+ vlc_event_manager_t * p_em = &p_item->p_input->event_manager;
+ vlc_event_attach( p_em, vlc_InputItemSubItemAdded,
+ input_item_subitem_added, p_item );
+ vlc_event_attach( p_em, vlc_InputItemDurationChanged,
+ input_item_changed, p_item );
+ vlc_event_attach( p_em, vlc_InputItemMetaChanged,
+ input_item_changed, p_item );
+ vlc_event_attach( p_em, vlc_InputItemNameChanged,
+ input_item_changed, p_item );
+ vlc_event_attach( p_em, vlc_InputItemInfoChanged,
+ input_item_changed, p_item );
+ vlc_event_attach( p_em, vlc_InputItemErrorWhenReadingChanged,
+ input_item_changed, p_item );
+}
+
+static void uninstall_input_item_observer( playlist_item_t * p_item )
+{
+ vlc_event_manager_t * p_em = &p_item->p_input->event_manager;
+ vlc_event_detach( p_em, vlc_InputItemSubItemAdded,
+ input_item_subitem_added, p_item );
+ vlc_event_detach( p_em, vlc_InputItemMetaChanged,
+ input_item_changed, p_item );
+ vlc_event_detach( p_em, vlc_InputItemDurationChanged,
+ input_item_changed, p_item );
+ vlc_event_detach( p_em, vlc_InputItemNameChanged,
+ input_item_changed, p_item );
+ vlc_event_detach( p_em, vlc_InputItemInfoChanged,
+ input_item_changed, p_item );
+ vlc_event_detach( p_em, vlc_InputItemErrorWhenReadingChanged,
+ input_item_changed, p_item );
+}
+
+/*****************************************************************************
+ * Playlist item creation
+ *****************************************************************************/
+playlist_item_t *playlist_ItemNewFromInput( playlist_t *p_playlist,
+ input_item_t *p_input )
+{
+ DECMALLOC_NULL( p_item, playlist_item_t );