Commit 831da1b8 authored by ipkiss's avatar ipkiss
Browse files

* skins2:

    - new possible action vlc.mute() to mute/un-mute
    - vlc.isMute is now working well (in a boolean expression)
parent 14c15d6b
......@@ -2,7 +2,7 @@
* cmd_input.cpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: cmd_input.cpp,v 1.2 2004/01/18 19:54:45 asmax Exp $
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr>
......@@ -22,6 +22,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
#include <vlc/aout.h>
#include "cmd_input.hpp"
......@@ -92,3 +93,9 @@ void CmdFaster::execute()
}
}
void CmdMute::execute()
{
aout_VolumeMute( getIntf(), NULL );
}
......@@ -2,7 +2,7 @@
* cmd_input.hpp
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: cmd_input.hpp,v 1.3 2004/01/25 17:20:18 kuehne Exp $
* $Id$
*
* Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulière <ipkiss@via.ecp.fr>
......@@ -28,11 +28,12 @@
#include "cmd_generic.hpp"
/// Commands to control the input
DEFINE_COMMAND( Play, "Play" )
DEFINE_COMMAND( Play, "play" )
DEFINE_COMMAND( Pause, "pause" )
DEFINE_COMMAND( Stop, "Stop" )
DEFINE_COMMAND( Stop, "stop" )
DEFINE_COMMAND( Slower, "slower" )
DEFINE_COMMAND( Faster, "faster" )
DEFINE_COMMAND( Mute, "mute" )
#endif
......@@ -71,10 +71,11 @@ Interpreter::Interpreter( intf_thread_t *pIntf ): SkinObject( pIntf )
REGISTER_CMD( "vlc.fullscreen()", CmdFullscreen )
REGISTER_CMD( "vlc.play()", CmdPlay )
REGISTER_CMD( "vlc.pause()", CmdPause )
REGISTER_CMD( "vlc.quit()", CmdQuit )
REGISTER_CMD( "vlc.stop()", CmdStop )
REGISTER_CMD( "vlc.faster()", CmdFaster )
REGISTER_CMD( "vlc.slower()", CmdSlower )
REGISTER_CMD( "vlc.stop()", CmdStop )
REGISTER_CMD( "vlc.mute()", CmdMute )
REGISTER_CMD( "vlc.quit()", CmdQuit )
// Register the constant bool variables in the var manager
VarManager *pVarManager = VarManager::instance( getIntf() );
......
......@@ -149,13 +149,16 @@ void VlcProc::manage()
VarBoolImpl *pVarStopped = (VarBoolImpl*)m_cVarStopped.get();
VarBoolImpl *pVarPaused = (VarBoolImpl*)m_cVarPaused.get();
VarBoolImpl *pVarSeekable = (VarBoolImpl*)m_cVarSeekable.get();
VarBoolImpl *pVarMute = (VarBoolImpl*)m_cVarMute.get();
VarBoolImpl *pVarRandom = (VarBoolImpl*)m_cVarRandom.get();
VarBoolImpl *pVarLoop = (VarBoolImpl*)m_cVarLoop.get();
// Refresh sound volume
audio_volume_t volume;
aout_VolumeGet( getIntf(), &volume);
aout_VolumeGet( getIntf(), &volume );
pVolume->set( (double)volume / AOUT_VOLUME_MAX );
// Set the mute variable
pVarMute->set( volume == 0 );
// Update the input
if( getIntf()->p_sys->p_input == NULL )
......
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