| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/message_loop_proxy.h" | 14 #include "base/message_loop_proxy.h" |
| 15 #include "base/time.h" | 15 #include "base/time.h" |
| 16 #include "content/common/content_export.h" | 16 #include "content/common/content_export.h" |
| 17 #include "media/audio/audio_input_device.h" | 17 #include "media/audio/audio_input_device.h" |
| 18 #include "media/base/audio_renderer_sink.h" | 18 #include "media/base/audio_renderer_sink.h" |
| 19 #include "third_party/webrtc/modules/audio_device/main/interface/audio_device.h" | 19 #include "third_party/webrtc/modules/audio_device/include/audio_device.h" |
| 20 | 20 |
| 21 // A WebRtcAudioDeviceImpl instance implements the abstract interface | 21 // A WebRtcAudioDeviceImpl instance implements the abstract interface |
| 22 // webrtc::AudioDeviceModule which makes it possible for a user (e.g. webrtc:: | 22 // webrtc::AudioDeviceModule which makes it possible for a user (e.g. webrtc:: |
| 23 // VoiceEngine) to register this class as an external AudioDeviceModule (ADM). | 23 // VoiceEngine) to register this class as an external AudioDeviceModule (ADM). |
| 24 // Then WebRtcAudioDeviceImpl::SetSessionId() needs to be called to set the | 24 // Then WebRtcAudioDeviceImpl::SetSessionId() needs to be called to set the |
| 25 // session id that tells which device to use. The user can either get the | 25 // session id that tells which device to use. The user can either get the |
| 26 // session id from the MediaStream or use a value of 1 (AudioInputDeviceManager | 26 // session id from the MediaStream or use a value of 1 (AudioInputDeviceManager |
| 27 // ::kFakeOpenSessionId), the later will open the default device without going | 27 // ::kFakeOpenSessionId), the later will open the default device without going |
| 28 // through the MediaStream. The user can then call WebRtcAudioDeviceImpl:: | 28 // through the MediaStream. The user can then call WebRtcAudioDeviceImpl:: |
| 29 // StartPlayout() and WebRtcAudioDeviceImpl::StartRecording() from the render | 29 // StartPlayout() and WebRtcAudioDeviceImpl::StartRecording() from the render |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 bool agc_is_enabled_; | 442 bool agc_is_enabled_; |
| 443 | 443 |
| 444 // Used for histograms of total recording and playout times. | 444 // Used for histograms of total recording and playout times. |
| 445 base::Time start_capture_time_; | 445 base::Time start_capture_time_; |
| 446 base::Time start_render_time_; | 446 base::Time start_render_time_; |
| 447 | 447 |
| 448 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); | 448 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); |
| 449 }; | 449 }; |
| 450 | 450 |
| 451 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 451 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
| OLD | NEW |