Commit 5df9c323 authored by Ilkka Ollakka's avatar Ilkka Ollakka

quick hack to get rate-faster/slower to react in qt4 interface, there's

something fishy in here because seems that inputmanager doesn't get
variable callbacks regarding input-rate from /src/input/input.c. 
Slider worked because we set ourself that rate-variable, or atleast it seems
so.
parent b737dd6c
...@@ -138,6 +138,8 @@ void InputManager::addCallbacks() ...@@ -138,6 +138,8 @@ void InputManager::addCallbacks()
var_AddCallback( p_input, "video-es", ChangeVideo, this ); var_AddCallback( p_input, "video-es", ChangeVideo, this );
/* src/input/input.c:1765 */ /* src/input/input.c:1765 */
var_AddCallback( p_input, "rate", ItemRateChanged, this ); var_AddCallback( p_input, "rate", ItemRateChanged, this );
var_AddCallback( p_input, "rate-faster", ItemRateChanged, this );
var_AddCallback( p_input, "rate-slower", ItemRateChanged, this );
/* src/input/input.c:2003 */ /* src/input/input.c:2003 */
var_AddCallback( p_input, "title", ItemTitleChanged, this ); var_AddCallback( p_input, "title", ItemTitleChanged, this );
/* src/input/input.c:734 for timers update*/ /* src/input/input.c:734 for timers update*/
...@@ -151,6 +153,8 @@ void InputManager::delCallbacks() ...@@ -151,6 +153,8 @@ void InputManager::delCallbacks()
var_DelCallback( p_input, "video-es", ChangeVideo, this ); var_DelCallback( p_input, "video-es", ChangeVideo, this );
var_DelCallback( p_input, "state", ItemStateChanged, this ); var_DelCallback( p_input, "state", ItemStateChanged, this );
var_DelCallback( p_input, "rate", ItemRateChanged, this ); var_DelCallback( p_input, "rate", ItemRateChanged, this );
var_DelCallback( p_input, "rate-faster", ItemRateChanged, this );
var_DelCallback( p_input, "rate-slower", ItemRateChanged, this );
var_DelCallback( p_input, "title", ItemTitleChanged, this ); var_DelCallback( p_input, "title", ItemTitleChanged, this );
var_DelCallback( p_input, "intf-change", InterfaceChanged, this ); var_DelCallback( p_input, "intf-change", InterfaceChanged, this );
} }
...@@ -599,7 +603,7 @@ static int ItemRateChanged( vlc_object_t *p_this, const char *psz_var, ...@@ -599,7 +603,7 @@ static int ItemRateChanged( vlc_object_t *p_this, const char *psz_var,
vlc_value_t oldval, vlc_value_t newval, void *param ) vlc_value_t oldval, vlc_value_t newval, void *param )
{ {
InputManager *im = (InputManager*)param; InputManager *im = (InputManager*)param;
IMEvent *event = new IMEvent( ItemRateChanged_Type, 0 ); IMEvent *event = new IMEvent( ItemRateChanged_Type, 0 );
QApplication::postEvent( im, static_cast<QEvent*>(event) ); QApplication::postEvent( im, static_cast<QEvent*>(event) );
return VLC_SUCCESS; return VLC_SUCCESS;
......
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