Commit 13b03ef4 authored by Ilkka Ollakka's avatar Ilkka Ollakka

only emit rateChanged when it has changed

parent b47c4dac
...@@ -40,6 +40,7 @@ InputManager::InputManager( QObject *parent, intf_thread_t *_p_intf) : ...@@ -40,6 +40,7 @@ InputManager::InputManager( QObject *parent, intf_thread_t *_p_intf) :
i_old_playing_status = END_S; i_old_playing_status = END_S;
old_name=""; old_name="";
p_input = NULL; p_input = NULL;
i_rate = 0;
ON_TIMEOUT( update() ); ON_TIMEOUT( update() );
} }
...@@ -101,8 +102,13 @@ void InputManager::update() ...@@ -101,8 +102,13 @@ void InputManager::update()
f_pos = var_GetFloat( p_input, "position" ); f_pos = var_GetFloat( p_input, "position" );
emit positionUpdated( f_pos, i_time, i_length ); emit positionUpdated( f_pos, i_time, i_length );
/* Update rate */ int i_new_rate = var_GetInteger( p_input, "rate");
emit rateChanged( var_GetInteger( p_input, "rate") ); if( i_new_rate != i_rate )
{
i_rate = i_new_rate;
/* Update rate */
emit rateChanged( i_rate );
}
/* Update navigation status */ /* Update navigation status */
vlc_value_t val; val.i_int = 0; vlc_value_t val; val.i_int = 0;
......
...@@ -46,6 +46,7 @@ private: ...@@ -46,6 +46,7 @@ private:
input_thread_t *p_input; input_thread_t *p_input;
int i_old_playing_status; int i_old_playing_status;
QString old_name; QString old_name;
int i_rate;
public slots: public slots:
void togglePlayPause(); void togglePlayPause();
void update(); ///< Periodic updates void update(); ///< Periodic updates
......
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