status_t RtspMediaSource::start(MetaData* params) { ReentrantMonitorAutoEnter mon(mMonitor); if (!mIsStarted) { // RtspMediaSource relinquish the ownership of MediaBuffer |buf| to mGroup. mGroup = new MediaBufferGroup(); MediaBuffer* buf = new MediaBuffer(mFrameMaxSize); mGroup->add_buffer(buf); mIsStarted = true; } return OK; }