Browse Source

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.
pull/29/head
Rémi Denis-Courmont 11 years ago
parent
commit
ca00082db9
  1. 3
      include/vlc_access.h
  2. 3
      src/input/access.c

3
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, ... )

3
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;

Loading…
Cancel
Save