[vlc-commits] sout: remove broken statistics code
Rémi Denis-Courmont
git at videolan.org
Tue Mar 29 17:25:10 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Mar 29 13:23:41 2011 +0300| [de064a4cd3bbc7b2d4cf6ccc2d9cdbc0981bae37] | committer: Rémi Denis-Courmont
sout: remove broken statistics code
The sout instance is _not_ a child of the input, so this cannot work.
In practice, finding the input would always fail.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=de064a4cd3bbc7b2d4cf6ccc2d9cdbc0981bae37
---
include/vlc_sout.h | 15 ---------
modules/stream_out/transcode/audio.c | 1 -
modules/stream_out/transcode/spu.c | 2 -
modules/stream_out/transcode/video.c | 2 -
src/libvlccore.sym | 1 -
src/missing.c | 6 ----
src/stream_output/stream_output.c | 55 ----------------------------------
7 files changed, 0 insertions(+), 82 deletions(-)
diff --git a/include/vlc_sout.h b/include/vlc_sout.h
index 304e2d1..404d631 100644
--- a/include/vlc_sout.h
+++ b/include/vlc_sout.h
@@ -59,21 +59,6 @@ struct sout_instance_t
sout_instance_sys_t *p_sys;
};
-/** Stream output statistics */
-typedef enum
-{
- SOUT_STATISTIC_DECODED_VIDEO,
- SOUT_STATISTIC_DECODED_AUDIO,
- SOUT_STATISTIC_DECODED_SUBTITLE,
-
- /* Use them only if you do not goes through a access_out module */
- SOUT_STATISTIC_SENT_PACKET,
- SOUT_STATISTIC_SENT_BYTE,
-
-} sout_statistic_t;
-
-VLC_EXPORT( void, sout_UpdateStatistic, ( sout_instance_t *p_sout, sout_statistic_t, int ) );
-
/****************************************************************************
* sout_stream_id_t: opaque (private for all sout_stream_t)
****************************************************************************/
diff --git a/modules/stream_out/transcode/audio.c b/modules/stream_out/transcode/audio.c
index f056bb6..3537f86 100644
--- a/modules/stream_out/transcode/audio.c
+++ b/modules/stream_out/transcode/audio.c
@@ -356,7 +356,6 @@ int transcode_audio_process( sout_stream_t *p_stream,
while( (p_audio_buf = id->p_decoder->pf_decode_audio( id->p_decoder,
&in )) )
{
- sout_UpdateStatistic( p_stream->p_sout, SOUT_STATISTIC_DECODED_AUDIO, 1 );
if( p_sys->b_master_sync )
{
mtime_t i_dts = date_Get( &id->interpolated_pts ) + 1;
diff --git a/modules/stream_out/transcode/spu.c b/modules/stream_out/transcode/spu.c
index 778ee44..d008d2d 100644
--- a/modules/stream_out/transcode/spu.c
+++ b/modules/stream_out/transcode/spu.c
@@ -131,8 +131,6 @@ int transcode_spu_process( sout_stream_t *p_stream,
if( !p_subpic )
return VLC_EGENERIC;
- sout_UpdateStatistic( p_stream->p_sout, SOUT_STATISTIC_DECODED_SUBTITLE, 1 );
-
if( p_sys->b_master_sync && p_sys->i_master_drift )
{
p_subpic->i_start -= p_sys->i_master_drift;
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 3740f63..662020d 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -627,8 +627,6 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_t *id,
while( (p_pic = id->p_decoder->pf_decode_video( id->p_decoder, &in )) )
{
- sout_UpdateStatistic( p_stream->p_sout, SOUT_STATISTIC_DECODED_VIDEO, 1 );
-
if( p_stream->p_sout->i_out_pace_nocontrol && p_sys->b_hurry_up )
{
mtime_t current_date = mdate();
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 30173a5..4c66152 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -397,7 +397,6 @@ sout_MuxNew
sout_MuxSendBuffer
sout_StreamChainDelete
sout_StreamChainNew
-sout_UpdateStatistic
spu_Create
spu_Destroy
spu_PutSubpicture
diff --git a/src/missing.c b/src/missing.c
index 3bfb41f..77b3ee1 100644
--- a/src/missing.c
+++ b/src/missing.c
@@ -313,12 +313,6 @@ sout_stream_t *sout_StreamChainNew (sout_instance_t *p_sout, char *psz_chain,
assert (0);
}
-void sout_UpdateStatistic (sout_instance_t *instance, sout_statistic_t stat,
- int value)
-{
- assert (0);
-}
-
char *vlc_sdp_Start (vlc_object_t *obj, const char *cfg,
const struct sockaddr *src, size_t srclen,
const struct sockaddr *addr, size_t addrlen)
diff --git a/src/stream_output/stream_output.c b/src/stream_output/stream_output.c
index be9b71e..912f99d 100644
--- a/src/stream_output/stream_output.c
+++ b/src/stream_output/stream_output.c
@@ -160,50 +160,6 @@ void sout_DeleteInstance( sout_instance_t * p_sout )
}
/*****************************************************************************
- *
- *****************************************************************************/
-void sout_UpdateStatistic( sout_instance_t *p_sout, sout_statistic_t i_type, int i_delta )
-{
- if( !libvlc_stats( p_sout ) )
- return;
-
- /* */
- input_thread_t *p_input = vlc_object_find( p_sout, VLC_OBJECT_INPUT, FIND_PARENT );
- if( !p_input )
- return;
-
- int i_input_type;
- switch( i_type )
- {
- case SOUT_STATISTIC_DECODED_VIDEO:
- i_input_type = INPUT_STATISTIC_DECODED_VIDEO;
- break;
- case SOUT_STATISTIC_DECODED_AUDIO:
- i_input_type = INPUT_STATISTIC_DECODED_AUDIO;
- break;
- case SOUT_STATISTIC_DECODED_SUBTITLE:
- i_input_type = INPUT_STATISTIC_DECODED_SUBTITLE;
- break;
-
- case SOUT_STATISTIC_SENT_PACKET:
- i_input_type = INPUT_STATISTIC_SENT_PACKET;
- break;
-
- case SOUT_STATISTIC_SENT_BYTE:
- i_input_type = INPUT_STATISTIC_SENT_BYTE;
- break;
-
- default:
- msg_Err( p_sout, "Not yet supported statistic type %d", i_type );
- vlc_object_release( p_input );
- return;
- }
-
- input_UpdateStatistic( p_input, i_input_type, i_delta );
-
- vlc_object_release( p_input );
-}
-/*****************************************************************************
* Packetizer/Input
*****************************************************************************/
sout_packetizer_input_t *sout_InputNew( sout_instance_t *p_sout,
@@ -375,17 +331,6 @@ ssize_t sout_AccessOutRead( sout_access_out_t *p_access, block_t *p_buffer )
*****************************************************************************/
ssize_t sout_AccessOutWrite( sout_access_out_t *p_access, block_t *p_buffer )
{
-#if 0
- const unsigned i_packets_gather = 30;
- p_access->i_writes++;
- p_access->i_sent_bytes += p_buffer->i_buffer;
- if( (p_access->i_writes % i_packets_gather) == 0 )
- {
- sout_UpdateStatistic( p_access->p_sout, SOUT_STATISTIC_SENT_PACKET, i_packets_gather );
- sout_UpdateStatistic( p_access->p_sout, SOUT_STATISTIC_SENT_BYTE, p_access->i_sent_bytes );
- p_access->i_sent_bytes = 0;
- }
-#endif
return p_access->pf_write( p_access, p_buffer );
}
More information about the vlc-commits
mailing list