| 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/debug/trace_event.h" | |
| 14 #include "base/location.h" | 13 #include "base/location.h" |
| 15 #include "base/metrics/histogram.h" | 14 #include "base/metrics/histogram.h" |
| 16 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
| 16 #include "base/trace_event/trace_event.h" |
| 17 #include "content/public/common/content_switches.h" | 17 #include "content/public/common/content_switches.h" |
| 18 #include "media/base/bind_to_current_loop.h" | 18 #include "media/base/bind_to_current_loop.h" |
| 19 #include "media/base/video_util.h" | 19 #include "media/base/video_util.h" |
| 20 | 20 |
| 21 namespace content { | 21 namespace content { |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 // Amount of frame intervals to wait before considering the source as muted, for | 25 // Amount of frame intervals to wait before considering the source as muted, for |
| 26 // the first frame and under normal conditions, respectively. First frame might | 26 // the first frame and under normal conditions, respectively. First frame might |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 } | 523 } |
| 524 | 524 |
| 525 io_message_loop_->PostDelayedTask(FROM_HERE, | 525 io_message_loop_->PostDelayedTask(FROM_HERE, |
| 526 base::Bind(&VideoTrackAdapter::CheckFramesReceivedOnIO, this, | 526 base::Bind(&VideoTrackAdapter::CheckFramesReceivedOnIO, this, |
| 527 set_muted_state_callback, frame_counter_), | 527 set_muted_state_callback, frame_counter_), |
| 528 base::TimeDelta::FromSecondsD(kNormalFrameTimeoutInFrameIntervals / | 528 base::TimeDelta::FromSecondsD(kNormalFrameTimeoutInFrameIntervals / |
| 529 source_frame_rate_)); | 529 source_frame_rate_)); |
| 530 } | 530 } |
| 531 | 531 |
| 532 } // namespace content | 532 } // namespace content |
| OLD | NEW |