コード例 #1
0
ファイル: time.cpp プロジェクト: Adatan/vlc
string StreamTime::getAsStringDuration( bool bShortFormat ) const
{
    if( !havePosition() )
        return "-:--:--";

    mtime_t time = var_GetInteger( getIntf()->p_sys->p_input, "length" );
    return formatTime( time / CLOCK_FREQ, bShortFormat );
}
コード例 #2
0
ファイル: time.cpp プロジェクト: mstorsjo/vlc
std::string StreamTime::getAsStringDuration( bool bShortFormat ) const
{
    if( !havePosition() )
        return "-:--:--";

    vlc_tick_t time = var_GetInteger( getIntf()->p_sys->p_input, "length" );
    return formatTime( SEC_FROM_VLC_TICK(time), bShortFormat );
}
コード例 #3
0
ファイル: time.cpp プロジェクト: 0xheart0/vlc
std::string StreamTime::getAsStringTimeLeft( bool bShortFormat ) const
{
    if( !havePosition() )
        return "-:--:--";

    mtime_t time = var_GetInteger( getIntf()->p_sys->p_input, "time" ),
        duration = var_GetInteger( getIntf()->p_sys->p_input, "length" );

    return formatTime( (duration - time) / CLOCK_FREQ, bShortFormat );
}