[vlc-devel] [PATCH 1/6] Add a pf_readdir callback to access_t modules
Julien 'Lta' BALLET
elthariel at gmail.com
Fri Jun 20 19:53:03 CEST 2014
From: Julien 'Lta' BALLET <contact at lta.io>
---
include/vlc_access.h | 7 ++++---
src/input/access.c | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/vlc_access.h b/include/vlc_access.h
index 511278a..9237b2a 100644
--- a/include/vlc_access.h
+++ b/include/vlc_access.h
@@ -88,10 +88,11 @@ struct access_t
* (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, return VLC_SUCCESS on success, something else otherwise*/
/* Called for each seek.
* XXX can be null */
diff --git a/src/input/access.c b/src/input/access.c
index 850fccd..a9b2804 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -78,6 +78,7 @@ access_t *access_New( vlc_object_t *p_obj, input_thread_t *p_parent_input,
p_access->pf_read = NULL;
p_access->pf_block = NULL;
+ p_access->pf_readdir = NULL;
p_access->pf_seek = NULL;
p_access->pf_control = NULL;
p_access->p_sys = NULL;
--
2.0.0
More information about the vlc-devel
mailing list