]> git.sesse.net Git - vlc/commitdiff
omxil: Hardcode known roles for OMX broadcom components on raspberry pi
authorMartin Storsjö <martin@martin.st>
Mon, 11 Mar 2013 14:52:11 +0000 (16:52 +0200)
committerMartin Storsjö <martin@martin.st>
Mon, 18 Mar 2013 16:24:29 +0000 (18:24 +0200)
This OMX core does not list any roles for the components.

Signed-off-by: Martin Storsjö <martin@martin.st>
modules/codec/omxil/omxil_core.c

index 976b53cf7d0e64a7e1adc1d359f74513632079ec..66c1aab9e3c99b06e84cfd5fe07465490f8c2fe4 100644 (file)
@@ -212,6 +212,18 @@ int CreateComponentsList(vlc_object_t *p_this, const char *psz_role,
 
         msg_Dbg(p_this, "component %s", psz_name);
 
+#ifdef RPI_OMX
+        if (!strcmp(psz_name, "OMX.broadcom.video_decode")) {
+            if (!strcmp(psz_role, "video_decoder.avc")) {
+                goto found;
+            }
+        } else if (!strcmp(psz_name, "OMX.broadcom.video_render")) {
+            if (!strcmp(psz_role, "iv_renderer")) {
+                goto found;
+            }
+        }
+#endif
+
         omx_error = pf_get_roles_of_component(psz_name, &roles, 0);
         if(omx_error != OMX_ErrorNone || !roles) continue;
 
@@ -235,6 +247,7 @@ int CreateComponentsList(vlc_object_t *p_this, const char *psz_role,
 
         if(!b_found) continue;
 
+found:
         if(components >= MAX_COMPONENTS_LIST_SIZE)
         {
             msg_Dbg(p_this, "too many matching components");