mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
rename __srs_rtmp_expect_message to srs_rtmp_expect_message
This commit is contained in:
parent
5b98a27256
commit
b53f83acf1
4 changed files with 18 additions and 18 deletions
|
@ -198,7 +198,7 @@ int SrsBandwidth::do_bandwidth_check()
|
||||||
while (true) {
|
while (true) {
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsBandwidthPacket* pkt = NULL;
|
SrsBandwidthPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
// info level to ignore and return success.
|
// info level to ignore and return success.
|
||||||
srs_info("expect final message failed. ret=%d", ret);
|
srs_info("expect final message failed. ret=%d", ret);
|
||||||
return ERROR_SUCCESS;
|
return ERROR_SUCCESS;
|
||||||
|
@ -244,7 +244,7 @@ int SrsBandwidth::check_play(
|
||||||
// recv client's starting play response
|
// recv client's starting play response
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsBandwidthPacket* pkt = NULL;
|
SrsBandwidthPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("expect bandwidth message failed. ret=%d", ret);
|
srs_error("expect bandwidth message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -325,7 +325,7 @@ int SrsBandwidth::check_play(
|
||||||
// recv client's stop play response.
|
// recv client's stop play response.
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsBandwidthPacket* pkt = NULL;
|
SrsBandwidthPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("expect bandwidth message failed. ret=%d", ret);
|
srs_error("expect bandwidth message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -368,7 +368,7 @@ int SrsBandwidth::check_publish(
|
||||||
// read client's notification of starting publish
|
// read client's notification of starting publish
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsBandwidthPacket* pkt = NULL;
|
SrsBandwidthPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("expect bandwidth message failed. ret=%d", ret);
|
srs_error("expect bandwidth message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -436,7 +436,7 @@ int SrsBandwidth::check_publish(
|
||||||
// recv client's stop publish response.
|
// recv client's stop publish response.
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsBandwidthPacket* pkt = NULL;
|
SrsBandwidthPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("expect bandwidth message failed. ret=%d", ret);
|
srs_error("expect bandwidth message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -344,7 +344,7 @@ int SrsBandCheckClient::expect_start_play()
|
||||||
// expect connect _result
|
// expect connect _result
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsBandwidthPacket* pkt = NULL;
|
SrsBandwidthPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("expect bandcheck start play message failed. ret=%d", ret);
|
srs_error("expect bandcheck start play message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -381,7 +381,7 @@ int SrsBandCheckClient::expect_stop_play()
|
||||||
while (true) {
|
while (true) {
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsBandwidthPacket* pkt = NULL;
|
SrsBandwidthPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("expect stop play message failed. ret=%d", ret);
|
srs_error("expect stop play message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -418,7 +418,7 @@ int SrsBandCheckClient::expect_start_pub()
|
||||||
while (true) {
|
while (true) {
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsBandwidthPacket* pkt = NULL;
|
SrsBandwidthPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("expect start pub message failed. ret=%d", ret);
|
srs_error("expect start pub message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -488,7 +488,7 @@ int SrsBandCheckClient::expect_stop_pub()
|
||||||
|
|
||||||
SrsMessage* msg;
|
SrsMessage* msg;
|
||||||
SrsBandwidthPacket* pkt;
|
SrsBandwidthPacket* pkt;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(this->protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(this->protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
SrsAutoFree(SrsMessage, msg, false);
|
SrsAutoFree(SrsMessage, msg, false);
|
||||||
|
@ -507,7 +507,7 @@ int SrsBandCheckClient::expect_finished()
|
||||||
while (true) {
|
while (true) {
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsBandwidthPacket* pkt = NULL;
|
SrsBandwidthPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("expect finished message failed. ret=%d", ret);
|
srs_error("expect finished message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -482,7 +482,7 @@ int SrsRtmpClient::connect_app(string app, string tc_url)
|
||||||
// expect connect _result
|
// expect connect _result
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsConnectAppResPacket* pkt = NULL;
|
SrsConnectAppResPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsConnectAppResPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsConnectAppResPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("expect connect app response message failed. ret=%d", ret);
|
srs_error("expect connect app response message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -509,7 +509,7 @@ int SrsRtmpClient::create_stream(int& stream_id)
|
||||||
if (true) {
|
if (true) {
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsCreateStreamResPacket* pkt = NULL;
|
SrsCreateStreamResPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsCreateStreamResPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsCreateStreamResPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("expect create stream response message failed. ret=%d", ret);
|
srs_error("expect create stream response message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -643,7 +643,7 @@ int SrsRtmpClient::fmle_publish(string stream, int& stream_id)
|
||||||
if (true) {
|
if (true) {
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsCreateStreamResPacket* pkt = NULL;
|
SrsCreateStreamResPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsCreateStreamResPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsCreateStreamResPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("expect create stream response message failed. ret=%d", ret);
|
srs_error("expect create stream response message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -774,7 +774,7 @@ int SrsRtmpServer::connect_app(SrsRequest* req)
|
||||||
|
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsConnectAppPacket* pkt = NULL;
|
SrsConnectAppPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsConnectAppPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsConnectAppPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("expect connect app message failed. ret=%d", ret);
|
srs_error("expect connect app message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1128,7 +1128,7 @@ int SrsRtmpServer::start_fmle_publish(int stream_id)
|
||||||
if (true) {
|
if (true) {
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsFMLEStartPacket* pkt = NULL;
|
SrsFMLEStartPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsFMLEStartPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsFMLEStartPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("recv FCPublish message failed. ret=%d", ret);
|
srs_error("recv FCPublish message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1154,7 +1154,7 @@ int SrsRtmpServer::start_fmle_publish(int stream_id)
|
||||||
if (true) {
|
if (true) {
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsCreateStreamPacket* pkt = NULL;
|
SrsCreateStreamPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsCreateStreamPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsCreateStreamPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("recv createStream message failed. ret=%d", ret);
|
srs_error("recv createStream message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1179,7 +1179,7 @@ int SrsRtmpServer::start_fmle_publish(int stream_id)
|
||||||
if (true) {
|
if (true) {
|
||||||
SrsMessage* msg = NULL;
|
SrsMessage* msg = NULL;
|
||||||
SrsPublishPacket* pkt = NULL;
|
SrsPublishPacket* pkt = NULL;
|
||||||
if ((ret = __srs_rtmp_expect_message<SrsPublishPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
if ((ret = srs_rtmp_expect_message<SrsPublishPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) {
|
||||||
srs_error("recv publish message failed. ret=%d", ret);
|
srs_error("recv publish message failed. ret=%d", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1151,7 +1151,7 @@ protected:
|
||||||
* if need to set timeout, use set timeout of SrsProtocol.
|
* if need to set timeout, use set timeout of SrsProtocol.
|
||||||
*/
|
*/
|
||||||
template<class T>
|
template<class T>
|
||||||
int __srs_rtmp_expect_message(SrsProtocol* protocol, SrsMessage** pmsg, T** ppacket)
|
int srs_rtmp_expect_message(SrsProtocol* protocol, SrsMessage** pmsg, T** ppacket)
|
||||||
{
|
{
|
||||||
*pmsg = NULL;
|
*pmsg = NULL;
|
||||||
*ppacket = NULL;
|
*ppacket = NULL;
|
||||||
|
|
Loading…
Reference in a new issue