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

Commit d92dbbc0 authored by Zhoulu Luo's avatar Zhoulu Luo Committed by Anh Nguyen
Browse files

Compilation fixes for NuPlayer

Change-Id: Ibb0ff25970ad9f44dbb6c8fc7a799f3a157a3697
parent c1140e3b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ NuPlayer::NuPlayer()
      mOffloadAudio(false),
      mOffloadDecodedPCM(false),
      mSwitchingFromPcmOffload(false),
      mIsStreaming(true),
      mIsStreaming(false),
      mAudioDecoderGeneration(0),
      mVideoDecoderGeneration(0),
      mRendererGeneration(0),
+5 −1
Original line number Diff line number Diff line
@@ -464,8 +464,12 @@ bool NuPlayer::Decoder::handleAnOutputBuffer() {
                flags = AUDIO_OUTPUT_FLAG_NONE;
            }

            uint32_t isStreaming = 0;
            sp<AMessage> notify = mNotify->dup();
            notify->findInt32("isStreaming", (int32_t *)&isStreaming);

            res = mRenderer->openAudioSink(
                    format, false /* offloadOnly */, hasVideo, flags, NULL /* isOffloaded */);
                    format, false /* offloadOnly */, hasVideo, flags, isStreaming, NULL /* isOffloaded */);
            if (res != OK) {
                ALOGE("Failed to open AudioSink on format change for %s (err=%d)",
                        mComponentName.c_str(), res);
+4 −1
Original line number Diff line number Diff line
@@ -74,12 +74,15 @@ void NuPlayer::DecoderPassThrough::onConfigure(const sp<AMessage> &format) {

    onRequestInputBuffers();

    uint32_t isStreaming = 0;
    format->findInt32("isStreaming", (int32_t *)&isStreaming);

    // The audio sink is already opened before the PassThrough decoder is created.
    // Opening again might be relevant if decoder is instantiated after shutdown and
    // format is different.
    status_t err = mRenderer->openAudioSink(
            format, true /* offloadOnly */, false /* hasVideo */,
            AUDIO_OUTPUT_FLAG_NONE /* flags */, NULL /* isOffloaded */);
            AUDIO_OUTPUT_FLAG_NONE /* flags */, isStreaming, NULL /* isOffloaded */);
    if (err != OK) {
        handleError(err);
    }