This is an arbitrary choice. But KiB are much more common than kB.
Also the notation is unambiguous.
Note that we keep kbps for *bit* rates.
/* Input */
msg_rc("%s", _("+-[Incoming]"));
- msg_rc(_("| input bytes read : %8.0f kB"),
- (float)(p_item->p_stats->i_read_bytes)/1000 );
+ msg_rc(_("| input bytes read : %8.0f KiB"),
+ (float)(p_item->p_stats->i_read_bytes)/1024 );
msg_rc(_("| input bitrate : %6.0f kb/s"),
(float)(p_item->p_stats->f_input_bitrate)*8000 );
- msg_rc(_("| demux bytes read : %8.0f kB"),
- (float)(p_item->p_stats->i_demux_read_bytes)/1000 );
+ msg_rc(_("| demux bytes read : %8.0f KiB"),
+ (float)(p_item->p_stats->i_demux_read_bytes)/1024 );
msg_rc(_("| demux bitrate : %6.0f kb/s"),
(float)(p_item->p_stats->f_demux_bitrate)*8000 );
msg_rc(_("| demux corrupted : %5i"),
/* Sout */
msg_rc("%s", _("+-[Streaming]"));
msg_rc(_("| packets sent : %5i"), p_item->p_stats->i_sent_packets );
- msg_rc(_("| bytes sent : %8.0f kB"),
- (float)(p_item->p_stats->i_sent_bytes)/1000 );
+ msg_rc(_("| bytes sent : %8.0f KiB"),
+ (float)(p_item->p_stats->i_sent_bytes)/1024 );
msg_rc(_("| sending bitrate : %6.0f kb/s"),
(float)(p_item->p_stats->f_send_bitrate*8)*1000 );
msg_rc("|");
- (void)initMediaPanelStats
{
//Initializing Input Variables
- [o_read_bytes_txt setStringValue: [NSString stringWithFormat:@"%8.0f kB", (float)0]];
+ [o_read_bytes_txt setStringValue: [NSString stringWithFormat:@"%8.0f KiB", (float)0]];
[o_input_bitrate_txt setStringValue: [NSString stringWithFormat:@"%6.0f kb/s", (float)0]];
- [o_demux_bytes_txt setStringValue: [NSString stringWithFormat:@"%8.0f kB", (float)0]];
+ [o_demux_bytes_txt setStringValue: [NSString stringWithFormat:@"%8.0f KiB", (float)0]];
[o_demux_bitrate_txt setStringValue: [NSString stringWithFormat:@"%6.0f kb/s", (float)0]];
//Initializing Video Variables
//Initializing Output Variables
[o_sent_packets_txt setIntValue: 0];
- [o_sent_bytes_txt setStringValue: [NSString stringWithFormat:@"%8.0f kB", (float)0]];
+ [o_sent_bytes_txt setStringValue: [NSString stringWithFormat:@"%8.0f KiB", (float)0]];
[o_sent_bitrate_txt setStringValue: [NSString stringWithFormat:@"%6.0f kb/s", (float)0]];
//Initializing Audio Variables
/* input */
[o_read_bytes_txt setStringValue: [NSString stringWithFormat:
- @"%8.0f kB", (float)(p_item->p_stats->i_read_bytes)/1000]];
+ @"%8.0f KiB", (float)(p_item->p_stats->i_read_bytes)/1024]];
[o_input_bitrate_txt setStringValue: [NSString stringWithFormat:
@"%6.0f kb/s", (float)(p_item->p_stats->f_input_bitrate)*8000]];
[o_demux_bytes_txt setStringValue: [NSString stringWithFormat:
- @"%8.0f kB", (float)(p_item->p_stats->i_demux_read_bytes)/1000]];
+ @"%8.0f KiB", (float)(p_item->p_stats->i_demux_read_bytes)/1024]];
[o_demux_bitrate_txt setStringValue: [NSString stringWithFormat:
@"%6.0f kb/s", (float)(p_item->p_stats->f_demux_bitrate)*8000]];
/* Sout */
[o_sent_packets_txt setIntValue: p_item->p_stats->i_sent_packets];
- [o_sent_bytes_txt setStringValue: [NSString stringWithFormat: @"%8.0f kB",
- (float)(p_item->p_stats->i_sent_bytes)/1000]];
+ [o_sent_bytes_txt setStringValue: [NSString stringWithFormat: @"%8.0f KiB",
+ (float)(p_item->p_stats->i_sent_bytes)/1024]];
[o_sent_bitrate_txt setStringValue: [NSString stringWithFormat:
@"%6.0f kb/s", (float)(p_item->p_stats->f_send_bitrate*8)*1000]];
MainBoxWrite( p_intf, l, 1, _("+-[Incoming]"));
SHOW_ACS( 1, ACS_ULCORNER ); SHOW_ACS( 2, ACS_HLINE ); l++;
if( p_sys->b_color ) wcolor_set( p_sys->w, C_DEFAULT, NULL );
- MainBoxWrite( p_intf, l, 1, _("| input bytes read : %8.0f kB"),
- (float)(p_item->p_stats->i_read_bytes)/1000 );
+ MainBoxWrite( p_intf, l, 1, _("| input bytes read : %8.0f KiB"),
+ (float)(p_item->p_stats->i_read_bytes)/1024 );
SHOW_ACS( 1, ACS_VLINE ); l++;
MainBoxWrite( p_intf, l, 1, _("| input bitrate : %6.0f kb/s"),
(float)(p_item->p_stats->f_input_bitrate)*8000 );
- MainBoxWrite( p_intf, l, 1, _("| demux bytes read : %8.0f kB"),
- (float)(p_item->p_stats->i_demux_read_bytes)/1000 );
+ MainBoxWrite( p_intf, l, 1, _("| demux bytes read : %8.0f KiB"),
+ (float)(p_item->p_stats->i_demux_read_bytes)/1024 );
SHOW_ACS( 1, ACS_VLINE ); l++;
MainBoxWrite( p_intf, l, 1, _("| demux bitrate : %6.0f kb/s"),
(float)(p_item->p_stats->f_demux_bitrate)*8000 );
if( p_sys->b_color ) wcolor_set( p_sys->w, C_DEFAULT, NULL );
MainBoxWrite( p_intf, l, 1, _("| packets sent : %5i"), p_item->p_stats->i_sent_packets );
SHOW_ACS( 1, ACS_VLINE ); l++;
- MainBoxWrite( p_intf, l, 1, _("| bytes sent : %8.0f kB"),
- (float)(p_item->p_stats->i_sent_bytes)/1000 );
+ MainBoxWrite( p_intf, l, 1, _("| bytes sent : %8.0f KiB"),
+ (float)(p_item->p_stats->i_sent_bytes)/1024 );
SHOW_ACS( 1, ACS_VLINE ); l++;
MainBoxWrite( p_intf, l, 1, _("\\ sending bitrate : %6.0f kb/s"),
(float)(p_item->p_stats->f_send_bitrate*8)*1000 );
CREATE_CATEGORY( streaming, qtr("Output/Written/Sent") );
CREATE_AND_ADD_TO_CAT( read_media_stat, qtr("Media data size"),
- "0", input , "kB" );
+ "0", input , "KiB" );
CREATE_AND_ADD_TO_CAT( input_bitrate_stat, qtr("Input bitrate"),
"0", input, "kb/s" );
- CREATE_AND_ADD_TO_CAT( demuxed_stat, qtr("Demuxed data size"), "0", input, "kB") ;
+ CREATE_AND_ADD_TO_CAT( demuxed_stat, qtr("Demuxed data size"), "0", input, "KiB") ;
CREATE_AND_ADD_TO_CAT( stream_bitrate_stat, qtr("Content bitrate"),
"0", input, "kb/s" );
CREATE_AND_ADD_TO_CAT( corrupted_stat, qtr("Discarded (corrupted)"),
CREATE_AND_ADD_TO_CAT( send_stat, qtr("Sent"), "0", streaming, qtr("packets") );
CREATE_AND_ADD_TO_CAT( send_bytes_stat, qtr("Sent"),
- "0", streaming, "kB" );
+ "0", streaming, "KiB" );
CREATE_AND_ADD_TO_CAT( send_bitrate_stat, qtr("Upstream rate"),
"0", streaming, "kb/s" );
{ QString str; widget->setText( 1 , str.sprintf( format, ## calc ) ); }
UPDATE( read_media_stat, "%8.0f",
- (float)(p_item->p_stats->i_read_bytes)/1000);
+ (float)(p_item->p_stats->i_read_bytes)/1024);
UPDATE( input_bitrate_stat, "%6.0f",
(float)(p_item->p_stats->f_input_bitrate * 8000 ));
UPDATE( demuxed_stat, "%8.0f",
- (float)(p_item->p_stats->i_demux_read_bytes)/1000 );
+ (float)(p_item->p_stats->i_demux_read_bytes)/1024 );
UPDATE( stream_bitrate_stat, "%6.0f",
(float)(p_item->p_stats->f_demux_bitrate * 8000 ));
UPDATE( corrupted_stat, "%5i", p_item->p_stats->i_demux_corrupted );
/* Sout */
UPDATE( send_stat, "%5i", p_item->p_stats->i_sent_packets );
UPDATE( send_bytes_stat, "%8.0f",
- (float)(p_item->p_stats->i_sent_bytes)/1000 );
+ (float)(p_item->p_stats->i_sent_bytes)/1024 );
UPDATE( send_bitrate_stat, "%6.0f",
(float)(p_item->p_stats->f_send_bitrate*8)*1000 );
client:append("+----[ begin of statistical info")
client:append("+-[Incoming]")
- client:append("| input bytes read : "..string.format("%8.0f kB",stats_tab["read_bytes"]/1000))
- client:append("| input bitrate : "..string.format("%6.0f bB/s",stats_tab["input_bitrate"]*8000))
- client:append("| demux bytes read : "..string.format("%8.0f kB",stats_tab["demux_read_bytes"]/1000))
+ client:append("| input bytes read : "..string.format("%8.0f KiB",stats_tab["read_bytes"]/1024))
+ client:append("| input bitrate : "..string.format("%6.0f kB/s",stats_tab["input_bitrate"]*8000))
+ client:append("| demux bytes read : "..string.format("%8.0f KiB",stats_tab["demux_read_bytes"]/1024))
client:append("| demux bitrate : "..string.format("%6.0f kB/s",stats_tab["demux_bitrate"]*8000))
client:append("| demux corrupted : "..string.format("%5i",stats_tab["demux_corrupted"]))
client:append("| discontinuities : "..string.format("%5i",stats_tab["demux_discontinuity"]))
client:append("|")
client:append("+-[Streaming]")
client:append("| packets sent : "..string.format("%5i",stats_tab["sent_packets"]))
- client:append("| bytes sent : "..string.format("%8.0f kB",stats_tab["sent_bytes"]/1000))
+ client:append("| bytes sent : "..string.format("%8.0f KiB",stats_tab["sent_bytes"]/1024))
client:append("| sending bitrate : "..string.format("%6.0f kb/s",stats_tab["send_bitrate"]*8000))
client:append("+----[ end of statistical info ]")
end