Loading media/libstagefright/omx/GraphicBufferSource.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,18 @@ void GraphicBufferSource::omxExecuting() { } } void GraphicBufferSource::omxIdle() { ALOGV("omxIdle"); Mutex::Autolock autoLock(mMutex); if (mExecuting) { // We are only interested in the transition from executing->idle, // not loaded->idle. mEndOfStream = mEndOfStreamSent = true; } } void GraphicBufferSource::omxLoaded(){ Mutex::Autolock autoLock(mMutex); if (!mExecuting) { Loading media/libstagefright/omx/GraphicBufferSource.h +5 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,11 @@ public: // sitting in the BufferQueue, this will send them to the codec. void omxExecuting(); // This is called when OMX transitions to OMX_StateIdle, indicating that // the codec is meant to return all buffers back to the client for them // to be freed. Do NOT submit any more buffers to the component. void omxIdle(); // This is called when OMX transitions to OMX_StateLoaded, indicating that // we are shutting down. void omxLoaded(); Loading media/libstagefright/omx/OMXNodeInstance.cpp +12 −7 Original line number Diff line number Diff line Loading @@ -243,13 +243,18 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { status_t OMXNodeInstance::sendCommand( OMX_COMMANDTYPE cmd, OMX_S32 param) { const sp<GraphicBufferSource>& bufferSource(getGraphicBufferSource()); if (bufferSource != NULL && cmd == OMX_CommandStateSet && param == OMX_StateLoaded) { // Initiating transition from Executing -> Loaded if (bufferSource != NULL && cmd == OMX_CommandStateSet) { if (param == OMX_StateIdle) { // Initiating transition from Executing -> Idle // ACodec is waiting for all buffers to be returned, do NOT // submit any more buffers to the codec. bufferSource->omxIdle(); } else if (param == OMX_StateLoaded) { // Initiating transition from Idle/Executing -> Loaded // Buffers are about to be freed. bufferSource->omxLoaded(); setGraphicBufferSource(NULL); } // fall through } Loading Loading
media/libstagefright/omx/GraphicBufferSource.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,18 @@ void GraphicBufferSource::omxExecuting() { } } void GraphicBufferSource::omxIdle() { ALOGV("omxIdle"); Mutex::Autolock autoLock(mMutex); if (mExecuting) { // We are only interested in the transition from executing->idle, // not loaded->idle. mEndOfStream = mEndOfStreamSent = true; } } void GraphicBufferSource::omxLoaded(){ Mutex::Autolock autoLock(mMutex); if (!mExecuting) { Loading
media/libstagefright/omx/GraphicBufferSource.h +5 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,11 @@ public: // sitting in the BufferQueue, this will send them to the codec. void omxExecuting(); // This is called when OMX transitions to OMX_StateIdle, indicating that // the codec is meant to return all buffers back to the client for them // to be freed. Do NOT submit any more buffers to the component. void omxIdle(); // This is called when OMX transitions to OMX_StateLoaded, indicating that // we are shutting down. void omxLoaded(); Loading
media/libstagefright/omx/OMXNodeInstance.cpp +12 −7 Original line number Diff line number Diff line Loading @@ -243,13 +243,18 @@ status_t OMXNodeInstance::freeNode(OMXMaster *master) { status_t OMXNodeInstance::sendCommand( OMX_COMMANDTYPE cmd, OMX_S32 param) { const sp<GraphicBufferSource>& bufferSource(getGraphicBufferSource()); if (bufferSource != NULL && cmd == OMX_CommandStateSet && param == OMX_StateLoaded) { // Initiating transition from Executing -> Loaded if (bufferSource != NULL && cmd == OMX_CommandStateSet) { if (param == OMX_StateIdle) { // Initiating transition from Executing -> Idle // ACodec is waiting for all buffers to be returned, do NOT // submit any more buffers to the codec. bufferSource->omxIdle(); } else if (param == OMX_StateLoaded) { // Initiating transition from Idle/Executing -> Loaded // Buffers are about to be freed. bufferSource->omxLoaded(); setGraphicBufferSource(NULL); } // fall through } Loading