Skip to content

Commit 6146bdb

Browse files
dhacker29intervigilium
authored andcommitted
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
1 parent a755a9e commit 6146bdb

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

mm-video/vidc/vdec/Android.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ libOmxVdec-def += -D_ANDROID_ICS_
4444
libOmxVdec-def += -DUSE_ION
4545
#endif
4646

47+
ifeq ($(TARGET_NO_ADAPTIVE_PLAYBACK),true)
48+
libOmxVdec-def += -DNO_ADAPTIVE_PLAYBACK
49+
endif
50+
4751
# ---------------------------------------------------------------------------------
4852
# Make the Shared library (libOmxVdec)
4953
# ---------------------------------------------------------------------------------

mm-video/vidc/vdec/src/omx_vdec.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4349,9 +4349,11 @@ OMX_ERRORTYPE omx_vdec::get_extension_index(OMX_IN OMX_HANDLETYPE hComp,
43494349
else if(!strncmp(paramName,"OMX.google.android.index.getAndroidNativeBufferUsage", sizeof("OMX.google.android.index.getAndroidNativeBufferUsage") - 1)) {
43504350
*indexType = (OMX_INDEXTYPE)OMX_GoogleAndroidIndexGetAndroidNativeBufferUsage;
43514351
}
4352+
#ifndef NO_ADAPTIVE_PLAYBACK
43524353
else if(!strncmp(paramName,"OMX.google.android.index.prepareForAdaptivePlayback", sizeof("OMX.google.android.index.prepareForAdaptivePlayback") - 1)) {
43534354
*indexType = (OMX_INDEXTYPE)OMX_GoogleAndroidIndexPrepareForAdaptivePlayback;
43544355
}
4356+
#endif
43554357
#endif
43564358
else {
43574359
DEBUG_PRINT_ERROR("Extension: %s not implemented\n", paramName);

0 commit comments

Comments
 (0)