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

Commit 604064e8 authored by Lajos Molnar's avatar Lajos Molnar Committed by Android (Google) Code Review
Browse files

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

parents 0ce1cc62 832939e6
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);
    }
}