Loading include/media/stagefright/MetaData.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -134,6 +134,7 @@ enum { kKeyRequiresSecureBuffers = 'secu', // bool (int32_t) kKeyRequiresSecureBuffers = 'secu', // bool (int32_t) kKeyIsADTS = 'adts', // bool (int32_t) kKeyIsADTS = 'adts', // bool (int32_t) kKeyAACAOT = 'aaot', // int32_t // If a MediaBuffer's data represents (at least partially) encrypted // If a MediaBuffer's data represents (at least partially) encrypted // data, the following fields aid in decryption. // data, the following fields aid in decryption. Loading media/libstagefright/MPEG4Extractor.cpp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -2297,6 +2297,9 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( objectType = 32 + br.getBits(6); objectType = 32 + br.getBits(6); } } //keep AOT type mLastTrack->meta->setInt32(kKeyAACAOT, objectType); uint32_t freqIndex = br.getBits(4); uint32_t freqIndex = br.getBits(4); int32_t sampleRate = 0; int32_t sampleRate = 0; Loading media/libstagefright/Utils.cpp +11 −0 Original line number Original line Diff line number Diff line Loading @@ -562,6 +562,17 @@ bool canOffloadStream(const sp<MetaData>& meta, bool hasVideo, return false; 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; int32_t srate = -1; if (!meta->findInt32(kKeySampleRate, &srate)) { if (!meta->findInt32(kKeySampleRate, &srate)) { ALOGV("track of type '%s' does not publish sample rate", mime); ALOGV("track of type '%s' does not publish sample rate", mime); Loading Loading
include/media/stagefright/MetaData.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -134,6 +134,7 @@ enum { kKeyRequiresSecureBuffers = 'secu', // bool (int32_t) kKeyRequiresSecureBuffers = 'secu', // bool (int32_t) kKeyIsADTS = 'adts', // bool (int32_t) kKeyIsADTS = 'adts', // bool (int32_t) kKeyAACAOT = 'aaot', // int32_t // If a MediaBuffer's data represents (at least partially) encrypted // If a MediaBuffer's data represents (at least partially) encrypted // data, the following fields aid in decryption. // data, the following fields aid in decryption. Loading
media/libstagefright/MPEG4Extractor.cpp +3 −0 Original line number Original line Diff line number Diff line Loading @@ -2297,6 +2297,9 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio( objectType = 32 + br.getBits(6); objectType = 32 + br.getBits(6); } } //keep AOT type mLastTrack->meta->setInt32(kKeyAACAOT, objectType); uint32_t freqIndex = br.getBits(4); uint32_t freqIndex = br.getBits(4); int32_t sampleRate = 0; int32_t sampleRate = 0; Loading
media/libstagefright/Utils.cpp +11 −0 Original line number Original line Diff line number Diff line Loading @@ -562,6 +562,17 @@ bool canOffloadStream(const sp<MetaData>& meta, bool hasVideo, return false; 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; int32_t srate = -1; if (!meta->findInt32(kKeySampleRate, &srate)) { if (!meta->findInt32(kKeySampleRate, &srate)) { ALOGV("track of type '%s' does not publish sample rate", mime); ALOGV("track of type '%s' does not publish sample rate", mime); Loading