[vlc-devel] [PATCH 06/14] input: Add a synchronous control helper
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Mon Sep 23 13:22:16 CEST 2019
On Mon, Sep 23, 2019, at 12:50 PM, Thomas Guillem wrote:
>
>
> 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.
>
Good point, I renamed it to input_ControlSync locally, and switched the return type to void.
Thanks,
--
Hugo Beauzée-Luyssen
hugo at beauzee.fr
More information about the vlc-devel
mailing list