/* */
ACCESS_SET_TITLE, /* arg1= int can fail */
ACCESS_SET_SEEKPOINT, /* arg1= int can fail */
+
+ /* Special mode for access/demux communication
+ * XXX: avoid to use it unless you can't */
+ ACCESS_SET_PRIVATE_ID_STATE, /* arg1= vlc_bool_t b_selected, int i_private_data can fail */
};
struct access_t
/* Access name (empty if non forced) */
char *psz_access;
+ /* Access path/url/filename/.... */
char *psz_path;
- /* Access can fill this entry to force a demuxer */
+
+ /* Access can fill this entry to force a demuxer
+ * XXX: fill it once you know for sure you will succed
+ * (if you fail, this value won't be reseted */
char *psz_demux;
- /* set by access (only one of pf_read/pf_block may be filled) */
+ /* pf_read/pf_block is used to read data.
+ * XXX A access should set one and only one of them */
int (*pf_read) ( access_t *, uint8_t *, int ); /* Return -1 if no data yet, 0 if no more data, else real data read */
- block_t *(*pf_block)( access_t * ); /* return a block of data in his 'natural' size */
+ block_t *(*pf_block)( access_t * ); /* return a block of data in his 'natural' size, NULL if not yet data or eof */
+
+ /* Called for each seek.
+ * XXX can be null */
int (*pf_seek) ( access_t *, int64_t ); /* can be null if can't seek */
- int (*pf_control)( access_t *, int i_query, va_list args); /* mandatory */
+ /* Used to retreive and configure the access
+ * XXX mandatory. look at access_query_e to know what query you *have to* support */
+ int (*pf_control)( access_t *, int i_query, va_list args);
- /* access has to maintain them uptodate */
+ /* Access has to maintain them uptodate */
struct
{
unsigned int i_update; /* Access sets them on change,
access_sys_t *p_sys;
};
-#define access2_New( a, b ) __access2_New(VLC_OBJECT(a), b )
-VLC_EXPORT( access_t *, __access2_New, ( vlc_object_t *p_obj, char *psz_mrl ) );
+#define access2_New( a, b, c, d ) __access2_New(VLC_OBJECT(a), b, c, d )
+VLC_EXPORT( access_t *, __access2_New, ( vlc_object_t *p_obj, char *psz_access, char *psz_demux, char *psz_path ) );
VLC_EXPORT( void, access2_Delete, ( access_t * ) );
static inline int access2_vaControl( access_t *p_access, int i_query, va_list args )
STREAM_GET_SIZE, /**< arg1= int64_t * res=cannot fail (0 if no sense)*/
- STREAM_GET_MTU /**< arg1= int * res=cannot fail (0 if no sense)*/
+ STREAM_GET_MTU, /**< arg1= int * res=cannot fail (0 if no sense)*/
+
+ /* Special for direct access control from demuxer.
+ * XXX: avoid using it by all means */
+ STREAM_CONTROL_ACCESS, /* arg1= int i_access_query, args res: can fail
+ if access unreachable or access control answer */
};
/**
int (*pf_control)( demux_t *, int i_query, va_list args);
/* Demux has to maintain them uptodate
- * when it is responsible of seekpoint/title*/
+ * when it is responsible of seekpoint/title
+ * XXX: don't use them yet */
struct
{
unsigned int i_update; /* Demux sets them on change,
/* stream_t *s could be null and then it mean a access+demux in one */
-#define demux2_New( a, b, c, d ) __demux2_New(VLC_OBJECT(a), b, c, d)
-VLC_EXPORT( demux_t *, __demux2_New, ( vlc_object_t *p_obj, char *psz_mrl, stream_t *s, es_out_t *out ) );
+#define demux2_New( a, b, c, d, e, f ) __demux2_New(VLC_OBJECT(a),b,c,d,e,f)
+VLC_EXPORT( demux_t *, __demux2_New, ( vlc_object_t *p_obj, char *psz_access, char *psz_demux, char *psz_path, stream_t *s, es_out_t *out ) );
VLC_EXPORT( void, demux2_Delete, ( demux_t * ) );
VLC_EXPORT( int, demux2_vaControlHelper, ( stream_t *, int64_t i_start, int64_t i_end, int i_bitrate, int i_align, int i_query, va_list args ) );
*/
enum input_query_e
{
+ /* input variable "position" */
INPUT_GET_POSITION, /* arg1= double * res= */
INPUT_SET_POSITION, /* arg1= double res=can fail */
+ /* input variable "length" */
+ INPUT_GET_LENGTH, /* arg1= int64_t * res=can fail */
+
+ /* input variable "time" */
INPUT_GET_TIME, /* arg1= int64_t * res= */
INPUT_SET_TIME, /* arg1= int64_t res=can fail */
- INPUT_GET_LENGTH, /* arg1= int64_t * res=can fail */
+ /* input variable "rate" (1 is DEFAULT_RATE) */
+ INPUT_GET_RATE, /* arg1= int * res= */
+ INPUT_SET_RATE, /* arg1= int res=can fail */
+
+ /* input variable "state" */
+ INPUT_GET_STATE, /* arg1= int * res= */
+ INPUT_SET_STATE, /* arg1= int res=can fail */
- INPUT_GET_FPS, /* arg1= float * res=can fail */
- INPUT_GET_META, /* arg1= vlc_meta_t ** res=can fail */
+ /* bookmarks */
INPUT_GET_BOOKMARKS, /* arg1= seekpoint_t *** arg2= int * res=can fail */
INPUT_CLEAR_BOOKMARKS, /* res=can fail */
INPUT_ADD_BOOKMARK, /* arg1= seekpoint_t * res=can fail */
+ INPUT_CHANGE_BOOKMARK, /* arg1= seekpoint_t * arg2= int * res=can fail */
INPUT_DEL_BOOKMARK, /* arg1= seekpoint_t * res=can fail */
INPUT_SET_BOOKMARK, /* arg1= int res=can fail */
INPUT_ADD_OPTION, /* arg1= char * arg2= char * res=can fail */
+ /* */
INPUT_ADD_INFO, /* arg1= char * arg2= char * arg3=... res=can fail */
INPUT_GET_INFO, /* arg1= char * arg2= char * arg3= char ** res=can fail*/
INPUT_SET_NAME, /* arg1= char * res=can fail */
+ /* */
INPUT_GET_SUBDELAY, /* arg1 = int* res=can fail */
INPUT_SET_SUBDELAY, /* arg1 = int res=can fail */
-
- INPUT_GET_DIVISIONS
};
VLC_EXPORT( int, input_vaControl,( input_thread_t *, int i_query, va_list ) );