[vlc-devel] [PATCH 2/5] src: Move sub-text-scale variable to playlist scope

david.fuhrmann at gmail.com david.fuhrmann at gmail.com
Fri Jun 16 15:46:29 CEST 2017


From: David Fuhrmann <dfuhrmann at videolan.org>

This variable describes the general scale factor for sub texts,
which is typically set if the user percieves subtitles as too
small or too large in general.
Therefore it should be valid for the overall lifetime of a
VLC instance and not only valid for a single vout instance.
---
 src/playlist/engine.c        | 3 +++
 src/video_output/vout_intf.c | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/playlist/engine.c b/src/playlist/engine.c
index b5b17d0..0b0c82e 100644
--- a/src/playlist/engine.c
+++ b/src/playlist/engine.c
@@ -462,6 +462,9 @@ static void VariablesInit( playlist_t *p_playlist )
     var_Create( p_playlist, "mute", VLC_VAR_BOOL );
     var_Create( p_playlist, "volume", VLC_VAR_FLOAT );
     var_SetFloat( p_playlist, "volume", -1.f );
+
+    var_Create( p_playlist, "sub-text-scale",
+               VLC_VAR_INTEGER | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND );
 }
 
 playlist_item_t * playlist_CurrentPlayingItem( playlist_t * p_playlist )
diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index ce1e695..4f23d8b 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -295,9 +295,6 @@ void vout_IntfInit( vout_thread_t *p_vout )
                 VLC_VAR_INTEGER | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND );
     var_AddCallback( p_vout, "sub-margin", SubMarginCallback, NULL );
 
-    var_Create( p_vout, "sub-text-scale",
-                VLC_VAR_INTEGER | VLC_VAR_DOINHERIT | VLC_VAR_ISCOMMAND );
-
     /* Mouse coordinates */
     var_Create( p_vout, "mouse-button-down", VLC_VAR_INTEGER );
     var_Create( p_vout, "mouse-moved", VLC_VAR_COORDS );
-- 
2.7.4 (Apple Git-66)



More information about the vlc-devel mailing list