rsked/vlcplayer.cc
/// Return true if this player is okay, false if not so.
/// This is the same as is_usable(), however it may return false
/// if we lose internet while playing an internet stream.
/// Does not start the player if in test mode.
///
/// * Throws NO exceptions.
///
Return true if this player is okay, false if not so.
This is the same as is_usable(), however it may return false
if we lose internet while playing an internet stream.
Does not start the player if in test mode.

Throws NO exceptions.
Return true if this player is okay false if not so . This is the same as is_usable () however it may return false if we lose internet while playing an internet stream . Does not start the player if in test mode . Throws NO exceptions .
bool Vlc_player::check()
{
    bool rc = is_usable();
    if (m_testmode) {
        return (m_state != PlayerState::Broken);
    }
    if (m_src and m_src->medium()==Medium::stream) {
        if (not Player_manager::inet_available()) {
            if (m_state == PlayerState::Playing) try { stop(); } catch(...) {}
            LOG_WARNING(Lgr)
                << "Vlc_player playing stream, but there are internet problems";
            rc = false;
        }
    }
    return rc;
}
bool Vlc_player :: check ( ) { bool rc = is_usable ( ) ; if ( m_testmode ) { return ( m_state != PlayerState :: Broken ) ; } if ( m_src and m_src -> medium ( ) == Medium :: stream ) { if ( not Player_manager :: inet_available ( ) ) { if ( m_state == PlayerState :: Playing ) try { stop ( ) ; } catch ( ... ) { } LOG_WARNING ( Lgr ) << " " ; rc = false ; } } return rc ; }
Return true if this player is okay, false if not so.
Return true if this player is okay false if not so .
// If we are playing an MP3 stream but the internet becomes // unavailable, then return false. // oops -- abort playing this stream if we are trying to play