-#define stream_MemoryNew( a, b, c, d ) __stream_MemoryNew( VLC_OBJECT(a), b, c, d )
-VLC_EXPORT( stream_t *,__stream_MemoryNew, (vlc_object_t *p_obj, uint8_t *p_buffer, int64_t i_size, vlc_bool_t i_preserve_memory ) );
-#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 ) );
+static inline int stream_DemuxControl( stream_t *s, int query, ... )
+{
+ va_list ap;
+ int ret;
+
+ va_start( ap, query );
+ ret = stream_DemuxControlVa( s, query, ap );
+ va_end( ap );
+ return ret;
+}
+
+/**
+ * Create a stream_t reading from memory.
+ * You must delete it using stream_Delete.
+ */
+VLC_API stream_t * stream_MemoryNew(vlc_object_t *p_obj, uint8_t *p_buffer, uint64_t i_size, bool b_preserve_memory );
+#define stream_MemoryNew( a, b, c, d ) stream_MemoryNew( VLC_OBJECT(a), b, c, d )
+
+/**
+ * Create a stream_t reading from a URL.
+ * You must delete it using stream_Delete.
+ */
+VLC_API stream_t * stream_UrlNew(vlc_object_t *p_this, const char *psz_url );
+#define stream_UrlNew( a, b ) stream_UrlNew( VLC_OBJECT(a), b )
+
+
+/**
+ * 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_API stream_t* 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 stream_FilterDefaultReadDir( stream_t *s, input_item_node_t *p_node );
+
+/**
+ * Sets stream_FilterDefaultReadDir as the pf_readdir callback for this stream filter
+ */
+#define stream_FilterSetDefaultReadDir(p_stream) \
+ p_stream->pf_readdir = stream_FilterDefaultReadDir;