[vlc-devel] commit: Stream: Export stream_FilterNew ( Jean-Philippe André )

git version control git at videolan.org
Sat Dec 19 19:48:24 CET 2009


vlc | branch: master | Jean-Philippe André <jpeg at videolan.org> | Tue Nov 10 18:10:37 2009 +0100| [cf168e78fdada731702ca1ebfcbbafe8a49f9dbc] | committer: Jean-Philippe André 

Stream: Export stream_FilterNew

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf168e78fdada731702ca1ebfcbbafe8a49f9dbc
---

 include/vlc_stream.h      |    5 +++++
 src/input/stream_filter.c |    3 +++
 src/libvlccore.sym        |    1 +
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/vlc_stream.h b/include/vlc_stream.h
index 96a2f0e..c2c40ab 100644
--- a/include/vlc_stream.h
+++ b/include/vlc_stream.h
@@ -182,6 +182,11 @@ VLC_EXPORT( stream_t *,__stream_MemoryNew, (vlc_object_t *p_obj, uint8_t *p_buff
 VLC_EXPORT( stream_t *,__stream_UrlNew, (vlc_object_t *p_this, const char *psz_url ) );
 
 /**
+ * Try to add a stream filter to an open stream.
+ * @return New stream to use, or NULL if the filter could not be added.
+ **/
+VLC_EXPORT( stream_t*, stream_FilterNew, ( stream_t *p_source, const char *psz_stream_filter ) );
+/**
  * @}
  */
 
diff --git a/src/input/stream_filter.c b/src/input/stream_filter.c
index 213643f..fc06b6f 100644
--- a/src/input/stream_filter.c
+++ b/src/input/stream_filter.c
@@ -29,6 +29,8 @@
 #include <vlc_stream.h>
 #include <libvlc.h>
 
+#include <assert.h>
+
 #include "stream.h"
 
 static void StreamDelete( stream_t * );
@@ -37,6 +39,7 @@ stream_t *stream_FilterNew( stream_t *p_source,
                             const char *psz_stream_filter )
 {
     stream_t *s;
+    assert( p_source != NULL );
 
     s = stream_CommonNew( VLC_OBJECT( p_source ) );
     if( s == NULL )
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 06274d9..fb1480a 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -388,6 +388,7 @@ stream_Control
 stream_Delete
 stream_DemuxNew
 stream_DemuxSend
+stream_FilterNew
 __stream_MemoryNew
 stream_Peek
 stream_Read




More information about the vlc-devel mailing list