/* In skins interface, append some items */
if( !mi )
{
-
- vlc_object_t *p_object = ( vlc_object_t* )
- vlc_object_find_name( p_intf, "skins2", FIND_PARENT );
- if( p_object )
+ if( p_intf->p_sys->b_isDialogProvider )
{
+ vlc_object_t* p_object = p_intf->p_parent;
+
objects.clear(); varnames.clear();
objects.push_back( p_object );
varnames.push_back( "intf-skins" );
objects.push_back( p_object );
varnames.push_back( "intf-skins-interactive" );
Populate( p_intf, submenu, varnames, objects );
-
- vlc_object_release( p_object );
}
else
msg_Warn( p_intf, "could not find parent interface" );
// Create a variable to be notified of skins to be loaded
var_Create( p_intf, "skin-to-load", VLC_VAR_STRING );
+ vlc_mutex_init( &p_intf->p_sys->vout_lock );
+ vlc_cond_init( &p_intf->p_sys->vout_wait );
+
vlc_mutex_init( &p_intf->p_sys->init_lock );
vlc_cond_init( &p_intf->p_sys->init_wait );
VLC_THREAD_PRIORITY_LOW ) )
{
vlc_mutex_unlock( &p_intf->p_sys->init_lock );
+
vlc_cond_destroy( &p_intf->p_sys->init_wait );
vlc_mutex_destroy( &p_intf->p_sys->init_lock );
+ vlc_cond_destroy( &p_intf->p_sys->vout_wait );
+ vlc_mutex_destroy( &p_intf->p_sys->vout_lock );
pl_Release( p_intf->p_sys->p_playlist );
free( p_intf->p_sys );
return VLC_EGENERIC;
skin_load.intf = p_intf;
vlc_mutex_unlock( &skin_load.mutex );
- vlc_mutex_init( &p_intf->p_sys->vout_lock );
- vlc_cond_init( &p_intf->p_sys->vout_wait );
-
return VLC_SUCCESS;
}
// Callbacks for vout requests
static int WindowOpen( vlc_object_t *p_this )
{
+ int i_ret;
vout_window_t *pWnd = (vout_window_t *)p_this;
- intf_thread_t *pIntf = (intf_thread_t *)
- vlc_object_find_name( p_this, "skins2", FIND_ANYWHERE );
+
+ vlc_mutex_lock( &skin_load.mutex );
+ intf_thread_t *pIntf = skin_load.intf;
+ if( pIntf )
+ vlc_object_hold( pIntf );
+ vlc_mutex_unlock( &skin_load.mutex );
if( pIntf == NULL )
return VLC_EGENERIC;
- vlc_object_release( pIntf );
-
vlc_mutex_lock( &serializer );
pWnd->handle.hwnd = VoutManager::getWindow( pIntf, pWnd );
if( pWnd->handle.hwnd )
{
- pWnd->sys = (vout_window_sys_t*)pIntf;
pWnd->control = &VoutManager::controlWindow;
+ pWnd->sys = (vout_window_sys_t*)pIntf;
+
vlc_mutex_unlock( &serializer );
return VLC_SUCCESS;
}
else
{
+ vlc_object_release( pIntf );
vlc_mutex_unlock( &serializer );
return VLC_EGENERIC;
}
intf_thread_t *pIntf = (intf_thread_t *)pWnd->sys;
VoutManager::releaseWindow( pIntf, pWnd );
+
+ vlc_object_release( pIntf );
}
//---------------------------------------------------------------------------