commit | 938aadaf20ba78f68c53b62955967806b590a5e5 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | Thu May 25 12:42:03 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Thu May 25 12:42:03 2023 +0000 |
tree | 5608475c4c4f997cddf2e5ea981b809a498dbfd0 | |
parent | c4794915e5aea3f640f5f21c7db5e25bd93d0bef [diff] | |
parent | a90df2a670ab93e402ac3c7a4a1c73ae17039f77 [diff] |
Merge "NuPlayer: signal video scaling mode to components that queue to IGBR" am: a90df2a670 Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/2600465 Change-Id: I86b0b01cd4bfbac7e1a8c79b57f8863c9a84b114 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index d205990..f73c5a8 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -2217,6 +2217,11 @@ -ret, strerror(-ret)); return ret; } + if (mVideoDecoder != NULL) { + sp<AMessage> params = new AMessage(); + params->setInt32("android._video-scaling", mode); + mVideoDecoder->setParameters(params); + } } return OK; }
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp index 8da09c4..f4143da 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
@@ -459,6 +459,14 @@ codecParams->setFloat("operating-rate", decodeFrameRate * mPlaybackSpeed); mCodec->setParameters(codecParams); } + + int32_t videoScalingMode; + if (params->findInt32("android._video-scaling", &videoScalingMode) + && mCodec != NULL) { + sp<AMessage> codecParams = new AMessage(); + codecParams->setInt32("android._video-scaling", videoScalingMode); + mCodec->setParameters(codecParams); + } } void NuPlayer::Decoder::onSetRenderer(const sp<Renderer> &renderer) {