diff options
author | Steve Kondik <steve@cyngn.com> | 2015-11-19 00:33:58 -0800 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-11-24 04:02:48 -0800 |
commit | 3a0bcf107182665d5b8628245750f1e210ef0936 (patch) | |
tree | 5e530ee0e0da1b786466dcbf8362d671c6ea6057 /media/libavextensions | |
parent | 29c75250c58bdcc3b38513813ba521cba82d5c61 (diff) | |
download | frameworks_av-3a0bcf107182665d5b8628245750f1e210ef0936.zip frameworks_av-3a0bcf107182665d5b8628245750f1e210ef0936.tar.gz frameworks_av-3a0bcf107182665d5b8628245750f1e210ef0936.tar.bz2 |
stagefright: Act V: I am become death, the destroyer of worlds
* In which our hero unites the legions of distant worlds together
as one at last to fight anew until the segfaults boil the lands
and the New Version cometh.
Change-Id: I869b2ab254968ed7a133827ea9e5ba6056f68a5c
Diffstat (limited to 'media/libavextensions')
-rw-r--r-- | media/libavextensions/Android.mk | 4 | ||||
-rw-r--r-- | media/libavextensions/mediaplayerservice/AVNuExtensions.h | 7 | ||||
-rw-r--r-- | media/libavextensions/mediaplayerservice/AVNuUtils.cpp | 15 |
3 files changed, 11 insertions, 15 deletions
diff --git a/media/libavextensions/Android.mk b/media/libavextensions/Android.mk index 3918857..0b01669 100644 --- a/media/libavextensions/Android.mk +++ b/media/libavextensions/Android.mk @@ -83,6 +83,10 @@ ifeq ($(TARGET_ENABLE_QC_AV_ENHANCEMENTS),true) LOCAL_CFLAGS += -DENABLE_AV_ENHANCEMENTS endif +ifeq ($(TARGET_BOARD_PLATFORM),msm8974) + LOCAL_CFLAGS += -DTARGET_8974 +endif + LOCAL_MODULE:= libavmediaserviceextensions LOCAL_CLANG := false diff --git a/media/libavextensions/mediaplayerservice/AVNuExtensions.h b/media/libavextensions/mediaplayerservice/AVNuExtensions.h index d7e29d1..2fe56b8 100644 --- a/media/libavextensions/mediaplayerservice/AVNuExtensions.h +++ b/media/libavextensions/mediaplayerservice/AVNuExtensions.h @@ -80,12 +80,17 @@ struct AVNuUtils { virtual void setDecodedPCMFormat(const sp<AMessage> &); virtual status_t convertToSinkFormatIfNeeded(const sp<ABuffer> &, sp<ABuffer> &, audio_format_t sinkFormat, bool isOffload); +#ifndef TARGET_8974 virtual uint32_t getFlags(); virtual bool canUseSetBuffers(const sp<MetaData> &Meta); - +#endif virtual void printFileName(int fd); virtual void checkFormatChange(bool *formatChange, const sp<ABuffer> &accessUnit); +#ifdef TARGET_8974 virtual void addFlagsInMeta(const sp<ABuffer> &buffer, int32_t flags, bool isAudio); + virtual uint32_t getFlags(); + virtual bool canUseSetBuffers(const sp<MetaData> &Meta); +#endif virtual bool dropCorruptFrame(); // ----- NO TRESSPASSING BEYOND THIS LINE ------ diff --git a/media/libavextensions/mediaplayerservice/AVNuUtils.cpp b/media/libavextensions/mediaplayerservice/AVNuUtils.cpp index 31d7b32..8d87759 100644 --- a/media/libavextensions/mediaplayerservice/AVNuUtils.cpp +++ b/media/libavextensions/mediaplayerservice/AVNuUtils.cpp @@ -101,20 +101,7 @@ void AVNuUtils::setKeyPCMFormat(const sp<MetaData> &meta, audio_format_t audioFo meta->setInt32('pfmt', audioFormat); } -audio_format_t AVNuUtils::getPCMFormat(const sp<AMessage> &format) { - int32_t pcmFormat = 0; - if (format->findInt32("pcm-format", &pcmFormat)) - return (audio_format_t)pcmFormat; - - int32_t bits = 16; - if (format->findInt32("bits-per-sample", &bits)) { - if (bits == 8) - return AUDIO_FORMAT_PCM_8_BIT; - if (bits == 24) - return AUDIO_FORMAT_PCM_32_BIT; - if (bits == 32) - return AUDIO_FORMAT_PCM_FLOAT; - } +audio_format_t AVNuUtils::getPCMFormat(const sp<AMessage> &/*format*/) { return AUDIO_FORMAT_PCM_16_BIT; } |