]> git.sesse.net Git - vlc/commitdiff
Use KiB instead of kB for input statistics
authorRémi Denis-Courmont <remi@remlab.net>
Wed, 3 Mar 2010 15:33:44 +0000 (17:33 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Wed, 3 Mar 2010 15:56:51 +0000 (17:56 +0200)
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.

modules/control/rc.c
modules/gui/macosx/playlistinfo.m
modules/gui/ncurses.c
modules/gui/qt4/components/info_panels.cpp
share/lua/intf/rc.lua

index 0e2035def02ea46747ef55a0ebe3731da14739a6..9b831e8a22ab4d5344d893358f06a724bcc3cca9 100644 (file)
@@ -1868,12 +1868,12 @@ static int updateStatistics( intf_thread_t *p_intf, input_item_t *p_item )
 
     /* 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"),
@@ -1902,8 +1902,8 @@ static int updateStatistics( intf_thread_t *p_intf, input_item_t *p_item )
     /* 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("|");
index 9e8af64b6ce516ad0ed49c56c8273118b7ffcd75..e7cb6d889106a740df5f98fbe24dded937a0ceea 100644 (file)
@@ -195,9 +195,9 @@ static VLCInfo *_o_sharedInstance = nil;
 - (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
@@ -208,7 +208,7 @@ static VLCInfo *_o_sharedInstance = nil;
 
     //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
@@ -328,11 +328,11 @@ static VLCInfo *_o_sharedInstance = nil;
 
     /* 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]];
 
@@ -346,8 +346,8 @@ static VLCInfo *_o_sharedInstance = nil;
 
     /* 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]];
 
index 2eaf95f02c204a6fc2437fa43fbb4c9c38c00f6d..f3641edc11b22b2afbfba49e1fdd7f859f8feff4 100644 (file)
@@ -1972,13 +1972,13 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
             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 );
@@ -2031,8 +2031,8 @@ static void Redraw( intf_thread_t *p_intf, time_t *t_last_refresh )
             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 );
index c10caddd20fefbd275c1ecf8ec3bad9346ca1334..2b35cdb599a2869f9540b6e617d53a16d1dd9b5d 100644 (file)
@@ -510,10 +510,10 @@ InputStatsPanel::InputStatsPanel( QWidget *parent,
     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)"),
@@ -530,7 +530,7 @@ InputStatsPanel::InputStatsPanel( QWidget *parent,
 
     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" );
 
@@ -567,11 +567,11 @@ void InputStatsPanel::update( input_item_t *p_item )
     { 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 );
@@ -585,7 +585,7 @@ void InputStatsPanel::update( input_item_t *p_item )
     /* 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 );
 
index 9a66ab03ac1e41dceebd2f92c20d56d118b05025..d2c65c475679f0c8db3236b7561efa0a2d2a86ac 100644 (file)
@@ -332,9 +332,9 @@ function stats(name,client)
 
     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"]))
@@ -351,7 +351,7 @@ function stats(name,client)
     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