summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
diff options
context:
space:
mode:
authorRachad <rachad@google.com>2014-12-15 18:46:48 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-15 18:46:48 +0000
commit96143d433419e789c5667a54d54ca0241f3286f0 (patch)
treedee470865a6c32fcb1689e452a75f2d19f56e2ce /media/libstagefright
parent1fceb5697728557116a109d45e4eacc134ff738c (diff)
parent690257fe8288bc6f84069cc4b5d7f2a76e850401 (diff)
downloadframeworks_av-96143d433419e789c5667a54d54ca0241f3286f0.zip
frameworks_av-96143d433419e789c5667a54d54ca0241f3286f0.tar.gz
frameworks_av-96143d433419e789c5667a54d54ca0241f3286f0.tar.bz2
am 690257fe: 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 '690257fe8288bc6f84069cc4b5d7f2a76e850401': Tunneled video Playback/Max resolution: Call mOmx->prepareForAdaptivePlayback() to provide max resolution information to tunneled OMX component.
Diffstat (limited to 'media/libstagefright')
-rw-r--r--media/libstagefright/ACodec.cpp16
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;