#include "theme_loader.hpp"
#include "theme.hpp"
#include "theme_repository.hpp"
+#include "vout_window.hpp"
+#include "vout_manager.hpp"
#include "../parser/interpreter.hpp"
#include "../commands/async_queue.hpp"
#include "../commands/cmd_quit.hpp"
p_intf->p_sys->p_osFactory = NULL;
p_intf->p_sys->p_osLoop = NULL;
p_intf->p_sys->p_varManager = NULL;
+ p_intf->p_sys->p_voutManager = NULL;
p_intf->p_sys->p_vlcProc = NULL;
p_intf->p_sys->p_repository = NULL;
#endif
return VLC_EGENERIC;
}
+ if( VoutManager::instance( p_intf ) == NULL )
+ {
+ msg_Err( p_intf, "cannot instanciate VoutManager" );
+ vlc_object_release( p_intf->p_sys->p_playlist );
+ return VLC_EGENERIC;
+ }
vlc_mutex_lock( &skin_load.mutex );
skin_load.intf = p_intf;
vlc_mutex_unlock( &skin_load.mutex );
{
intf_thread_t *p_intf = (intf_thread_t *)p_this;
+ msg_Dbg( p_intf, "closing skins2 module" );
+
vlc_mutex_lock( &skin_load.mutex );
skin_load.intf = NULL;
vlc_mutex_unlock( &skin_load.mutex);
+ if( p_intf->p_sys->p_theme )
+ {
+ delete p_intf->p_sys->p_theme;
+ p_intf->p_sys->p_theme = NULL;
+ msg_Dbg( p_intf, "current theme deleted" );
+ }
+
// Destroy "singleton" objects
OSFactory::instance( p_intf )->destroyOSLoop();
ThemeRepository::destroy( p_intf );
+ VoutManager::destroy( p_intf );
//Dialogs::destroy( p_intf );
Interpreter::destroy( p_intf );
AsyncQueue::destroy( p_intf );
if( p_intf->p_sys->p_theme )
{
p_intf->p_sys->p_theme->saveConfig();
- delete p_intf->p_sys->p_theme;
- p_intf->p_sys->p_theme = NULL;
}
// cannot be called in "Close", because it refcounts skins2
if( pIntf == NULL )
return VLC_EGENERIC;
- /* FIXME: most probably not thread-safe,
- * albeit no worse than ever before */
- pWnd->handle.hwnd = VlcProc::getWindow( pIntf, pWnd->vout,
- &pWnd->pos_x, &pWnd->pos_y,
- &pWnd->width, &pWnd->height );
+ vlc_object_release( pIntf );
+
+ pWnd->handle.hwnd = VoutManager::getWindow( pIntf, pWnd );
+
if( pWnd->handle.hwnd )
{
pWnd->p_private = pIntf;
- pWnd->control = &VlcProc::controlWindow;
+ pWnd->control = &VoutManager::controlWindow;
return VLC_SUCCESS;
}
else
vout_window_t *pWnd = (vout_window_t *)p_this;
intf_thread_t *pIntf = (intf_thread_t *)p_this->p_private;
- VlcProc::releaseWindow( pIntf, pWnd->handle.hwnd );
+ VoutManager::releaseWindow( pIntf, pWnd );
}
//---------------------------------------------------------------------------