正在显示
2 个修改的文件
包含
20 行增加
和
1 行删除
| @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
| 31 | // current release version | 31 | // current release version |
| 32 | #define VERSION_MAJOR "0" | 32 | #define VERSION_MAJOR "0" |
| 33 | #define VERSION_MINOR "9" | 33 | #define VERSION_MINOR "9" |
| 34 | -#define VERSION_REVISION "143" | 34 | +#define VERSION_REVISION "145" |
| 35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION | 35 | #define RTMP_SIG_SRS_VERSION VERSION_MAJOR"."VERSION_MINOR"."VERSION_REVISION |
| 36 | // server info. | 36 | // server info. |
| 37 | #define RTMP_SIG_SRS_KEY "SRS" | 37 | #define RTMP_SIG_SRS_KEY "SRS" |
| @@ -996,6 +996,21 @@ int SrsRtmpServer::identify_client(int stream_id, SrsRtmpConnType& type, string& | @@ -996,6 +996,21 @@ int SrsRtmpServer::identify_client(int stream_id, SrsRtmpConnType& type, string& | ||
| 996 | srs_info("level0 identify client by play."); | 996 | srs_info("level0 identify client by play."); |
| 997 | return identify_play_client(dynamic_cast<SrsPlayPacket*>(pkt), type, stream_name, duration); | 997 | return identify_play_client(dynamic_cast<SrsPlayPacket*>(pkt), type, stream_name, duration); |
| 998 | } | 998 | } |
| 999 | + // call msg, | ||
| 1000 | + // support response null first, | ||
| 1001 | + // @see https://github.com/winlinvip/simple-rtmp-server/issues/106 | ||
| 1002 | + // TODO: FIXME: response in right way, or forward in edge mode. | ||
| 1003 | + SrsCallPacket* call = dynamic_cast<SrsCallPacket*>(pkt); | ||
| 1004 | + if (call) { | ||
| 1005 | + SrsCallResPacket* res = new SrsCallResPacket(call->transaction_id); | ||
| 1006 | + res->command_object = SrsAmf0Any::null(); | ||
| 1007 | + res->response = SrsAmf0Any::null(); | ||
| 1008 | + if ((ret = protocol->send_and_free_packet(res, 0)) != ERROR_SUCCESS) { | ||
| 1009 | + srs_warn("response call failed. ret=%d", ret); | ||
| 1010 | + return ret; | ||
| 1011 | + } | ||
| 1012 | + continue; | ||
| 1013 | + } | ||
| 999 | 1014 | ||
| 1000 | srs_trace("ignore AMF0/AMF3 command message."); | 1015 | srs_trace("ignore AMF0/AMF3 command message."); |
| 1001 | } | 1016 | } |
| @@ -1387,6 +1402,10 @@ int SrsRtmpServer::identify_create_stream_client(SrsCreateStreamPacket* req, int | @@ -1387,6 +1402,10 @@ int SrsRtmpServer::identify_create_stream_client(SrsCreateStreamPacket* req, int | ||
| 1387 | srs_info("identify client by publish, falsh publish."); | 1402 | srs_info("identify client by publish, falsh publish."); |
| 1388 | return identify_flash_publish_client(dynamic_cast<SrsPublishPacket*>(pkt), type, stream_name); | 1403 | return identify_flash_publish_client(dynamic_cast<SrsPublishPacket*>(pkt), type, stream_name); |
| 1389 | } | 1404 | } |
| 1405 | + if (dynamic_cast<SrsCreateStreamPacket*>(pkt)) { | ||
| 1406 | + srs_info("identify client by create stream, play or flash publish."); | ||
| 1407 | + return identify_create_stream_client(dynamic_cast<SrsCreateStreamPacket*>(pkt), stream_id, type, stream_name, duration); | ||
| 1408 | + } | ||
| 1390 | 1409 | ||
| 1391 | srs_trace("ignore AMF0/AMF3 command message."); | 1410 | srs_trace("ignore AMF0/AMF3 command message."); |
| 1392 | } | 1411 | } |
-
请 注册 或 登录 后发表评论