[vlc-commits] commit: Removed non thread safe callbacks on video-title-show/timeout/ position. (Laurent Aimar )
git at videolan.org
git at videolan.org
Mon Oct 25 20:41:53 CEST 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Fri Oct 22 20:29:18 2010 +0200| [b5b258f7c346539c64d1a267bc3cfffead3b2811] | committer: Laurent Aimar
Removed non thread safe callbacks on video-title-show/timeout/position.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b5b258f7c346539c64d1a267bc3cfffead3b2811
---
src/video_output/video_output.c | 4 +++
src/video_output/vout_intf.c | 45 ++------------------------------------
2 files changed, 7 insertions(+), 42 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 124d689..0215883 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -137,6 +137,10 @@ 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");
+
/* Get splitter name if present */
char *splitter_name = var_GetNonEmptyString(vout, "vout-filter");
if (splitter_name) {
diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c
index 412fefb..f3c78c2 100644
--- a/src/video_output/vout_intf.c
+++ b/src/video_output/vout_intf.c
@@ -78,12 +78,6 @@ static int SubFilterCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int SubMarginCallback( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
-static int TitleShowCallback( vlc_object_t *, char const *,
- vlc_value_t, vlc_value_t, void * );
-static int TitleTimeoutCallback( vlc_object_t *, char const *,
- vlc_value_t, vlc_value_t, void * );
-static int TitlePositionCallback( vlc_object_t *, char const *,
- vlc_value_t, vlc_value_t, void * );
/*****************************************************************************
* vout_IntfInit: called during the vout creation to initialise misc things.
@@ -185,14 +179,9 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_Create( p_vout, "mouse-hide-timeout",
VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
- p_vout->p->title.show = var_CreateGetBool( p_vout, "video-title-show" );
- p_vout->p->title.timeout = var_CreateGetInteger( p_vout,
- "video-title-timeout" );
- p_vout->p->title.position = var_CreateGetInteger( p_vout,
- "video-title-position" );
- var_AddCallback( p_vout, "video-title-show", TitleShowCallback, NULL );
- var_AddCallback( p_vout, "video-title-timeout", TitleTimeoutCallback, NULL );
- var_AddCallback( p_vout, "video-title-position", TitlePositionCallback, NULL );
+ 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 |
@@ -808,31 +797,3 @@ static int SubMarginCallback( vlc_object_t *p_this, char const *psz_cmd,
return VLC_SUCCESS;
}
-static int TitleShowCallback( vlc_object_t *p_this, char const *psz_cmd,
- vlc_value_t oldval, vlc_value_t newval, void *p_data )
-{
- VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
- VLC_UNUSED(p_data);
- vout_thread_t *p_vout = (vout_thread_t *)p_this;
- p_vout->p->title.show = newval.b_bool;
- return VLC_SUCCESS;
-}
-
-static int TitleTimeoutCallback( vlc_object_t *p_this, char const *psz_cmd,
- vlc_value_t oldval, vlc_value_t newval, void *p_data )
-{
- VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval); VLC_UNUSED(p_data);
- vout_thread_t *p_vout = (vout_thread_t *)p_this;
- p_vout->p->title.timeout = (mtime_t) newval.i_int;
- return VLC_SUCCESS;
-}
-
-static int TitlePositionCallback( vlc_object_t *p_this, char const *psz_cmd,
- vlc_value_t oldval, vlc_value_t newval, void *p_data )
-{
- VLC_UNUSED(psz_cmd); VLC_UNUSED(oldval);
- VLC_UNUSED(p_data);
- vout_thread_t *p_vout = (vout_thread_t *)p_this;
- p_vout->p->title.position = newval.i_int;
- return VLC_SUCCESS;
-}
More information about the vlc-commits
mailing list