diff options
author | Rachad <rachad@google.com> | 2014-12-13 02:27:40 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-12-13 02:27:40 +0000 |
commit | 690257fe8288bc6f84069cc4b5d7f2a76e850401 (patch) | |
tree | 362e9f63184958ec9a877f5252c675a962e8149e /media | |
parent | 1896bbb7797842960f37a6bd0f5654f046e9ff45 (diff) | |
parent | aff13ad4e639316bca12827d68a4f0a6ac54cd02 (diff) | |
download | frameworks_av-690257fe8288bc6f84069cc4b5d7f2a76e850401.zip frameworks_av-690257fe8288bc6f84069cc4b5d7f2a76e850401.tar.gz frameworks_av-690257fe8288bc6f84069cc4b5d7f2a76e850401.tar.bz2 |
am aff13ad4: am 8ddb0223: Merge "Tunneled video Playback/Max resolution: Call mOmx->prepareForAdaptivePlayback() to provide max resolution information to tunneled OMX component." into lmp-mr1-dev
* commit 'aff13ad4e639316bca12827d68a4f0a6ac54cd02':
Tunneled video Playback/Max resolution: Call mOmx->prepareForAdaptivePlayback() to provide max resolution information to tunneled OMX component.
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/ACodec.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 653d16c..dfb0101 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -1302,7 +1302,21 @@ status_t ACodec::configureCodec( return err; } - inputFormat->setInt32("adaptive-playback", true); + int32_t maxWidth = 0, maxHeight = 0; + if (msg->findInt32("max-width", &maxWidth) && + msg->findInt32("max-height", &maxHeight)) { + + err = mOMX->prepareForAdaptivePlayback( + mNode, kPortIndexOutput, OMX_TRUE, maxWidth, maxHeight); + if (err != OK) { + ALOGW("[%s] prepareForAdaptivePlayback failed w/ err %d", + mComponentName.c_str(), err); + } else { + inputFormat->setInt32("max-width", maxWidth); + inputFormat->setInt32("max-height", maxHeight); + inputFormat->setInt32("adaptive-playback", true); + } + } } else { ALOGV("Configuring CPU controlled video playback."); mTunneled = false; |