OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 // This class implements an AudioCaptureModule that can be used to detect if | 11 // This class implements an AudioCaptureModule that can be used to detect if |
12 // audio is being received properly if it is fed by another AudioCaptureModule | 12 // audio is being received properly if it is fed by another AudioCaptureModule |
13 // in some arbitrary audio pipeline where they are connected. It does not play | 13 // in some arbitrary audio pipeline where they are connected. It does not play |
14 // out or record any audio so it does not need access to any hardware and can | 14 // out or record any audio so it does not need access to any hardware and can |
15 // therefore be used in the gtest testing framework. | 15 // therefore be used in the gtest testing framework. |
16 | 16 |
17 // Note P postfix of a function indicates that it should only be called by the | 17 // Note P postfix of a function indicates that it should only be called by the |
18 // processing thread. | 18 // processing thread. |
19 | 19 |
20 #ifndef WEBRTC_PC_TEST_FAKEAUDIOCAPTUREMODULE_H_ | 20 #ifndef WEBRTC_PC_TEST_FAKEAUDIOCAPTUREMODULE_H_ |
21 #define WEBRTC_PC_TEST_FAKEAUDIOCAPTUREMODULE_H_ | 21 #define WEBRTC_PC_TEST_FAKEAUDIOCAPTUREMODULE_H_ |
22 | 22 |
23 #include <memory> | 23 #include <memory> |
24 | 24 |
| 25 #include "webrtc/base/basictypes.h" |
| 26 #include "webrtc/base/criticalsection.h" |
| 27 #include "webrtc/base/messagehandler.h" |
| 28 #include "webrtc/base/scoped_ref_ptr.h" |
25 #include "webrtc/common_types.h" | 29 #include "webrtc/common_types.h" |
26 #include "webrtc/modules/audio_device/include/audio_device.h" | 30 #include "webrtc/modules/audio_device/include/audio_device.h" |
27 #include "webrtc/rtc_base/basictypes.h" | |
28 #include "webrtc/rtc_base/criticalsection.h" | |
29 #include "webrtc/rtc_base/messagehandler.h" | |
30 #include "webrtc/rtc_base/scoped_ref_ptr.h" | |
31 | 31 |
32 namespace rtc { | 32 namespace rtc { |
33 class Thread; | 33 class Thread; |
34 } // namespace rtc | 34 } // namespace rtc |
35 | 35 |
36 class FakeAudioCaptureModule | 36 class FakeAudioCaptureModule |
37 : public webrtc::AudioDeviceModule, | 37 : public webrtc::AudioDeviceModule, |
38 public rtc::MessageHandler { | 38 public rtc::MessageHandler { |
39 public: | 39 public: |
40 typedef uint16_t Sample; | 40 typedef uint16_t Sample; |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 272 |
273 // Protects variables that are accessed from process_thread_ and | 273 // Protects variables that are accessed from process_thread_ and |
274 // the main thread. | 274 // the main thread. |
275 rtc::CriticalSection crit_; | 275 rtc::CriticalSection crit_; |
276 // Protects |audio_callback_| that is accessed from process_thread_ and | 276 // Protects |audio_callback_| that is accessed from process_thread_ and |
277 // the main thread. | 277 // the main thread. |
278 rtc::CriticalSection crit_callback_; | 278 rtc::CriticalSection crit_callback_; |
279 }; | 279 }; |
280 | 280 |
281 #endif // WEBRTC_PC_TEST_FAKEAUDIOCAPTUREMODULE_H_ | 281 #endif // WEBRTC_PC_TEST_FAKEAUDIOCAPTUREMODULE_H_ |
OLD | NEW |