summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRachad <rachad@google.com>2014-12-13 02:19:34 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-12-13 02:19:34 +0000
commitaff13ad4e639316bca12827d68a4f0a6ac54cd02 (patch)
tree3030b6e69d70a5a9b7250460f4a70b77dda95155
parentd4c0fef88384128acc4c986fe7d3026996d4a96b (diff)
parent8ddb02230d02968d471aa41b22433957c38827c0 (diff)
downloadframeworks_av-aff13ad4e639316bca12827d68a4f0a6ac54cd02.zip
frameworks_av-aff13ad4e639316bca12827d68a4f0a6ac54cd02.tar.gz
frameworks_av-aff13ad4e639316bca12827d68a4f0a6ac54cd02.tar.bz2
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 '8ddb02230d02968d471aa41b22433957c38827c0': Tunneled video Playback/Max resolution: Call mOmx->prepareForAdaptivePlayback() to provide max resolution information to tunneled OMX component.
-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 208f0d5..e1b3b4d 100644
--- a/media/libstagefright/ACodec.cpp
+++ b/media/libstagefright/ACodec.cpp
@@ -1303,7 +1303,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;