]> git.sesse.net Git - vlc/commitdiff
* implemented the statistics-tab. No auto-update yet.
authorFelix Paul Kühne <fkuehne@videolan.org>
Fri, 3 Mar 2006 12:19:56 +0000 (12:19 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Fri, 3 Mar 2006 12:19:56 +0000 (12:19 +0000)
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
modules/gui/macosx/playlistinfo.h
modules/gui/macosx/playlistinfo.m

index 6321a3c46cf96e027e7ad15986ede2f3a38fdfd7..bfb3aa61fe5ce373e47893cd7851a3c013d327eb 100644 (file)
             CLASS = VLCInfo; 
             LANGUAGE = ObjC; 
             OUTLETS = {
+                "o_audio_box" = id; 
+                "o_audio_decoded_lbl" = id; 
+                "o_audio_decoded_txt" = id; 
                 "o_author_lbl" = id; 
                 "o_author_txt" = id; 
                 "o_btn_cancel" = id; 
                 "o_copyright_txt" = id; 
                 "o_date_lbl" = id; 
                 "o_date_txt" = id; 
+                "o_demux_bitrate_lbl" = id; 
+                "o_demux_bitrate_txt" = id; 
+                "o_demux_bytes_lbl" = id; 
+                "o_demux_bytes_txt" = id; 
                 "o_description_lbl" = id; 
                 "o_description_txt" = id; 
+                "o_displayed_lbl" = id; 
+                "o_displayed_txt" = id; 
                 "o_genre_lbl" = id; 
                 "o_genre_txt" = id; 
                 "o_info_window" = id; 
+                "o_input_bitrate_lbl" = id; 
+                "o_input_bitrate_txt" = id; 
+                "o_input_box" = id; 
                 "o_language_lbl" = id; 
                 "o_language_txt" = id; 
+                "o_lost_abuffers_lbl" = id; 
+                "o_lost_abuffers_txt" = id; 
+                "o_lost_frames_lbl" = id; 
+                "o_lost_frames_txt" = id; 
                 "o_nowPlaying_lbl" = id; 
                 "o_nowPlaying_txt" = id; 
                 "o_outline_view" = id; 
+                "o_played_abuffers_lbl" = id; 
+                "o_played_abuffers_txt" = id; 
                 "o_publisher_lbl" = id; 
                 "o_publisher_txt" = id; 
                 "o_rating_lbl" = id; 
                 "o_rating_txt" = id; 
+                "o_read_bytes_lbl" = id; 
+                "o_read_bytes_txt" = id; 
+                "o_sent_bitrate_lbl" = id; 
+                "o_sent_bitrate_txt" = id; 
+                "o_sent_bytes_lbl" = id; 
+                "o_sent_bytes_txt" = id; 
+                "o_sent_packets_lbl" = id; 
+                "o_sent_packets_txt" = id; 
                 "o_seqNum_lbl" = id; 
                 "o_seqNum_txt" = id; 
+                "o_sout_box" = id; 
                 "o_tab_view" = id; 
                 "o_title_lbl" = id; 
                 "o_title_txt" = id; 
                 "o_uri_lbl" = id; 
                 "o_uri_txt" = id; 
+                "o_video_box" = id; 
+                "o_video_decoded_lbl" = id; 
+                "o_video_decoded_txt" = id; 
             }; 
             SUPERCLASS = NSObject; 
         }, 
index 59e378c3a04c40d74f0b750d24685b14c78ad667..b624e92d2150509583990385c02c5f371c4359e3 100644 (file)
Binary files a/extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib and b/extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib differ
index f8d6583c681b53d62c673a7c042af708b145bfac..f9b302526e64536a4f3d53d82013bb5cc6e4fea6 100644 (file)
@@ -1,10 +1,11 @@
 /*****************************************************************************
  * playlistinfo.h: MacOS X interface module
  *****************************************************************************
- * Copyright (C) 2002-2004 the VideoLAN team
+ * Copyright (C) 2002-2006 the VideoLAN team
  * $Id$
  *
- * Authors: Benjamin Pracht <bigben at videolan dot org> 
+ * Authors: Benjamin Pracht <bigben at videolan dot org>
+ *          Felix Kühne <fkuehne at videolan dot org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
     IBOutlet id o_seqNum_lbl;
     IBOutlet id o_seqNum_txt;
 
+    IBOutlet id o_audio_box;
+    IBOutlet id o_audio_decoded_lbl;
+    IBOutlet id o_audio_decoded_txt;
+    IBOutlet id o_demux_bitrate_lbl;
+    IBOutlet id o_demux_bitrate_txt;
+    IBOutlet id o_demux_bytes_lbl;
+    IBOutlet id o_demux_bytes_txt;
+    IBOutlet id o_displayed_lbl;
+    IBOutlet id o_displayed_txt;
+    IBOutlet id o_input_bitrate_lbl;
+    IBOutlet id o_input_bitrate_txt;
+    IBOutlet id o_input_box;
+    IBOutlet id o_lost_abuffers_lbl;
+    IBOutlet id o_lost_abuffers_txt;
+    IBOutlet id o_lost_frames_lbl;
+    IBOutlet id o_lost_frames_txt;
+    IBOutlet id o_played_abuffers_lbl;
+    IBOutlet id o_played_abuffers_txt;
+    IBOutlet id o_read_bytes_lbl;
+    IBOutlet id o_read_bytes_txt;
+    IBOutlet id o_sent_bitrate_lbl;
+    IBOutlet id o_sent_bitrate_txt;
+    IBOutlet id o_sent_bytes_lbl;
+    IBOutlet id o_sent_bytes_txt;
+    IBOutlet id o_sent_packets_lbl;
+    IBOutlet id o_sent_packets_txt;
+    IBOutlet id o_sout_box;
+    IBOutlet id o_video_box;
+    IBOutlet id o_video_decoded_lbl;
+    IBOutlet id o_video_decoded_txt;
+
     playlist_item_t * p_item;
 }
 
 - (BOOL)isItemInPlaylist:(playlist_item_t *)p_item;
 
 - (void)setMeta: (char *)meta forLabel: (id)theItem;
-
+- (void)updateStatistics;
+/*- (void)setIntStat: (int)value forLabel: (id)theItem withFormat: (NSString *)format;
+- (void)setFloatStat: (float)value forLabel: (id)theItem withFormat: (NSString *)format;
+*/
 @end
 
 @interface VLCInfoTreeItem : NSObject
index a10a6b39c5b195039140ffc15de607044be3cbb5..498a100d3a472fc09ad620f4c1385e2105f406aa 100644 (file)
@@ -1,10 +1,11 @@
 /*****************************************************************************
  r playlistinfo.m: MacOS X interface module
  *****************************************************************************
- * Copyright (C) 2002-2005 the VideoLAN team
+ * Copyright (C) 2002-2006 the VideoLAN team
  * $Id$
  *
  * Authors: Benjamin Pracht <bigben at videolan dot org>
+ *          Felix Kühne <fkuehne at videolan dot org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
     [o_language_lbl setStringValue: _NS(VLC_META_LANGUAGE)];
     [o_nowPlaying_lbl setStringValue: _NS(VLC_META_NOW_PLAYING)];
     [o_publisher_lbl setStringValue: _NS(VLC_META_PUBLISHER)];
+    
+    /* statistics */
+    [o_input_box setTitle: _NS("Input")];
+    [o_read_bytes_lbl setStringValue: _NS("Read at media")];
+    [o_input_bitrate_lbl setStringValue: _NS("Input bitrate")];
+    [o_demux_bytes_lbl setStringValue: _NS("Demuxed")];
+    [o_demux_bitrate_lbl setStringValue: _NS("Stream bitrate")];
+    
+    [o_video_box setTitle: _NS("Video")];
+    [o_video_decoded_lbl setStringValue: _NS("Decoded blocks")];
+    [o_displayed_lbl setStringValue: _NS("Displayed frames")];
+    [o_lost_frames_lbl setStringValue: _NS("Lost frames")];
+    
+    [o_sout_box setTitle: _NS("Streaming")];
+    [o_sent_packets_lbl setStringValue: _NS("Sent packets")];
+    [o_sent_bytes_lbl setStringValue: _NS("Sent bytes")];
+    [o_sent_bitrate_lbl setStringValue: _NS("Send rate")];
+    
+    [o_audio_box setTitle: _NS("Audio")];
+    [o_audio_decoded_lbl setStringValue: _NS("Decoded blocks")];
+    [o_played_abuffers_lbl setStringValue: _NS("Played buffers")];
+    [o_lost_abuffers_lbl setStringValue: _NS("Lost buffers")];
 }
 
 - (IBAction)togglePlaylistInfoPanel:(id)sender
     /* reload the advanced table */
     [[VLCInfoTreeItem rootItem] refresh];
     [o_outline_view reloadData];
+    
+    [self updateStatistics];
 
     [o_info_window makeKeyAndOrderFront: sender];
 }
         [theItem setStringValue: @"-"];
 }
 
+- (void)updateStatistics
+{
+    vlc_mutex_lock( &p_item->input.p_stats->lock );
+
+    /* input */
+    [o_read_bytes_txt setStringValue: [NSString stringWithFormat: @"%8.0f kB", \
+        (float)(p_item->input.p_stats->i_read_bytes)/1000]];
+    [o_input_bitrate_txt setStringValue: [NSString stringWithFormat: @"%6.0f kb/s", \
+        (float)(p_item->input.p_stats->f_input_bitrate)/1000]];
+    [o_demux_bytes_txt setStringValue: [NSString stringWithFormat: @"%8.0f kB",\
+        (float)(p_item->input.p_stats->i_demux_read_bytes)/1000]];
+    [o_demux_bitrate_txt setStringValue: [NSString stringWithFormat: @"%6.0f kb/s", \
+        (float)(p_item->input.p_stats->f_demux_bitrate)/1000]];
+
+    /* Video */
+    [o_video_decoded_txt setStringValue: [NSString stringWithFormat: @"%8.0f kB", \
+        p_item->input.p_stats->i_decoded_video]];
+    [o_displayed_txt setStringValue: [NSString stringWithFormat: @"%5i", \
+        p_item->input.p_stats->i_displayed_pictures]];
+    [o_lost_frames_txt setStringValue: [NSString stringWithFormat: @"%5i", \
+        p_item->input.p_stats->i_lost_pictures]];
+
+    /* Sout */
+    [o_sent_packets_txt setStringValue: [NSString stringWithFormat: @"%5i", \
+        p_item->input.p_stats->i_sent_packets]];
+    [o_sent_bytes_txt setStringValue: [NSString stringWithFormat: @"%6.0f kB", \
+        (float)(p_item->input.p_stats->i_sent_bytes)/1000]];
+    [o_sent_bitrate_txt setStringValue: [NSString stringWithFormat: @"%6.0f kb/s", \
+        (float)(p_item->input.p_stats->f_send_bitrate*8)*1000]];
+
+    /* Audio */
+    [o_audio_decoded_txt setStringValue: [NSString stringWithFormat: @"%5i", \
+        p_item->input.p_stats->i_decoded_audio]];
+    [o_played_abuffers_txt setStringValue: [NSString stringWithFormat: @"%5i", \
+        p_item->input.p_stats->i_played_abuffers]];
+    [o_lost_abuffers_txt setStringValue: [NSString stringWithFormat: @"%5i", \
+        p_item->input.p_stats->i_lost_abuffers]];
+
+    vlc_mutex_unlock( &p_item->input.p_stats->lock );
+}
+
 - (IBAction)infoCancel:(id)sender
 {
     [o_info_window orderOut: self];