+/*****************************************************************************
+ * StatusChange: Player status change signal
+ *****************************************************************************/
+
+DBUS_SIGNAL( StatusChangeSignal )
+{ /* send the updated status info on the bus */
+ SIGNAL_INIT( "StatusChange" );
+ OUT_ARGUMENTS;
+
+ /* we're called from a callback of input_thread_t, so it can not be
+ * destroyed before we return */
+ MarshalStatus( (intf_thread_t*) p_data, &args, false );
+
+ SIGNAL_SEND;
+}
+
+/*****************************************************************************
+ * StateChange: callback on input "state"
+ *****************************************************************************/
+static int StateChange( vlc_object_t *p_this, const char* psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ VLC_UNUSED(psz_var); VLC_UNUSED(oldval);
+ intf_thread_t *p_intf = ( intf_thread_t* ) p_data;
+ intf_sys_t *p_sys = p_intf->p_sys;
+
+ if( p_intf->b_dead )
+ return VLC_SUCCESS;
+
+ UpdateCaps( p_intf, true );
+
+ if( !p_sys->b_meta_read && newval.i_int == PLAYING_S )
+ {
+ input_item_t *p_item = input_GetItem( (input_thread_t*)p_this );
+ if( p_item )
+ {
+ p_sys->b_meta_read = true;
+ TrackChangeSignal( p_sys->p_conn, p_item );
+ }
+ }
+
+ if( newval.i_int == PLAYING_S || newval.i_int == PAUSE_S ||
+ newval.i_int == STOP_S || newval.i_int == END_S )
+ {
+ StatusChangeSignal( p_sys->p_conn, (void*) p_intf );
+ }
+
+ return VLC_SUCCESS;
+}
+
+/*****************************************************************************
+ * StatusChangeEmit: Emits the StatusChange signal
+ *****************************************************************************/
+static int StatusChangeEmit( vlc_object_t *p_this, const char *psz_var,
+ vlc_value_t oldval, vlc_value_t newval, void *p_data )
+{
+ VLC_UNUSED(p_this); VLC_UNUSED(psz_var);
+ VLC_UNUSED(oldval); VLC_UNUSED(newval);
+ intf_thread_t *p_intf = p_data;
+
+ if( p_intf->b_dead )
+ return VLC_SUCCESS;
+
+ UpdateCaps( p_intf, false );
+ StatusChangeSignal( p_intf->p_sys->p_conn, p_data );
+ return VLC_SUCCESS;
+}
+
+/*****************************************************************************
+ * TrackChange: callback on playlist "playlist-current"
+ *****************************************************************************/