зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1093318 - Pass newer AAC profile levels to the platform decoder module. r=edwin
This commit is contained in:
Родитель
a73ae4b0e8
Коммит
62a809499d
|
@ -6,6 +6,7 @@
|
|||
#include "mp4_demuxer/AnnexB.h"
|
||||
#include "mp4_demuxer/ByteReader.h"
|
||||
#include "mp4_demuxer/DecoderData.h"
|
||||
#include <media/stagefright/foundation/ABitReader.h>
|
||||
#include "media/stagefright/MetaData.h"
|
||||
#include "media/stagefright/MediaBuffer.h"
|
||||
#include "media/stagefright/MediaDefs.h"
|
||||
|
@ -150,8 +151,16 @@ AudioDecoderConfig::Update(sp<MetaData>& aMetaData, const char* aMimeType)
|
|||
const void* data;
|
||||
size_t size;
|
||||
if (esds.getCodecSpecificInfo(&data, &size) == OK) {
|
||||
audio_specific_config.append(reinterpret_cast<const uint8_t*>(data),
|
||||
size);
|
||||
const uint8_t* cdata = reinterpret_cast<const uint8_t*>(data);
|
||||
audio_specific_config.append(cdata, size);
|
||||
if (size > 1) {
|
||||
ABitReader br(cdata, size);
|
||||
extended_profile = br.getBits(5);
|
||||
|
||||
if (extended_profile == 31) { // AAC-ELD => additional 6 bits
|
||||
extended_profile = 32 + br.getBits(6);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,6 +97,7 @@ public:
|
|||
, samples_per_second(0)
|
||||
, frequency_index(0)
|
||||
, aac_profile(0)
|
||||
, extended_profile(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -105,6 +106,7 @@ public:
|
|||
uint32_t samples_per_second;
|
||||
int8_t frequency_index;
|
||||
int8_t aac_profile;
|
||||
int8_t extended_profile;
|
||||
mozilla::Vector<uint8_t> extra_data;
|
||||
mozilla::Vector<uint8_t> audio_specific_config;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче