[vlc-devel] commit: Bugfix Stats Panel (maxime Ripard )
git version control
git at videolan.org
Tue Apr 8 14:55:04 CEST 2008
vlc | branch: master | maxime Ripard <maxime.ripard at utbm.fr> | Tue Apr 8 14:39:00 2008 +0200| [da99cadbf6b7f24af44cfd9059dfa869b687f0c0]
Bugfix Stats Panel
Signed-off-by: Felix Paul Kühne <fkuehne at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=da99cadbf6b7f24af44cfd9059dfa869b687f0c0
---
modules/gui/macosx/playlistinfo.h | 1 +
modules/gui/macosx/playlistinfo.m | 27 +++++++++++++++++++++++++++
2 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/modules/gui/macosx/playlistinfo.h b/modules/gui/macosx/playlistinfo.h
index d084f7c..4666fea 100644
--- a/modules/gui/macosx/playlistinfo.h
+++ b/modules/gui/macosx/playlistinfo.h
@@ -101,6 +101,7 @@
- (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;
diff --git a/modules/gui/macosx/playlistinfo.m b/modules/gui/macosx/playlistinfo.m
index 5f6a009..965634c 100644
--- a/modules/gui/macosx/playlistinfo.m
+++ b/modules/gui/macosx/playlistinfo.m
@@ -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 */
More information about the vlc-devel
mailing list