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

Commit d0b9a2b8 authored by Rachad's avatar Rachad
Browse files

Tunneled video Playback/Max resolution:

Call mOmx->prepareForAdaptivePlayback() to provide max resolution information
to tunneled OMX component.

bug: 17883772
Change-Id: I8f634824103e66483527828993bb24f65e68e419
parent c73ca6ef
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -1303,7 +1303,21 @@ status_t ACodec::configureCodec(
                return err;
            }

            int32_t maxWidth = 0, maxHeight = 0;
            if (msg->findInt32("max-width", &maxWidth) &&
                    msg->findInt32("max-height", &maxHeight)) {

                err = mOMX->prepareForAdaptivePlayback(
                        mNode, kPortIndexOutput, OMX_TRUE, maxWidth, maxHeight);
                if (err != OK) {
                    ALOGW("[%s] prepareForAdaptivePlayback failed w/ err %d",
                            mComponentName.c_str(), err);
                } else {
                    inputFormat->setInt32("max-width", maxWidth);
                    inputFormat->setInt32("max-height", maxHeight);
                    inputFormat->setInt32("adaptive-playback", true);
                }
            }
        } else {
            ALOGV("Configuring CPU controlled video playback.");
            mTunneled = false;