[vlc-devel] [vlc-commits] access: pf_control is mandatory

Thomas Guillem thomas at gllm.fr
Wed Jun 3 10:59:17 CEST 2015


On Tue, Jun 2, 2015, at 22:07, Rémi Denis-Courmont wrote:
> vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jun  2
> 23:01:38 2015 +0300| [ca00082db979238d6dbfc1f97d77e6751df764de] |
> committer: Rémi Denis-Courmont
> 
> access: pf_control is mandatory
> 
> As per both usage and documentation ACCESS_CAN_SEEK,
> ACCESS_CAN_FASTSEEK, ACCESS_CAN_PAUSE, ACCESS_CAN_CONTROL_PACE and
> ACCESS_GET_PTS_DELAY are mandatory. Thus the pf_control callback is
> mandatory.
> 
> (Note that STREAM_* maps directly to ACCESS_* here.

This is a partial revert of one of my recent commit
763e765d2446cc87380a342a4f450f44a1bf89d3
"access: pf_control is not mandatory for directory accesses".

I thought we agreed that directory accesses could not have pf_control.
Indeed, I don't see how theses mandatory ACCESS_* controls can be used
with a directory.

What's the current state ? Should I add back pf_control to directory
accesses or is it a mistake ?

> 
> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ca00082db979238d6dbfc1f97d77e6751df764de
> ---
> 
>  include/vlc_access.h |    3 +--
>  src/input/access.c   |    3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/include/vlc_access.h b/include/vlc_access.h
> index a6a84cf..1adf669 100644
> --- a/include/vlc_access.h
> +++ b/include/vlc_access.h
> @@ -128,8 +128,7 @@ struct access_t
>  static inline int access_vaControl( access_t *p_access, int i_query,
>  va_list args )
>  {
>      if( !p_access ) return VLC_EGENERIC;
> -    return p_access->pf_control ? p_access->pf_control( p_access,
> i_query, args )
> -                                : VLC_EGENERIC;
> +    return p_access->pf_control( p_access, i_query, args );
>  }
>  
>  static inline int access_Control( access_t *p_access, int i_query, ... )
> diff --git a/src/input/access.c b/src/input/access.c
> index 7bf4390..6b9ae13 100644
> --- a/src/input/access.c
> +++ b/src/input/access.c
> @@ -91,8 +91,7 @@ access_t *access_New( vlc_object_t *p_obj,
> input_thread_t *p_parent_input,
>      if( p_access->p_module == NULL )
>          goto error;
>  
> -    /* if access has pf_readdir, pf_control is not mandatory */
> -    assert( p_access->pf_control || p_access->pf_readdir );
> +    assert( p_access->pf_control != NULL );
>  
>      return p_access;
>  
> 
> _______________________________________________
> vlc-commits mailing list
> vlc-commits at videolan.org
> https://mailman.videolan.org/listinfo/vlc-commits



More information about the vlc-devel mailing list