[vlc-devel] [PATCH 14/14] input: remove legacy events from input item

Thomas Guillem thomas at gllm.fr
Fri Aug 17 09:45:23 CEST 2018


The question is now: do we want to remove all others input_item_t events (not that easy to do I think) ?

On Thu, Aug 16, 2018, at 16:02, Romain Vimont wrote:
> The "subtree added" and "preparse ended" events are now managed outside
> the input item (respectively by the input thread and preparser
> callbacks).
> 
> Remove these events which are now unused.
> ---
>  include/vlc_events.h        |  4 +---
>  src/input/input_interface.h |  1 -
>  src/input/input_internal.h  |  3 ---
>  src/input/item.c            | 16 ----------------
>  4 files changed, 1 insertion(+), 23 deletions(-)
> 
> diff --git a/include/vlc_events.h b/include/vlc_events.h
> index 38c9108fbd..71d701fe03 100644
> --- a/include/vlc_events.h
> +++ b/include/vlc_events.h
> @@ -98,13 +98,11 @@
>  typedef enum vlc_event_type_t {
>      /* Input item events */
>      vlc_InputItemMetaChanged,
> -    vlc_InputItemSubItemTreeAdded,
>      vlc_InputItemDurationChanged,
>      vlc_InputItemPreparsedChanged,
>      vlc_InputItemNameChanged,
>      vlc_InputItemInfoChanged,
>      vlc_InputItemErrorWhenReadingChanged,
> -    vlc_InputItemPreparseEnded,
>  } vlc_event_type_t;
>  
>  typedef struct vlc_event_listeners_group_t
> @@ -117,7 +115,7 @@ typedef struct vlc_event_manager_t
>  {
>      void * p_obj;
>      vlc_mutex_t lock;
> -    vlc_event_listeners_group_t events[vlc_InputItemPreparseEnded + 1];
> +    vlc_event_listeners_group_t 
> events[vlc_InputItemErrorWhenReadingChanged + 1];
>  } vlc_event_manager_t;
>  
>  /* Event definition */
> diff --git a/src/input/input_interface.h b/src/input/input_interface.h
> index 779798d7f9..34cf6eb141 100644
> --- a/src/input/input_interface.h
> +++ b/src/input/input_interface.h
> @@ -30,7 +30,6 @@
>  /**********************************************************************
>   * Item metadata
>   **********************************************************************/
> -void input_item_SignalPreparseEnded( input_item_t *p_i, int new_status );
>  void input_item_SetPreparsed( input_item_t *p_i, bool b_preparsed );
>  void input_item_SetArtNotFound( input_item_t *p_i, bool b_not_found );
>  void input_item_SetArtFetched( input_item_t *p_i, bool b_art_fetched );
> diff --git a/src/input/input_internal.h b/src/input/input_internal.h
> index 512fa73ef8..70374612de 100644
> --- a/src/input/input_internal.h
> +++ b/src/input/input_internal.h
> @@ -287,9 +287,6 @@ int subtitles_Filter( const char *);
>  void vlc_audio_replay_gain_MergeFromMeta( audio_replay_gain_t *p_dst,
>                                            const vlc_meta_t *p_meta );
>  
> -/* item.c */
> -void input_item_node_PostAndDelete( input_item_node_t *p_node );
> -
>  /* stats.c */
>  typedef struct input_rate_t
>  {
> diff --git a/src/input/item.c b/src/input/item.c
> index 934d86e4ac..ff2532ebfa 100644
> --- a/src/input/item.c
> +++ b/src/input/item.c
> @@ -66,13 +66,6 @@ void input_item_SetErrorWhenReading( input_item_t 
> *p_i, bool b_error )
>              .u.input_item_error_when_reading_changed.new_value = 
> b_error } );
>      }
>  }
> -void input_item_SignalPreparseEnded( input_item_t *p_i, int status )
> -{
> -    vlc_event_send( &p_i->event_manager, &(vlc_event_t) {
> -        .type = vlc_InputItemPreparseEnded,
> -        .u.input_item_preparse_ended.new_status = status } );
> -}
> -
>  void input_item_SetPreparsed( input_item_t *p_i, bool b_preparsed )
>  {
>      bool b_send_event = false;
> @@ -1301,15 +1294,6 @@ void 
> input_item_node_RemoveNode( input_item_node_t *parent,
>      TAB_REMOVE(parent->i_children, parent->pp_children, child);
>  }
>  
> -void input_item_node_PostAndDelete( input_item_node_t *p_root )
> -{
> -    vlc_event_send( &p_root->p_item->event_manager, &(vlc_event_t) {
> -        .type = vlc_InputItemSubItemTreeAdded,
> -        .u.input_item_subitem_tree_added.p_root = p_root } );
> -
> -    input_item_node_Delete( p_root );
> -}
> -
>  /* Called by es_out when a new Elementary Stream is added or updated. */
>  void input_item_UpdateTracksInfo(input_item_t *item, const es_format_t *fmt)
>  {
> -- 
> 2.18.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list