diff options
author | dhacker29 <davidhackerdvm@gmail.com> | 2014-11-23 17:57:55 -0800 |
---|---|---|
committer | Ethan Chen <intervigil@gmail.com> | 2014-11-23 18:01:03 -0800 |
commit | 6146bdb10e1d2e74b06f0906c5a7ffd7d3605fc2 (patch) | |
tree | 3294aef8ad604ffa704919594ae504f00269b9c2 | |
parent | a755a9e946b33965e4d2c63cb40d4b286c709d86 (diff) | |
download | android_hardware_qcom_media-6146bdb10e1d2e74b06f0906c5a7ffd7d3605fc2.tar.gz android_hardware_qcom_media-6146bdb10e1d2e74b06f0906c5a7ffd7d3605fc2.tar.bz2 android_hardware_qcom_media-6146bdb10e1d2e74b06f0906c5a7ffd7d3605fc2.zip |
mm-video: vdec: Allow devices to disable adaptive playback
* Older Adreno drivers have problems with adaptive playback due to
incompatibility inside the library.
* Allow devices to choose to not advertise adaptive playback capability
if bad output results.
Change-Id: Ie68fb9f8ec2122f2fc6e6654d9fdbc773dff509a
-rw-r--r-- | mm-video/vidc/vdec/Android.mk | 4 | ||||
-rw-r--r-- | mm-video/vidc/vdec/src/omx_vdec.cpp | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/mm-video/vidc/vdec/Android.mk b/mm-video/vidc/vdec/Android.mk index eedcf889..390059c9 100644 --- a/mm-video/vidc/vdec/Android.mk +++ b/mm-video/vidc/vdec/Android.mk @@ -44,6 +44,10 @@ libOmxVdec-def += -D_ANDROID_ICS_ libOmxVdec-def += -DUSE_ION #endif +ifeq ($(TARGET_NO_ADAPTIVE_PLAYBACK),true) +libOmxVdec-def += -DNO_ADAPTIVE_PLAYBACK +endif + # --------------------------------------------------------------------------------- # Make the Shared library (libOmxVdec) # --------------------------------------------------------------------------------- diff --git a/mm-video/vidc/vdec/src/omx_vdec.cpp b/mm-video/vidc/vdec/src/omx_vdec.cpp index 9ccdc6b8..2829b424 100644 --- a/mm-video/vidc/vdec/src/omx_vdec.cpp +++ b/mm-video/vidc/vdec/src/omx_vdec.cpp @@ -4349,10 +4349,12 @@ OMX_ERRORTYPE omx_vdec::get_extension_index(OMX_IN OMX_HANDLETYPE hComp, else if(!strncmp(paramName,"OMX.google.android.index.getAndroidNativeBufferUsage", sizeof("OMX.google.android.index.getAndroidNativeBufferUsage") - 1)) { *indexType = (OMX_INDEXTYPE)OMX_GoogleAndroidIndexGetAndroidNativeBufferUsage; } +#ifndef NO_ADAPTIVE_PLAYBACK else if(!strncmp(paramName,"OMX.google.android.index.prepareForAdaptivePlayback", sizeof("OMX.google.android.index.prepareForAdaptivePlayback") - 1)) { *indexType = (OMX_INDEXTYPE)OMX_GoogleAndroidIndexPrepareForAdaptivePlayback; } #endif +#endif else { DEBUG_PRINT_ERROR("Extension: %s not implemented\n", paramName); return OMX_ErrorNotImplemented; |