OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <algorithm> | 5 #include <algorithm> |
6 #include <climits> | 6 #include <climits> |
7 #include <cstdarg> | 7 #include <cstdarg> |
8 #include <cstdio> | 8 #include <cstdio> |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 #endif // defined(USE_X11) | 510 #endif // defined(USE_X11) |
511 scoped_ptr<AudioOutputStream> audio_output_stream_; | 511 scoped_ptr<AudioOutputStream> audio_output_stream_; |
512 | 512 |
513 // Video playout queue. | 513 // Video playout queue. |
514 typedef std::pair<base::TimeTicks, scoped_refptr<VideoFrame> > | 514 typedef std::pair<base::TimeTicks, scoped_refptr<VideoFrame> > |
515 VideoQueueEntry; | 515 VideoQueueEntry; |
516 std::deque<VideoQueueEntry> video_playout_queue_; | 516 std::deque<VideoQueueEntry> video_playout_queue_; |
517 base::TimeTicks last_popped_video_playout_time_; | 517 base::TimeTicks last_popped_video_playout_time_; |
518 int64 num_video_frames_processed_; | 518 int64 num_video_frames_processed_; |
519 | 519 |
520 base::OneShotTimer<NaivePlayer> video_playout_timer_; | 520 base::OneShotTimer video_playout_timer_; |
521 | 521 |
522 // Audio playout queue, synchronized by |audio_lock_|. | 522 // Audio playout queue, synchronized by |audio_lock_|. |
523 base::Lock audio_lock_; | 523 base::Lock audio_lock_; |
524 typedef std::pair<base::TimeTicks, AudioBus*> AudioQueueEntry; | 524 typedef std::pair<base::TimeTicks, AudioBus*> AudioQueueEntry; |
525 std::deque<AudioQueueEntry> audio_playout_queue_; | 525 std::deque<AudioQueueEntry> audio_playout_queue_; |
526 base::TimeTicks last_popped_audio_playout_time_; | 526 base::TimeTicks last_popped_audio_playout_time_; |
527 int64 num_audio_frames_processed_; | 527 int64 num_audio_frames_processed_; |
528 | 528 |
529 // These must only be used on the audio thread calling OnMoreData(). | 529 // These must only be used on the audio thread calling OnMoreData(). |
530 scoped_ptr<AudioBus> currently_playing_audio_frame_; | 530 scoped_ptr<AudioBus> currently_playing_audio_frame_; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
591 audio_config, | 591 audio_config, |
592 video_config, | 592 video_config, |
593 window_width, | 593 window_width, |
594 window_height); | 594 window_height); |
595 player.Start(); | 595 player.Start(); |
596 | 596 |
597 base::MessageLoop().Run(); // Run forever (i.e., until SIGTERM). | 597 base::MessageLoop().Run(); // Run forever (i.e., until SIGTERM). |
598 NOTREACHED(); | 598 NOTREACHED(); |
599 return 0; | 599 return 0; |
600 } | 600 } |
OLD | NEW |