1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Fix #844, support Haivision encoder. 2.0.238

This commit is contained in:
winlin 2017-04-15 20:44:02 +08:00
parent 1c139d8fd8
commit 33a0abdeff
6 changed files with 112 additions and 3 deletions

View file

@ -69,6 +69,7 @@ class SrsCommonMessage;
class SrsPacket;
class SrsAmf0Object;
class IMergeReadHandler;
class SrsCallPacket;
/****************************************************************************
*****************************************************************************
@ -631,6 +632,7 @@ enum SrsRtmpConnType
SrsRtmpConnPlay,
SrsRtmpConnFMLEPublish,
SrsRtmpConnFlashPublish,
SrsRtmpConnHaivisionPublish,
};
std::string srs_client_type_string(SrsRtmpConnType type);
bool srs_client_type_is_publish(SrsRtmpConnType type);
@ -989,6 +991,11 @@ public:
* onStatus(NetStream.Publish.Start)
*/
virtual int start_fmle_publish(int stream_id);
/**
* For encoder of Haivision, response the startup request.
* @see https://github.com/ossrs/srs/issues/844
*/
virtual int start_haivision_publish(int stream_id);
/**
* process the FMLE unpublish event.
* @unpublish_tid the unpublish request transaction id.
@ -1025,6 +1032,7 @@ public:
private:
virtual int identify_create_stream_client(SrsCreateStreamPacket* req, int stream_id, SrsRtmpConnType& type, std::string& stream_name, double& duration);
virtual int identify_fmle_publish_client(SrsFMLEStartPacket* req, SrsRtmpConnType& type, std::string& stream_name);
virtual int identify_haivision_publish_client(SrsFMLEStartPacket* req, SrsRtmpConnType& type, std::string& stream_name);
virtual int identify_flash_publish_client(SrsPublishPacket* req, SrsRtmpConnType& type, std::string& stream_name);
private:
virtual int identify_play_client(SrsPlayPacket* req, SrsRtmpConnType& type, std::string& stream_name, double& duration);
@ -1293,7 +1301,7 @@ public:
};
/**
* FMLE start publish: ReleaseStream/PublishStream
* FMLE start publish: ReleaseStream/PublishStream/FCPublish/FCUnpublish
*/
class SrsFMLEStartPacket : public SrsPacket
{