Commit 6fd7ce2f authored by Pierre d'Herbemont's avatar Pierre d'Herbemont
Browse files

playlist: Code readability.

parent 097f8fc9
......@@ -114,8 +114,7 @@ static void input_item_changed( const vlc_event_t * p_event,
{
(void)p_event;
playlist_item_t * p_item = user_data;
var_SetInteger( p_item->p_playlist,
"item-change", p_item->i_id );
var_SetInteger( p_item->p_playlist, "item-change", p_item->i_id );
}
/*****************************************************************************
......@@ -123,34 +122,24 @@ static void input_item_changed( const vlc_event_t * p_event,
*****************************************************************************/
static void install_input_item_observer( playlist_item_t * p_item )
{
vlc_event_attach( &p_item->p_input->event_manager,
vlc_InputItemSubItemAdded,
input_item_subitem_added,
p_item );
vlc_event_attach( &p_item->p_input->event_manager,
vlc_InputItemDurationChanged,
input_item_changed,
p_item );
vlc_event_attach( &p_item->p_input->event_manager,
vlc_InputItemMetaChanged,
input_item_changed,
p_item );
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 );
}
static void uninstall_input_item_observer( playlist_item_t * p_item )
{
vlc_event_detach( &p_item->p_input->event_manager,
vlc_InputItemMetaChanged,
input_item_changed,
p_item );
vlc_event_detach( &p_item->p_input->event_manager,
vlc_InputItemDurationChanged,
input_item_changed,
p_item );
vlc_event_detach( &p_item->p_input->event_manager,
vlc_InputItemSubItemAdded,
input_item_subitem_added,
p_item );
vlc_event_manager_t * p_em = &p_item->p_input->event_manager;
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_InputItemSubItemAdded,
input_item_subitem_added, p_item );
}
/*****************************************************************************
......
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