正在显示
1 个修改的文件
包含
12 行增加
和
4 行删除
| @@ -48,11 +48,19 @@ int main(int argc, char** argv) | @@ -48,11 +48,19 @@ int main(int argc, char** argv) | ||
| 48 | rtmp = srs_rtmp_create("rtmp://127.0.0.1:1935/live/livestream"); | 48 | rtmp = srs_rtmp_create("rtmp://127.0.0.1:1935/live/livestream"); |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | - if (srs_simple_handshake(rtmp) != 0) { | ||
| 52 | - printf("simple handshake failed.\n"); | ||
| 53 | - goto rtmp_destroy; | 51 | + if (1) { |
| 52 | + if (srs_complex_handshake(rtmp) != 0) { | ||
| 53 | + printf("complex handshake failed.\n"); | ||
| 54 | + goto rtmp_destroy; | ||
| 55 | + } | ||
| 56 | + printf("complex handshake success\n"); | ||
| 57 | + } else { | ||
| 58 | + if (srs_simple_handshake(rtmp) != 0) { | ||
| 59 | + printf("simple handshake failed.\n"); | ||
| 60 | + goto rtmp_destroy; | ||
| 61 | + } | ||
| 62 | + printf("simple handshake success\n"); | ||
| 54 | } | 63 | } |
| 55 | - printf("simple handshake success\n"); | ||
| 56 | 64 | ||
| 57 | if (srs_connect_app(rtmp) != 0) { | 65 | if (srs_connect_app(rtmp) != 0) { |
| 58 | printf("connect vhost/app failed.\n"); | 66 | printf("connect vhost/app failed.\n"); |
-
请 注册 或 登录 后发表评论