mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
use complex handshake for srs play
This commit is contained in:
parent
f5f29e486f
commit
b2aab8804b
1 changed files with 12 additions and 4 deletions
|
@ -48,11 +48,19 @@ int main(int argc, char** argv)
|
||||||
rtmp = srs_rtmp_create("rtmp://127.0.0.1:1935/live/livestream");
|
rtmp = srs_rtmp_create("rtmp://127.0.0.1:1935/live/livestream");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (srs_simple_handshake(rtmp) != 0) {
|
if (1) {
|
||||||
printf("simple handshake failed.\n");
|
if (srs_complex_handshake(rtmp) != 0) {
|
||||||
goto rtmp_destroy;
|
printf("complex handshake failed.\n");
|
||||||
|
goto rtmp_destroy;
|
||||||
|
}
|
||||||
|
printf("complex handshake success\n");
|
||||||
|
} else {
|
||||||
|
if (srs_simple_handshake(rtmp) != 0) {
|
||||||
|
printf("simple handshake failed.\n");
|
||||||
|
goto rtmp_destroy;
|
||||||
|
}
|
||||||
|
printf("simple handshake success\n");
|
||||||
}
|
}
|
||||||
printf("simple handshake success\n");
|
|
||||||
|
|
||||||
if (srs_connect_app(rtmp) != 0) {
|
if (srs_connect_app(rtmp) != 0) {
|
||||||
printf("connect vhost/app failed.\n");
|
printf("connect vhost/app failed.\n");
|
||||||
|
|
Loading…
Reference in a new issue