[vlc-devel] [PATCH 06/10] Make record stream filter forward pf_readdir calls

Rémi Denis-Courmont remi at remlab.net
Mon Jun 16 15:19:22 CEST 2014


I would create a common helper for this, perhaps. Isn't the NULL check redundant?

-- 
Rémi Denis-Courmont
Sent from my NVIDIA Tegra-powered device

----- Reply message -----
De : "Julien 'Lta' BALLET" <elthariel at gmail.com>
Pour : <vlc-devel at videolan.org>
Cc : "Julien 'Lta' BALLET" <contact at lta.io>
Objet : [vlc-devel] [PATCH 06/10] Make record stream filter forward pf_readdir calls
Date : lun., juin 16, 2014 15:41

From: Julien 'Lta' BALLET <contact at lta.io>

---
modules/stream_filter/record.c | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/modules/stream_filter/record.c b/modules/stream_filter/record.c
index 538d506..89d2842 100644
--- a/modules/stream_filter/record.c
+++ b/modules/stream_filter/record.c
@@ -67,6 +67,7 @@ struct stream_sys_t
static int  Read   ( stream_t *, void *p_read, unsigned int i_read );
static int  Peek   ( stream_t *, const uint8_t **pp_peek, unsigned int i_peek );
static int  Control( stream_t *, int i_query, va_list );
+static input_item_t *ReadDir( stream_t * );

static int  Start  ( stream_t *, const char *psz_extension );
static int  Stop   ( stream_t * );
@@ -91,6 +92,7 @@ static int Open ( vlc_object_t *p_this )
s->pf_read = Read;
s->pf_peek = Peek;
s->pf_control = Control;
+    s->pf_readdir = ReadDir;

return VLC_SUCCESS;
}
@@ -241,3 +243,11 @@ static void Write( stream_t *s, const uint8_t *p_buffer, size_t i_buffer )
msg_Err( s, "Failed to record data (end)" );
}
}
+
+input_item_t *ReadDir( stream_t *s )
+{
+    if( s != NULL )
+        return stream_ReadDir( s->p_source );
+    else
+        return NULL;
+}
-- 
1.9.3

_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
https://mailman.videolan.org/listinfo/vlc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20140616/82181977/attachment.html>


More information about the vlc-devel mailing list