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

Commit ccad786f authored by aarti jadhav-gaikwad's avatar aarti jadhav-gaikwad Committed by Lajos Molnar
Browse files

stagefright: Pass audio aac subformats in offloadinfo

Pass audio aac sub formats in offloadinfo according
to aac profile. Audio HAL can take decision about offload
using DSP capabilities

Change-Id: Ice277e8b6561b7a7db92c474f23f8041ebb35e8c
parent 7a9b2594
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -749,6 +749,15 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) {
                            ALOGV("Mime \"%s\" mapped to audio_format 0x%x",
                                    mime.c_str(), audioFormat);

                            int32_t aacProfile = -1;
                            if (audioFormat == AUDIO_FORMAT_AAC
                                    && format->findInt32("aac-profile", &aacProfile)) {
                                // Redefine AAC format as per aac profile
                                mapAACProfileToAudioFormat(
                                        audioFormat,
                                        aacProfile);
                            }

                            flags |= AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD;

                            offloadInfo.duration_us = -1;
+5 −0
Original line number Diff line number Diff line
@@ -135,6 +135,11 @@ status_t convertMetaDataToMessage(
        if (meta->findInt32(kKeyIsADTS, &isADTS)) {
            msg->setInt32("is-adts", true);
        }

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

    int32_t maxInputSize;