diff options
author | Rachad <rachad@google.com> | 2014-12-13 02:15:13 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-12-13 02:15:13 +0000 |
commit | 8ddb02230d02968d471aa41b22433957c38827c0 (patch) | |
tree | 3030b6e69d70a5a9b7250460f4a70b77dda95155 /media | |
parent | 554016a37167fc5cb449be3d93a9290e4a0dac21 (diff) | |
parent | d0b9a2b8538c9e4538d92fd675cf6786644ccb85 (diff) | |
download | frameworks_av-8ddb02230d02968d471aa41b22433957c38827c0.zip frameworks_av-8ddb02230d02968d471aa41b22433957c38827c0.tar.gz frameworks_av-8ddb02230d02968d471aa41b22433957c38827c0.tar.bz2 |
Merge "Tunneled video Playback/Max resolution: Call mOmx->prepareForAdaptivePlayback() to provide max resolution information to tunneled OMX component." into lmp-mr1-dev
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 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; |