diff options
author | Chong Zhang <chz@google.com> | 2015-07-18 04:52:50 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-07-18 04:52:51 +0000 |
commit | f8f669d7a727e4ad5505cd85741f4d50dbaffbf9 (patch) | |
tree | 5e6a28a6a6ead0798be7bab2e61eff08def18303 /media/libstagefright/MediaCodec.cpp | |
parent | 51390b48d311d1164a6638d3fe0b4a48aaa9028f (diff) | |
parent | 505aab41c0e8e79a49d4506344fcd9d220d5965b (diff) | |
download | frameworks_av-f8f669d7a727e4ad5505cd85741f4d50dbaffbf9.zip frameworks_av-f8f669d7a727e4ad5505cd85741f4d50dbaffbf9.tar.gz frameworks_av-f8f669d7a727e4ad5505cd85741f4d50dbaffbf9.tar.bz2 |
Merge "fix soft renderer rotation" into mnc-dev
Diffstat (limited to 'media/libstagefright/MediaCodec.cpp')
-rw-r--r-- | media/libstagefright/MediaCodec.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp index 09742a4..b444687 100644 --- a/media/libstagefright/MediaCodec.cpp +++ b/media/libstagefright/MediaCodec.cpp @@ -247,6 +247,7 @@ MediaCodec::MediaCodec(const sp<ALooper> &looper) mIsVideo(false), mVideoWidth(0), mVideoHeight(0), + mRotationDegrees(0), mDequeueInputTimeoutGeneration(0), mDequeueInputReplyID(0), mDequeueOutputTimeoutGeneration(0), @@ -409,6 +410,9 @@ status_t MediaCodec::configure( if (mIsVideo) { format->findInt32("width", &mVideoWidth); format->findInt32("height", &mVideoHeight); + if (!format->findInt32("rotation-degrees", &mRotationDegrees)) { + mRotationDegrees = 0; + } } msg->setMessage("format", format); @@ -1309,7 +1313,7 @@ void MediaCodec::onMessageReceived(const sp<AMessage> &msg) { CHECK(msg->findString("mime", &mime)); if (mime.startsWithIgnoreCase("video/")) { - mSoftRenderer = new SoftwareRenderer(mSurface); + mSoftRenderer = new SoftwareRenderer(mSurface, mRotationDegrees); } } |