rsked/vlcplayer.cc
/// Evaluates whether we can use VLC (only if enabled).
/// If this daemon has not been tried for m_recheck_secs since
/// last being marked unusable, attempt to start it again.
///
/// *  Will NOT throw.
///
Evaluates whether we can use VLC (only if enabled).
If this daemon has not been tried for m_recheck_secs since
last being marked unusable, attempt to start it again.

Will NOT throw.
Evaluates whether we can use VLC ( only if enabled ) . If this daemon has not been tried for m_recheck_secs since last being marked unusable attempt to start it again . Will NOT throw .
bool Vlc_player::is_usable()
{
    if (not m_enabled) return false;
    if (m_testmode) {
        return (m_state != PlayerState::Broken);
    }
    try {
        assure_running();       
    } catch(...) {
        m_usable=false;         
    }
    if (!m_usable) {
        if ( (time(0) - m_last_unusable) > m_recheck_secs ) {
            LOG_DEBUG(Lgr) << m_name << " tentatively marked as usable again";
            try_start();
        }
    }
    return m_usable;
}
bool Vlc_player :: is_usable ( ) { if ( not m_enabled ) return false ; if ( m_testmode ) { return ( m_state != PlayerState :: Broken ) ; } try { assure_running ( ) ; } catch ( ... ) { m_usable = false ; } if ( ! m_usable ) { if ( ( time ( 0 ) - m_last_unusable ) > m_recheck_secs ) { LOG_DEBUG ( Lgr ) << m_name << " " ; try_start ( ) ; } } return m_usable ; }
Evaluates whether we can use VLC (only if enabled).
Evaluates whether we can use VLC ( only if enabled ) .
// sets m_usable // nix it again just in case