#include "vlcproc.hpp"
#include "os_factory.hpp"
+#include "os_loop.hpp"
#include "os_timer.hpp"
#include "var_manager.hpp"
+#include "vout_manager.hpp"
#include "theme.hpp"
#include "window_manager.hpp"
#include "../commands/async_queue.hpp"
void VlcProc::destroy( intf_thread_t *pIntf )
{
- if( pIntf->p_sys->p_vlcProc )
- {
- delete pIntf->p_sys->p_vlcProc;
- pIntf->p_sys->p_vlcProc = NULL;
- }
+ delete pIntf->p_sys->p_vlcProc;
+ pIntf->p_sys->p_vlcProc = NULL;
}
var_DelCallback( getIntf()->p_sys->p_playlist, "item-change",
onItemChange, this );
var_DelCallback( getIntf(), "skin-to-load", onSkinToLoad, this );
+ var_DelCallback( getIntf(), "interaction", onInteraction, this );
}
void VlcProc::manage()
// Did the user request to quit vlc ?
if( !vlc_object_alive( getIntf() ) )
{
- CmdQuit *pCmd = new CmdQuit( getIntf() );
- AsyncQueue *pQueue = AsyncQueue::instance( getIntf() );
- pQueue->push( CmdGenericPtr( pCmd ) );
+ // Get the instance of OSFactory
+ OSFactory *pOsFactory = OSFactory::instance( getIntf() );
+
+ // Exit the main OS loop
+ pOsFactory->getOSLoop()->exit();
+
+ return;
}
refreshPlaylist();
refreshAudio();
refreshInput();
}
+
void VlcProc::CmdManage::execute()
{
// Just forward to VlcProc
// Refresh sound volume
audio_volume_t volume;
- aout_VolumeGet( getIntf(), &volume );
+ aout_VolumeGet( getIntf()->p_sys->p_playlist, &volume );
Volume *pVolume = (Volume*)m_cVarVolume.get();
pVolume->set( (double)volume * 2.0 / AOUT_VOLUME_MAX );
pVarHasVout->set( pVout != NULL );
if( pVout )
{
- pVarFullscreen->set( pVout->b_fullscreen );
+ pVarFullscreen->set( var_GetBool( pVout, "fullscreen" ) );
vlc_object_release( pVout );
}