Commit 831da1b8 authored by Olivier Teulière's avatar Olivier Teulière

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