diff options
Diffstat (limited to 'include/media/stagefright')
-rw-r--r-- | include/media/stagefright/ACodec.h | 1 | ||||
-rw-r--r-- | include/media/stagefright/MediaClock.h | 1 | ||||
-rw-r--r-- | include/media/stagefright/MediaCodec.h | 15 | ||||
-rw-r--r-- | include/media/stagefright/MediaCodecList.h | 15 |
4 files changed, 30 insertions, 2 deletions
diff --git a/include/media/stagefright/ACodec.h b/include/media/stagefright/ACodec.h index c1483f3..a8d0fcb 100644 --- a/include/media/stagefright/ACodec.h +++ b/include/media/stagefright/ACodec.h @@ -300,6 +300,7 @@ private: OMX_U32 portIndex, int32_t sampleRate, int32_t numChannels); status_t setPriority(int32_t priority); + status_t setOperatingRate(float rateFloat, bool isVideo); status_t setMinBufferSize(OMX_U32 portIndex, size_t size); diff --git a/include/media/stagefright/MediaClock.h b/include/media/stagefright/MediaClock.h index e9c09a1..dd1a809 100644 --- a/include/media/stagefright/MediaClock.h +++ b/include/media/stagefright/MediaClock.h @@ -42,6 +42,7 @@ struct MediaClock : public RefBase { void updateMaxTimeMedia(int64_t maxTimeMediaUs); void setPlaybackRate(float rate); + float getPlaybackRate() const; // query media time corresponding to real time |realUs|, and save the // result in |outMediaUs|. 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; diff --git a/include/media/stagefright/MediaCodecList.h b/include/media/stagefright/MediaCodecList.h index c2bbe4d..9d1d675 100644 --- a/include/media/stagefright/MediaCodecList.h +++ b/include/media/stagefright/MediaCodecList.h @@ -48,9 +48,14 @@ struct MediaCodecList : public BnMediaCodecList { return mCodecInfos.itemAt(index); } + virtual const sp<AMessage> getGlobalSettings() const; + // to be used by MediaPlayerService alone static sp<IMediaCodecList> getLocalInstance(); + // only to be used in getLocalInstance + void updateDetailsForMultipleCodecs(const KeyedVector<AString, CodecSettings>& updates); + private: class BinderDeathObserver : public IBinder::DeathRecipient { void binderDied(const wp<IBinder> &the_late_who __unused); @@ -60,6 +65,7 @@ private: enum Section { SECTION_TOPLEVEL, + SECTION_SETTINGS, SECTION_DECODERS, SECTION_DECODER, SECTION_DECODER_TYPE, @@ -74,10 +80,14 @@ private: status_t mInitCheck; Section mCurrentSection; + bool mUpdate; Vector<Section> mPastSections; int32_t mDepth; AString mHrefBase; + sp<AMessage> mGlobalSettings; + KeyedVector<AString, CodecSettings> mOverrides; + Vector<sp<MediaCodecInfo> > mCodecInfos; sp<MediaCodecInfo> mCurrentInfo; sp<IOMX> mOMX; @@ -87,7 +97,7 @@ private: status_t initCheck() const; void parseXMLFile(const char *path); - void parseTopLevelXMLFile(const char *path); + void parseTopLevelXMLFile(const char *path, bool ignore_errors = false); static void StartElementHandlerWrapper( void *me, const char *name, const char **attrs); @@ -98,9 +108,12 @@ private: void endElementHandler(const char *name); status_t includeXMLFile(const char **attrs); + status_t addSettingFromAttributes(const char **attrs); status_t addMediaCodecFromAttributes(bool encoder, const char **attrs); void addMediaCodec(bool encoder, const char *name, const char *type = NULL); + void setCurrentCodecInfo(bool encoder, const char *name, const char *type); + status_t addQuirk(const char **attrs); status_t addTypeFromAttributes(const char **attrs); status_t addLimit(const char **attrs); |