Commit 4c4c4ce2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Move code out of module descriptor.

By the way, I am VERY suspicious about the use of libvlc_global for mosaic and
bridge locks
parent d9d0e354
......@@ -82,7 +82,6 @@ vlc_module_begin();
ID_OFFSET_LONGTEXT, VLC_FALSE );
set_callbacks( OpenIn, CloseIn );
var_Create( p_module->p_libvlc_global, "bridge-lock", VLC_VAR_MUTEX );
vlc_module_end();
......@@ -170,6 +169,7 @@ static int OpenOut( vlc_object_t *p_this )
p_sys = malloc( sizeof( out_sout_stream_sys_t ) );
p_sys->b_inited = VLC_FALSE;
var_Create( p_this->p_libvlc_global, "bridge-lock", VLC_VAR_MUTEX );
var_Get( p_this->p_libvlc_global, "bridge-lock", &val );
p_sys->p_lock = val.p_address;
......@@ -354,6 +354,7 @@ static int OpenIn( vlc_object_t *p_this )
config_ChainParse( p_stream, SOUT_CFG_PREFIX_IN, ppsz_sout_options_in,
p_stream->p_cfg );
var_Create( p_this->p_libvlc_global, "bridge-lock", VLC_VAR_MUTEX );
var_Get( p_this->p_libvlc_global, "bridge-lock", &val );
p_sys->p_lock = val.p_address;
......
......@@ -162,8 +162,6 @@ vlc_module_begin();
NULL, NULL, VFILTER_TEXT, VFILTER_LONGTEXT, VLC_FALSE );
set_callbacks( Open, Close );
var_Create( p_module->p_libvlc_global, "mosaic-lock", VLC_VAR_MUTEX );
vlc_module_end();
static const char *ppsz_sout_options[] = {
......@@ -192,6 +190,7 @@ static int Open( vlc_object_t *p_this )
p_stream->p_sys = p_sys;
p_sys->b_inited = VLC_FALSE;
var_Create( p_libvlc_global, "mosaic-lock", VLC_VAR_MUTEX );
var_Get( p_libvlc_global, "mosaic-lock", &val );
p_sys->p_lock = val.p_address;
......
......@@ -228,8 +228,6 @@ vlc_module_begin();
add_integer( CFG_PREFIX "delay", 0, NULL, DELAY_TEXT, DELAY_LONGTEXT,
VLC_FALSE );
var_Create( p_module->p_libvlc_global, "mosaic-lock", VLC_VAR_MUTEX );
vlc_module_end();
static const char *ppsz_filter_options[] = {
......@@ -308,6 +306,7 @@ static int CreateFilter( vlc_object_t *p_this )
vlc_mutex_init( p_filter, &p_sys->lock );
vlc_mutex_lock( &p_sys->lock );
var_Create( p_libvlc_global, "mosaic-lock", VLC_VAR_MUTEX );
var_Get( p_libvlc_global, "mosaic-lock", &val );
p_sys->p_lock = val.p_address;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment