[vlc-devel] [PATCH 06/14] input: Add a synchronous control helper

Thomas Guillem thomas at gllm.fr
Mon Sep 23 12:50:01 CEST 2019



On Mon, Sep 23, 2019, at 11:44, Hugo Beauzée-Luyssen wrote:
> ---
>  src/input/input.c          | 6 ++++++
>  src/input/input_internal.h | 5 +++++
>  2 files changed, 11 insertions(+)
> 
> diff --git a/src/input/input.c b/src/input/input.c
> index abd84936b9..a99a005f91 100644
> --- a/src/input/input.c
> +++ b/src/input/input.c
> @@ -1786,6 +1786,12 @@ static void ControlInsertDemuxFilter( 
> input_thread_t* p_input, const char* psz_d
>          msg_Dbg(p_input, "Failed to create demux filter %s", 
> psz_demux_chain);
>  }
>  
> +bool input_Control(input_thread_t *p_input, int i_type,
> +                   const input_control_param_t* param )
> +{
> +    assert( !input_priv(p_input)->is_running );
> +    return Control( p_input, i_type, *param );
> +}
>  
>  static bool Control( input_thread_t *p_input,
>                       int i_type, input_control_param_t param )
> diff --git a/src/input/input_internal.h b/src/input/input_internal.h
> index 23250e72c7..29809cf4b6 100644
> --- a/src/input/input_internal.h
> +++ b/src/input/input_internal.h
> @@ -599,6 +599,11 @@ static inline void input_ControlPushEsHelper( 
> input_thread_t *p_input, int i_typ
>      } );
>  }
>  
> +/** Synchronously execute a control sequence. This MUST only be used before the
> + * input is started
> + */
> +bool input_Control(input_thread_t *, int, const input_control_param_t *);

Maybe, we could use a more specific name ? Like input_PreControl() or input_ControlSync().
And also, the returned vale is useless and undocumented.

> +
>  bool input_Stopped( input_thread_t * );
>  
>  int input_GetAttachments(input_thread_t *input, input_attachment_t 
> ***attachments);
> -- 
> 2.20.1
> 
> _______________________________________________
> 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