summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-12-21 01:19:56 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-12-21 01:19:57 +0000
commit8115f4b206dbd04c620f062feb3c7785e2732ab3 (patch)
treebc7f1dedcbebc5aef585e66c2baa67df8d1d8bf4 /media
parent1777ed30bfb3b9c1edc037a1b5482d5ab8f28b9b (diff)
parentdb170bb1cae145d07efc803a3c208963de0c6087 (diff)
downloadframeworks_av-8115f4b206dbd04c620f062feb3c7785e2732ab3.zip
frameworks_av-8115f4b206dbd04c620f062feb3c7785e2732ab3.tar.gz
frameworks_av-8115f4b206dbd04c620f062feb3c7785e2732ab3.tar.bz2
Merge "stagefright: do not offload LD-AAC decoding"
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/MPEG4Extractor.cpp3
-rw-r--r--media/libstagefright/Utils.cpp11
2 files changed, 14 insertions, 0 deletions
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index b419f53..dc73980 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -2431,6 +2431,9 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio(
objectType = 32 + br.getBits(6);
}
+ //keep AOT type
+ mLastTrack->meta->setInt32(kKeyAACAOT, objectType);
+
uint32_t freqIndex = br.getBits(4);
int32_t sampleRate = 0;
diff --git a/media/libstagefright/Utils.cpp b/media/libstagefright/Utils.cpp
index 9041c21..216a329 100644
--- a/media/libstagefright/Utils.cpp
+++ b/media/libstagefright/Utils.cpp
@@ -562,6 +562,17 @@ bool canOffloadStream(const sp<MetaData>& meta, bool hasVideo,
return false;
}
+ // check whether it is ELD/LD content -> no offloading
+ // FIXME: this should depend on audio DSP capabilities. mapMimeToAudioFormat() should use the
+ // metadata to refine the AAC format and the audio HAL should only list supported profiles.
+ int32_t aacaot = -1;
+ if (meta->findInt32(kKeyAACAOT, &aacaot)) {
+ if (aacaot == 23 || aacaot == 39 ) {
+ ALOGV("track of type '%s' is ELD/LD content", mime);
+ return false;
+ }
+ }
+
int32_t srate = -1;
if (!meta->findInt32(kKeySampleRate, &srate)) {
ALOGV("track of type '%s' does not publish sample rate", mime);