Commit 7b28b05e authored by Laurent Aimar's avatar Laurent Aimar

Cosmetics.

parent 8288876b
...@@ -324,7 +324,7 @@ stream_t *__stream_DemuxNew( vlc_object_t *p_obj, const char *psz_demux, ...@@ -324,7 +324,7 @@ stream_t *__stream_DemuxNew( vlc_object_t *p_obj, const char *psz_demux,
stream_t *s; stream_t *s;
d_stream_sys_t *p_sys; d_stream_sys_t *p_sys;
s = vlc_stream_create( p_obj ); s = stream_CommonNew( p_obj );
if( s == NULL ) if( s == NULL )
return NULL; return NULL;
s->pf_read = DStreamRead; s->pf_read = DStreamRead;
......
...@@ -263,6 +263,15 @@ static inline uint8_t * stream_buffer( stream_t *s ) ...@@ -263,6 +263,15 @@ static inline uint8_t * stream_buffer( stream_t *s )
return s->p_sys->immediate.p_buffer; 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 * 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 ) ...@@ -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 *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; stream_sys_t *p_sys;
char *psz_list = NULL; char *psz_list = NULL;
......
...@@ -53,13 +53,8 @@ struct stream_t ...@@ -53,13 +53,8 @@ struct stream_t
bool b_little_endian; bool b_little_endian;
}; };
#include <libvlc.h> /* */
stream_t *stream_CommonNew( vlc_object_t * );
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_AccessNew( access_t *p_access, bool ); stream_t *stream_AccessNew( access_t *p_access, bool );
......
...@@ -53,7 +53,7 @@ static void Delete ( stream_t * ); ...@@ -53,7 +53,7 @@ static void Delete ( stream_t * );
stream_t *__stream_MemoryNew( vlc_object_t *p_this, uint8_t *p_buffer, stream_t *__stream_MemoryNew( vlc_object_t *p_this, uint8_t *p_buffer,
int64_t i_size, bool i_preserve_memory ) 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; stream_sys_t *p_sys;
if( !s ) return NULL; if( !s ) return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment