summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorRachad <rachad@google.com>2014-12-12 17:41:36 -0800
committerRachad <rachad@google.com>2014-12-12 18:06:59 -0800
commitd0b9a2b8538c9e4538d92fd675cf6786644ccb85 (patch)
tree9f59612b10e68b13f94a86d337d970324a17719a /media
parentc73ca6ef04136f28306784ad35f444538f081957 (diff)
downloadframeworks_av-d0b9a2b8538c9e4538d92fd675cf6786644ccb85.zip
frameworks_av-d0b9a2b8538c9e4538d92fd675cf6786644ccb85.tar.gz
frameworks_av-d0b9a2b8538c9e4538d92fd675cf6786644ccb85.tar.bz2
Tunneled video Playback/Max resolution:
Call mOmx->prepareForAdaptivePlayback() to provide max resolution information to tunneled OMX component. bug: 17883772 Change-Id: I8f634824103e66483527828993bb24f65e68e419
Diffstat (limited to 'media')
-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;