/* */
ACCESS_GET_PTS_DELAY = 0x101,/* arg1= int64_t* cannot fail */
- /* */
- ACCESS_GET_TITLE_INFO, /* arg1=input_title_t*** arg2=int* res=can fail */
- /* Meta data */
- ACCESS_GET_META, /* arg1= vlc_meta_t ** res=can fail */
+ ACCESS_GET_TITLE_INFO, /* arg1=input_title_t*** arg2=int* res=can fail */
+ ACCESS_GET_TITLE, /* arg1=unsigned * res=can fail */
+ ACCESS_GET_SEEKPOINT, /* arg1=unsigned * res=can fail */
- /* */
- ACCESS_GET_CONTENT_TYPE,/* arg1=char **ppsz_content_type res=can fail */
+ /* Meta data */
+ ACCESS_GET_META, /* arg1= vlc_meta_t ** res=can fail */
+ ACCESS_GET_CONTENT_TYPE,/* arg1=char **ppsz_content_type res=can fail */
- /* */
ACCESS_GET_SIGNAL, /* arg1=double *pf_quality, arg2=double *pf_strength res=can fail */
/* */
* (if you fail, this value won't be reseted */
char *psz_demux;
- /* pf_read/pf_block is used to read data.
+ /* pf_read/pf_block/pf_readdir is used to read data.
* XXX A access should set one and only one of them */
- ssize_t (*pf_read) ( access_t *, uint8_t *, size_t ); /* 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, NULL if not yet data or eof */
+ ssize_t (*pf_read) ( access_t *, uint8_t *, size_t ); /* 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, NULL if not yet data or eof */
+ int (*pf_readdir)( access_t *, input_item_node_t * );/* Fills the provided item_node, see doc/browsing.txt for details */
/* Called for each seek.
* XXX can be null */
/* Access has to maintain them uptodate */
struct
{
- unsigned int i_update; /* Access sets them on change,
- Input removes them once take into account*/
-
uint64_t i_pos; /* idem */
bool b_eof; /* idem */
-
- int i_title; /* idem, start from 0 (could be menu) */
- int i_seekpoint;/* idem, start from 0 */
} info;
access_sys_t *p_sys;
static inline void access_InitFields( access_t *p_a )
{
- p_a->info.i_update = 0;
p_a->info.i_pos = 0;
p_a->info.b_eof = false;
- p_a->info.i_title = 0;
- p_a->info.i_seekpoint = 0;
}
/**
do { \
access_InitFields( p_access ); \
ACCESS_SET_CALLBACKS( Read, NULL, Control, Seek ); \
- p_sys = p_access->p_sys = calloc( 1, sizeof( access_sys_t ) ); \
+ p_sys = p_access->p_sys = (access_sys_t*)calloc( 1, sizeof( access_sys_t ) ); \
if( !p_sys ) return VLC_ENOMEM;\
} while(0);
do { \
access_InitFields( p_access ); \
ACCESS_SET_CALLBACKS( NULL, Block, Control, Seek ); \
- p_sys = p_access->p_sys = calloc( 1, sizeof( access_sys_t ) ); \
+ p_sys = p_access->p_sys = (access_sys_t*)calloc( 1, sizeof( access_sys_t ) ); \
if( !p_sys ) return VLC_ENOMEM; \
} while(0);