Commit 82e866f0 authored by JP Dinger's avatar JP Dinger

Skins2: Cosmetics and the occasional duplicate call elimintation.

parent c2e98900
...@@ -41,18 +41,9 @@ void CmdAddItem::execute() ...@@ -41,18 +41,9 @@ void CmdAddItem::execute()
if( !psz_uri ) if( !psz_uri )
return; return;
if( m_playNow ) playlist_Add( pPlaylist, psz_uri, NULL,
{ m_playNow ? PLAYLIST_APPEND | PLAYLIST_GO : PLAYLIST_APPEND,
// Enqueue and play the item PLAYLIST_END, true, false );
playlist_Add( pPlaylist, psz_uri, NULL,
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true,
false );
}
else
{
// Enqueue the item only
playlist_Add( pPlaylist, psz_uri, NULL,
PLAYLIST_APPEND, PLAYLIST_END, true, false );
}
free( psz_uri ); free( psz_uri );
} }
...@@ -32,9 +32,7 @@ void CmdPlay::execute() ...@@ -32,9 +32,7 @@ void CmdPlay::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
if( pPlaylist == NULL ) if( pPlaylist == NULL )
{
return; return;
}
playlist_Lock( pPlaylist ); playlist_Lock( pPlaylist );
const bool b_empty = playlist_IsEmpty( pPlaylist ); const bool b_empty = playlist_IsEmpty( pPlaylist );
...@@ -47,8 +45,7 @@ void CmdPlay::execute() ...@@ -47,8 +45,7 @@ void CmdPlay::execute()
else else
{ {
// If the playlist is empty, open a file requester instead // If the playlist is empty, open a file requester instead
CmdDlgFile cmd( getIntf() ); CmdDlgFile( getIntf() ).execute();
cmd.execute();
} }
} }
...@@ -56,24 +53,16 @@ void CmdPlay::execute() ...@@ -56,24 +53,16 @@ void CmdPlay::execute()
void CmdPause::execute() void CmdPause::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
if( pPlaylist == NULL ) if( pPlaylist != NULL )
{ playlist_Pause( pPlaylist );
return;
}
playlist_Pause( pPlaylist );
} }
void CmdStop::execute() void CmdStop::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
if( pPlaylist == NULL ) if( pPlaylist != NULL )
{ playlist_Stop( pPlaylist );
return;
}
playlist_Stop( pPlaylist );
} }
...@@ -105,24 +94,18 @@ void CmdFaster::execute() ...@@ -105,24 +94,18 @@ void CmdFaster::execute()
void CmdMute::execute() void CmdMute::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; aout_ToggleMute( getIntf()->p_sys->p_playlist, NULL );
aout_ToggleMute( pPlaylist, NULL );
} }
void CmdVolumeUp::execute() void CmdVolumeUp::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; aout_VolumeUp( getIntf()->p_sys->p_playlist, 1, NULL );
aout_VolumeUp( pPlaylist, 1, NULL );
} }
void CmdVolumeDown::execute() void CmdVolumeDown::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; aout_VolumeDown( getIntf()->p_sys->p_playlist, 1, NULL );
aout_VolumeDown( pPlaylist, 1, NULL );
} }
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include "cmd_layout.hpp" #include "cmd_layout.hpp"
...@@ -29,18 +29,13 @@ ...@@ -29,18 +29,13 @@
CmdLayout::CmdLayout( intf_thread_t *pIntf, TopWindow &rWindow, CmdLayout::CmdLayout( intf_thread_t *pIntf, TopWindow &rWindow,
GenericLayout &rLayout ): GenericLayout &rLayout )
CmdGeneric( pIntf ), m_rWindow( rWindow ), m_rLayout( rLayout ) : CmdGeneric( pIntf ), m_rWindow( rWindow ), m_rLayout( rLayout ) { }
{
}
void CmdLayout::execute() void CmdLayout::execute()
{ {
if( !getIntf()->p_sys->p_theme ) Theme *p_theme = getIntf()->p_sys->p_theme;
{ if( p_theme )
return; p_theme->getWindowManager().setActiveLayout( m_rWindow, m_rLayout );
}
getIntf()->p_sys->p_theme->getWindowManager().setActiveLayout( m_rWindow,
m_rLayout );
} }
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include "cmd_minimize.hpp" #include "cmd_minimize.hpp"
...@@ -29,27 +29,20 @@ ...@@ -29,27 +29,20 @@
void CmdMinimize::execute() void CmdMinimize::execute()
{ {
// Get the instance of OSFactory OSFactory::instance( getIntf() )->minimize();
OSFactory *pOsFactory = OSFactory::instance( getIntf() );
pOsFactory->minimize();
} }
void CmdRestore::execute() void CmdRestore::execute()
{ {
// Get the instance of OSFactory OSFactory::instance( getIntf() )->restore();
OSFactory *pOsFactory = OSFactory::instance( getIntf() );
pOsFactory->restore();
} }
CmdMaximize::CmdMaximize( intf_thread_t *pIntf, CmdMaximize::CmdMaximize( intf_thread_t *pIntf, WindowManager &rWindowManager,
WindowManager &rWindowManager, TopWindow &rWindow )
TopWindow &rWindow ): : CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ),
CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ), m_rWindow( rWindow ) { }
m_rWindow( rWindow )
{
}
void CmdMaximize::execute() void CmdMaximize::execute()
...@@ -61,11 +54,9 @@ void CmdMaximize::execute() ...@@ -61,11 +54,9 @@ void CmdMaximize::execute()
CmdUnmaximize::CmdUnmaximize( intf_thread_t *pIntf, CmdUnmaximize::CmdUnmaximize( intf_thread_t *pIntf,
WindowManager &rWindowManager, WindowManager &rWindowManager,
TopWindow &rWindow ): TopWindow &rWindow )
CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ), : CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ),
m_rWindow( rWindow ) m_rWindow( rWindow ) { }
{
}
void CmdUnmaximize::execute() void CmdUnmaximize::execute()
...@@ -77,32 +68,24 @@ void CmdUnmaximize::execute() ...@@ -77,32 +68,24 @@ void CmdUnmaximize::execute()
void CmdAddInTray::execute() void CmdAddInTray::execute()
{ {
// Get the instance of OSFactory OSFactory::instance( getIntf() )->addInTray();
OSFactory *pOsFactory = OSFactory::instance( getIntf() );
pOsFactory->addInTray();
} }
void CmdRemoveFromTray::execute() void CmdRemoveFromTray::execute()
{ {
// Get the instance of OSFactory OSFactory::instance( getIntf() )->removeFromTray();
OSFactory *pOsFactory = OSFactory::instance( getIntf() );
pOsFactory->removeFromTray();
} }
void CmdAddInTaskBar::execute() void CmdAddInTaskBar::execute()
{ {
// Get the instance of OSFactory OSFactory::instance( getIntf() )->addInTaskBar();
OSFactory *pOsFactory = OSFactory::instance( getIntf() );
pOsFactory->addInTaskBar();
} }
void CmdRemoveFromTaskBar::execute() void CmdRemoveFromTaskBar::execute()
{ {
// Get the instance of OSFactory OSFactory::instance( getIntf() )->removeFromTaskBar();
OSFactory *pOsFactory = OSFactory::instance( getIntf() );
pOsFactory->removeFromTaskBar();
} }
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include "cmd_muxer.hpp" #include "cmd_muxer.hpp"
...@@ -28,7 +28,5 @@ void CmdMuxer::execute() ...@@ -28,7 +28,5 @@ void CmdMuxer::execute()
{ {
cmdList_t::const_iterator it; cmdList_t::const_iterator it;
for( it = m_list.begin(); it != m_list.end(); ++it ) for( it = m_list.begin(); it != m_list.end(); ++it )
{
(*it)->execute(); (*it)->execute();
}
} }
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
class CmdMuxer: public CmdGeneric class CmdMuxer: public CmdGeneric
{ {
public: public:
CmdMuxer( intf_thread_t *pIntf, const list<CmdGeneric*> &rList ): CmdMuxer( intf_thread_t *pIntf, const list<CmdGeneric*> &rList )
CmdGeneric( pIntf ), m_list( rList ) { } : CmdGeneric( pIntf ), m_list( rList ) { }
virtual ~CmdMuxer() { } virtual ~CmdMuxer() { }
virtual void execute(); virtual void execute();
virtual string getType() const { return "muxer"; } virtual string getType() const { return "muxer"; }
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include "cmd_playlist.hpp" #include "cmd_playlist.hpp"
...@@ -36,9 +36,7 @@ void CmdPlaylistNext::execute() ...@@ -36,9 +36,7 @@ void CmdPlaylistNext::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
if( pPlaylist != NULL ) if( pPlaylist != NULL )
{
playlist_Next( pPlaylist ); playlist_Next( pPlaylist );
}
} }
...@@ -46,9 +44,7 @@ void CmdPlaylistPrevious::execute() ...@@ -46,9 +44,7 @@ void CmdPlaylistPrevious::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
if( pPlaylist != NULL ) if( pPlaylist != NULL )
{
playlist_Prev( pPlaylist ); playlist_Prev( pPlaylist );
}
} }
...@@ -89,29 +85,25 @@ void CmdPlaylistSave::execute() ...@@ -89,29 +85,25 @@ void CmdPlaylistSave::execute()
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
if( pPlaylist != NULL ) if( pPlaylist != NULL )
{ {
static const char psz_xspf[] = "export-xspf",
psz_m3u[] = "export-m3u",
psz_html[] = "export-html";
const char *psz_module; const char *psz_module;
if( m_file.find( ".xsp", 0 ) != string::npos ) if( m_file.find( ".xsp", 0 ) != string::npos )
psz_module = psz_xspf; psz_module = "export-xspf";
else if( m_file.find( "m3u", 0 ) != string::npos ) else if( m_file.find( "m3u", 0 ) != string::npos )
psz_module = psz_m3u; psz_module = "export-m3u";
else if( m_file.find( "html", 0 ) != string::npos ) else if( m_file.find( "html", 0 ) != string::npos )
psz_module = psz_html; psz_module = "export-html";
else else
{ {
msg_Err( getIntf(), "Impossible to recognise the file type" ); msg_Err(getIntf(),"Did not recognise playlist export file type");
return; return;
} }
playlist_Export( pPlaylist, m_file.c_str(), pPlaylist->p_local_category, psz_module ); playlist_Export( pPlaylist, m_file.c_str(),
pPlaylist->p_local_category, psz_module );
} }
} }
void CmdPlaylistFirst::execute() void CmdPlaylistFirst::execute()
{ {
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist; playlist_Control(getIntf()->p_sys->p_playlist,PLAYLIST_PLAY,pl_Unlocked);
playlist_Control( pPlaylist, PLAYLIST_PLAY, pl_Unlocked );
} }
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include "cmd_playtree.hpp" #include "cmd_playtree.hpp"
...@@ -43,6 +43,5 @@ void CmdPlaytreeSort::execute() ...@@ -43,6 +43,5 @@ void CmdPlaytreeSort::execute()
PL_UNLOCK; PL_UNLOCK;
// Ask for rebuild // Ask for rebuild
Playtree &rVar = VlcProc::instance( getIntf() )->getPlaytreeVar(); VlcProc::instance( getIntf() )->getPlaytreeVar().onChange();
rVar.onChange();
} }
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include "cmd_resize.hpp" #include "cmd_resize.hpp"
...@@ -31,11 +31,9 @@ ...@@ -31,11 +31,9 @@
CmdResize::CmdResize( intf_thread_t *pIntf, const WindowManager &rWindowManager, CmdResize::CmdResize( intf_thread_t *pIntf, const WindowManager &rWindowManager,
GenericLayout &rLayout, int width, int height ): GenericLayout &rLayout, int width, int height )
CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ), : CmdGeneric( pIntf ), m_rWindowManager( rWindowManager ),
m_rLayout( rLayout ), m_width( width ), m_height( height ) m_rLayout( rLayout ), m_width( width ), m_height( height ) { }
{
}
void CmdResize::execute() void CmdResize::execute()
...@@ -48,9 +46,7 @@ void CmdResize::execute() ...@@ -48,9 +46,7 @@ void CmdResize::execute()
CmdResizeInnerVout::CmdResizeInnerVout( intf_thread_t *pIntf, CmdResizeInnerVout::CmdResizeInnerVout( intf_thread_t *pIntf,
CtrlVideo* pCtrlVideo ) CtrlVideo* pCtrlVideo )
: CmdGeneric( pIntf ), m_pCtrlVideo( pCtrlVideo ) : CmdGeneric( pIntf ), m_pCtrlVideo( pCtrlVideo ) { }
{
}
void CmdResizeInnerVout::execute() void CmdResizeInnerVout::execute()
...@@ -61,30 +57,23 @@ void CmdResizeInnerVout::execute() ...@@ -61,30 +57,23 @@ void CmdResizeInnerVout::execute()
CmdResizeVout::CmdResizeVout( intf_thread_t *pIntf, vout_window_t* pWnd, CmdResizeVout::CmdResizeVout( intf_thread_t *pIntf, vout_window_t* pWnd,
int width, int height ) int width, int height )
: CmdGeneric( pIntf ), m_pWnd( pWnd ), m_width( width ), m_height( height ) : CmdGeneric( pIntf ), m_pWnd( pWnd ), m_width( width ),
{ m_height( height ) { }
}
void CmdResizeVout::execute() void CmdResizeVout::execute()
{ {
VoutManager* p_VoutManager = getIntf()->p_sys->p_voutManager; getIntf()->p_sys->p_voutManager->setSizeWnd( m_pWnd, m_width, m_height );
p_VoutManager->setSizeWnd( m_pWnd, m_width, m_height );
} }
CmdSetFullscreen::CmdSetFullscreen( intf_thread_t *pIntf, CmdSetFullscreen::CmdSetFullscreen( intf_thread_t *pIntf,
vout_window_t * pWnd, bool fullscreen ) vout_window_t * pWnd, bool fullscreen )
: CmdGeneric( pIntf ), m_pWnd( pWnd ), m_bFullscreen( fullscreen ) : CmdGeneric( pIntf ), m_pWnd( pWnd ), m_bFullscreen( fullscreen ) { }
{
}
void CmdSetFullscreen::execute() void CmdSetFullscreen::execute()
{ {
VoutManager* p_VoutManager = getIntf()->p_sys->p_voutManager; getIntf()->p_sys->p_voutManager->setFullscreenWnd( m_pWnd, m_bFullscreen );
p_VoutManager->setFullscreenWnd( m_pWnd, m_bFullscreen );
} }
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include "cmd_snapshot.hpp" #include "cmd_snapshot.hpp"
...@@ -43,20 +43,16 @@ void CmdSnapshot::execute() ...@@ -43,20 +43,16 @@ void CmdSnapshot::execute()
void CmdToggleRecord::execute() void CmdToggleRecord::execute()
{ {
input_thread_t* pInput = getIntf()->p_sys->p_input; input_thread_t* pInput = getIntf()->p_sys->p_input;
if( !pInput ) if( pInput )
return; var_ToggleBool( pInput, "record" );
var_ToggleBool( pInput, "record" );
} }
void CmdNextFrame::execute() void CmdNextFrame::execute()
{ {
input_thread_t* pInput = getIntf()->p_sys->p_input; input_thread_t* pInput = getIntf()->p_sys->p_input;
if( !pInput ) if( pInput )
return; var_TriggerCallback( pInput, "frame-next" );
var_TriggerCallback( pInput, "frame-next" );
} }
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include "cmd_vars.hpp" #include "cmd_vars.hpp"
...@@ -30,60 +30,45 @@ ...@@ -30,60 +30,45 @@
void CmdPlaytreeChanged::execute() void CmdPlaytreeChanged::execute()
{ {
// Notify the playtree variable VlcProc::instance( getIntf() )->getPlaytreeVar().onChange();
Playtree &rVar = VlcProc::instance( getIntf() )->getPlaytreeVar();
rVar.onChange();
} }
void CmdPlaytreeUpdate::execute() void CmdPlaytreeUpdate::execute()
{ {
// Notify the playtree variable VlcProc::instance( getIntf() )->getPlaytreeVar().onUpdateItem( m_id );
Playtree &rVar = VlcProc::instance( getIntf() )->getPlaytreeVar();
rVar.onUpdateItem( m_id );
} }
bool CmdPlaytreeUpdate::checkRemove( CmdGeneric *pQueuedCommand ) const bool CmdPlaytreeUpdate::checkRemove( CmdGeneric *pQueuedCommand ) const
{ {
// We don't use RTTI - Use C-style cast // We don't use RTTI - Use C-style cast
CmdPlaytreeUpdate *pUpdateCommand = (CmdPlaytreeUpdate *)(pQueuedCommand); CmdPlaytreeUpdate *pUpdateCommand = (CmdPlaytreeUpdate *)(pQueuedCommand);
if( m_id == pUpdateCommand->m_id ) return m_id == pUpdateCommand->m_id;
{
return true;
}
return false;
} }
void CmdPlaytreeAppend::execute() void CmdPlaytreeAppend::execute()
{ {
// Notify the playtree variable VlcProc::instance( getIntf() )->getPlaytreeVar().onAppend( m_pAdd );
Playtree &rVar = VlcProc::instance( getIntf() )->getPlaytreeVar();
rVar.onAppend( m_pAdd );
} }
void CmdPlaytreeDelete::execute() void CmdPlaytreeDelete::execute()
{ {
// Notify the playtree variable VlcProc::instance( getIntf() )->getPlaytreeVar().onDelete( m_id );
Playtree &rVar = VlcProc::instance( getIntf() )->getPlaytreeVar();
rVar.onDelete( m_id );
} }
void CmdSetText::execute() void CmdSetText::execute()
{ {
// Change the text variable
m_rText.set( m_value ); m_rText.set( m_value );
} }
void CmdSetEqBands::execute() void CmdSetEqBands::execute()
{ {
// Change the equalizer bands
m_rEqBands.set( m_value ); m_rEqBands.set( m_value );
} }
void CmdSetEqPreamp::execute() void CmdSetEqPreamp::execute()
{ {
// Change the preamp variable
m_rPreamp.set( m_value, false ); m_rPreamp.set( m_value, false );
} }
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License along
* along with this program; if not, write to the Free Software * with this program; if not, write to the Free Software Foundation, Inc.,
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#include "cmd_voutwindow.hpp" #include "cmd_voutwindow.hpp"
...@@ -27,46 +27,39 @@ ...@@ -27,46 +27,39 @@
CmdNewVoutWindow::CmdNewVoutWindow( intf_thread_t *pIntf, vout_window_t* pWnd ) CmdNewVoutWindow::CmdNewVoutWindow( intf_thread_t *pIntf, vout_window_t* pWnd )
: CmdGeneric( pIntf ), m_pWnd( pWnd ) : CmdGeneric( pIntf ), m_pWnd( pWnd ) { }
{
}
void CmdNewVoutWindow::execute() void CmdNewVoutWindow::execute()
{ {
vlc_mutex_lock( &getIntf()->p_sys->vout_lock ); intf_sys_t *p_sys = getIntf()->p_sys;
VoutManager* p_VoutManager = getIntf()->p_sys->p_voutManager;
void* handle = p_VoutManager->acceptWnd( m_pWnd ); vlc_mutex_lock( &p_sys->vout_lock );
getIntf()->p_sys->handle = handle; p_sys->handle = p_sys->p_voutManager->acceptWnd( m_pWnd );
getIntf()->p_sys->b_vout_ready = true; p_sys->b_vout_ready = true;
vlc_cond_signal( &getIntf()->p_sys->vout_wait ); vlc_cond_signal( &p_sys->vout_wait );
vlc_mutex_unlock( &getIntf()->p_sys->vout_lock ); vlc_mutex_unlock( &p_sys->vout_lock );
} }
CmdReleaseVoutWindow::CmdReleaseVoutWindow( intf_thread_t *pIntf, CmdReleaseVoutWindow::CmdReleaseVoutWindow( intf_thread_t *pIntf,
vout_window_t* pWnd ) vout_window_t* pWnd )
: CmdGeneric( pIntf ), m_pWnd( pWnd ) : CmdGeneric( pIntf ), m_pWnd( pWnd ) { }
{
}
void CmdReleaseVoutWindow::execute() void CmdReleaseVoutWindow::execute()
{ {
vlc_mutex_lock( &getIntf()->p_sys->vout_lock ); intf_sys_t *p_sys = getIntf()->p_sys;
VoutManager* p_VoutManager = getIntf()->p_sys->p_voutManager;
p_VoutManager->releaseWnd( m_pWnd ); vlc_mutex_lock( &p_sys->vout_lock );
getIntf()->p_sys->b_vout_ready = true; p_sys->p_voutManager->releaseWnd( m_pWnd );
vlc_cond_signal( &getIntf()->p_sys->vout_wait ); p_sys->b_vout_ready = true;
vlc_cond_signal( &p_sys->vout_wait );
vlc_mutex_unlock( &getIntf()->p_sys->vout_lock ); vlc_mutex_unlock( &p_sys->vout_lock );
} }
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