| 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 "content/renderer/media/webrtc_audio_device_not_impl.h" | 5 #include "content/renderer/media/webrtc_audio_device_not_impl.h" |
| 6 | 6 |
| 7 namespace { | |
| 8 | |
| 9 const int64 kMillisecondsBetweenProcessCalls = 5000; | |
| 10 | |
| 11 } // namespace | |
| 12 | |
| 13 namespace content { | 7 namespace content { |
| 14 | 8 |
| 15 WebRtcAudioDeviceNotImpl::WebRtcAudioDeviceNotImpl() | 9 WebRtcAudioDeviceNotImpl::WebRtcAudioDeviceNotImpl() |
| 16 : last_process_time_(base::TimeTicks::Now()) { | 10 : last_process_time_(base::TimeTicks::Now()) { |
| 17 } | 11 } |
| 18 | 12 |
| 19 int32_t WebRtcAudioDeviceNotImpl::ChangeUniqueId(const int32_t id) { | 13 int32_t WebRtcAudioDeviceNotImpl::ChangeUniqueId(const int32_t id) { |
| 20 return 0; | 14 return 0; |
| 21 } | 15 } |
| 22 | 16 |
| 23 int32_t WebRtcAudioDeviceNotImpl::TimeUntilNextProcess() { | 17 int64_t WebRtcAudioDeviceNotImpl::TimeUntilNextProcess() { |
| 18 const int64_t kMillisecondsBetweenProcessCalls = 5000; |
| 24 base::TimeDelta delta_time = (base::TimeTicks::Now() - last_process_time_); | 19 base::TimeDelta delta_time = (base::TimeTicks::Now() - last_process_time_); |
| 25 int64 time_until_next = | 20 return kMillisecondsBetweenProcessCalls - delta_time.InMilliseconds(); |
| 26 kMillisecondsBetweenProcessCalls - delta_time.InMilliseconds(); | |
| 27 return static_cast<int32_t>(time_until_next); | |
| 28 } | 21 } |
| 29 | 22 |
| 30 int32_t WebRtcAudioDeviceNotImpl::Process() { | 23 int32_t WebRtcAudioDeviceNotImpl::Process() { |
| 31 last_process_time_ = base::TimeTicks::Now(); | 24 last_process_time_ = base::TimeTicks::Now(); |
| 32 return 0; | 25 return 0; |
| 33 } | 26 } |
| 34 | 27 |
| 35 int32_t WebRtcAudioDeviceNotImpl::RegisterEventObserver( | 28 int32_t WebRtcAudioDeviceNotImpl::RegisterEventObserver( |
| 36 webrtc::AudioDeviceObserver* event_callback) { | 29 webrtc::AudioDeviceObserver* event_callback) { |
| 37 return 0; | 30 return 0; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 269 |
| 277 bool WebRtcAudioDeviceNotImpl::BuiltInAECIsAvailable() const { | 270 bool WebRtcAudioDeviceNotImpl::BuiltInAECIsAvailable() const { |
| 278 return false; | 271 return false; |
| 279 } | 272 } |
| 280 | 273 |
| 281 int32_t WebRtcAudioDeviceNotImpl::EnableBuiltInAEC(bool enable) { | 274 int32_t WebRtcAudioDeviceNotImpl::EnableBuiltInAEC(bool enable) { |
| 282 return 0; | 275 return 0; |
| 283 } | 276 } |
| 284 | 277 |
| 285 } // namespace content | 278 } // namespace content |
| OLD | NEW |