[vlc-commits] stream: remove dummy pf_readdir callbacks
Rémi Denis-Courmont
git at videolan.org
Sat Mar 31 17:02:18 CEST 2018
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Mar 31 15:46:06 2018 +0300| [2ec4bfe7b17af3b8c93cbbf145df18b6e73785bd] | committer: Rémi Denis-Courmont
stream: remove dummy pf_readdir callbacks
This was required for stream filters, but not for accesses. Now that
both are stream_t, this has become inconsistent.
So this just makes them optional also for stream filters.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2ec4bfe7b17af3b8c93cbbf145df18b6e73785bd
---
include/vlc_stream.h | 16 ----------------
modules/stream_filter/inflate.c | 7 -------
modules/stream_filter/prefetch.c | 7 -------
modules/stream_filter/record.c | 1 -
modules/stream_filter/skiptags.c | 7 -------
src/input/access.c | 8 --------
src/input/stream_filter.c | 6 ------
src/libvlccore.sym | 1 -
8 files changed, 53 deletions(-)
diff --git a/include/vlc_stream.h b/include/vlc_stream.h
index 4fb7212651..9a74dc54bb 100644
--- a/include/vlc_stream.h
+++ b/include/vlc_stream.h
@@ -504,22 +504,6 @@ VLC_API void vlc_stream_fifo_Close(stream_t *s);
VLC_API stream_t* vlc_stream_FilterNew( stream_t *p_source, const char *psz_stream_filter );
/**
- * Default ReadDir implementation for stream Filter. This implementation just
- * forward the pf_readdir call to the p_source stream.
- */
-VLC_API int vlc_stream_FilterDefaultReadDir(stream_t *s,
- input_item_node_t *p_node);
-
-/**
- * Sets vlc_stream_FilterDefaultReadDir as the pf_readdir callback for this
- * stream filter.
- */
-#define stream_FilterSetDefaultReadDir(stream) \
-do { \
- (stream)->pf_readdir = vlc_stream_FilterDefaultReadDir; \
-} while (0)
-
-/**
* @}
*/
diff --git a/modules/stream_filter/inflate.c b/modules/stream_filter/inflate.c
index 36fa8e09c2..047f0f4675 100644
--- a/modules/stream_filter/inflate.c
+++ b/modules/stream_filter/inflate.c
@@ -94,12 +94,6 @@ static ssize_t Read(stream_t *stream, void *buf, size_t buflen)
return -1;
}
-static int ReadDir(stream_t *stream, input_item_node_t *node)
-{
- (void) stream; (void) node;
- return VLC_EGENERIC;
-}
-
static int Seek(stream_t *stream, uint64_t offset)
{
(void) stream; (void) offset;
@@ -178,7 +172,6 @@ static int Open(vlc_object_t *obj)
stream->p_sys = sys;
stream->pf_read = Read;
- stream->pf_readdir = ReadDir;
stream->pf_seek = Seek;
stream->pf_control = Control;
return VLC_SUCCESS;
diff --git a/modules/stream_filter/prefetch.c b/modules/stream_filter/prefetch.c
index a3dc3a8c06..a5061df6d8 100644
--- a/modules/stream_filter/prefetch.c
+++ b/modules/stream_filter/prefetch.c
@@ -333,12 +333,6 @@ static ssize_t Read(stream_t *stream, void *buf, size_t buflen)
return copy;
}
-static int ReadDir(stream_t *stream, input_item_node_t *node)
-{
- (void) stream; (void) node;
- return VLC_EGENERIC;
-}
-
static int Control(stream_t *stream, int query, va_list args)
{
stream_sys_t *sys = stream->p_sys;
@@ -488,7 +482,6 @@ static int Open(vlc_object_t *obj)
msg_Dbg(stream, "using %zu bytes buffer, %zu bytes read",
sys->buffer_size, sys->read_size);
stream->pf_read = Read;
- stream->pf_readdir = ReadDir;
stream->pf_control = Control;
return VLC_SUCCESS;
diff --git a/modules/stream_filter/record.c b/modules/stream_filter/record.c
index 9b4a160556..7a155afa00 100644
--- a/modules/stream_filter/record.c
+++ b/modules/stream_filter/record.c
@@ -94,7 +94,6 @@ static int Open ( vlc_object_t *p_this )
s->pf_read = Read;
s->pf_seek = Seek;
s->pf_control = Control;
- stream_FilterSetDefaultReadDir( s );
return VLC_SUCCESS;
}
diff --git a/modules/stream_filter/skiptags.c b/modules/stream_filter/skiptags.c
index 65345a8aba..db3f27b189 100644
--- a/modules/stream_filter/skiptags.c
+++ b/modules/stream_filter/skiptags.c
@@ -152,12 +152,6 @@ static ssize_t Read(stream_t *stream, void *buf, size_t buflen)
return vlc_stream_Read(stream->s, buf, buflen);
}
-static int ReadDir(stream_t *stream, input_item_node_t *node)
-{
- (void) stream; (void) node;
- return VLC_EGENERIC;
-}
-
static int Seek(stream_t *stream, uint64_t offset)
{
const struct skiptags_sys_t *sys = stream->p_sys;
@@ -229,7 +223,6 @@ static int Open(vlc_object_t *obj)
sys->p_tags = p_tags;
stream->p_sys = sys;
stream->pf_read = Read;
- stream->pf_readdir = ReadDir;
stream->pf_seek = Seek;
stream->pf_control = Control;
return VLC_SUCCESS;
diff --git a/src/input/access.c b/src/input/access.c
index 05b50cbe8a..7da5b96019 100644
--- a/src/input/access.c
+++ b/src/input/access.c
@@ -175,12 +175,6 @@ int access_vaDirectoryControlHelper( stream_t *p_access, int i_query, va_list ar
return VLC_SUCCESS;
}
-static int AStreamNoReadDir(stream_t *s, input_item_node_t *p_node)
-{
- (void) s; (void) p_node;
- return VLC_EGENERIC;;
-}
-
/* Block access */
static block_t *AStreamReadBlock(stream_t *s, bool *restrict eof)
{
@@ -298,8 +292,6 @@ stream_t *stream_AccessNew(vlc_object_t *parent, input_thread_t *input,
if (access->pf_readdir != NULL)
s->pf_readdir = AStreamReadDir;
- else
- s->pf_readdir = AStreamNoReadDir;
s->pf_seek = AStreamSeek;
s->pf_control = AStreamControl;
diff --git a/src/input/stream_filter.c b/src/input/stream_filter.c
index c747751440..5bfd29985c 100644
--- a/src/input/stream_filter.c
+++ b/src/input/stream_filter.c
@@ -120,9 +120,3 @@ static void StreamDelete( stream_t *s )
free(s->psz_filepath);
}
-
-int vlc_stream_FilterDefaultReadDir( stream_t *s, input_item_node_t *p_node )
-{
- assert( s->s != NULL );
- return vlc_stream_ReadDir( s->s, p_node );
-}
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 6107aa577b..eb3c82837d 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -411,7 +411,6 @@ vlc_stream_NewMRL
vlc_stream_NewURL
vlc_stream_vaControl
vlc_stream_ReadDir
-vlc_stream_FilterDefaultReadDir
vlc_stream_fifo_New
vlc_stream_fifo_Queue
vlc_stream_fifo_Write
More information about the vlc-commits
mailing list