Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b2a805cd authored by Yuxiu Zhang's avatar Yuxiu Zhang Committed by Marco Nelissen
Browse files

Keep AOT type to support AAC offload feature

To support AAC offload feature, AACExtractor needs to parse profile
and send to HAL.
Therefore, AACExtractor needs to keep AOT type into mMeta, and
then AOSP default common flow will pass AOT type to HAL.

Bug: 123041584
Test: build pass in Android Qt and verified AAC offload feature
in Android Pie

Change-Id: Ie954546835c682cd32b5885af92dc715414cd8ea
parent 2334e001
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -150,6 +150,7 @@ AACExtractor::AACExtractor(

    mMeta = AMediaFormat_new();
    MakeAACCodecSpecificData(mMeta, profile, sf_index, channel);
    AMediaFormat_setInt32(mMeta, AMEDIAFORMAT_KEY_AAC_PROFILE, profile + 1);

    off64_t streamSize, numFrames = 0;
    size_t frameSize = 0;
+5 −0
Original line number Diff line number Diff line
@@ -1693,6 +1693,11 @@ void convertMessageToMetaData(const sp<AMessage> &msg, sp<MetaData> &meta) {
            meta->setInt32(kKeyIsADTS, isADTS);
        }

        int32_t aacProfile = -1;
        if (msg->findInt32("aac-profile", &aacProfile)) {
            meta->setInt32(kKeyAACAOT, aacProfile);
        }

        int32_t pcmEncoding;
        if (msg->findInt32("pcm-encoding", &pcmEncoding)) {
            meta->setInt32(kKeyPcmEncoding, pcmEncoding);