diff options
Diffstat (limited to 'include/media/stagefright/MediaCodec.h')
-rw-r--r-- | include/media/stagefright/MediaCodec.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/media/stagefright/MediaCodec.h b/include/media/stagefright/MediaCodec.h index 8241e19..3e3c276 100644 --- a/include/media/stagefright/MediaCodec.h +++ b/include/media/stagefright/MediaCodec.h @@ -30,8 +30,10 @@ struct AMessage; struct AReplyToken; struct AString; struct CodecBase; -struct ICrypto; struct IBatteryStats; +struct ICrypto; +struct IMemory; +struct MemoryDealer; struct SoftwareRenderer; struct Surface; @@ -51,6 +53,13 @@ struct MediaCodec : public AHandler { CB_OUTPUT_AVAILABLE = 2, CB_ERROR = 3, CB_OUTPUT_FORMAT_CHANGED = 4, + CB_CODEC_RELEASED = 5, + }; + + // used by CB_CODEC_RELEASED to tell the upper layer the cause of the release. + enum ReleaseReason { + REASON_UNKNOWN = 0, + REASON_RECLAIMED, // resources reclaimed by resource manager }; struct BatteryNotifier; @@ -126,6 +135,8 @@ struct MediaCodec : public AHandler { status_t getOutputFormat(sp<AMessage> *format) const; status_t getInputFormat(sp<AMessage> *format) const; + status_t getWidevineLegacyBuffers(Vector<sp<ABuffer> > *buffers) const; + status_t getInputBuffers(Vector<sp<ABuffer> > *buffers) const; status_t getOutputBuffers(Vector<sp<ABuffer> > *buffers) const; @@ -213,6 +224,7 @@ private: uint32_t mBufferID; sp<ABuffer> mData; sp<ABuffer> mEncryptedData; + sp<IMemory> mSharedEncryptedBuffer; sp<AMessage> mNotify; sp<AMessage> mFormat; bool mOwnedByClient; @@ -231,6 +243,7 @@ private: sp<AMessage> mOutputFormat; sp<AMessage> mInputFormat; sp<AMessage> mCallback; + sp<MemoryDealer> mDealer; bool mBatteryStatNotified; bool mIsVideo; |