]> git.sesse.net Git - vlc/commitdiff
omxil: Enable OMX.SEC.index.ThumbnailMode if available
authorMartin Storsjö <martin@martin.st>
Thu, 22 Sep 2011 11:12:37 +0000 (14:12 +0300)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 22 Sep 2011 11:56:05 +0000 (13:56 +0200)
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.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
modules/codec/omxil/omxil.c

index a1a9bb609258c56818c5d5d753a8470a094d18e2..177567e1d8ddb5b8a71712b18c8ebcb4ff0c252d 100644 (file)
@@ -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++)
     {