Cosmetics.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 13 Oct 2008 18:31:32 +0000 (20:31 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 13 Oct 2008 18:31:32 +0000 (20:31 +0200)
src/input/demux.c
src/input/stream.c
src/input/stream.h
src/input/stream_memory.c

index 89264a6..9d51e6a 100644 (file)
@@ -324,7 +324,7 @@ stream_t *__stream_DemuxNew( vlc_object_t *p_obj, const char *psz_demux,
     stream_t       *s;
     d_stream_sys_t *p_sys;
 
-    s = vlc_stream_create( p_obj );
+    s = stream_CommonNew( p_obj );
     if( s == NULL )
         return NULL;
     s->pf_read   = DStreamRead;
index c6395e1..4688cea 100644 (file)
@@ -263,6 +263,15 @@ static inline uint8_t * stream_buffer( stream_t *s )
     return s->p_sys->immediate.p_buffer;
 }
 
+/****************************************************************************
+ * stream_CommonNew: create an empty stream structure
+ ****************************************************************************/
+stream_t *stream_CommonNew( vlc_object_t *p_obj )
+{
+    return (stream_t *)vlc_custom_create( p_obj, sizeof(stream_t),
+                                          VLC_OBJECT_GENERIC, "stream" );
+}
+
 /****************************************************************************
  * stream_UrlNew: create a stream from a access
  ****************************************************************************/
@@ -301,7 +310,7 @@ stream_t *__stream_UrlNew( vlc_object_t *p_parent, const char *psz_url )
 
 stream_t *stream_AccessNew( access_t *p_access, bool b_quick )
 {
-    stream_t *s = vlc_stream_create( VLC_OBJECT(p_access) );
+    stream_t *s = stream_CommonNew( VLC_OBJECT(p_access) );
     stream_sys_t *p_sys;
     char *psz_list = NULL;
 
index 1cc712a..5d0d935 100644 (file)
@@ -53,13 +53,8 @@ struct stream_t
     bool            b_little_endian;
 };
 
-#include <libvlc.h>
-
-static inline stream_t *vlc_stream_create( vlc_object_t *obj )
-{
-    return (stream_t *)vlc_custom_create( obj, sizeof(stream_t),
-                                          VLC_OBJECT_GENERIC, "stream" );
-}
+/* */
+stream_t *stream_CommonNew( vlc_object_t * );
 
 /* */
 stream_t *stream_AccessNew( access_t *p_access, bool );
index 341f5f6..d9db249 100644 (file)
@@ -53,7 +53,7 @@ static void Delete ( stream_t * );
 stream_t *__stream_MemoryNew( vlc_object_t *p_this, uint8_t *p_buffer,
                               int64_t i_size, bool i_preserve_memory )
 {
-    stream_t *s = vlc_stream_create( p_this );
+    stream_t *s = stream_CommonNew( p_this );
     stream_sys_t *p_sys;
 
     if( !s ) return NULL;