summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/omx/GraphicBufferSource.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2013-07-17 13:55:26 -0700
committerAndreas Huber <andih@google.com>2013-07-17 15:27:31 -0700
commite40cda70eec141fa05cbcca1de420fdb22b98be6 (patch)
tree44ba825722026f73ceb0c27e5e58c47ab9e884fa /media/libstagefright/omx/GraphicBufferSource.h
parent5478f3c44b9d6670261733953a71a8290fa70ae8 (diff)
downloadframeworks_av-e40cda70eec141fa05cbcca1de420fdb22b98be6.zip
frameworks_av-e40cda70eec141fa05cbcca1de420fdb22b98be6.tar.gz
frameworks_av-e40cda70eec141fa05cbcca1de420fdb22b98be6.tar.bz2
Support "suspension" of a video encoder in "surface-input" mode.
i.e. feed no more input frames to the encoder while suspended. Change-Id: I51391e18c1517548e869f8ddece19f4af37e78f9
Diffstat (limited to 'media/libstagefright/omx/GraphicBufferSource.h')
-rw-r--r--media/libstagefright/omx/GraphicBufferSource.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/omx/GraphicBufferSource.h b/media/libstagefright/omx/GraphicBufferSource.h
index 8c6b470..ac73770 100644
--- a/media/libstagefright/omx/GraphicBufferSource.h
+++ b/media/libstagefright/omx/GraphicBufferSource.h
@@ -85,6 +85,10 @@ public:
// have a codec buffer ready, we just set the mEndOfStream flag.
status_t signalEndOfInputStream();
+ // If suspend is true, all incoming buffers (including those currently
+ // in the BufferQueue) will be discarded until the suspension is lifted.
+ void suspend(bool suspend);
+
protected:
// BufferQueue::ConsumerListener interface, called when a new frame of
// data is available. If we're executing and a codec buffer is
@@ -155,6 +159,8 @@ private:
// Set by omxExecuting() / omxIdling().
bool mExecuting;
+ bool mSuspended;
+
// We consume graphic buffers from this.
sp<BufferQueue> mBufferQueue;