omxil_vout: Set broadcom specific parameters
authorMartin Storsjö <martin@martin.st>
Mon, 11 Mar 2013 14:52:28 +0000 (16:52 +0200)
committerMartin Storsjö <martin@martin.st>
Mon, 18 Mar 2013 16:34:33 +0000 (18:34 +0200)
Signed-off-by: Martin Storsjö <martin@martin.st>
modules/codec/omxil/vout.c

index 3389855..a365aac 100644 (file)
 
 #include "omxil.h"
 #include "omxil_core.h"
+#include "OMX_Broadcom.h"
+
+// Defined in the broadcom version of OMX_Index.h
+#define OMX_IndexConfigDisplayRegion 0x7f000010
 
 /*****************************************************************************
  * Module descriptor
@@ -233,6 +237,20 @@ static int Open(vlc_object_t *p_this)
     CHECK_ERROR(omx_error, "Wait for Executing failed (%x: %s)",
                 omx_error, ErrorToString(omx_error));
 
+    if (!strcmp(p_sys->psz_component, "OMX.broadcom.video_render")) {
+        OMX_CONFIG_DISPLAYREGIONTYPE config_display;
+        OMX_INIT_STRUCTURE(config_display);
+        config_display.nPortIndex = p_sys->port.i_port_index;
+
+        config_display.set = OMX_DISPLAY_SET_SRC_RECT;
+        config_display.src_rect.width = vd->cfg->display.width;
+        config_display.src_rect.height = vd->cfg->display.height;
+        OMX_SetConfig(p_sys->omx_handle, OMX_IndexConfigDisplayRegion, &config_display);
+        config_display.set = OMX_DISPLAY_SET_FULLSCREEN;
+        config_display.fullscreen = OMX_TRUE;
+        OMX_SetConfig(p_sys->omx_handle, OMX_IndexConfigDisplayRegion, &config_display);
+    }
+
 
     /* Setup chroma */
     video_format_t fmt = vd->fmt;