[vlc-devel] [PATCH 3/3] omxil: Enable OMX.SEC.index.ThumbnailMode if available

Martin Storsjö martin at martin.st
Thu Sep 22 13:12:37 CEST 2011


This custom setting makes sure the codec actually fills the
OMX buffers with data, instead of opaque pointers to buffers
residing elsewhere.

This is needed in order to get sensible data output on
Nexus S, and most probably also on Galaxy S.
---
 modules/codec/omxil/omxil.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/modules/codec/omxil/omxil.c b/modules/codec/omxil/omxil.c
index a1a9bb6..177567e 100644
--- a/modules/codec/omxil/omxil.c
+++ b/modules/codec/omxil/omxil.c
@@ -636,6 +636,18 @@ static OMX_ERRORTYPE InitialiseComponent(decoder_t *p_dec,
         CHECK_ERROR(omx_error, "couldn't find an input and output port");
     }
 
+    if(!strncmp(p_sys->psz_component, "OMX.SEC.", 8))
+    {
+        OMX_INDEXTYPE index;
+        omx_error = OMX_GetExtensionIndex(omx_handle, "OMX.SEC.index.ThumbnailMode", &index);
+        if(omx_error == OMX_ErrorNone)
+        {
+            OMX_BOOL enable = OMX_TRUE;
+            omx_error = OMX_SetConfig(omx_handle, index, &enable);
+            CHECK_ERROR(omx_error, "Unable to set ThumbnailMode");
+        }
+    }
+
     /* Set port definitions */
     for(i = 0; i < p_sys->ports; i++)
     {
-- 
1.7.2.5




More information about the vlc-devel mailing list