[vlc-commits] vout: use var_Inherit*() for video-title* variables
Rémi Denis-Courmont
git at videolan.org
Wed May 1 10:10:55 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed May 1 11:08:45 2013 +0300| [6bd7c460c6668d608d198708dddeb160202c111f] | committer: Rémi Denis-Courmont
vout: use var_Inherit*() for video-title* variables
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6bd7c460c6668d608d198708dddeb160202c111f
---
modules/video_output/msw/common.c | 1 -
modules/video_output/msw/events.c | 2 +-
src/video_output/video_output.c | 6 +++---
src/video_output/vout_intf.c | 4 ----
src/video_output/vout_wrapper.c | 2 +-
5 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/modules/video_output/msw/common.c b/modules/video_output/msw/common.c
index b44ac45..a0e663d 100644
--- a/modules/video_output/msw/common.c
+++ b/modules/video_output/msw/common.c
@@ -77,7 +77,6 @@ int CommonInit(vout_display_t *vd)
sys->is_first_display = true;
sys->is_on_top = false;
- var_Create(vd, "video-title", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
var_Create(vd, "video-deco", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
/* */
diff --git a/modules/video_output/msw/events.c b/modules/video_output/msw/events.c
index b8a9d10..ada4d43 100644
--- a/modules/video_output/msw/events.c
+++ b/modules/video_output/msw/events.c
@@ -957,7 +957,7 @@ void EventThreadMouseHide( event_thread_t *p_event )
void EventThreadUpdateTitle( event_thread_t *p_event, const char *psz_fallback )
{
- char *psz_title = var_GetNonEmptyString( p_event->vd, "video-title" );
+ char *psz_title = var_InheritString( p_event->vd, "video-title" );
if( !psz_title )
psz_title = strdup( psz_fallback );
if( !psz_title )
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 34c2e91..2db8b2d 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -149,9 +149,9 @@ static vout_thread_t *VoutCreate(vlc_object_t *object,
/* Take care of some "interface/control" related initialisations */
vout_IntfInit(vout);
- vout->p->title.show = var_GetBool(vout, "video-title-show");
- vout->p->title.timeout = var_GetInteger(vout, "video-title-timeout");
- vout->p->title.position = var_GetInteger(vout, "video-title-position");
+ vout->p->title.show = var_InheritBool(vout, "video-title-show");
+ vout->p->title.timeout = var_InheritInteger(vout, "video-title-timeout");
+ vout->p->title.position = var_InheritInteger(vout, "video-title-position");
/* Get splitter name if present */
char *splitter_name = var_InheritString(vout, "video-splitter");
diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index c4c9f00..825918c 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -162,10 +162,6 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_Create( p_vout, "mouse-hide-timeout",
VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
- var_Create( p_vout, "video-title-show", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
- var_Create( p_vout, "video-title-timeout", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
- var_Create( p_vout, "video-title-position", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
-
/* Zoom object var */
var_Create( p_vout, "zoom", VLC_VAR_FLOAT | VLC_VAR_ISCOMMAND |
VLC_VAR_HASCHOICE | VLC_VAR_DOINHERIT );
diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
index b2cb772..d6f86d9 100644
--- a/src/video_output/vout_wrapper.c
+++ b/src/video_output/vout_wrapper.c
@@ -54,7 +54,7 @@ int vout_OpenWrapper(vout_thread_t *vout,
msg_Dbg(vout, "Opening vout display wrapper");
/* */
- sys->display.title = var_CreateGetNonEmptyString(vout, "video-title");
+ sys->display.title = var_InheritString(vout, "video-title");
/* */
const mtime_t double_click_timeout = 300000;
More information about the vlc-commits
mailing list