[vlc-devel] [PATCH 2/3] expose stream_CommonNew

Francois Cartegnie fcvlcdev at free.fr
Fri Sep 25 16:46:54 CEST 2015


---
 include/vlc_stream.h | 6 ++++++
 src/input/stream.c   | 1 +
 src/input/stream.h   | 4 ----
 src/libvlccore.sym   | 2 ++
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/include/vlc_stream.h b/include/vlc_stream.h
index cbdd2fa..3146ecf 100644
--- a/include/vlc_stream.h
+++ b/include/vlc_stream.h
@@ -160,6 +160,12 @@ VLC_API char * stream_ReadLine( stream_t * );
 VLC_API input_item_t *stream_ReadDir( stream_t * );
 
 /**
+ * Low level custom stream creation.
+ */
+VLC_API stream_t *stream_CommonNew(vlc_object_t *, void (*)(stream_t *));
+VLC_API void stream_CommonDelete(stream_t *);
+
+/**
  * Get the size of the stream.
  */
 VLC_USED static inline int stream_GetSize( stream_t *s, uint64_t *size )
diff --git a/src/input/stream.c b/src/input/stream.c
index 15a4079..422c484 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -73,6 +73,7 @@ stream_t *stream_CommonNew(vlc_object_t *parent, void (*destroy)(stream_t *))
     s->pf_read = NULL;
     s->pf_readdir = NULL;
     s->pf_control = NULL;
+    s->p_sys = NULL;
     s->p_input = NULL;
     assert(destroy != NULL);
     priv->destroy = destroy;
diff --git a/src/input/stream.h b/src/input/stream.h
index 4031c7a..3286e3b 100644
--- a/src/input/stream.h
+++ b/src/input/stream.h
@@ -28,10 +28,6 @@
 #include <vlc_common.h>
 #include <vlc_stream.h>
 
-/* */
-stream_t *stream_CommonNew( vlc_object_t *, void (*destroy)(stream_t *) );
-void stream_CommonDelete( stream_t *s );
-
 /**
  * This function creates a stream_t with an access_t back-end.
  */
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 6cf99e3..aeee078 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -395,6 +395,8 @@ spu_Render
 spu_RegisterChannel
 spu_ClearChannel
 stream_Block
+stream_CommonDelete
+stream_CommonNew
 stream_Control
 stream_Delete
 stream_DemuxNew
-- 
2.4.3



More information about the vlc-devel mailing list