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_API_TEST_FAKEAUDIOCAPTUREMODULE_H_ | 20 #ifndef WEBRTC_API_TEST_FAKEAUDIOCAPTUREMODULE_H_ |
21 #define WEBRTC_API_TEST_FAKEAUDIOCAPTUREMODULE_H_ | 21 #define WEBRTC_API_TEST_FAKEAUDIOCAPTUREMODULE_H_ |
22 | 22 |
23 #include <memory> | 23 #include <memory> |
24 | 24 |
25 #include "webrtc/base/basictypes.h" | 25 #include "webrtc/base/basictypes.h" |
26 #include "webrtc/base/criticalsection.h" | 26 #include "webrtc/base/criticalsection.h" |
27 #include "webrtc/base/messagehandler.h" | 27 #include "webrtc/base/messagehandler.h" |
28 #include "webrtc/base/scoped_ptr.h" | |
29 #include "webrtc/base/scoped_ref_ptr.h" | 28 #include "webrtc/base/scoped_ref_ptr.h" |
30 #include "webrtc/common_types.h" | 29 #include "webrtc/common_types.h" |
31 #include "webrtc/modules/audio_device/include/audio_device.h" | 30 #include "webrtc/modules/audio_device/include/audio_device.h" |
32 | 31 |
33 namespace rtc { | 32 namespace rtc { |
34 class Thread; | 33 class Thread; |
35 } // namespace rtc | 34 } // namespace rtc |
36 | 35 |
37 class FakeAudioCaptureModule | 36 class FakeAudioCaptureModule |
38 : public webrtc::AudioDeviceModule, | 37 : public webrtc::AudioDeviceModule, |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 262 |
264 // Protects variables that are accessed from process_thread_ and | 263 // Protects variables that are accessed from process_thread_ and |
265 // the main thread. | 264 // the main thread. |
266 rtc::CriticalSection crit_; | 265 rtc::CriticalSection crit_; |
267 // Protects |audio_callback_| that is accessed from process_thread_ and | 266 // Protects |audio_callback_| that is accessed from process_thread_ and |
268 // the main thread. | 267 // the main thread. |
269 rtc::CriticalSection crit_callback_; | 268 rtc::CriticalSection crit_callback_; |
270 }; | 269 }; |
271 | 270 |
272 #endif // WEBRTC_API_TEST_FAKEAUDIOCAPTUREMODULE_H_ | 271 #endif // WEBRTC_API_TEST_FAKEAUDIOCAPTUREMODULE_H_ |
OLD | NEW |