]> git.sesse.net Git - vlc/commitdiff
Bugfix Stats Panel
authormaxime Ripard <maxime.ripard@utbm.fr>
Tue, 8 Apr 2008 12:39:00 +0000 (14:39 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Tue, 8 Apr 2008 12:50:18 +0000 (14:50 +0200)
Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
modules/gui/macosx/playlistinfo.h
modules/gui/macosx/playlistinfo.m

index d084f7c46a59e2ce8d363d1c19eea8144212cb29..4666feac4280b6bf0e394efbdb6aa3bd99cfbc5f 100644 (file)
 - (void)initPanel;
 - (IBAction)metaFieldChanged:(id)sender;
 - (IBAction)saveMetaData:(id)sender;
+- (void)initMediaPanelStats;
 - (void)updatePanel;
 - (playlist_item_t *)getItem;
 - (BOOL)isItemInPlaylist:(playlist_item_t *)p_item;
index 5f6a009a2dca7f518190cbebff736e48bd86e0c7..965634c0036e5cee2cc726a2e9bde7262253b8f9 100644 (file)
@@ -127,6 +127,7 @@ static VLCInfo *_o_sharedInstance = nil;
 - (void)initPanel
 {
     BOOL b_stats = config_GetInt(VLCIntf, "stats");
+    [self initMediaPanelStats];
     if( b_stats )
     {
         o_statUpdateTimer = [NSTimer scheduledTimerWithTimeInterval: 1
@@ -145,6 +146,32 @@ static VLCInfo *_o_sharedInstance = nil;
     [o_info_window makeKeyAndOrderFront: self];
 }
 
+- (void)initMediaPanelStats
+{
+    //Initializing Input Variables
+    [o_read_bytes_txt setStringValue: [NSString stringWithFormat:@"%8.0f kB", (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_bitrate_txt setStringValue: [NSString stringWithFormat:@"%6.0f kb/s", (float)0]];
+    
+    //Initializing Video Variables
+    [o_video_decoded_txt setIntValue:0];
+    [o_displayed_txt setIntValue:0];
+    [o_lost_frames_txt setIntValue:0];
+    [o_fps_txt setFloatValue:0];
+
+    //Initializing Output Variables
+    [o_sent_packets_txt setIntValue: 0];
+    [o_sent_bytes_txt setStringValue: [NSString stringWithFormat:@"%8.0f kB", (float)0]];
+    [o_sent_bitrate_txt setStringValue: [NSString stringWithFormat:@"%6.0f kb/s", (float)0]];
+
+    //Initializing Audio Variables
+    [o_audio_decoded_txt setIntValue:0];
+    [o_played_abuffers_txt setIntValue: 0];
+    [o_lost_abuffers_txt setIntValue: 0];
+
+}
+
 - (void)updatePanel
 {
     /* make sure that we got the current item and not an outdated one */