From 4b898d321d77436204b573d066c61261d037f275 Mon Sep 17 00:00:00 2001 From: Julian Scheel Date: Thu, 19 Oct 2017 11:46:29 +0200 Subject: [PATCH] mmal/vout: Fix build Make the background switch independent from video size, as the is_fullscreen was removed from vout_display_cfg. Instead a cmdline options is introduced to enable or disable the background layer. Signed-off-by: Julian Scheel Signed-off-by: Jean-Baptiste Kempf --- modules/hw/mmal/vout.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c index 782ee48c4f..dc5807edd6 100644 --- a/modules/hw/mmal/vout.c +++ b/modules/hw/mmal/vout.c @@ -50,6 +50,11 @@ #define MMAL_LAYER_TEXT N_("VideoCore layer where the video is displayed.") #define MMAL_LAYER_LONGTEXT N_("VideoCore layer where the video is displayed. Subpictures are displayed directly above and a black background directly below.") +#define MMAL_BLANK_BACKGROUND_NAME "mmal-blank-background" +#define MMAL_BLANK_BACKGROUND_TEXT N_("Blank screen below video.") +#define MMAL_BLANK_BACKGROUND_LONGTEXT N_("Render blank screen below video. " \ + "Increases VideoCore load.") + #define MMAL_ADJUST_REFRESHRATE_NAME "mmal-adjust-refreshrate" #define MMAL_ADJUST_REFRESHRATE_TEXT N_("Adjust HDMI refresh rate to the video.") #define MMAL_ADJUST_REFRESHRATE_LONGTEXT N_("Adjust HDMI refresh rate to the video.") @@ -72,6 +77,8 @@ vlc_module_begin() set_capability("vout display", 90) add_shortcut("mmal_vout") add_integer(MMAL_LAYER_NAME, 1, MMAL_LAYER_TEXT, MMAL_LAYER_LONGTEXT, false) + add_bool(MMAL_BLANK_BACKGROUND_NAME, true, MMAL_BLANK_BACKGROUND_TEXT, + MMAL_BLANK_BACKGROUND_LONGTEXT, true); add_bool(MMAL_ADJUST_REFRESHRATE_NAME, false, MMAL_ADJUST_REFRESHRATE_TEXT, MMAL_ADJUST_REFRESHRATE_LONGTEXT, false) add_bool(MMAL_NATIVE_INTERLACED, false, MMAL_NATIVE_INTERLACE_TEXT, @@ -426,7 +433,7 @@ static int configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg, return -EINVAL; } - show_background(vd, cfg->is_fullscreen); + show_background(vd, var_InheritBool(vd, MMAL_BLANK_BACKGROUND_NAME)); sys->adjust_refresh_rate = var_InheritBool(vd, MMAL_ADJUST_REFRESHRATE_NAME); sys->native_interlaced = var_InheritBool(vd, MMAL_NATIVE_INTERLACED); if (sys->adjust_refresh_rate) { -- 2.20.1