+ /* We don't care about:
+ - spu-es
+ - chapter
+ - programs
+ - audio-delay
+ - spu-delay
+ - bookmark
+ - position, time, length, because they are included in intf-change
+ */
+ /* src/input/input.c:1629 */
+ var_AddCallback( p_input, "state", ItemStateChanged, this );
+ /* src/input/es-out.c:550 */
+ var_AddCallback( p_input, "audio-es", ChangeAudio, this );
+ /* src/input/es-out.c:551 */
+ var_AddCallback( p_input, "video-es", ChangeVideo, this );
+ /* src/input/input.c:1765 */
+ var_AddCallback( p_input, "rate-change", ItemRateChanged, this );
+ /* src/input/input.c:2003 */
+ var_AddCallback( p_input, "title", ItemTitleChanged, this );
+ /* src/input/input.c:734 for timers update*/
+ var_AddCallback( p_input, "intf-change", InterfaceChanged, this );
+}
+
+/* Delete the callbacks on Input. Self explanatory */
+void InputManager::delCallbacks()
+{
+ var_DelCallback( p_input, "audio-es", ChangeAudio, this );
+ var_DelCallback( p_input, "video-es", ChangeVideo, this );
+ var_DelCallback( p_input, "state", ItemStateChanged, this );
+ var_DelCallback( p_input, "rate-change", ItemRateChanged, this );
+ var_DelCallback( p_input, "title", ItemTitleChanged, this );
+ var_DelCallback( p_input, "intf-change", InterfaceChanged, this );
+}
+
+/* Convert the event from the callbacks in actions */
+void InputManager::customEvent( QEvent *event )
+{
+ int type = event->type();
+ IMEvent *ple = static_cast<IMEvent *>(event);
+
+ if ( type != PositionUpdate_Type &&
+ type != ItemChanged_Type &&
+ type != ItemRateChanged_Type &&
+ type != ItemTitleChanged_Type &&
+ type != ItemStateChanged_Type )