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

Commit a9127865 authored by Steve Kondik's avatar Steve Kondik
Browse files

stagefright: Add bit-depth plumbing for new formats

Change-Id: I13cfd75e4b4819543b64babf20cc9af57ea2978f
parent de128799
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -300,7 +300,7 @@ private:

    status_t setupAC3Codec(bool encoder, int32_t numChannels, int32_t sampleRate, int32_t bitsPerSample);

    status_t setupEAC3Codec(bool encoder, int32_t numChannels, int32_t sampleRate);
    status_t setupEAC3Codec(bool encoder, int32_t numChannels, int32_t sampleRate, int32_t bitsPerSample);

    status_t selectAudioPortFormat(
            OMX_U32 portIndex, OMX_AUDIO_CODINGTYPE desiredFormat);
+5 −3
Original line number Diff line number Diff line
@@ -1861,7 +1861,9 @@ status_t ACodec::configureCodec(
                || !msg->findInt32("sample-rate", &sampleRate)) {
            err = INVALID_OPERATION;
        } else {
            err = setupEAC3Codec(encoder, numChannels, sampleRate);
            int32_t bitsPerSample = 16;
            msg->findInt32("bits-per-sample", &bitsPerSample);
            err = setupEAC3Codec(encoder, numChannels, sampleRate, bitsPerSample);
        }
    } else {
        if (encoder) {
@@ -2170,9 +2172,9 @@ status_t ACodec::setupAC3Codec(
}

status_t ACodec::setupEAC3Codec(
        bool encoder, int32_t numChannels, int32_t sampleRate) {
        bool encoder, int32_t numChannels, int32_t sampleRate, int32_t bitsPerSample) {
    status_t err = setupRawAudioFormat(
            encoder ? kPortIndexInput : kPortIndexOutput, sampleRate, numChannels);
            encoder ? kPortIndexInput : kPortIndexOutput, sampleRate, numChannels, bitsPerSample);

    if (err != OK) {
        return err;