25 #define VLC_ACCESS_H 1
45 ACCESS_CAN_CONTROL_PACE,
48 ACCESS_GET_PTS_DELAY = 0x101,
50 ACCESS_GET_TITLE_INFO,
55 ACCESS_GET_CONTENT_TYPE,
61 ACCESS_SET_PAUSE_STATE = 0x200,
69 ACCESS_SET_PRIVATE_ID_STATE = 0x1000,
70 ACCESS_SET_PRIVATE_ID_CA,
71 ACCESS_GET_PRIVATE_ID_STATE,
93 ssize_t (*pf_read) (
access_t *, uint8_t *, size_t );
98 int (*pf_seek) (
access_t *, uint64_t );
102 int (*pf_control)( access_t *,
int i_query, va_list args);
107 unsigned int i_update;
123 static inline int access_vaControl(
access_t *p_access,
int i_query, va_list args )
126 return p_access->pf_control( p_access, i_query, args );
129 static inline int access_Control(
access_t *p_access,
int i_query, ... )
134 va_start( args, i_query );
135 i_result = access_vaControl( p_access, i_query, args );
140 static inline void access_InitFields(
access_t *p_a )
142 p_a->info.i_update = 0;
143 p_a->info.i_size = 0;
145 p_a->info.b_eof =
false;
146 p_a->info.i_title = 0;
147 p_a->info.i_seekpoint = 0;
156 #define ACCESS_SET_CALLBACKS( read, block, control, seek ) \
158 p_access->pf_read = (read); \
159 p_access->pf_block = (block); \
160 p_access->pf_control = (control); \
161 p_access->pf_seek = (seek); \
164 #define STANDARD_READ_ACCESS_INIT \
166 access_InitFields( p_access ); \
167 ACCESS_SET_CALLBACKS( Read, NULL, Control, Seek ); \
168 p_sys = p_access->p_sys = calloc( 1, sizeof( access_sys_t ) ); \
169 if( !p_sys ) return VLC_ENOMEM;\
172 #define STANDARD_BLOCK_ACCESS_INIT \
174 access_InitFields( p_access ); \
175 ACCESS_SET_CALLBACKS( NULL, Block, Control, Seek ); \
176 p_sys = p_access->p_sys = calloc( 1, sizeof( access_sys_t ) ); \
177 if( !p_sys ) return VLC_ENOMEM; \
VLC_API input_thread_t * access_GetParentInput(access_t *p_access) VLC_USED
Definition: vlc_access.h:74
char * psz_location
Definition: vlc_access.h:83
#define VLC_EGENERIC
Definition: vlc_common.h:374
char * psz_filepath
Definition: vlc_access.h:84
Definition: vlc_block.h:102