OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" |
12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "base/message_loop_proxy.h" | 15 #include "base/message_loop_proxy.h" |
15 #include "base/time.h" | 16 #include "base/time.h" |
16 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
17 #include "content/renderer/media/audio_device.h" | 18 #include "content/renderer/media/audio_device.h" |
18 #include "content/renderer/media/audio_input_device.h" | 19 #include "content/renderer/media/audio_input_device.h" |
19 #include "third_party/webrtc/modules/audio_device/main/interface/audio_device.h" | 20 #include "third_party/webrtc/modules/audio_device/main/interface/audio_device.h" |
20 | 21 |
21 // A WebRtcAudioDeviceImpl instance implements the abstract interface | 22 // A WebRtcAudioDeviceImpl instance implements the abstract interface |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // The actual data is transferred via SharedMemory. IPC is not involved | 86 // The actual data is transferred via SharedMemory. IPC is not involved |
86 // in the actual media transfer. | 87 // in the actual media transfer. |
87 // | 88 // |
88 // Implementation notes: | 89 // Implementation notes: |
89 // | 90 // |
90 // - This class must be created on the main render thread. | 91 // - This class must be created on the main render thread. |
91 // - The webrtc::AudioDeviceModule is reference counted. | 92 // - The webrtc::AudioDeviceModule is reference counted. |
92 // - Recording is currently not supported on Mac OS X. | 93 // - Recording is currently not supported on Mac OS X. |
93 // | 94 // |
94 class CONTENT_EXPORT WebRtcAudioDeviceImpl | 95 class CONTENT_EXPORT WebRtcAudioDeviceImpl |
95 : public webrtc::AudioDeviceModule, | 96 : NON_EXPORTED_BASE(public webrtc::AudioDeviceModule), |
96 public AudioDevice::RenderCallback, | 97 public AudioDevice::RenderCallback, |
97 public AudioInputDevice::CaptureCallback, | 98 public AudioInputDevice::CaptureCallback, |
98 public AudioInputDevice::CaptureEventHandler { | 99 public AudioInputDevice::CaptureEventHandler { |
99 public: | 100 public: |
100 // Methods called on main render thread. | 101 // Methods called on main render thread. |
101 WebRtcAudioDeviceImpl(); | 102 WebRtcAudioDeviceImpl(); |
102 | 103 |
103 // webrtc::RefCountedModule implementation. | 104 // webrtc::RefCountedModule implementation. |
104 // The creator must call AddRef() after construction and use Release() | 105 // The creator must call AddRef() after construction and use Release() |
105 // to release the reference and delete this object. | 106 // to release the reference and delete this object. |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 int bytes_per_sample_; | 327 int bytes_per_sample_; |
327 | 328 |
328 bool initialized_; | 329 bool initialized_; |
329 bool playing_; | 330 bool playing_; |
330 bool recording_; | 331 bool recording_; |
331 | 332 |
332 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); | 333 DISALLOW_COPY_AND_ASSIGN(WebRtcAudioDeviceImpl); |
333 }; | 334 }; |
334 | 335 |
335 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ | 336 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_AUDIO_DEVICE_IMPL_H_ |
OLD | NEW |