Merge "MediaCodec: make setVideoScalingMode usable for IGBP-based clients" into pi-dev

This commit is contained in:
Lajos Molnar
2018-05-23 23:41:21 +00:00
committed by Android (Google) Code Review

View File

@@ -742,7 +742,12 @@ status_t JMediaCodec::setParameters(const sp<AMessage> &msg) {
void JMediaCodec::setVideoScalingMode(int mode) {
if (mSurfaceTextureClient != NULL) {
// this works for components that queue to surface
native_window_set_scaling_mode(mSurfaceTextureClient.get(), mode);
// also signal via param for components that queue to IGBP
sp<AMessage> msg = new AMessage;
msg->setInt32("android._video-scaling", mode);
(void)mCodec->setParameters(msg);
}
}