summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include/OMXNodeInstance.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2009-10-26 16:11:54 -0700
committerAndreas Huber <andih@google.com>2009-10-26 16:11:54 -0700
commitd6703ab22c85b43fdb2deb78a37e51465c902a5f (patch)
tree758e461c2351430bd5aae21781b707ece78fa7f4 /media/libstagefright/include/OMXNodeInstance.h
parentfe44b7a8b2b8da50a7a78f4b7e034b6d01785e44 (diff)
downloadframeworks_av-d6703ab22c85b43fdb2deb78a37e51465c902a5f.zip
frameworks_av-d6703ab22c85b43fdb2deb78a37e51465c902a5f.tar.gz
frameworks_av-d6703ab22c85b43fdb2deb78a37e51465c902a5f.tar.bz2
When freeing an OMX node, attempt to transition it from its current state all the way to "Loaded" in order to properly free any allocated buffers.
Diffstat (limited to 'media/libstagefright/include/OMXNodeInstance.h')
-rw-r--r--media/libstagefright/include/OMXNodeInstance.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libstagefright/include/OMXNodeInstance.h b/media/libstagefright/include/OMXNodeInstance.h
index 181742e..09a8816 100644
--- a/media/libstagefright/include/OMXNodeInstance.h
+++ b/media/libstagefright/include/OMXNodeInstance.h
@@ -85,8 +85,18 @@ private:
OMX_HANDLETYPE mHandle;
sp<IOMXObserver> mObserver;
+ struct ActiveBuffer {
+ OMX_U32 mPortIndex;
+ OMX::buffer_id mID;
+ };
+ Vector<ActiveBuffer> mActiveBuffers;
+
~OMXNodeInstance();
+ void addActiveBuffer(OMX_U32 portIndex, OMX::buffer_id id);
+ void removeActiveBuffer(OMX_U32 portIndex, OMX::buffer_id id);
+ void freeActiveBuffers();
+
static OMX_ERRORTYPE OnEvent(
OMX_IN OMX_HANDLETYPE hComponent,
OMX_IN OMX_PTR pAppData,