mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
rename srs-client to srs-rtmp-conn
This commit is contained in:
parent
aa89f9f51e
commit
ab3c6c92a0
6 changed files with 62 additions and 57 deletions
|
@ -178,12 +178,12 @@ SrsResponse::~SrsResponse()
|
|||
{
|
||||
}
|
||||
|
||||
string srs_client_type_string(SrsClientType type)
|
||||
string srs_client_type_string(SrsRtmpConnType type)
|
||||
{
|
||||
switch (type) {
|
||||
case SrsClientPlay: return "Play";
|
||||
case SrsClientFlashPublish: return "FlashPublish";
|
||||
case SrsClientFMLEPublish: return "FMLEPublish";
|
||||
case SrsRtmpConnPlay: return "Play";
|
||||
case SrsRtmpConnFlashPublish: return "FlashPublish";
|
||||
case SrsRtmpConnFMLEPublish: return "FMLEPublish";
|
||||
default: return "Unknown";
|
||||
}
|
||||
return "Unknown";
|
||||
|
@ -947,9 +947,9 @@ int SrsRtmpServer::on_bw_done()
|
|||
return ret;
|
||||
}
|
||||
|
||||
int SrsRtmpServer::identify_client(int stream_id, SrsClientType& type, string& stream_name)
|
||||
int SrsRtmpServer::identify_client(int stream_id, SrsRtmpConnType& type, string& stream_name)
|
||||
{
|
||||
type = SrsClientUnknown;
|
||||
type = SrsRtmpConnUnknown;
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
while (true) {
|
||||
|
@ -1380,7 +1380,7 @@ int SrsRtmpServer::start_flash_publish(int stream_id)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int SrsRtmpServer::identify_create_stream_client(SrsCreateStreamPacket* req, int stream_id, SrsClientType& type, string& stream_name)
|
||||
int SrsRtmpServer::identify_create_stream_client(SrsCreateStreamPacket* req, int stream_id, SrsRtmpConnType& type, string& stream_name)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
@ -1433,11 +1433,11 @@ int SrsRtmpServer::identify_create_stream_client(SrsCreateStreamPacket* req, int
|
|||
return ret;
|
||||
}
|
||||
|
||||
int SrsRtmpServer::identify_fmle_publish_client(SrsFMLEStartPacket* req, SrsClientType& type, string& stream_name)
|
||||
int SrsRtmpServer::identify_fmle_publish_client(SrsFMLEStartPacket* req, SrsRtmpConnType& type, string& stream_name)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
type = SrsClientFMLEPublish;
|
||||
type = SrsRtmpConnFMLEPublish;
|
||||
stream_name = req->stream_name;
|
||||
|
||||
// releaseStream response
|
||||
|
@ -1457,21 +1457,21 @@ int SrsRtmpServer::identify_fmle_publish_client(SrsFMLEStartPacket* req, SrsClie
|
|||
return ret;
|
||||
}
|
||||
|
||||
int SrsRtmpServer::identify_flash_publish_client(SrsPublishPacket* req, SrsClientType& type, string& stream_name)
|
||||
int SrsRtmpServer::identify_flash_publish_client(SrsPublishPacket* req, SrsRtmpConnType& type, string& stream_name)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
type = SrsClientFlashPublish;
|
||||
type = SrsRtmpConnFlashPublish;
|
||||
stream_name = req->stream_name;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SrsRtmpServer::identify_play_client(SrsPlayPacket* req, SrsClientType& type, string& stream_name)
|
||||
int SrsRtmpServer::identify_play_client(SrsPlayPacket* req, SrsRtmpConnType& type, string& stream_name)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
type = SrsClientPlay;
|
||||
type = SrsRtmpConnPlay;
|
||||
stream_name = req->stream_name;
|
||||
|
||||
srs_trace("identity client type=play, stream_name=%s", stream_name.c_str());
|
||||
|
|
|
@ -101,14 +101,14 @@ struct SrsResponse
|
|||
/**
|
||||
* the rtmp client type.
|
||||
*/
|
||||
enum SrsClientType
|
||||
enum SrsRtmpConnType
|
||||
{
|
||||
SrsClientUnknown,
|
||||
SrsClientPlay,
|
||||
SrsClientFMLEPublish,
|
||||
SrsClientFlashPublish,
|
||||
SrsRtmpConnUnknown,
|
||||
SrsRtmpConnPlay,
|
||||
SrsRtmpConnFMLEPublish,
|
||||
SrsRtmpConnFlashPublish,
|
||||
};
|
||||
std::string srs_client_type_string(SrsClientType type);
|
||||
std::string srs_client_type_string(SrsRtmpConnType type);
|
||||
|
||||
/**
|
||||
* store the handshake bytes,
|
||||
|
@ -223,7 +223,7 @@ public:
|
|||
* the stream_id used to response the createStream request.
|
||||
* @type, output the client type.
|
||||
*/
|
||||
virtual int identify_client(int stream_id, SrsClientType& type, std::string& stream_name);
|
||||
virtual int identify_client(int stream_id, SrsRtmpConnType& type, std::string& stream_name);
|
||||
/**
|
||||
* set the chunk size when client type identified.
|
||||
*/
|
||||
|
@ -267,11 +267,11 @@ public:
|
|||
*/
|
||||
virtual int start_flash_publish(int stream_id);
|
||||
private:
|
||||
virtual int identify_create_stream_client(SrsCreateStreamPacket* req, int stream_id, SrsClientType& type, std::string& stream_name);
|
||||
virtual int identify_fmle_publish_client(SrsFMLEStartPacket* req, SrsClientType& type, std::string& stream_name);
|
||||
virtual int identify_flash_publish_client(SrsPublishPacket* req, SrsClientType& type, std::string& stream_name);
|
||||
virtual int identify_create_stream_client(SrsCreateStreamPacket* req, int stream_id, SrsRtmpConnType& type, std::string& stream_name);
|
||||
virtual int identify_fmle_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, SrsClientType& type, std::string& stream_name);
|
||||
virtual int identify_play_client(SrsPlayPacket* req, SrsRtmpConnType& type, std::string& stream_name);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue