[vlc-devel] [PATCH 1/3] vout: support rendering subpictures in display dimensions

Salah-Eddin Shaban salah at videolan.org
Fri Mar 3 18:05:51 CET 2017


---
 include/vlc_vout_display.h      | 1 +
 src/video_output/video_output.c | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 46825be..05ea39b 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -131,6 +131,7 @@ typedef struct {
     bool has_hide_mouse;                    /* Is mouse automatically hidden */
     bool has_pictures_invalid;              /* Will VOUT_DISPLAY_EVENT_PICTURES_INVALID be used */
     bool needs_event_thread VLC_DEPRECATED; /* Will events (key at least) be emitted using an independent thread */
+    bool scale_spu_to_display;              /* Subpictures not restricted to video area */
     const vlc_fourcc_t *subpicture_chromas; /* List of supported chromas for subpicture rendering. */
 } vout_display_info_t;
 
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 155d6a9..b13fe88 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -912,6 +912,15 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)
             fmt_spu.i_height         =
             fmt_spu.i_visible_height = place.height;
         }
+
+        if( vd->info.scale_spu_to_display )
+        {
+            fmt_spu.i_width          =
+            fmt_spu.i_visible_width  = vd->cfg->display.width;
+            fmt_spu.i_height         =
+            fmt_spu.i_visible_height = vd->cfg->display.height;
+        }
+
         subpicture_chromas = vd->info.subpicture_chromas;
     } else {
         if (do_early_spu) {
-- 
2.10.2



More information about the vlc-devel mailing list