Commit de064a4c authored by Rémi Denis-Courmont's avatar 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.
parent ffe7367b
......@@ -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)
****************************************************************************/
......
......@@ -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;
......
......@@ -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;
......
......@@ -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();
......
......@@ -397,7 +397,6 @@ sout_MuxNew
sout_MuxSendBuffer
sout_StreamChainDelete
sout_StreamChainNew
sout_UpdateStatistic
spu_Create
spu_Destroy
spu_PutSubpicture
......
......@@ -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)
......
......@@ -159,50 +159,6 @@ void sout_DeleteInstance( sout_instance_t * p_sout )
vlc_object_release( 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
*****************************************************************************/
......@@ -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 );
}
......
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