summaryrefslogtreecommitdiffstats
path: root/include/media/stagefright/MediaCodec.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-02-28 15:54:51 -0800
committerAndreas Huber <andih@google.com>2012-02-28 15:54:51 -0800
commitc95c2ddcdfc974f42408a377fbe2de51b94a8c94 (patch)
tree24239ca3f0d24f790b73d92627de057f738f91d5 /include/media/stagefright/MediaCodec.h
parenta3873833d518e032138cf70188b6f33cd7acec3d (diff)
downloadframeworks_av-c95c2ddcdfc974f42408a377fbe2de51b94a8c94.zip
frameworks_av-c95c2ddcdfc974f42408a377fbe2de51b94a8c94.tar.gz
frameworks_av-c95c2ddcdfc974f42408a377fbe2de51b94a8c94.tar.bz2
Separate the notion of "stop" from that of "release", i.e.
stop - means transition back to LOADED state and keeping the component instance allocated. release - means we get rid of the component completely. Change-Id: I40ad01ce70821faaad43f57999249904f9144924
Diffstat (limited to 'include/media/stagefright/MediaCodec.h')
-rw-r--r--include/media/stagefright/MediaCodec.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/media/stagefright/MediaCodec.h b/include/media/stagefright/MediaCodec.h
index 8c11c9c..72ac56a 100644
--- a/include/media/stagefright/MediaCodec.h
+++ b/include/media/stagefright/MediaCodec.h
@@ -53,8 +53,15 @@ struct MediaCodec : public AHandler {
uint32_t flags);
status_t start();
+
+ // Returns to a state in which the component remains allocated but
+ // unconfigured.
status_t stop();
+ // Client MUST call release before releasing final reference to this
+ // object.
+ status_t release();
+
status_t flush();
status_t queueInputBuffer(
@@ -97,6 +104,7 @@ private:
STARTED,
FLUSHING,
STOPPING,
+ RELEASING,
};
enum {
@@ -109,6 +117,7 @@ private:
kWhatConfigure = 'conf',
kWhatStart = 'strt',
kWhatStop = 'stop',
+ kWhatRelease = 'rele',
kWhatDequeueInputBuffer = 'deqI',
kWhatQueueInputBuffer = 'queI',
kWhatDequeueOutputBuffer = 'deqO',