diff options
author | Andreas Huber <andih@google.com> | 2012-10-03 10:48:22 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-10-03 10:48:22 -0700 |
commit | 38e7ffeba12e6f2d9ffb1f8a79d528d9bae06cf4 (patch) | |
tree | b9f68cd3789a58102aceb0b8f522b36e761e2b2c /include | |
parent | df9f074a4ac852673c9c56729535f6e5cb778b14 (diff) | |
parent | ce42b94ae4363c97945732fb8698675fa8b0861a (diff) | |
download | frameworks_av-38e7ffeba12e6f2d9ffb1f8a79d528d9bae06cf4.zip frameworks_av-38e7ffeba12e6f2d9ffb1f8a79d528d9bae06cf4.tar.gz frameworks_av-38e7ffeba12e6f2d9ffb1f8a79d528d9bae06cf4.tar.bz2 |
am ce42b94a: am 4401091b: Merge "Better power savings with wifi display code." into jb-mr1-dev
* commit 'ce42b94ae4363c97945732fb8698675fa8b0861a':
Better power savings with wifi display code.
Diffstat (limited to 'include')
-rw-r--r-- | include/media/stagefright/MediaCodec.h | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/include/media/stagefright/MediaCodec.h b/include/media/stagefright/MediaCodec.h index 8c612d4..cacfa54 100644 --- a/include/media/stagefright/MediaCodec.h +++ b/include/media/stagefright/MediaCodec.h @@ -108,6 +108,11 @@ struct MediaCodec : public AHandler { status_t requestIDRFrame(); + // Notification will be posted once there "is something to do", i.e. + // an input/output buffer has become available, a format change is + // pending, an error is pending. + void requestActivityNotification(const sp<AMessage> ¬ify); + protected: virtual ~MediaCodec(); virtual void onMessageReceived(const sp<AMessage> &msg); @@ -132,22 +137,23 @@ private: }; enum { - kWhatInit = 'init', - kWhatConfigure = 'conf', - kWhatStart = 'strt', - kWhatStop = 'stop', - kWhatRelease = 'rele', - kWhatDequeueInputBuffer = 'deqI', - kWhatQueueInputBuffer = 'queI', - kWhatDequeueOutputBuffer = 'deqO', - kWhatReleaseOutputBuffer = 'relO', - kWhatGetBuffers = 'getB', - kWhatFlush = 'flus', - kWhatGetOutputFormat = 'getO', - kWhatDequeueInputTimedOut = 'dITO', - kWhatDequeueOutputTimedOut = 'dOTO', - kWhatCodecNotify = 'codc', - kWhatRequestIDRFrame = 'ridr', + kWhatInit = 'init', + kWhatConfigure = 'conf', + kWhatStart = 'strt', + kWhatStop = 'stop', + kWhatRelease = 'rele', + kWhatDequeueInputBuffer = 'deqI', + kWhatQueueInputBuffer = 'queI', + kWhatDequeueOutputBuffer = 'deqO', + kWhatReleaseOutputBuffer = 'relO', + kWhatGetBuffers = 'getB', + kWhatFlush = 'flus', + kWhatGetOutputFormat = 'getO', + kWhatDequeueInputTimedOut = 'dITO', + kWhatDequeueOutputTimedOut = 'dOTO', + kWhatCodecNotify = 'codc', + kWhatRequestIDRFrame = 'ridr', + kWhatRequestActivityNotification = 'racN', }; enum { @@ -191,6 +197,8 @@ private: List<sp<ABuffer> > mCSD; + sp<AMessage> mActivityNotify; + MediaCodec(const sp<ALooper> &looper); static status_t PostAndAwaitResponse( @@ -216,6 +224,8 @@ private: status_t setNativeWindow( const sp<SurfaceTextureClient> &surfaceTextureClient); + void postActivityNotificationIfPossible(); + DISALLOW_EVIL_CONSTRUCTORS(MediaCodec); }; |