|
@@ -1,4 +1,4 @@
|
|
|
-From 5d1874d24159c8ad4541d5e00ec7319c86cd896a Mon Sep 17 00:00:00 2001
|
|
|
+From 5efe94bd6eb06acb6055eb1a45e27269522dc215 Mon Sep 17 00:00:00 2001
|
|
|
From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
|
|
|
Date: Mon, 23 Nov 2015 16:09:24 +0100
|
|
|
Subject: [PATCH 14/14] libvlc: expose a base set of freetype options to
|
|
@@ -8,16 +8,16 @@ Subject: [PATCH 14/14] libvlc: expose a base set of freetype options to
|
|
|
include/vlc/libvlc_media_player.h | 26 ++++++++++++
|
|
|
lib/libvlc.sym | 6 +++
|
|
|
lib/media_player.c | 6 +++
|
|
|
- lib/video.c | 66 +++++++++++++++++++++++++++++++
|
|
|
- modules/text_renderer/freetype/freetype.c | 58 +++++++++++++++++++++++++--
|
|
|
+ lib/video.c | 68 ++++++++++++++++++++++++++++++-
|
|
|
+ modules/text_renderer/freetype/freetype.c | 59 +++++++++++++++++++++++++--
|
|
|
modules/text_renderer/freetype/freetype.h | 2 +
|
|
|
- 6 files changed, 161 insertions(+), 3 deletions(-)
|
|
|
+ 6 files changed, 163 insertions(+), 4 deletions(-)
|
|
|
|
|
|
diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
|
|
|
-index 6614340..ef5c54c 100644
|
|
|
+index 76443c1..23a0183 100644
|
|
|
--- a/include/vlc/libvlc_media_player.h
|
|
|
+++ b/include/vlc/libvlc_media_player.h
|
|
|
-@@ -1515,6 +1515,32 @@ LIBVLC_API float libvlc_video_get_adjust_float( libvlc_media_player_t *p_mi,
|
|
|
+@@ -1521,6 +1521,32 @@ LIBVLC_API float libvlc_video_get_adjust_float( libvlc_media_player_t *p_mi,
|
|
|
LIBVLC_API void libvlc_video_set_adjust_float( libvlc_media_player_t *p_mi,
|
|
|
unsigned option, float value );
|
|
|
|
|
@@ -51,7 +51,7 @@ index 6614340..ef5c54c 100644
|
|
|
|
|
|
/** \defgroup libvlc_audio LibVLC audio controls
|
|
|
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
|
|
|
-index 49207db..88d2478 100644
|
|
|
+index 49207db..15fa384 100644
|
|
|
--- a/lib/libvlc.sym
|
|
|
+++ b/lib/libvlc.sym
|
|
|
@@ -229,6 +229,9 @@ libvlc_video_get_spu_count
|
|
@@ -59,8 +59,8 @@ index 49207db..88d2478 100644
|
|
|
libvlc_video_get_spu_description
|
|
|
libvlc_video_get_teletext
|
|
|
+libvlc_video_get_textrenderer_bool
|
|
|
-+libvlc_video_get_text_renderer_int
|
|
|
-+libvlc_video_get_text_renderer_string
|
|
|
++libvlc_video_get_textrenderer_int
|
|
|
++libvlc_video_get_textrenderer_string
|
|
|
libvlc_video_get_title_description
|
|
|
libvlc_video_get_track
|
|
|
libvlc_video_get_track_count
|
|
@@ -69,13 +69,13 @@ index 49207db..88d2478 100644
|
|
|
libvlc_video_set_subtitle_file
|
|
|
libvlc_video_set_teletext
|
|
|
+libvlc_video_set_textrenderer_bool
|
|
|
-+libvlc_video_set_text_renderer_int
|
|
|
-+libvlc_video_set_text_renderer_string
|
|
|
++libvlc_video_set_textrenderer_int
|
|
|
++libvlc_video_set_textrenderer_string
|
|
|
libvlc_video_set_track
|
|
|
libvlc_video_take_snapshot
|
|
|
libvlc_vlm_add_broadcast
|
|
|
diff --git a/lib/media_player.c b/lib/media_player.c
|
|
|
-index 3ff4b8a..dca0ffc 100644
|
|
|
+index 533988f..7ab8954 100644
|
|
|
--- a/lib/media_player.c
|
|
|
+++ b/lib/media_player.c
|
|
|
@@ -640,6 +640,12 @@ libvlc_media_player_new( libvlc_instance_t *instance )
|
|
@@ -92,9 +92,18 @@ index 3ff4b8a..dca0ffc 100644
|
|
|
var_Create (mp, "aout", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
|
|
|
var_Create (mp, "audio-device", VLC_VAR_STRING);
|
|
|
diff --git a/lib/video.c b/lib/video.c
|
|
|
-index b2c9b34..a18d711 100644
|
|
|
+index b2c9b34..6af4e1c 100644
|
|
|
--- a/lib/video.c
|
|
|
+++ b/lib/video.c
|
|
|
+@@ -635,7 +635,7 @@ static bool find_sub_source_by_name( libvlc_media_player_t *p_mi, const char *re
|
|
|
+ }
|
|
|
+
|
|
|
+ typedef const struct {
|
|
|
+- const char name[20];
|
|
|
++ const char name[25];
|
|
|
+ unsigned type;
|
|
|
+ } opt_t;
|
|
|
+
|
|
|
@@ -664,6 +664,9 @@ set_int( libvlc_media_player_t *p_mi, const char *restrict name,
|
|
|
case VLC_VAR_FLOAT:
|
|
|
var_SetFloat( p_mi, opt->name, value );
|
|
@@ -180,7 +189,7 @@ index b2c9b34..a18d711 100644
|
|
|
+ return get_string( p_mi, "freetype", textrenderer_option_bynumber(option) );
|
|
|
+}
|
|
|
diff --git a/modules/text_renderer/freetype/freetype.c b/modules/text_renderer/freetype/freetype.c
|
|
|
-index 3409460..acb8c08 100644
|
|
|
+index 3409460..4e3da96 100644
|
|
|
--- a/modules/text_renderer/freetype/freetype.c
|
|
|
+++ b/modules/text_renderer/freetype/freetype.c
|
|
|
@@ -77,6 +77,9 @@
|
|
@@ -254,7 +263,7 @@ index 3409460..acb8c08 100644
|
|
|
/* Attachments */
|
|
|
if( p_sys->pp_font_attachments )
|
|
|
{
|
|
|
-@@ -1353,3 +1375,33 @@ static void Destroy( vlc_object_t *p_this )
|
|
|
+@@ -1353,3 +1375,34 @@ static void Destroy( vlc_object_t *p_this )
|
|
|
free( p_sys );
|
|
|
}
|
|
|
|
|
@@ -270,9 +279,9 @@ index 3409460..acb8c08 100644
|
|
|
+ if( !strcmp( psz_var, "freetype-font" ) ) {
|
|
|
+ FREENULL( p_sys->p_default_style->psz_fontname );
|
|
|
+ p_sys->p_default_style->psz_fontname = strdup( newval.psz_string );
|
|
|
-+ } else if( !strcmp( psz_var, "freetype-rel-fontsize" ) )
|
|
|
-+ p_sys->p_forced_style->f_font_relsize = (int)p_filter->fmt_out.video.i_height / newval.i_int;
|
|
|
-+ else if( !strcmp( psz_var, "freetype-color" ) )
|
|
|
++ } else if( !strcmp( psz_var, "freetype-rel-fontsize" ) ) {
|
|
|
++ p_sys->p_forced_style->f_font_relsize = 1.0 / newval.i_int;
|
|
|
++ } else if( !strcmp( psz_var, "freetype-color" ) )
|
|
|
+ p_sys->p_default_style->i_font_color = VLC_CLIP(newval.i_int, 0, 0xFFFFFF);
|
|
|
+ else if ( !strcmp( psz_var, "freetype-bold" ) )
|
|
|
+ {
|
|
@@ -284,6 +293,7 @@ index 3409460..acb8c08 100644
|
|
|
+ p_sys->p_forced_style->i_features &= ~STYLE_HAS_FLAGS;
|
|
|
+ }
|
|
|
+ }
|
|
|
++ text_style_Merge( p_sys->p_default_style, p_sys->p_forced_style, true );
|
|
|
+ vlc_mutex_unlock( &p_sys->lock );
|
|
|
+
|
|
|
+ return VLC_SUCCESS;
|
|
@@ -302,5 +312,5 @@ index 44b2731..7f1abec 100644
|
|
|
|
|
|
/**
|
|
|
--
|
|
|
-2.6.3
|
|
|
+2.7.0
|
|
|
|