Commit d90abb6b authored by Ilkka Ollakka's avatar Ilkka Ollakka

Qt4: tell how much has been buffered when buffering (percents)

parent acb58aa6
......@@ -483,7 +483,10 @@ void TimeLabel::toggleTimeDisplay()
void TimeLabel::setCaching( float f_cache )
{
setText( "Buffering" );
QString amount;
amount.setNum( (int)(100 * f_cache) );
msg_Dbg( p_intf, "New caching: %d", (int)(100*f_cache));
setText( "Buffering " + amount + "%" );
}
......@@ -524,10 +524,12 @@ void InputManager::UpdateAout()
}
void InputManager::UpdateCaching()
{
float f_newCache = var_GetFloat( p_input, "cache" );
if(!hasInput()) return;
float f_newCache = var_GetFloat ( p_input, "cache" );
if( f_newCache != f_cache )
{
f_newCache = f_cache;
f_cache = f_newCache;
/* Update rate */
emit cachingChanged( f_cache );
}
......
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