[vlc-devel] commit: Cosmetics. (Laurent Aimar )
git version control
git at videolan.org
Mon Oct 13 20:36:05 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Oct 13 20:31:32 2008 +0200| [7b28b05e510f354a6f6c7c16940106b85a34fed4] | committer: Laurent Aimar
Cosmetics.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7b28b05e510f354a6f6c7c16940106b85a34fed4
---
src/input/demux.c | 2 +-
src/input/stream.c | 11 ++++++++++-
src/input/stream.h | 9 ++-------
src/input/stream_memory.c | 2 +-
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/input/demux.c b/src/input/demux.c
index 89264a6..9d51e6a 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -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;
diff --git a/src/input/stream.c b/src/input/stream.c
index c6395e1..4688cea 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -264,6 +264,15 @@ static inline uint8_t * stream_buffer( stream_t *s )
}
/****************************************************************************
+ * 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
****************************************************************************/
stream_t *__stream_UrlNew( vlc_object_t *p_parent, const char *psz_url )
@@ -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;
diff --git a/src/input/stream.h b/src/input/stream.h
index 1cc712a..5d0d935 100644
--- a/src/input/stream.h
+++ b/src/input/stream.h
@@ -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 );
diff --git a/src/input/stream_memory.c b/src/input/stream_memory.c
index 341f5f6..d9db249 100644
--- a/src/input/stream_memory.c
+++ b/src/input/stream_memory.c
@@ -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;
More information about the vlc-devel
mailing list