OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "media/renderers/renderer_impl.h" | 5 #include "media/renderers/renderer_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/callback_helpers.h" | 9 #include "base/callback_helpers.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/location.h" | 12 #include "base/location.h" |
13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "media/base/audio_renderer.h" | 15 #include "media/base/audio_renderer.h" |
16 #include "media/base/bind_to_current_loop.h" | |
17 #include "media/base/demuxer_stream_provider.h" | 16 #include "media/base/demuxer_stream_provider.h" |
18 #include "media/base/media_switches.h" | 17 #include "media/base/media_switches.h" |
19 #include "media/base/time_source.h" | 18 #include "media/base/time_source.h" |
20 #include "media/base/video_renderer.h" | 19 #include "media/base/video_renderer.h" |
21 #include "media/base/wall_clock_time_source.h" | 20 #include "media/base/wall_clock_time_source.h" |
22 | 21 |
23 namespace media { | 22 namespace media { |
24 | 23 |
25 // See |video_underflow_threshold_|. | 24 // See |video_underflow_threshold_|. |
26 static const int kDefaultVideoUnderflowThresholdMs = 3000; | 25 static const int kDefaultVideoUnderflowThresholdMs = 3000; |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 } | 625 } |
627 | 626 |
628 // After OnError() returns, the pipeline may destroy |this|. | 627 // After OnError() returns, the pipeline may destroy |this|. |
629 base::ResetAndReturn(&error_cb_).Run(error); | 628 base::ResetAndReturn(&error_cb_).Run(error); |
630 | 629 |
631 if (!flush_cb_.is_null()) | 630 if (!flush_cb_.is_null()) |
632 base::ResetAndReturn(&flush_cb_).Run(); | 631 base::ResetAndReturn(&flush_cb_).Run(); |
633 } | 632 } |
634 | 633 |
635 } // namespace media | 634 } // namespace media |
OLD | NEW |