diff options
author | Martin Storsjo <martin@martin.st> | 2013-09-25 16:26:09 +0300 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2013-09-25 16:33:30 +0300 |
commit | 6539f82d55d4457bc84ed23d57967346022c56dc (patch) | |
tree | 2a9643062c78edbd048a5e6fb59b0d80f83ca322 /media/libstagefright/MediaCodec.cpp | |
parent | e56f3c96fa6e7550b67e8b049f999aaa2ada1192 (diff) | |
download | frameworks_av-6539f82d55d4457bc84ed23d57967346022c56dc.zip frameworks_av-6539f82d55d4457bc84ed23d57967346022c56dc.tar.gz frameworks_av-6539f82d55d4457bc84ed23d57967346022c56dc.tar.bz2 |
MediaCodec: Pass the crop rect to SoftwareRenderer
Change-Id: I434411516eb5fafe9d7aeac9882bbc7f1a8415d8
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 f412dc8..674e6e5 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -729,6 +729,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)); @@ -736,6 +740,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 = |