diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-01-21 09:23:23 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-01-21 09:24:11 +0000 |
commit | 7f0daebf8f73db51bd26a01aace179e07f59d188 (patch) | |
tree | 7c69b85f8be94203cc69e12a47a567ab396eb676 /main/vlc/0002-omxil-vout-Handle-dynamic-aspect-changes.patch | |
parent | a48995c297ca129b2beeac0533379e9f44c8a1f7 (diff) | |
download | aports-7f0daebf8f73db51bd26a01aace179e07f59d188.tar.bz2 aports-7f0daebf8f73db51bd26a01aace179e07f59d188.tar.xz |
main/vlc: cherrypick some omxil (rpi) patches
Diffstat (limited to 'main/vlc/0002-omxil-vout-Handle-dynamic-aspect-changes.patch')
-rw-r--r-- | main/vlc/0002-omxil-vout-Handle-dynamic-aspect-changes.patch | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/main/vlc/0002-omxil-vout-Handle-dynamic-aspect-changes.patch b/main/vlc/0002-omxil-vout-Handle-dynamic-aspect-changes.patch new file mode 100644 index 0000000000..d2dd8572f9 --- /dev/null +++ b/main/vlc/0002-omxil-vout-Handle-dynamic-aspect-changes.patch @@ -0,0 +1,81 @@ +From 3b564f5f943a0687706ff5f1b6a70288eacfd909 Mon Sep 17 00:00:00 2001 +From: Julian Scheel <julian@jusst.de> +Date: Thu, 5 Sep 2013 16:03:01 +0200 +Subject: [PATCH] omxil: vout: Handle dynamic aspect changes. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Handle changes of aspect ratio through the Control handler. + +Signed-off-by: Julian Scheel <julian@jusst.de> +Signed-off-by: Martin Storsjö <martin@martin.st> +--- + modules/codec/omxil/vout.c | 33 +++++++++++++++++++++++++-------- + 1 file changed, 25 insertions(+), 8 deletions(-) + +diff --git a/modules/codec/omxil/vout.c b/modules/codec/omxil/vout.c +index 48aa744..d0864ae 100644 +--- a/modules/codec/omxil/vout.c ++++ b/modules/codec/omxil/vout.c +@@ -126,6 +126,22 @@ static OMX_ERRORTYPE OmxFillBufferDone(OMX_HANDLETYPE omx_handle, + return OMX_ErrorNone; + } + ++static void UpdateDisplaySize(vout_display_t *vd, vout_display_cfg_t *cfg) ++{ ++ OMX_CONFIG_DISPLAYREGIONTYPE config_display; ++ OMX_INIT_STRUCTURE(config_display); ++ ++ /* OMX_DISPLAY_SET_PIXEL is broadcom specific */ ++ if (strcmp(vd->sys->psz_component, "OMX.broadcom.video_render")) ++ return; ++ ++ config_display.nPortIndex = vd->sys->port.i_port_index; ++ config_display.set = OMX_DISPLAY_SET_PIXEL; ++ config_display.pixel_x = cfg->display.width * vd->fmt.i_height; ++ config_display.pixel_y = cfg->display.height * vd->fmt.i_width; ++ OMX_SetConfig(vd->sys->omx_handle, OMX_IndexConfigDisplayRegion, &config_display); ++} ++ + static int Open(vlc_object_t *p_this) + { + vout_display_t *vd = (vout_display_t *)p_this; +@@ -261,12 +277,7 @@ static int Open(vlc_object_t *p_this) + config_display.fullscreen = OMX_TRUE; + OMX_SetConfig(p_sys->omx_handle, OMX_IndexConfigDisplayRegion, &config_display); + +- if (vd->fmt.i_width != vd->cfg->display.width || vd->fmt.i_height != vd->cfg->display.height) { +- config_display.set = OMX_DISPLAY_SET_PIXEL; +- config_display.pixel_x = vd->cfg->display.width * vd->fmt.i_height; +- config_display.pixel_y = vd->cfg->display.height * vd->fmt.i_width; +- OMX_SetConfig(p_sys->omx_handle, OMX_IndexConfigDisplayRegion, &config_display); +- } ++ UpdateDisplaySize(vd, vd->cfg); + } + + +@@ -444,12 +455,18 @@ static int Control(vout_display_t *vd, int query, va_list args) + default: + msg_Err(vd, "Unknown request in omxil vout display"); + ++ case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT: ++ return VLC_SUCCESS; ++ case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: ++ { ++ const vout_display_cfg_t *cfg = va_arg(args, const vout_display_cfg_t *); ++ UpdateDisplaySize(vd, cfg); ++ return VLC_SUCCESS; ++ } + case VOUT_DISPLAY_CHANGE_FULLSCREEN: + case VOUT_DISPLAY_CHANGE_WINDOW_STATE: +- case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: + case VOUT_DISPLAY_CHANGE_DISPLAY_FILLED: + case VOUT_DISPLAY_CHANGE_ZOOM: +- case VOUT_DISPLAY_CHANGE_SOURCE_ASPECT: + case VOUT_DISPLAY_CHANGE_SOURCE_CROP: + case VOUT_DISPLAY_GET_OPENGL: + return VLC_EGENERIC; +-- +1.8.5.2 + |