Changeset 5bd61a8060701e1c0c6b70066f0e2f27b117ea43
- Timestamp:
- 21/01/06 15:14:36 (3 years ago)
- git-parent:
- Files:
-
- include/aout_internal.h (modified) (1 diff)
- include/vlc_messages.h (modified) (1 diff)
- modules/gui/wxwidgets/dialogs/infopanels.cpp (modified) (2 diffs)
- modules/gui/wxwidgets/dialogs/infopanels.hpp (modified) (2 diffs)
- src/audio_output/dec.c (modified) (4 diffs)
- src/audio_output/input.c (modified) (3 diffs)
- src/audio_output/mixer.c (modified) (2 diffs)
- src/input/input.c (modified) (2 diffs)
- src/misc/stats.c (modified) (7 diffs)
- src/playlist/playlist.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
include/aout_internal.h
r2cb472d r5bd61a8 151 151 vlc_mutex_t lock; 152 152 153 /* The input thread that spawned this input */ 154 input_thread_t *p_input_thread; 155 153 156 audio_sample_format_t input; 154 157 aout_alloc_t input_alloc; include/vlc_messages.h
r4f86b95 r5bd61a8 315 315 int i_displayed_pictures; 316 316 int i_lost_pictures; 317 318 /* Aout */ 319 int i_played_abuffers; 320 int i_lost_abuffers; 317 321 }; 318 322 modules/gui/wxwidgets/dialogs/infopanels.cpp
rb930462 r5bd61a8 198 198 sizer->Add( video_bsizer , 0, wxALL| wxGROW, 5 ); 199 199 200 /* Aout */ 201 wxStaticBox *audio_box = new wxStaticBox( this, -1, 202 wxU( _("Audio" ) ) ); 203 audio_box->SetAutoLayout( TRUE ); 204 audio_bsizer = new wxStaticBoxSizer( audio_box, wxVERTICAL ); 205 audio_sizer = new wxFlexGridSizer( 2,3, 20 ); 206 207 #define AUDIO_ADD(txt,widget,dflt) \ 208 { audio_sizer->Add ( new wxStaticText( this, -1, wxU(_( txt ) ) ), \ 209 0, wxEXPAND|wxLEFT , 5 ); \ 210 widget = new wxStaticText( this, -1, wxU( dflt ) ); \ 211 audio_sizer->Add( widget, 0, wxEXPAND|wxRIGHT, 5 ); \ 212 } 213 AUDIO_ADD( "Decoded blocks", audio_decoded_text, "0" ); 214 /* Hack to get enough size */ 215 AUDIO_ADD( "Played buffers", played_abuffers_text, 216 "0 " ); 217 AUDIO_ADD( "Lost buffers", lost_abuffers_text, "0" ); 218 219 220 audio_sizer->Layout(); 221 audio_bsizer->Add( audio_sizer, 0, wxALL | wxGROW, 5 ); 222 audio_bsizer->Layout(); 223 sizer->Add( audio_bsizer , 0, wxALL| wxGROW, 5 ); 224 200 225 sizer->Layout(); 201 226 panel_sizer->Add( sizer, 0, wxEXPAND, 5 ); … … 229 254 UPDATE( lost_frames_text, "%5i", p_item->p_stats->i_lost_pictures ); 230 255 256 UPDATE( audio_decoded_text, "%5i", p_item->p_stats->i_decoded_audio ); 257 UPDATE( played_abuffers_text, "%5i", p_item->p_stats->i_played_abuffers ); 258 UPDATE( lost_abuffers_text, "%5i", p_item->p_stats->i_lost_abuffers ); 259 231 260 vlc_mutex_unlock( &p_item->p_stats->lock ); 232 261 modules/gui/wxwidgets/dialogs/infopanels.hpp
rb930462 r5bd61a8 87 87 wxFlexGridSizer *input_sizer; 88 88 wxStaticBoxSizer *input_bsizer; 89 90 89 wxStaticText *read_bytes_text; 91 90 wxStaticText *input_bitrate_text; … … 95 94 wxFlexGridSizer *video_sizer; 96 95 wxStaticBoxSizer *video_bsizer; 97 98 96 wxStaticText *video_decoded_text; 99 97 wxStaticText *displayed_text; 100 98 wxStaticText *lost_frames_text; 99 100 wxFlexGridSizer *audio_sizer; 101 wxStaticBoxSizer *audio_bsizer; 102 wxStaticText *audio_decoded_text; 103 wxStaticText *played_abuffers_text; 104 wxStaticText *lost_abuffers_text; 101 105 }; 102 106 }; src/audio_output/dec.c
r2cb472d r5bd61a8 135 135 p_input->i_pts_delay = p_input_thread->i_pts_delay; 136 136 p_input->i_pts_delay += p_input->i_desync; 137 p_input->p_input_thread = p_input_thread; 137 138 vlc_object_release( p_input_thread ); 138 139 } … … 141 142 p_input->i_pts_delay = DEFAULT_PTS_DELAY; 142 143 p_input->i_pts_delay += p_input->i_desync; 144 p_input->p_input_thread = NULL; 143 145 } 144 146 … … 309 311 msg_Warn( p_aout, "received buffer in the future ("I64Fd")", 310 312 p_buffer->start_date - mdate()); 313 if( p_input->p_input_thread ) 314 { 315 stats_UpdateInteger( p_input->p_input_thread, "lost_abuffers", 1 ); 316 } 311 317 aout_BufferFree( p_buffer ); 312 318 return -1; … … 359 365 vlc_mutex_lock( &p_aout->mixer_lock ); 360 366 aout_MixerRun( p_aout ); 367 if( p_input->p_input_thread ) 368 { 369 stats_UpdateInteger( p_input->p_input_thread, 370 "played_abuffers", 1 ); 371 } 361 372 vlc_mutex_unlock( &p_aout->mixer_lock ); 362 373 src/audio_output/input.c
r2cb472d r5bd61a8 446 446 } 447 447 start_date = 0; 448 if( p_input->p_input_thread ) 449 { 450 stats_UpdateInteger( p_input->p_input_thread, "lost_abuffers", 1 ); 451 } 448 452 } 449 453 … … 454 458 msg_Warn( p_aout, "PTS is out of range ("I64Fd"), dropping buffer", 455 459 mdate() - p_buffer->start_date ); 460 if( p_input->p_input_thread ) 461 { 462 stats_UpdateInteger( p_input->p_input_thread, "lost_abuffers", 1 ); 463 } 456 464 aout_BufferFree( p_buffer ); 457 465 p_input->i_resampling_type = AOUT_RESAMPLING_NONE; … … 491 499 start_date - p_buffer->start_date ); 492 500 aout_BufferFree( p_buffer ); 501 if( p_input->p_input_thread ) 502 { 503 stats_UpdateInteger( p_input->p_input_thread, "lost_abuffers", 1 ); 504 } 493 505 return 0; 494 506 } src/audio_output/mixer.c
r2cb472d r5bd61a8 141 141 p_buffer = aout_FifoPop( p_aout, p_fifo ); 142 142 aout_BufferFree( p_buffer ); 143 if( p_input->p_input_thread ) 144 { 145 // stats_UpdateInteger( p_input->p_input_thread, 146 // "lost_abuffers", 1 ); 147 } 143 148 p_buffer = p_fifo->p_first; 144 149 p_input->p_first_byte_to_mix = NULL; … … 198 203 start_date - p_buffer->end_date ); 199 204 aout_BufferFree( p_buffer ); 205 if( p_input->p_input_thread ) 206 { 207 // stats_UpdateInteger( p_input->p_input_thread, 208 // "lost_abuffers", 1 ); 209 } 200 210 p_fifo->p_first = p_buffer = p_next; 201 211 p_input->p_first_byte_to_mix = NULL; src/input/input.c
rdc6ed6d r5bd61a8 684 684 if( !b_quick ) 685 685 { 686 /* Prepare statistics */ 686 687 counter_t *p_counter; 687 688 stats_Create( p_input, "read_bytes", VLC_VAR_INTEGER, STATS_COUNTER ); … … 699 700 if( p_counter ) p_counter->update_interval = 1000000; 700 701 702 stats_Create( p_input, "played_abuffers", VLC_VAR_INTEGER, STATS_COUNTER ); 703 stats_Create( p_input, "lost_abuffers", VLC_VAR_INTEGER, STATS_COUNTER ); 704 705 /* handle sout */ 701 706 psz = var_GetString( p_input, "sout" ); 702 707 if( *psz && strncasecmp( p_input->input.p_item->psz_uri, "vlc:", 4 ) ) src/misc/stats.c
rcb1196f r5bd61a8 139 139 140 140 vlc_mutex_lock( &p_handler->object_lock ); 141 142 141 /* Look for existing element */ 143 142 p_counter = GetCounter( p_handler, p_this->i_object_id, … … 177 176 if( !p_handler ) return VLC_ENOMEM; 178 177 vlc_mutex_lock( &p_handler->object_lock ); 179 180 178 181 179 /* Look for existing element */ … … 292 290 stats_GetInteger( p_input, p_input->i_object_id, "decoded_audio", 293 291 &p_stats->i_decoded_audio ); 292 293 /* Aout - We store in p_input because aout is shared */ 294 stats_GetInteger( p_input, p_input->i_object_id, "played_abuffers", 295 &p_stats->i_played_abuffers ); 296 stats_GetInteger( p_input, p_input->i_object_id, "lost_abuffers", 297 &p_stats->i_lost_abuffers ); 294 298 295 299 /* Vouts */ … … 312 316 vlc_list_release( p_list ); 313 317 } 318 314 319 vlc_mutex_unlock( &p_stats->lock ); 315 320 } … … 322 327 p_stats->f_demux_bitrate = p_stats->f_average_demux_bitrate = 323 328 p_stats->i_displayed_pictures = p_stats->i_lost_pictures = 329 p_stats->i_played_abuffers = p_stats->i_lost_abuffers = 324 330 p_stats->i_decoded_video = p_stats->i_decoded_audio = 0; 325 331 } … … 330 336 /* f_bitrate is in bytes / microsecond 331 337 * *1000 => bytes / millisecond => kbytes / seconds */ 332 fprintf( stderr, "Input : %i (%i bytes) - %f kB/s - "333 " Demux : %i (%i bytes) - %f kB/s - Vout : %i/%i\n",338 fprintf( stderr, "Input : %i (%i bytes) - %f kB/s - Demux : %i (%i bytes) - %f kB/s\n" 339 " - Vout : %i/%i - Aout : %i/%i\n", 334 340 p_stats->i_read_packets, p_stats->i_read_bytes, 335 341 p_stats->f_input_bitrate * 1000, 336 342 p_stats->i_demux_read_packets, p_stats->i_demux_read_bytes, 337 343 p_stats->f_demux_bitrate * 1000, 338 p_stats->i_displayed_pictures, p_stats->i_lost_pictures ); 344 p_stats->i_displayed_pictures, p_stats->i_lost_pictures, 345 p_stats->i_played_abuffers, p_stats->i_lost_abuffers ); 339 346 vlc_mutex_unlock( &p_stats->lock ); 340 347 } … … 478 485 { 479 486 int i; 480 for( i = 0; i< p_handler->i_counters; i++ )487 for( i = 0; i< p_handler->i_counters; i++ ) 481 488 { 482 489 counter_t *p_counter = p_handler->pp_counters[i]; src/playlist/playlist.c
r31e0a13 r5bd61a8 626 626 stats_ComputeInputStats( p_playlist->p_input, 627 627 p_playlist->p_input->input.p_item->p_stats ); 628 // stats_DumpInputStats(628 // stats_DumpInputStats( 629 629 // p_playlist->p_input->input.p_item->p_stats ); 630 630 }
