diff options
author | Andy McFadden <fadden@android.com> | 2013-03-05 14:31:02 -0800 |
---|---|---|
committer | Andy McFadden <fadden@android.com> | 2013-03-05 16:29:55 -0800 |
commit | ba6218eae3dbcf3f962b3561b26374a214dbf5e2 (patch) | |
tree | 4b7922c6822c116b67123022fa48489a23724fe7 /media/libstagefright/omx/GraphicBufferSource.h | |
parent | a7a5917a064710edea9cfacc8eda44532150e852 (diff) | |
download | frameworks_av-ba6218eae3dbcf3f962b3561b26374a214dbf5e2.zip frameworks_av-ba6218eae3dbcf3f962b3561b26374a214dbf5e2.tar.gz frameworks_av-ba6218eae3dbcf3f962b3561b26374a214dbf5e2.tar.bz2 |
Correct MediaCodec + Surface behavior
Assorted tweaks:
- Allow signalEndOfInputStream() before ACodec is in Executing
state (added message to two more states).
- Return an error if signalEndOfInputStream() is called a second
time on the same stream.
- Require AndroidOpaque color format in createInputSurface().
- Disallow dequeueInputBuffer() after an input surface has been
created (boolean flag in MediaCodec tracks it).
- Discard input surface when encoder is re-configure()ed (drop
OMXNodeInstance's ref when we go back to Loaded).
Bug 7991062
Change-Id: Iff30f3036e14eb5a2f6536910dcf11aba33031ee
Diffstat (limited to 'media/libstagefright/omx/GraphicBufferSource.h')
-rw-r--r-- | media/libstagefright/omx/GraphicBufferSource.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/media/libstagefright/omx/GraphicBufferSource.h b/media/libstagefright/omx/GraphicBufferSource.h index 6d49f96..6a34bc5 100644 --- a/media/libstagefright/omx/GraphicBufferSource.h +++ b/media/libstagefright/omx/GraphicBufferSource.h @@ -67,10 +67,9 @@ public: // sitting in the BufferQueue, this will send them to the codec. void omxExecuting(); - // This is called when OMX transitions to OMX_StateIdle. If we were - // previously executing, this means we're about to be shut down. (We - // also enter Idle on the way up.) - void omxIdling(); + // This is called when OMX transitions to OMX_StateLoaded, indicating that + // we are shutting down. + void omxLoaded(); // A "codec buffer", i.e. a buffer that can be used to pass data into // the encoder, has been allocated. (This call does not call back into @@ -84,7 +83,7 @@ public: // This is called after the last input frame has been submitted. We // need to submit an empty buffer with the EOS flag set. If we don't // have a codec buffer ready, we just set the mEndOfStream flag. - void signalEndOfInputStream(); + status_t signalEndOfInputStream(); protected: // BufferQueue::ConsumerListener interface, called when a new frame of |