正在显示
4 个修改的文件
包含
18 行增加
和
18 行删除
| @@ -198,7 +198,7 @@ int SrsBandwidth::do_bandwidth_check() | @@ -198,7 +198,7 @@ int SrsBandwidth::do_bandwidth_check() | ||
| 198 | while (true) { | 198 | while (true) { |
| 199 | SrsMessage* msg = NULL; | 199 | SrsMessage* msg = NULL; |
| 200 | SrsBandwidthPacket* pkt = NULL; | 200 | SrsBandwidthPacket* pkt = NULL; |
| 201 | - if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 201 | + if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 202 | // info level to ignore and return success. | 202 | // info level to ignore and return success. |
| 203 | srs_info("expect final message failed. ret=%d", ret); | 203 | srs_info("expect final message failed. ret=%d", ret); |
| 204 | return ERROR_SUCCESS; | 204 | return ERROR_SUCCESS; |
| @@ -244,7 +244,7 @@ int SrsBandwidth::check_play( | @@ -244,7 +244,7 @@ int SrsBandwidth::check_play( | ||
| 244 | // recv client's starting play response | 244 | // recv client's starting play response |
| 245 | SrsMessage* msg = NULL; | 245 | SrsMessage* msg = NULL; |
| 246 | SrsBandwidthPacket* pkt = NULL; | 246 | SrsBandwidthPacket* pkt = NULL; |
| 247 | - if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 247 | + if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 248 | srs_error("expect bandwidth message failed. ret=%d", ret); | 248 | srs_error("expect bandwidth message failed. ret=%d", ret); |
| 249 | return ret; | 249 | return ret; |
| 250 | } | 250 | } |
| @@ -325,7 +325,7 @@ int SrsBandwidth::check_play( | @@ -325,7 +325,7 @@ int SrsBandwidth::check_play( | ||
| 325 | // recv client's stop play response. | 325 | // recv client's stop play response. |
| 326 | SrsMessage* msg = NULL; | 326 | SrsMessage* msg = NULL; |
| 327 | SrsBandwidthPacket* pkt = NULL; | 327 | SrsBandwidthPacket* pkt = NULL; |
| 328 | - if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 328 | + if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 329 | srs_error("expect bandwidth message failed. ret=%d", ret); | 329 | srs_error("expect bandwidth message failed. ret=%d", ret); |
| 330 | return ret; | 330 | return ret; |
| 331 | } | 331 | } |
| @@ -368,7 +368,7 @@ int SrsBandwidth::check_publish( | @@ -368,7 +368,7 @@ int SrsBandwidth::check_publish( | ||
| 368 | // read client's notification of starting publish | 368 | // read client's notification of starting publish |
| 369 | SrsMessage* msg = NULL; | 369 | SrsMessage* msg = NULL; |
| 370 | SrsBandwidthPacket* pkt = NULL; | 370 | SrsBandwidthPacket* pkt = NULL; |
| 371 | - if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 371 | + if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 372 | srs_error("expect bandwidth message failed. ret=%d", ret); | 372 | srs_error("expect bandwidth message failed. ret=%d", ret); |
| 373 | return ret; | 373 | return ret; |
| 374 | } | 374 | } |
| @@ -436,7 +436,7 @@ int SrsBandwidth::check_publish( | @@ -436,7 +436,7 @@ int SrsBandwidth::check_publish( | ||
| 436 | // recv client's stop publish response. | 436 | // recv client's stop publish response. |
| 437 | SrsMessage* msg = NULL; | 437 | SrsMessage* msg = NULL; |
| 438 | SrsBandwidthPacket* pkt = NULL; | 438 | SrsBandwidthPacket* pkt = NULL; |
| 439 | - if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 439 | + if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 440 | srs_error("expect bandwidth message failed. ret=%d", ret); | 440 | srs_error("expect bandwidth message failed. ret=%d", ret); |
| 441 | return ret; | 441 | return ret; |
| 442 | } | 442 | } |
| @@ -344,7 +344,7 @@ int SrsBandCheckClient::expect_start_play() | @@ -344,7 +344,7 @@ int SrsBandCheckClient::expect_start_play() | ||
| 344 | // expect connect _result | 344 | // expect connect _result |
| 345 | SrsMessage* msg = NULL; | 345 | SrsMessage* msg = NULL; |
| 346 | SrsBandwidthPacket* pkt = NULL; | 346 | SrsBandwidthPacket* pkt = NULL; |
| 347 | - if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 347 | + if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 348 | srs_error("expect bandcheck start play message failed. ret=%d", ret); | 348 | srs_error("expect bandcheck start play message failed. ret=%d", ret); |
| 349 | return ret; | 349 | return ret; |
| 350 | } | 350 | } |
| @@ -381,7 +381,7 @@ int SrsBandCheckClient::expect_stop_play() | @@ -381,7 +381,7 @@ int SrsBandCheckClient::expect_stop_play() | ||
| 381 | while (true) { | 381 | while (true) { |
| 382 | SrsMessage* msg = NULL; | 382 | SrsMessage* msg = NULL; |
| 383 | SrsBandwidthPacket* pkt = NULL; | 383 | SrsBandwidthPacket* pkt = NULL; |
| 384 | - if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 384 | + if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 385 | srs_error("expect stop play message failed. ret=%d", ret); | 385 | srs_error("expect stop play message failed. ret=%d", ret); |
| 386 | return ret; | 386 | return ret; |
| 387 | } | 387 | } |
| @@ -418,7 +418,7 @@ int SrsBandCheckClient::expect_start_pub() | @@ -418,7 +418,7 @@ int SrsBandCheckClient::expect_start_pub() | ||
| 418 | while (true) { | 418 | while (true) { |
| 419 | SrsMessage* msg = NULL; | 419 | SrsMessage* msg = NULL; |
| 420 | SrsBandwidthPacket* pkt = NULL; | 420 | SrsBandwidthPacket* pkt = NULL; |
| 421 | - if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 421 | + if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 422 | srs_error("expect start pub message failed. ret=%d", ret); | 422 | srs_error("expect start pub message failed. ret=%d", ret); |
| 423 | return ret; | 423 | return ret; |
| 424 | } | 424 | } |
| @@ -488,7 +488,7 @@ int SrsBandCheckClient::expect_stop_pub() | @@ -488,7 +488,7 @@ int SrsBandCheckClient::expect_stop_pub() | ||
| 488 | 488 | ||
| 489 | SrsMessage* msg; | 489 | SrsMessage* msg; |
| 490 | SrsBandwidthPacket* pkt; | 490 | SrsBandwidthPacket* pkt; |
| 491 | - if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(this->protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 491 | + if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(this->protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 492 | return ret; | 492 | return ret; |
| 493 | } | 493 | } |
| 494 | SrsAutoFree(SrsMessage, msg, false); | 494 | SrsAutoFree(SrsMessage, msg, false); |
| @@ -507,7 +507,7 @@ int SrsBandCheckClient::expect_finished() | @@ -507,7 +507,7 @@ int SrsBandCheckClient::expect_finished() | ||
| 507 | while (true) { | 507 | while (true) { |
| 508 | SrsMessage* msg = NULL; | 508 | SrsMessage* msg = NULL; |
| 509 | SrsBandwidthPacket* pkt = NULL; | 509 | SrsBandwidthPacket* pkt = NULL; |
| 510 | - if ((ret = __srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 510 | + if ((ret = srs_rtmp_expect_message<SrsBandwidthPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 511 | srs_error("expect finished message failed. ret=%d", ret); | 511 | srs_error("expect finished message failed. ret=%d", ret); |
| 512 | return ret; | 512 | return ret; |
| 513 | } | 513 | } |
| @@ -482,7 +482,7 @@ int SrsRtmpClient::connect_app(string app, string tc_url) | @@ -482,7 +482,7 @@ int SrsRtmpClient::connect_app(string app, string tc_url) | ||
| 482 | // expect connect _result | 482 | // expect connect _result |
| 483 | SrsMessage* msg = NULL; | 483 | SrsMessage* msg = NULL; |
| 484 | SrsConnectAppResPacket* pkt = NULL; | 484 | SrsConnectAppResPacket* pkt = NULL; |
| 485 | - if ((ret = __srs_rtmp_expect_message<SrsConnectAppResPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 485 | + if ((ret = srs_rtmp_expect_message<SrsConnectAppResPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 486 | srs_error("expect connect app response message failed. ret=%d", ret); | 486 | srs_error("expect connect app response message failed. ret=%d", ret); |
| 487 | return ret; | 487 | return ret; |
| 488 | } | 488 | } |
| @@ -509,7 +509,7 @@ int SrsRtmpClient::create_stream(int& stream_id) | @@ -509,7 +509,7 @@ int SrsRtmpClient::create_stream(int& stream_id) | ||
| 509 | if (true) { | 509 | if (true) { |
| 510 | SrsMessage* msg = NULL; | 510 | SrsMessage* msg = NULL; |
| 511 | SrsCreateStreamResPacket* pkt = NULL; | 511 | SrsCreateStreamResPacket* pkt = NULL; |
| 512 | - if ((ret = __srs_rtmp_expect_message<SrsCreateStreamResPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 512 | + if ((ret = srs_rtmp_expect_message<SrsCreateStreamResPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 513 | srs_error("expect create stream response message failed. ret=%d", ret); | 513 | srs_error("expect create stream response message failed. ret=%d", ret); |
| 514 | return ret; | 514 | return ret; |
| 515 | } | 515 | } |
| @@ -643,7 +643,7 @@ int SrsRtmpClient::fmle_publish(string stream, int& stream_id) | @@ -643,7 +643,7 @@ int SrsRtmpClient::fmle_publish(string stream, int& stream_id) | ||
| 643 | if (true) { | 643 | if (true) { |
| 644 | SrsMessage* msg = NULL; | 644 | SrsMessage* msg = NULL; |
| 645 | SrsCreateStreamResPacket* pkt = NULL; | 645 | SrsCreateStreamResPacket* pkt = NULL; |
| 646 | - if ((ret = __srs_rtmp_expect_message<SrsCreateStreamResPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 646 | + if ((ret = srs_rtmp_expect_message<SrsCreateStreamResPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 647 | srs_error("expect create stream response message failed. ret=%d", ret); | 647 | srs_error("expect create stream response message failed. ret=%d", ret); |
| 648 | return ret; | 648 | return ret; |
| 649 | } | 649 | } |
| @@ -774,7 +774,7 @@ int SrsRtmpServer::connect_app(SrsRequest* req) | @@ -774,7 +774,7 @@ int SrsRtmpServer::connect_app(SrsRequest* req) | ||
| 774 | 774 | ||
| 775 | SrsMessage* msg = NULL; | 775 | SrsMessage* msg = NULL; |
| 776 | SrsConnectAppPacket* pkt = NULL; | 776 | SrsConnectAppPacket* pkt = NULL; |
| 777 | - if ((ret = __srs_rtmp_expect_message<SrsConnectAppPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 777 | + if ((ret = srs_rtmp_expect_message<SrsConnectAppPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 778 | srs_error("expect connect app message failed. ret=%d", ret); | 778 | srs_error("expect connect app message failed. ret=%d", ret); |
| 779 | return ret; | 779 | return ret; |
| 780 | } | 780 | } |
| @@ -1128,7 +1128,7 @@ int SrsRtmpServer::start_fmle_publish(int stream_id) | @@ -1128,7 +1128,7 @@ int SrsRtmpServer::start_fmle_publish(int stream_id) | ||
| 1128 | if (true) { | 1128 | if (true) { |
| 1129 | SrsMessage* msg = NULL; | 1129 | SrsMessage* msg = NULL; |
| 1130 | SrsFMLEStartPacket* pkt = NULL; | 1130 | SrsFMLEStartPacket* pkt = NULL; |
| 1131 | - if ((ret = __srs_rtmp_expect_message<SrsFMLEStartPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 1131 | + if ((ret = srs_rtmp_expect_message<SrsFMLEStartPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 1132 | srs_error("recv FCPublish message failed. ret=%d", ret); | 1132 | srs_error("recv FCPublish message failed. ret=%d", ret); |
| 1133 | return ret; | 1133 | return ret; |
| 1134 | } | 1134 | } |
| @@ -1154,7 +1154,7 @@ int SrsRtmpServer::start_fmle_publish(int stream_id) | @@ -1154,7 +1154,7 @@ int SrsRtmpServer::start_fmle_publish(int stream_id) | ||
| 1154 | if (true) { | 1154 | if (true) { |
| 1155 | SrsMessage* msg = NULL; | 1155 | SrsMessage* msg = NULL; |
| 1156 | SrsCreateStreamPacket* pkt = NULL; | 1156 | SrsCreateStreamPacket* pkt = NULL; |
| 1157 | - if ((ret = __srs_rtmp_expect_message<SrsCreateStreamPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 1157 | + if ((ret = srs_rtmp_expect_message<SrsCreateStreamPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 1158 | srs_error("recv createStream message failed. ret=%d", ret); | 1158 | srs_error("recv createStream message failed. ret=%d", ret); |
| 1159 | return ret; | 1159 | return ret; |
| 1160 | } | 1160 | } |
| @@ -1179,7 +1179,7 @@ int SrsRtmpServer::start_fmle_publish(int stream_id) | @@ -1179,7 +1179,7 @@ int SrsRtmpServer::start_fmle_publish(int stream_id) | ||
| 1179 | if (true) { | 1179 | if (true) { |
| 1180 | SrsMessage* msg = NULL; | 1180 | SrsMessage* msg = NULL; |
| 1181 | SrsPublishPacket* pkt = NULL; | 1181 | SrsPublishPacket* pkt = NULL; |
| 1182 | - if ((ret = __srs_rtmp_expect_message<SrsPublishPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { | 1182 | + if ((ret = srs_rtmp_expect_message<SrsPublishPacket>(protocol, &msg, &pkt)) != ERROR_SUCCESS) { |
| 1183 | srs_error("recv publish message failed. ret=%d", ret); | 1183 | srs_error("recv publish message failed. ret=%d", ret); |
| 1184 | return ret; | 1184 | return ret; |
| 1185 | } | 1185 | } |
| @@ -1151,7 +1151,7 @@ protected: | @@ -1151,7 +1151,7 @@ protected: | ||
| 1151 | * if need to set timeout, use set timeout of SrsProtocol. | 1151 | * if need to set timeout, use set timeout of SrsProtocol. |
| 1152 | */ | 1152 | */ |
| 1153 | template<class T> | 1153 | template<class T> |
| 1154 | -int __srs_rtmp_expect_message(SrsProtocol* protocol, SrsMessage** pmsg, T** ppacket) | 1154 | +int srs_rtmp_expect_message(SrsProtocol* protocol, SrsMessage** pmsg, T** ppacket) |
| 1155 | { | 1155 | { |
| 1156 | *pmsg = NULL; | 1156 | *pmsg = NULL; |
| 1157 | *ppacket = NULL; | 1157 | *ppacket = NULL; |
-
请 注册 或 登录 后发表评论