]> git.sesse.net Git - vlc/commitdiff
Stream: Export stream_FilterNew
authorJean-Philippe André <jpeg@videolan.org>
Tue, 10 Nov 2009 17:10:37 +0000 (18:10 +0100)
committerJean-Philippe André <jpeg@videolan.org>
Sat, 19 Dec 2009 17:56:39 +0000 (18:56 +0100)
include/vlc_stream.h
src/input/stream_filter.c
src/libvlccore.sym

index 96a2f0e5f7f0da092216976f15a408ae725856ef..c2c40ab9b9c9cfda122a0d5dfcedebdbfe20da5c 100644 (file)
@@ -181,6 +181,11 @@ VLC_EXPORT( stream_t *,__stream_MemoryNew, (vlc_object_t *p_obj, uint8_t *p_buff
 #define stream_UrlNew( a, b ) __stream_UrlNew( VLC_OBJECT(a), b )
 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 ) );
 /**
  * @}
  */
index 213643f58f965285f426f16e7c29a360f3a508ac..fc06b6fa5f1072b65e7ca6c22dfb28c50b68d89b 100644 (file)
@@ -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 )
index 06274d9a5338068112ca202962274e50d8fbbdbc..fb1480a3ed7e0589b622ef863606910776f00039 100644 (file)
@@ -388,6 +388,7 @@ stream_Control
 stream_Delete
 stream_DemuxNew
 stream_DemuxSend
+stream_FilterNew
 __stream_MemoryNew
 stream_Peek
 stream_Read