[vlc-devel] commit: block_FifoNew: remove un-needed parameter ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat May 3 19:10:17 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Sat May 3 20:11:28 2008 +0300| [b2b9fb4c30858b5caa1d660c791c051ac8bacd87]
block_FifoNew: remove un-needed parameter
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b2b9fb4c30858b5caa1d660c791c051ac8bacd87
---
include/vlc_block.h | 3 +--
modules/access/rtmp/access.c | 4 ++--
modules/access_filter/timeshift.c | 2 +-
modules/access_output/udp.c | 4 ++--
modules/misc/rtsp.c | 2 +-
modules/stream_out/rtp.c | 2 +-
src/input/decoder.c | 2 +-
src/input/demux.c | 2 +-
src/libvlc.sym | 2 +-
src/misc/block.c | 12 ++++++------
src/stream_output/stream_output.c | 2 +-
11 files changed, 18 insertions(+), 19 deletions(-)
diff --git a/include/vlc_block.h b/include/vlc_block.h
index fda20ce..780c44f 100644
--- a/include/vlc_block.h
+++ b/include/vlc_block.h
@@ -271,8 +271,7 @@ static inline block_t *block_ChainGather( block_t *p_list )
* (this is used to wakeup a thread when there is no data to queue)
****************************************************************************/
-#define block_FifoNew( a ) __block_FifoNew( VLC_OBJECT(a) )
-VLC_EXPORT( block_fifo_t *, __block_FifoNew, ( vlc_object_t * ) );
+VLC_EXPORT( block_fifo_t *, block_FifoNew, ( void ) );
VLC_EXPORT( void, block_FifoRelease, ( block_fifo_t * ) );
VLC_EXPORT( void, block_FifoEmpty, ( block_fifo_t * ) );
VLC_EXPORT( size_t, block_FifoPut, ( block_fifo_t *, block_t * ) );
diff --git a/modules/access/rtmp/access.c b/modules/access/rtmp/access.c
index 0182f8f..9ae019e 100644
--- a/modules/access/rtmp/access.c
+++ b/modules/access/rtmp/access.c
@@ -146,8 +146,8 @@ static int Open( vlc_object_t *p_this )
vlc_object_attach( p_sys->p_thread, p_access );
p_sys->p_thread->b_die = 0;
p_sys->p_thread->b_error= 0;
- p_sys->p_thread->p_fifo_media = block_FifoNew( p_access );
- p_sys->p_thread->p_empty_blocks = block_FifoNew( p_access );
+ p_sys->p_thread->p_fifo_media = block_FifoNew();
+ p_sys->p_thread->p_empty_blocks = block_FifoNew();
p_sys->p_thread->has_audio = 0;
p_sys->p_thread->has_video = 0;
p_sys->p_thread->metadata_received = 0;
diff --git a/modules/access_filter/timeshift.c b/modules/access_filter/timeshift.c
index e254017..fea0c1d 100644
--- a/modules/access_filter/timeshift.c
+++ b/modules/access_filter/timeshift.c
@@ -161,7 +161,7 @@ static int Open( vlc_object_t *p_this )
p_access->p_sys = p_sys = malloc( sizeof( access_sys_t ) );
/* */
- p_sys->p_fifo = block_FifoNew( p_access );
+ p_sys->p_fifo = block_FifoNew();
p_sys->i_write_size = 0;
p_sys->i_files = 0;
p_sys->i_data = 0;
diff --git a/modules/access_output/udp.c b/modules/access_output/udp.c
index 0ef2828..82960a2 100644
--- a/modules/access_output/udp.c
+++ b/modules/access_output/udp.c
@@ -221,8 +221,8 @@ static int Open( vlc_object_t *p_this )
p_sys->p_thread->p_sout = p_access->p_sout;
p_sys->p_thread->b_die = 0;
p_sys->p_thread->b_error= 0;
- p_sys->p_thread->p_fifo = block_FifoNew( p_access );
- p_sys->p_thread->p_empty_blocks = block_FifoNew( p_access );
+ p_sys->p_thread->p_fifo = block_FifoNew();
+ p_sys->p_thread->p_empty_blocks = block_FifoNew();
i_handle = net_ConnectDgram( p_this, psz_dst_addr, i_dst_port, -1,
IPPROTO_UDP );
diff --git a/modules/misc/rtsp.c b/modules/misc/rtsp.c
index 27bf618..1b9fad3 100644
--- a/modules/misc/rtsp.c
+++ b/modules/misc/rtsp.c
@@ -297,7 +297,7 @@ static int Open( vlc_object_t *p_this )
p_vod->pf_media_add_es = MediaAddES;
p_vod->pf_media_del_es = MediaDelES;
- p_sys->p_fifo_cmd = block_FifoNew( p_vod );
+ p_sys->p_fifo_cmd = block_FifoNew();
if( vlc_thread_create( p_vod, "rtsp vod thread", CommandThread,
VLC_THREAD_PRIORITY_LOW, false ) )
{
diff --git a/modules/stream_out/rtp.c b/modules/stream_out/rtp.c
index b0f6dd0..f0aae26 100644
--- a/modules/stream_out/rtp.c
+++ b/modules/stream_out/rtp.c
@@ -1162,7 +1162,7 @@ static sout_stream_id_t *Add( sout_stream_t *p_stream, es_format_t *p_fmt )
p_sys->psz_destination,
p_sys->i_ttl, id->i_port, id->i_port + 1 );
- id->p_fifo = block_FifoNew( p_stream );
+ id->p_fifo = block_FifoNew();
if( vlc_thread_create( id, "RTP send thread", ThreadSend,
VLC_THREAD_PRIORITY_HIGHEST, false ) )
goto error;
diff --git a/src/input/decoder.c b/src/input/decoder.c
index 5eaa1b3..24d0e61 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -483,7 +483,7 @@ static decoder_t * CreateDecoder( input_thread_t *p_input,
p_dec->p_owner->p_packetizer = NULL;
/* decoder fifo */
- if( ( p_dec->p_owner->p_fifo = block_FifoNew( p_dec ) ) == NULL )
+ if( ( p_dec->p_owner->p_fifo = block_FifoNew() ) == NULL )
{
msg_Err( p_dec, "out of memory" );
return NULL;
diff --git a/src/input/demux.c b/src/input/demux.c
index 6116346..8b17db8 100644
--- a/src/input/demux.c
+++ b/src/input/demux.c
@@ -337,7 +337,7 @@ stream_t *__stream_DemuxNew( vlc_object_t *p_obj, const char *psz_demux,
p_sys->psz_name = strdup( psz_demux );
/* decoder fifo */
- if( ( p_sys->p_fifo = block_FifoNew( s ) ) == NULL )
+ if( ( p_sys->p_fifo = block_FifoNew() ) == NULL )
{
msg_Err( s, "out of memory" );
vlc_object_release( s );
diff --git a/src/libvlc.sym b/src/libvlc.sym
index 014ecb9..dc445b4 100644
--- a/src/libvlc.sym
+++ b/src/libvlc.sym
@@ -35,7 +35,7 @@ block_Alloc
block_FifoCount
block_FifoEmpty
block_FifoGet
-__block_FifoNew
+block_FifoNew
block_FifoPut
block_FifoRelease
block_FifoShow
diff --git a/src/misc/block.c b/src/misc/block.c
index 7e94ec9..a6e5dff 100644
--- a/src/misc/block.c
+++ b/src/misc/block.c
@@ -243,14 +243,14 @@ struct block_fifo_t
bool b_force_wake;
};
-block_fifo_t *__block_FifoNew( vlc_object_t *p_obj )
+block_fifo_t *block_FifoNew( void )
{
- block_fifo_t *p_fifo;
+ block_fifo_t *p_fifo = malloc( sizeof( block_fifo_t ) );
+ if( !p_fifo )
+ return NULL;
- p_fifo = malloc( sizeof( block_fifo_t ) );
- if( !p_fifo ) return NULL;
- vlc_mutex_init( p_obj, &p_fifo->lock );
- vlc_cond_init( p_obj, &p_fifo->wait );
+ vlc_mutex_init( NULL, &p_fifo->lock );
+ vlc_cond_init( NULL, &p_fifo->wait );
p_fifo->p_first = NULL;
p_fifo->pp_last = &p_fifo->p_first;
p_fifo->i_depth = p_fifo->i_size = 0;
diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index 8f4a76a..dbfbd7d 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -530,7 +530,7 @@ sout_input_t *sout_MuxAddStream( sout_mux_t *p_mux, es_format_t *p_fmt )
}
p_input->p_sout = p_mux->p_sout;
p_input->p_fmt = p_fmt;
- p_input->p_fifo = block_FifoNew( p_mux->p_sout );
+ p_input->p_fifo = block_FifoNew();
p_input->p_sys = NULL;
TAB_APPEND( p_mux->i_nb_inputs, p_mux->pp_inputs, p_input );
More information about the vlc-devel
mailing list