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 "content/renderer/media/video_track_adapter.h" | 5 #include "content/renderer/media/video_track_adapter.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
| 17 #include "base/threading/thread_task_runner_handle.h" |
17 #include "base/trace_event/trace_event.h" | 18 #include "base/trace_event/trace_event.h" |
18 #include "content/public/common/content_switches.h" | 19 #include "content/public/common/content_switches.h" |
19 #include "media/base/bind_to_current_loop.h" | 20 #include "media/base/bind_to_current_loop.h" |
20 #include "media/base/video_util.h" | 21 #include "media/base/video_util.h" |
21 | 22 |
22 namespace content { | 23 namespace content { |
23 | 24 |
24 namespace { | 25 namespace { |
25 | 26 |
26 // Amount of frame intervals to wait before considering the source as muted, for | 27 // Amount of frame intervals to wait before considering the source as muted, for |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 } | 514 } |
514 | 515 |
515 io_task_runner_->PostDelayedTask( | 516 io_task_runner_->PostDelayedTask( |
516 FROM_HERE, base::Bind(&VideoTrackAdapter::CheckFramesReceivedOnIO, this, | 517 FROM_HERE, base::Bind(&VideoTrackAdapter::CheckFramesReceivedOnIO, this, |
517 set_muted_state_callback, frame_counter_), | 518 set_muted_state_callback, frame_counter_), |
518 base::TimeDelta::FromSecondsD(kNormalFrameTimeoutInFrameIntervals / | 519 base::TimeDelta::FromSecondsD(kNormalFrameTimeoutInFrameIntervals / |
519 source_frame_rate_)); | 520 source_frame_rate_)); |
520 } | 521 } |
521 | 522 |
522 } // namespace content | 523 } // namespace content |
OLD | NEW |