正在显示
1 个修改的文件
包含
12 行增加
和
0 行删除
trunk/src/libs/srs_librtmp.cpp
100644 → 100755
| @@ -227,6 +227,18 @@ int srs_connect_app(srs_rtmp_t rtmp) | @@ -227,6 +227,18 @@ int srs_connect_app(srs_rtmp_t rtmp) | ||
| 227 | 227 | ||
| 228 | int srs_play_stream(srs_rtmp_t rtmp) | 228 | int srs_play_stream(srs_rtmp_t rtmp) |
| 229 | { | 229 | { |
| 230 | + int ret = ERROR_SUCCESS; | ||
| 231 | + | ||
| 232 | + srs_assert(rtmp != NULL); | ||
| 233 | + Context* context = (Context*)rtmp; | ||
| 234 | + | ||
| 235 | + if ((ret = context->rtmp->create_stream(context->stream_id)) != ERROR_SUCCESS) { | ||
| 236 | + return ret; | ||
| 237 | + } | ||
| 238 | + if ((ret = context->rtmp->play(context->stream, context->stream_id)) != ERROR_SUCCESS) { | ||
| 239 | + return ret; | ||
| 240 | + } | ||
| 241 | + | ||
| 230 | return ERROR_SUCCESS; | 242 | return ERROR_SUCCESS; |
| 231 | } | 243 | } |
| 232 | 244 |
-
请 注册 或 登录 后发表评论