Commit da99cadb authored by maxime Ripard's avatar maxime Ripard Committed by Felix Paul Kühne

Bugfix Stats Panel

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent b744c467
......@@ -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;
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment