rsked/vlcplayer.cc
/// Enable or disable this player.
///   enabled==true:  Enable
///   enabled==false: Disable
///
/// When disabled, the player exits and goes to state Disabled.
/// When enabled, the player goes to state Stopped.
/// Return the new value of the enabled flag.
///
/// * Will not throw.
///
Enable or disable this player.
enabled==true:  Enable
enabled==false: Disable

When disabled, the player exits and goes to state Disabled.
When enabled, the player goes to state Stopped.
Return the new value of the enabled flag.

Will not throw.
Enable or disable this player . enabled == true : Enable enabled == false : Disable When disabled the player exits and goes to state Disabled . When enabled the player goes to state Stopped . Return the new value of the enabled flag . Will not throw .
bool Vlc_player::set_enabled( bool enabled )
{
    bool was_enabled = m_enabled;
    if (was_enabled and not enabled) {
        exit();
        m_enabled = false;
        m_state = PlayerState::Disabled;
        LOG_WARNING(Lgr) << m_name << " is being Disabled";
    }
    else if (enabled and not was_enabled) {
        m_state = PlayerState::Stopped;
        m_enabled = true;
        LOG_WARNING(Lgr) << m_name << " is being Enabled";
    }
    return m_enabled;
}
bool Vlc_player :: set_enabled ( bool enabled ) { bool was_enabled = m_enabled ; if ( was_enabled and not enabled ) { exit ( ) ; m_enabled = false ; m_state = PlayerState :: Disabled ; LOG_WARNING ( Lgr ) << m_name << " " ; } else if ( enabled and not was_enabled ) { m_state = PlayerState :: Stopped ; m_enabled = true ; LOG_WARNING ( Lgr ) << m_name << " " ; } return m_enabled ; }
Enable or disable this player.
Enable or disable this player .