diff options
author | Jeff Tinker <jtinker@google.com> | 2014-11-03 13:29:35 -0800 |
---|---|---|
committer | Jeff Tinker <jtinker@google.com> | 2014-11-03 18:39:23 -0800 |
commit | 2514d080c8a54ff603a45d7e336de668fe7329db (patch) | |
tree | c02e8521f99240935f7c672c9d79846addd785cb /media/libstagefright | |
parent | 3c1285e8f86bd497e14c14fb6df7b42072ef52bd (diff) | |
download | frameworks_av-2514d080c8a54ff603a45d7e336de668fe7329db.zip frameworks_av-2514d080c8a54ff603a45d7e336de668fe7329db.tar.gz frameworks_av-2514d080c8a54ff603a45d7e336de668fe7329db.tar.bz2 |
Pass resolution to Crypto plugin on format change
Change-Id: I56cd557ce3525fe625db8c312d2557d3c8b51101
related-to-bug: 16034599
Diffstat (limited to 'media/libstagefright')
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index df47bd5..d7ddc89 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -1011,6 +1011,16 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { mFlags |= kFlagOutputFormatChanged; postActivityNotificationIfPossible(); } + + // Notify mCrypto of video resolution changes + if (mCrypto != NULL) { + int32_t height, width; + if (mOutputFormat->findInt32("height", &height) && + mOutputFormat->findInt32("width", &width)) { + mCrypto->notifyResolution(width, height); + } + } + break; } |