diff options
author | Lajos Molnar <lajos@google.com> | 2014-11-06 10:51:06 -0800 |
---|---|---|
committer | Lajos Molnar <lajos@google.com> | 2014-11-19 16:50:48 -0800 |
commit | 6597c00f7015e5ec9a07601d7a760169ca7266d3 (patch) | |
tree | 0a21fd103d45476c11e812b6d796dc5849df4299 /media | |
parent | 18899808001ddaea13fa4c5277502c96351f69a5 (diff) | |
download | frameworks_av-6597c00f7015e5ec9a07601d7a760169ca7266d3.zip frameworks_av-6597c00f7015e5ec9a07601d7a760169ca7266d3.tar.gz frameworks_av-6597c00f7015e5ec9a07601d7a760169ca7266d3.tar.bz2 |
stagefright: add (temporary) support for automatic video frc
Use MediaFormat.setInteger("auto-frc", 1) to turn this feature on.
If supported, this feature will show up in codec.getOutputFormat().getInteger("auto-frc")
Otherwise, this key will not be present.
Bug: 17383204
Change-Id: I03549b3ede4de156e9e2d81b3883010360bb42ae
Diffstat (limited to 'media')
-rw-r--r-- | media/libstagefright/ACodec.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index 0e9d734..1413635 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -1268,6 +1268,24 @@ status_t ACodec::configureCodec( static_cast<NativeWindowWrapper *>(obj.get())); sp<ANativeWindow> nativeWindow = windowWrapper->getNativeWindow(); + // START of temporary support for automatic FRC - THIS WILL BE REMOVED + int32_t autoFrc; + if (msg->findInt32("auto-frc", &autoFrc)) { + bool enabled = autoFrc; + OMX_CONFIG_BOOLEANTYPE config; + InitOMXParams(&config); + config.bEnabled = (OMX_BOOL)enabled; + status_t temp = mOMX->setConfig( + mNode, (OMX_INDEXTYPE)OMX_IndexConfigAutoFramerateConversion, + &config, sizeof(config)); + if (temp == OK) { + outputFormat->setInt32("auto-frc", enabled); + } else if (enabled) { + ALOGI("codec does not support requested auto-frc (err %d)", temp); + } + } + // END of temporary support for automatic FRC + int32_t tunneled; if (msg->findInt32("feature-tunneled-playback", &tunneled) && tunneled != 0) { |