diff options
author | Andreas Huber <andih@google.com> | 2011-06-29 15:53:28 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2011-07-01 09:28:51 -0700 |
commit | 0bb6b4c5da2451ee0973372b0a3858b15c742689 (patch) | |
tree | 968bcc86bf7c08aa943b4eb2286921dac8e7fbe0 /include/media/stagefright/OMXCodec.h | |
parent | cebcdaef5b559f4db2a9d8b305d9d7da03525b62 (diff) | |
download | frameworks_av-0bb6b4c5da2451ee0973372b0a3858b15c742689.zip frameworks_av-0bb6b4c5da2451ee0973372b0a3858b15c742689.tar.gz frameworks_av-0bb6b4c5da2451ee0973372b0a3858b15c742689.tar.bz2 |
Support a "secure input buffer" mode for use by Widevine DRM in OMXCodec.
Change-Id: Ie03b285265099dbac9b12f3f41d9ad758d0b50ad
Diffstat (limited to 'include/media/stagefright/OMXCodec.h')
-rw-r--r-- | include/media/stagefright/OMXCodec.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/include/media/stagefright/OMXCodec.h b/include/media/stagefright/OMXCodec.h index 92331a1..7f3c497 100644 --- a/include/media/stagefright/OMXCodec.h +++ b/include/media/stagefright/OMXCodec.h @@ -53,6 +53,9 @@ struct OMXCodec : public MediaSource, // Enable GRALLOC_USAGE_PROTECTED for output buffers from native window kEnableGrallocUsageProtected = 128, + + // Secure decoding mode + kUseSecureInputBuffers = 256, }; static sp<MediaSource> Create( const sp<IOMX> &omx, @@ -164,6 +167,10 @@ private: bool mOMXLivesLocally; IOMX::node_id mNode; uint32_t mQuirks; + + // Flags specified in the creation of the codec. + uint32_t mFlags; + bool mIsEncoder; char *mMIME; char *mComponentName; @@ -205,15 +212,12 @@ private: List<size_t> mFilledBuffers; Condition mBufferFilled; - bool mIsMetaDataStoredInVideoBuffers; - bool mOnlySubmitOneBufferAtOneTime; - bool mEnableGrallocUsageProtected; - // Used to record the decoding time for an output picture from // a video encoder. List<int64_t> mDecodingTimeList; - OMXCodec(const sp<IOMX> &omx, IOMX::node_id node, uint32_t quirks, + OMXCodec(const sp<IOMX> &omx, IOMX::node_id node, + uint32_t quirks, uint32_t flags, bool isEncoder, const char *mime, const char *componentName, const sp<MediaSource> &source, const sp<ANativeWindow> &nativeWindow); @@ -287,6 +291,10 @@ private: void drainInputBuffers(); void fillOutputBuffers(); + bool drainAnyInputBuffer(); + BufferInfo *findInputBufferByDataPointer(void *ptr); + BufferInfo *findEmptyInputBuffer(); + // Returns true iff a flush was initiated and a completion event is // upcoming, false otherwise (A flush was not necessary as we own all // the buffers on that port). @@ -313,7 +321,7 @@ private: void dumpPortStatus(OMX_U32 portIndex); - status_t configureCodec(const sp<MetaData> &meta, uint32_t flags); + status_t configureCodec(const sp<MetaData> &meta); static uint32_t getComponentQuirks( const char *componentName, bool isEncoder); |