diff options
author | Lajos Molnar <lajos@google.com> | 2013-09-25 10:16:13 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-09-25 10:16:13 -0700 |
commit | a35b4278582175ee7e4082c0e93ddb4a83726f47 (patch) | |
tree | 69d88676f0848f4068b27471c1d94b3ad58bf779 /media/libstagefright/MediaCodec.cpp | |
parent | 42d4e659dec636fad2b76c562296812b80d67fac (diff) | |
parent | 6c63fe0fdb33e5e7eb8c89f2420262b072cdd83f (diff) | |
download | frameworks_av-a35b4278582175ee7e4082c0e93ddb4a83726f47.zip frameworks_av-a35b4278582175ee7e4082c0e93ddb4a83726f47.tar.gz frameworks_av-a35b4278582175ee7e4082c0e93ddb4a83726f47.tar.bz2 |
am 6c63fe0f: am ab70649e: Merge "MediaCodec: Pass the crop rect to SoftwareRenderer"
* commit '6c63fe0fdb33e5e7eb8c89f2420262b072cdd83f':
MediaCodec: Pass the crop rect to SoftwareRenderer
Diffstat (limited to 'media/libstagefright/MediaCodec.cpp')
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index e0686be..e299caf 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -746,6 +746,10 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { CHECK(msg->findInt32("width", &width)); CHECK(msg->findInt32("height", &height)); + int32_t cropLeft, cropTop, cropRight, cropBottom; + CHECK(msg->findRect("crop", + &cropLeft, &cropTop, &cropRight, &cropBottom)); + int32_t colorFormat; CHECK(msg->findInt32( "color-format", &colorFormat)); @@ -753,6 +757,8 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { sp<MetaData> meta = new MetaData; meta->setInt32(kKeyWidth, width); meta->setInt32(kKeyHeight, height); + meta->setRect(kKeyCropRect, + cropLeft, cropTop, cropRight, cropBottom); meta->setInt32(kKeyColorFormat, colorFormat); mSoftRenderer = |