winlin

refine code, rename SrsRtmp to SrsRtmpServer.

@@ -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