[vlc-devel] [PATCH] mmal/vout: Add option to disable background layer
Julian Scheel
julian at jusst.de
Thu Oct 8 09:54:56 CEST 2015
Introduce a new option that allows users to disable the creation of a black
dispman layer below the video layer for fullscreen video. While this extra
layer ensures that unused screen areas are blanked in any case it does also
cost extra processing power. In some circumstances users may have to save this
extra power, for which this option can be used now.
Signed-off-by: Julian Scheel <julian at jusst.de>
---
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 dc1a273..52fdabd 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -50,6 +50,10 @@
#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 the screen behind the video in fullscreen mode.")
+#define MMAL_BLANK_BACKGROUND_LONGTEXT N_("Add an extra VideoCore layer below the video layer for fullscreen output to make sure the background is black if the video is not occupying the entire screen, ie due to aspect mismatch. This comes at the cost of some extra processing power being used by the VideoCore.")
+
#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 +76,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,
@@ -427,7 +433,8 @@ 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, cfg->is_fullscreen &&
+ 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.6.0
More information about the vlc-devel
mailing list