Loading media/libstagefright/MediaCodec.cpp +23 −1 Original line number Diff line number Diff line Loading @@ -637,6 +637,9 @@ MediaCodec::MediaCodec( mDequeueInputReplyID(0), mDequeueOutputTimeoutGeneration(0), mDequeueOutputReplyID(0), mTunneledInputWidth(0), mTunneledInputHeight(0), mTunneled(false), mHaveInputSurface(false), mHavePendingInputBuffers(false), mCpuBoostRequested(false), Loading Loading @@ -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; } Loading Loading @@ -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), Loading media/libstagefright/include/media/stagefright/MediaCodec.h +4 −0 Original line number Diff line number Diff line Loading @@ -418,6 +418,10 @@ private: sp<ICrypto> mCrypto; int32_t mTunneledInputWidth; int32_t mTunneledInputHeight; bool mTunneled; sp<IDescrambler> mDescrambler; List<sp<ABuffer> > mCSD; Loading Loading
media/libstagefright/MediaCodec.cpp +23 −1 Original line number Diff line number Diff line Loading @@ -637,6 +637,9 @@ MediaCodec::MediaCodec( mDequeueInputReplyID(0), mDequeueOutputTimeoutGeneration(0), mDequeueOutputReplyID(0), mTunneledInputWidth(0), mTunneledInputHeight(0), mTunneled(false), mHaveInputSurface(false), mHavePendingInputBuffers(false), mCpuBoostRequested(false), Loading Loading @@ -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; } Loading Loading @@ -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), Loading
media/libstagefright/include/media/stagefright/MediaCodec.h +4 −0 Original line number Diff line number Diff line Loading @@ -418,6 +418,10 @@ private: sp<ICrypto> mCrypto; int32_t mTunneledInputWidth; int32_t mTunneledInputHeight; bool mTunneled; sp<IDescrambler> mDescrambler; List<sp<ABuffer> > mCSD; Loading