diff options
author | Andreas Huber <andih@google.com> | 2013-11-07 11:13:27 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2013-11-07 13:50:18 -0800 |
commit | ad3b7e8d40bf1c97347f1538d30bba78ca371f67 (patch) | |
tree | 4f3b8ec0d04db8a0c8ab26bb8c0ee7addaf3930f /media/libstagefright/omx/GraphicBufferSource.cpp | |
parent | f8a1169d98a09d1473f289c363353d08301576f6 (diff) | |
download | frameworks_av-ad3b7e8d40bf1c97347f1538d30bba78ca371f67.zip frameworks_av-ad3b7e8d40bf1c97347f1538d30bba78ca371f67.tar.gz frameworks_av-ad3b7e8d40bf1c97347f1538d30bba78ca371f67.tar.bz2 |
Properly handle executing->idle in GraphicBufferSource
ACodec has initiated the transition from exectuing->idle and is waiting
for the component to return all buffers so they can be freed.
It's counter productive and with some vendors harmful to submit additional
buffers to the component from this point on.
Change-Id: I332be254a1faf94902c77b5792a373ab447e44d3
related-to-bug: 11573543
Diffstat (limited to 'media/libstagefright/omx/GraphicBufferSource.cpp')
-rw-r--r-- | media/libstagefright/omx/GraphicBufferSource.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/media/libstagefright/omx/GraphicBufferSource.cpp b/media/libstagefright/omx/GraphicBufferSource.cpp index f295e5a..3a44a0d 100644 --- a/media/libstagefright/omx/GraphicBufferSource.cpp +++ b/media/libstagefright/omx/GraphicBufferSource.cpp @@ -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) { |