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

Commit 775ac580 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libstatgefright: nts OPL-001-TC4 test failed [1/1]" am: 6b6db5bf am: dca14d27

Original change: https://android-review.googlesource.com/c/platform/frameworks/av/+/1473240

Change-Id: I2d1a8a32e611e6024c37f1e66021fb9d3fb3e00a
parents f77442d7 dca14d27
Loading
Loading
Loading
Loading
+23 −1
Original line number Diff line number Diff line
@@ -637,6 +637,9 @@ MediaCodec::MediaCodec(
      mDequeueInputReplyID(0),
      mDequeueOutputTimeoutGeneration(0),
      mDequeueOutputReplyID(0),
      mTunneledInputWidth(0),
      mTunneledInputHeight(0),
      mTunneled(false),
      mHaveInputSurface(false),
      mHavePendingInputBuffers(false),
      mCpuBoostRequested(false),
@@ -2951,6 +2954,14 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) {

            extractCSD(format);

            int32_t tunneled;
            if (format->findInt32("feature-tunneled-playback", &tunneled) && tunneled != 0) {
                ALOGI("Configuring TUNNELED video playback.");
                mTunneled = true;
            } else {
                mTunneled = false;
            }

            mCodec->initiateConfigureComponent(format);
            break;
        }
@@ -3930,7 +3941,18 @@ status_t MediaCodec::onQueueInputBuffer(const sp<AMessage> &msg) {
    if (hasCryptoOrDescrambler() && !c2Buffer && !memory) {
        AString *errorDetailMsg;
        CHECK(msg->findPointer("errorDetailMsg", (void **)&errorDetailMsg));

        // Notify mCrypto of video resolution changes
        if (mTunneled && mCrypto != NULL) {
            int32_t width, height;
            if (mInputFormat->findInt32("width", &width) &&
                mInputFormat->findInt32("height", &height) && width > 0 && height > 0) {
                if (width != mTunneledInputWidth || height != mTunneledInputHeight) {
                    mTunneledInputWidth = width;
                    mTunneledInputHeight = height;
                    mCrypto->notifyResolution(width, height);
                }
            }
        }
        err = mBufferChannel->queueSecureInputBuffer(
                buffer,
                (mFlags & kFlagIsSecure),
+4 −0
Original line number Diff line number Diff line
@@ -418,6 +418,10 @@ private:

    sp<ICrypto> mCrypto;

    int32_t mTunneledInputWidth;
    int32_t mTunneledInputHeight;
    bool mTunneled;

    sp<IDescrambler> mDescrambler;

    List<sp<ABuffer> > mCSD;