Loading media/libmediaplayerservice/nuplayer/NuPlayer.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -1257,6 +1257,8 @@ status_t NuPlayer::instantiateDecoder(bool audio, sp<DecoderBase> *decoder) { notify->setInt32("generation", mAudioDecoderGeneration); if (mOffloadAudio) { const bool hasVideo = (mSource->getFormat(false /*audio */) != NULL); format->setInt32("has-video", hasVideo); *decoder = new DecoderPassThrough(notify, mSource, mRenderer); } else { *decoder = new Decoder(notify, mSource, mRenderer); Loading media/libmediaplayerservice/nuplayer/NuPlayerDecoderPassThrough.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -74,11 +74,14 @@ void NuPlayer::DecoderPassThrough::onConfigure(const sp<AMessage> &format) { onRequestInputBuffers(); int32_t hasVideo = 0; format->findInt32("has-video", &hasVideo); // 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 */, format, true /* offloadOnly */, hasVideo, AUDIO_OUTPUT_FLAG_NONE /* flags */, NULL /* isOffloaded */); if (err != OK) { handleError(err); Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayer.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -1257,6 +1257,8 @@ status_t NuPlayer::instantiateDecoder(bool audio, sp<DecoderBase> *decoder) { notify->setInt32("generation", mAudioDecoderGeneration); if (mOffloadAudio) { const bool hasVideo = (mSource->getFormat(false /*audio */) != NULL); format->setInt32("has-video", hasVideo); *decoder = new DecoderPassThrough(notify, mSource, mRenderer); } else { *decoder = new Decoder(notify, mSource, mRenderer); Loading
media/libmediaplayerservice/nuplayer/NuPlayerDecoderPassThrough.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -74,11 +74,14 @@ void NuPlayer::DecoderPassThrough::onConfigure(const sp<AMessage> &format) { onRequestInputBuffers(); int32_t hasVideo = 0; format->findInt32("has-video", &hasVideo); // 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 */, format, true /* offloadOnly */, hasVideo, AUDIO_OUTPUT_FLAG_NONE /* flags */, NULL /* isOffloaded */); if (err != OK) { handleError(err); Loading