mirror of
https://github.com/ossrs/srs.git
synced 2025-02-14 12:21:55 +00:00
add chad.wang to authors for srs-librtmp on windows build project
This commit is contained in:
parent
a63a3812e3
commit
a2f317a113
5 changed files with 56 additions and 3 deletions
|
@ -6,3 +6,4 @@ Authors ordered by first contribution.
|
|||
* naijia.liu<youngcow@youngcow.net>
|
||||
* alcoholyi<alcoholyi@qq.com>
|
||||
* byteman<wangchen2011@gmail.com>
|
||||
* chad.wang<chad.wang.cn@gmail.com>
|
||||
|
|
|
@ -23,3 +23,20 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include <srs_app_edge.hpp>
|
||||
|
||||
#include <srs_kernel_error.hpp>
|
||||
|
||||
SrsEdge::SrsEdge()
|
||||
{
|
||||
state = SrsEdgeStateInit;
|
||||
}
|
||||
|
||||
SrsEdge::~SrsEdge()
|
||||
{
|
||||
}
|
||||
|
||||
int SrsEdge::on_client_play()
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,4 +30,34 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include <srs_core.hpp>
|
||||
|
||||
#endif
|
||||
/**
|
||||
* the state of edge
|
||||
*/
|
||||
enum SrsEdgeState
|
||||
{
|
||||
SrsEdgeStateInit = 0,
|
||||
SrsEdgeStatePlay = 100,
|
||||
SrsEdgeStatePublish,
|
||||
SrsEdgeStateConnected,
|
||||
SrsEdgeStateAborting,
|
||||
SrsEdgeStateReloading,
|
||||
};
|
||||
|
||||
/**
|
||||
* edge control service.
|
||||
*/
|
||||
class SrsEdge
|
||||
{
|
||||
private:
|
||||
SrsEdgeState state;
|
||||
public:
|
||||
SrsEdge();
|
||||
virtual ~SrsEdge();
|
||||
public:
|
||||
/**
|
||||
* when client play stream on edge.
|
||||
*/
|
||||
virtual int on_client_play();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -38,6 +38,7 @@ using namespace std;
|
|||
#include <srs_protocol_rtmp.hpp>
|
||||
#include <srs_app_dvr.hpp>
|
||||
#include <srs_kernel_stream.hpp>
|
||||
#include <srs_app_edge.hpp>
|
||||
|
||||
#define CONST_MAX_JITTER_MS 500
|
||||
#define DEFAULT_FRAME_TIME_MS 40
|
||||
|
@ -455,6 +456,7 @@ SrsSource::SrsSource(SrsRequest* _req)
|
|||
frame_rate = sample_rate = 0;
|
||||
_can_publish = true;
|
||||
|
||||
edge = new SrsEdge();
|
||||
gop_cache = new SrsGopCache();
|
||||
|
||||
_srs_config->subscribe(this);
|
||||
|
@ -487,6 +489,7 @@ SrsSource::~SrsSource()
|
|||
srs_freep(cache_sh_video);
|
||||
srs_freep(cache_sh_audio);
|
||||
|
||||
srs_freep(edge);
|
||||
srs_freep(gop_cache);
|
||||
|
||||
#ifdef SRS_AUTO_HLS
|
||||
|
@ -1177,8 +1180,7 @@ bool SrsSource::is_atc()
|
|||
|
||||
int SrsSource::on_edge_play_stream()
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
return ret;
|
||||
return edge->on_client_play();
|
||||
}
|
||||
|
||||
int SrsSource::create_forwarders()
|
||||
|
|
|
@ -37,6 +37,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <srs_app_st.hpp>
|
||||
#include <srs_app_reload.hpp>
|
||||
|
||||
class SrsEdge;
|
||||
class SrsSource;
|
||||
class SrsCommonMessage;
|
||||
class SrsOnMetaDataPacket;
|
||||
|
@ -234,6 +235,8 @@ private:
|
|||
#ifdef SRS_AUTO_TRANSCODE
|
||||
SrsEncoder* encoder;
|
||||
#endif
|
||||
// edge control service
|
||||
SrsEdge* edge;
|
||||
// gop cache for client fast startup.
|
||||
SrsGopCache* gop_cache;
|
||||
// to forward stream to other servers
|
||||
|
|
Loading…
Reference in a new issue