mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-12 13:44:56 +02:00
statistics to 64bit
Didn't touch the os x interface code. I don't think I missed any core-code that relates. Fixe #3411
This commit is contained in:
parent
ef39893fa2
commit
7f48382793
@ -277,35 +277,35 @@ struct input_stats_t
|
|||||||
vlc_mutex_t lock;
|
vlc_mutex_t lock;
|
||||||
|
|
||||||
/* Input */
|
/* Input */
|
||||||
int i_read_packets;
|
int64_t i_read_packets;
|
||||||
int i_read_bytes;
|
int64_t i_read_bytes;
|
||||||
float f_input_bitrate;
|
float f_input_bitrate;
|
||||||
float f_average_input_bitrate;
|
float f_average_input_bitrate;
|
||||||
|
|
||||||
/* Demux */
|
/* Demux */
|
||||||
int i_demux_read_packets;
|
int64_t i_demux_read_packets;
|
||||||
int i_demux_read_bytes;
|
int64_t i_demux_read_bytes;
|
||||||
float f_demux_bitrate;
|
float f_demux_bitrate;
|
||||||
float f_average_demux_bitrate;
|
float f_average_demux_bitrate;
|
||||||
int i_demux_corrupted;
|
int64_t i_demux_corrupted;
|
||||||
int i_demux_discontinuity;
|
int64_t i_demux_discontinuity;
|
||||||
|
|
||||||
/* Decoders */
|
/* Decoders */
|
||||||
int i_decoded_audio;
|
int64_t i_decoded_audio;
|
||||||
int i_decoded_video;
|
int64_t i_decoded_video;
|
||||||
|
|
||||||
/* Vout */
|
/* Vout */
|
||||||
int i_displayed_pictures;
|
int64_t i_displayed_pictures;
|
||||||
int i_lost_pictures;
|
int64_t i_lost_pictures;
|
||||||
|
|
||||||
/* Sout */
|
/* Sout */
|
||||||
int i_sent_packets;
|
int64_t i_sent_packets;
|
||||||
int i_sent_bytes;
|
int64_t i_sent_bytes;
|
||||||
float f_send_bitrate;
|
float f_send_bitrate;
|
||||||
|
|
||||||
/* Aout */
|
/* Aout */
|
||||||
int i_played_abuffers;
|
int64_t i_played_abuffers;
|
||||||
int i_lost_abuffers;
|
int64_t i_lost_abuffers;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1995,13 +1995,13 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
|
|||||||
MainBoxWrite( p_intf, l, 1, _("+-[Video Decoding]"));
|
MainBoxWrite( p_intf, l, 1, _("+-[Video Decoding]"));
|
||||||
SHOW_ACS( 1, ACS_LTEE ); SHOW_ACS( 2, ACS_HLINE ); l++;
|
SHOW_ACS( 1, ACS_LTEE ); SHOW_ACS( 2, ACS_HLINE ); l++;
|
||||||
if( p_sys->b_color ) wcolor_set( p_sys->w, C_DEFAULT, NULL );
|
if( p_sys->b_color ) wcolor_set( p_sys->w, C_DEFAULT, NULL );
|
||||||
MainBoxWrite( p_intf, l, 1, _("| video decoded : %5i"),
|
MainBoxWrite( p_intf, l, 1, _("| video decoded : %"PRId64),
|
||||||
p_item->p_stats->i_decoded_video );
|
p_item->p_stats->i_decoded_video );
|
||||||
SHOW_ACS( 1, ACS_VLINE ); l++;
|
SHOW_ACS( 1, ACS_VLINE ); l++;
|
||||||
MainBoxWrite( p_intf, l, 1, _("| frames displayed : %5i"),
|
MainBoxWrite( p_intf, l, 1, _("| frames displayed : %"PRId64),
|
||||||
p_item->p_stats->i_displayed_pictures );
|
p_item->p_stats->i_displayed_pictures );
|
||||||
SHOW_ACS( 1, ACS_VLINE ); l++;
|
SHOW_ACS( 1, ACS_VLINE ); l++;
|
||||||
MainBoxWrite( p_intf, l, 1, _("| frames lost : %5i"),
|
MainBoxWrite( p_intf, l, 1, _("| frames lost : %"PRId64),
|
||||||
p_item->p_stats->i_lost_pictures );
|
p_item->p_stats->i_lost_pictures );
|
||||||
SHOW_ACS( 1, ACS_VLINE ); l++;
|
SHOW_ACS( 1, ACS_VLINE ); l++;
|
||||||
DrawEmptyLine( p_sys->w, p_sys->i_box_y + l - p_sys->i_box_start, 1, COLS - 2 );
|
DrawEmptyLine( p_sys->w, p_sys->i_box_y + l - p_sys->i_box_start, 1, COLS - 2 );
|
||||||
@ -2014,13 +2014,13 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
|
|||||||
MainBoxWrite( p_intf, l, 1, _("+-[Audio Decoding]"));
|
MainBoxWrite( p_intf, l, 1, _("+-[Audio Decoding]"));
|
||||||
SHOW_ACS( 1, ACS_LTEE ); SHOW_ACS( 2, ACS_HLINE ); l++;
|
SHOW_ACS( 1, ACS_LTEE ); SHOW_ACS( 2, ACS_HLINE ); l++;
|
||||||
if( p_sys->b_color ) wcolor_set( p_sys->w, C_DEFAULT, NULL );
|
if( p_sys->b_color ) wcolor_set( p_sys->w, C_DEFAULT, NULL );
|
||||||
MainBoxWrite( p_intf, l, 1, _("| audio decoded : %5i"),
|
MainBoxWrite( p_intf, l, 1, _("| audio decoded : %"PRId64),
|
||||||
p_item->p_stats->i_decoded_audio );
|
p_item->p_stats->i_decoded_audio );
|
||||||
SHOW_ACS( 1, ACS_VLINE ); l++;
|
SHOW_ACS( 1, ACS_VLINE ); l++;
|
||||||
MainBoxWrite( p_intf, l, 1, _("| buffers played : %5i"),
|
MainBoxWrite( p_intf, l, 1, _("| buffers played : %"PRId64),
|
||||||
p_item->p_stats->i_played_abuffers );
|
p_item->p_stats->i_played_abuffers );
|
||||||
SHOW_ACS( 1, ACS_VLINE ); l++;
|
SHOW_ACS( 1, ACS_VLINE ); l++;
|
||||||
MainBoxWrite( p_intf, l, 1, _("| buffers lost : %5i"),
|
MainBoxWrite( p_intf, l, 1, _("| buffers lost : %"PRId64),
|
||||||
p_item->p_stats->i_lost_abuffers );
|
p_item->p_stats->i_lost_abuffers );
|
||||||
SHOW_ACS( 1, ACS_VLINE ); l++;
|
SHOW_ACS( 1, ACS_VLINE ); l++;
|
||||||
DrawEmptyLine( p_sys->w, p_sys->i_box_y + l - p_sys->i_box_start, 1, COLS - 2 );
|
DrawEmptyLine( p_sys->w, p_sys->i_box_y + l - p_sys->i_box_start, 1, COLS - 2 );
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#define __STDC_FORMAT_MACROS 1
|
||||||
|
#define __STDC_CONSTANT_MACROS 1
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
@ -566,33 +569,33 @@ void InputStatsPanel::update( input_item_t *p_item )
|
|||||||
#define UPDATE( widget, format, calc... ) \
|
#define UPDATE( widget, format, calc... ) \
|
||||||
{ QString str; widget->setText( 1 , str.sprintf( format, ## calc ) ); }
|
{ QString str; widget->setText( 1 , str.sprintf( format, ## calc ) ); }
|
||||||
|
|
||||||
UPDATE( read_media_stat, "%8.0f",
|
UPDATE( read_media_stat, "%"PRId64,
|
||||||
(float)(p_item->p_stats->i_read_bytes)/1024);
|
(p_item->p_stats->i_read_bytes / 1024 ) );
|
||||||
UPDATE( input_bitrate_stat, "%6.0f",
|
UPDATE( input_bitrate_stat, "%6.0f",
|
||||||
(float)(p_item->p_stats->f_input_bitrate * 8000 ));
|
(float)(p_item->p_stats->f_input_bitrate * 8000 ));
|
||||||
UPDATE( demuxed_stat, "%8.0f",
|
UPDATE( demuxed_stat, "%"PRId64,
|
||||||
(float)(p_item->p_stats->i_demux_read_bytes)/1024 );
|
(p_item->p_stats->i_demux_read_bytes / 1024 ) );
|
||||||
UPDATE( stream_bitrate_stat, "%6.0f",
|
UPDATE( stream_bitrate_stat, "%6.0f",
|
||||||
(float)(p_item->p_stats->f_demux_bitrate * 8000 ));
|
(float)(p_item->p_stats->f_demux_bitrate * 8000 ));
|
||||||
UPDATE( corrupted_stat, "%5i", p_item->p_stats->i_demux_corrupted );
|
UPDATE( corrupted_stat, "%"PRId64, p_item->p_stats->i_demux_corrupted );
|
||||||
UPDATE( discontinuity_stat, "%5i", p_item->p_stats->i_demux_discontinuity );
|
UPDATE( discontinuity_stat, "%"PRId64, p_item->p_stats->i_demux_discontinuity );
|
||||||
|
|
||||||
/* Video */
|
/* Video */
|
||||||
UPDATE( vdecoded_stat, "%5i", p_item->p_stats->i_decoded_video );
|
UPDATE( vdecoded_stat, "%"PRId64, p_item->p_stats->i_decoded_video );
|
||||||
UPDATE( vdisplayed_stat, "%5i", p_item->p_stats->i_displayed_pictures );
|
UPDATE( vdisplayed_stat, "%"PRId64, p_item->p_stats->i_displayed_pictures );
|
||||||
UPDATE( vlost_frames_stat, "%5i", p_item->p_stats->i_lost_pictures );
|
UPDATE( vlost_frames_stat, "%"PRId64, p_item->p_stats->i_lost_pictures );
|
||||||
|
|
||||||
/* Sout */
|
/* Sout */
|
||||||
UPDATE( send_stat, "%5i", p_item->p_stats->i_sent_packets );
|
UPDATE( send_stat, "%"PRId64, p_item->p_stats->i_sent_packets );
|
||||||
UPDATE( send_bytes_stat, "%8.0f",
|
UPDATE( send_bytes_stat, "%"PRId64,
|
||||||
(float)(p_item->p_stats->i_sent_bytes)/1024 );
|
(p_item->p_stats->i_sent_bytes)/ 1024 );
|
||||||
UPDATE( send_bitrate_stat, "%6.0f",
|
UPDATE( send_bitrate_stat, "%6.0f",
|
||||||
(float)(p_item->p_stats->f_send_bitrate*8)*1000 );
|
(float)(p_item->p_stats->f_send_bitrate * 8000 ) );
|
||||||
|
|
||||||
/* Audio*/
|
/* Audio*/
|
||||||
UPDATE( adecoded_stat, "%5i", p_item->p_stats->i_decoded_audio );
|
UPDATE( adecoded_stat, "%"PRId64, p_item->p_stats->i_decoded_audio );
|
||||||
UPDATE( aplayed_stat, "%5i", p_item->p_stats->i_played_abuffers );
|
UPDATE( aplayed_stat, "%"PRId64, p_item->p_stats->i_played_abuffers );
|
||||||
UPDATE( alost_stat, "%5i", p_item->p_stats->i_lost_abuffers );
|
UPDATE( alost_stat, "%"PRId64, p_item->p_stats->i_lost_abuffers );
|
||||||
|
|
||||||
#undef UPDATE
|
#undef UPDATE
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ int stats_Get( vlc_object_t *p_this, counter_t *p_counter, vlc_value_t *val )
|
|||||||
p_counter->pp_samples[1]->value.i_int ) /
|
p_counter->pp_samples[1]->value.i_int ) /
|
||||||
(float)( p_counter->pp_samples[0]->date -
|
(float)( p_counter->pp_samples[0]->date -
|
||||||
p_counter->pp_samples[1]->date );
|
p_counter->pp_samples[1]->date );
|
||||||
val->i_int = (int)f;
|
val->i_int = (int64_t)f;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -232,9 +232,9 @@ void stats_DumpInputStats( input_stats_t *p_stats )
|
|||||||
vlc_mutex_lock( &p_stats->lock );
|
vlc_mutex_lock( &p_stats->lock );
|
||||||
/* f_bitrate is in bytes / microsecond
|
/* f_bitrate is in bytes / microsecond
|
||||||
* *1000 => bytes / millisecond => kbytes / seconds */
|
* *1000 => bytes / millisecond => kbytes / seconds */
|
||||||
fprintf( stderr, "Input : %i (%i bytes) - %f kB/s - "
|
fprintf( stderr, "Input : %"PRId64" (%"PRId64" bytes) - %f kB/s - "
|
||||||
"Demux : %i (%i bytes) - %f kB/s\n"
|
"Demux : %"PRId64" (%"PRId64" bytes) - %f kB/s\n"
|
||||||
" - Vout : %i/%i - Aout : %i/%i - Sout : %f\n",
|
" - Vout : %"PRId64"/%"PRId64" - Aout : %"PRId64"/%"PRId64" - Sout : %f\n",
|
||||||
p_stats->i_read_packets, p_stats->i_read_bytes,
|
p_stats->i_read_packets, p_stats->i_read_bytes,
|
||||||
p_stats->f_input_bitrate * 1000,
|
p_stats->f_input_bitrate * 1000,
|
||||||
p_stats->i_demux_read_packets, p_stats->i_demux_read_bytes,
|
p_stats->i_demux_read_packets, p_stats->i_demux_read_bytes,
|
||||||
@ -560,7 +560,7 @@ static void TimerDump( vlc_object_t *p_obj, counter_t *p_counter,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
mtime_t last, total;
|
mtime_t last, total;
|
||||||
int i_total;
|
int64_t i_total;
|
||||||
if( p_counter->i_samples != 2 )
|
if( p_counter->i_samples != 2 )
|
||||||
{
|
{
|
||||||
msg_Err( p_obj, "timer %s does not exist", p_counter->psz_name );
|
msg_Err( p_obj, "timer %s does not exist", p_counter->psz_name );
|
||||||
@ -581,14 +581,14 @@ static void TimerDump( vlc_object_t *p_obj, counter_t *p_counter,
|
|||||||
if( b_total )
|
if( b_total )
|
||||||
{
|
{
|
||||||
msg_Dbg( p_obj,
|
msg_Dbg( p_obj,
|
||||||
"TIMER %s : %.3f ms - Total %.3f ms / %i intvls (Avg %.3f ms)",
|
"TIMER %s : %.3f ms - Total %.3f ms / %"PRId64" intvls (Avg %.3f ms)",
|
||||||
p_counter->psz_name, (float)last/1000, (float)total/1000, i_total,
|
p_counter->psz_name, (float)last/1000, (float)total/1000, i_total,
|
||||||
(float)(total)/(1000*(float)i_total ) );
|
(float)(total)/(1000*(float)i_total ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msg_Dbg( p_obj,
|
msg_Dbg( p_obj,
|
||||||
"TIMER %s : Total %.3f ms / %i intvls (Avg %.3f ms)",
|
"TIMER %s : Total %.3f ms / %"PRId64" intvls (Avg %.3f ms)",
|
||||||
p_counter->psz_name, (float)total/1000, i_total,
|
p_counter->psz_name, (float)total/1000, i_total,
|
||||||
(float)(total)/(1000*(float)i_total ) );
|
(float)(total)/(1000*(float)i_total ) );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user