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

Move OSD and TLS to instance.

parent 50ca2acd
...@@ -37,8 +37,8 @@ tls_Init( vlc_object_t *p_this ) ...@@ -37,8 +37,8 @@ tls_Init( vlc_object_t *p_this )
tls_t *p_tls; tls_t *p_tls;
vlc_value_t lockval; vlc_value_t lockval;
var_Create( p_this->p_libvlc_global, "tls_mutex", VLC_VAR_MUTEX ); var_Create( p_this->p_libvlc, "tls_mutex", VLC_VAR_MUTEX );
var_Get( p_this->p_libvlc_global, "tls_mutex", &lockval ); var_Get( p_this->p_libvlc, "tls_mutex", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
p_tls = vlc_object_find( p_this, VLC_OBJECT_TLS, FIND_ANYWHERE ); p_tls = vlc_object_find( p_this, VLC_OBJECT_TLS, FIND_ANYWHERE );
...@@ -76,7 +76,7 @@ tls_Deinit( tls_t *p_tls ) ...@@ -76,7 +76,7 @@ tls_Deinit( tls_t *p_tls )
int i; int i;
vlc_value_t lockval; vlc_value_t lockval;
var_Get( p_tls->p_libvlc_global, "tls_mutex", &lockval ); var_Get( p_tls->p_libvlc, "tls_mutex", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
vlc_object_release( p_tls ); vlc_object_release( p_tls );
......
...@@ -61,8 +61,8 @@ osd_menu_t *__osd_MenuCreate( vlc_object_t *p_this, const char *psz_file ) ...@@ -61,8 +61,8 @@ osd_menu_t *__osd_MenuCreate( vlc_object_t *p_this, const char *psz_file )
int i_steps = 0; int i_steps = 0;
/* to be sure to avoid multiple creation */ /* to be sure to avoid multiple creation */
var_Create( p_this->p_libvlc_global, "osd_mutex", VLC_VAR_MUTEX ); var_Create( p_this->p_libvlc, "osd_mutex", VLC_VAR_MUTEX );
var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
if( ( p_osd = vlc_object_find( p_this, VLC_OBJECT_OSDMENU, FIND_ANYWHERE ) ) == NULL ) if( ( p_osd = vlc_object_find( p_this, VLC_OBJECT_OSDMENU, FIND_ANYWHERE ) ) == NULL )
...@@ -124,7 +124,7 @@ void __osd_MenuDelete( vlc_object_t *p_this, osd_menu_t *p_osd ) ...@@ -124,7 +124,7 @@ void __osd_MenuDelete( vlc_object_t *p_this, osd_menu_t *p_osd )
if( !p_osd || !p_this ) return; if( !p_osd || !p_this ) return;
var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
vlc_object_release( p_osd ); vlc_object_release( p_osd );
...@@ -204,7 +204,7 @@ void __osd_MenuShow( vlc_object_t *p_this ) ...@@ -204,7 +204,7 @@ void __osd_MenuShow( vlc_object_t *p_this )
return; return;
} }
var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
#if defined(OSD_MENU_DEBUG) #if defined(OSD_MENU_DEBUG)
...@@ -245,7 +245,7 @@ void __osd_MenuHide( vlc_object_t *p_this ) ...@@ -245,7 +245,7 @@ void __osd_MenuHide( vlc_object_t *p_this )
return; return;
} }
var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
#if defined(OSD_MENU_DEBUG) #if defined(OSD_MENU_DEBUG)
...@@ -278,7 +278,7 @@ void __osd_MenuActivate( vlc_object_t *p_this ) ...@@ -278,7 +278,7 @@ void __osd_MenuActivate( vlc_object_t *p_this )
return; return;
} }
var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
#if defined(OSD_MENU_DEBUG) #if defined(OSD_MENU_DEBUG)
...@@ -340,7 +340,7 @@ void __osd_MenuNext( vlc_object_t *p_this ) ...@@ -340,7 +340,7 @@ void __osd_MenuNext( vlc_object_t *p_this )
return; return;
} }
var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
p_button = p_osd->p_state->p_visible; p_button = p_osd->p_state->p_visible;
...@@ -390,7 +390,7 @@ void __osd_MenuPrev( vlc_object_t *p_this ) ...@@ -390,7 +390,7 @@ void __osd_MenuPrev( vlc_object_t *p_this )
return; return;
} }
var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
p_button = p_osd->p_state->p_visible; p_button = p_osd->p_state->p_visible;
...@@ -443,7 +443,7 @@ void __osd_MenuUp( vlc_object_t *p_this ) ...@@ -443,7 +443,7 @@ void __osd_MenuUp( vlc_object_t *p_this )
return; return;
} }
var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
p_button = p_osd->p_state->p_visible; p_button = p_osd->p_state->p_visible;
...@@ -514,7 +514,7 @@ void __osd_MenuDown( vlc_object_t *p_this ) ...@@ -514,7 +514,7 @@ void __osd_MenuDown( vlc_object_t *p_this )
return; return;
} }
var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
p_button = p_osd->p_state->p_visible; p_button = p_osd->p_state->p_visible;
...@@ -593,7 +593,7 @@ void __osd_Volume( vlc_object_t *p_this ) ...@@ -593,7 +593,7 @@ void __osd_Volume( vlc_object_t *p_this )
return; return;
} }
var_Get( p_this->p_libvlc_global, "osd_mutex", &lockval ); var_Get( p_this->p_libvlc, "osd_mutex", &lockval );
vlc_mutex_lock( lockval.p_address ); vlc_mutex_lock( lockval.p_address );
p_button = p_osd->p_state->p_volume; p_button = p_osd->p_state->p_volume;
......
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