Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 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 | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #ifndef WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_TRANSPORT_CAPTURE_H_ | |
|
the sun
2017/04/05 15:49:39
Rename file "audio_device_observer.h"
lliuu
2017/04/05 19:45:46
Done.
| |
| 12 #define WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_TRANSPORT_CAPTURE_H_ | |
| 13 | |
| 14 #include "webrtc/base/refcountedobject.h" | |
|
the sun
2017/04/05 15:49:39
Include scoped_ref_ptr.h instead.
lliuu
2017/04/05 19:45:46
Done.
| |
| 15 #include "webrtc/modules/audio_device/include/audio_device.h" | |
| 16 #include "webrtc/modules/include/module.h" | |
|
the sun
2017/04/05 15:49:39
shouldn't be needed here
lliuu
2017/04/05 19:45:46
Done.
| |
| 17 | |
| 18 namespace webrtc { | |
| 19 | |
| 20 class AudioTransportCapture { | |
|
the sun
2017/04/05 15:49:39
Ah, the name is a bit confusing since "capture" is
lliuu
2017/04/05 19:45:46
Unfortunately AudioDeviceObserver is already taken
the sun
2017/04/06 06:58:37
Doh! <face-palm>
| |
| 21 public: | |
| 22 virtual void CaptureRecordedData(const void* audio_samples, | |
|
the sun
2017/04/05 15:49:39
Rename to "OnCapture", "OnAudioCapture" or "OnCapt
lliuu
2017/04/05 19:45:46
Done.
| |
| 23 const size_t num_samples, | |
| 24 const size_t bytes_per_sample, | |
| 25 const size_t num_channels, | |
| 26 const uint32_t samples_per_sec) = 0; | |
| 27 | |
| 28 virtual void CapturePlayoutData(const void* audio_samples, | |
|
the sun
2017/04/05 15:49:39
Rename to "OnRender", "OnAudioRender" or "OnRender
lliuu
2017/04/05 19:45:46
Done.
| |
| 29 const size_t num_samples, | |
| 30 const size_t bytes_per_sample, | |
| 31 const size_t num_channels, | |
| 32 const uint32_t samples_per_sec) = 0; | |
| 33 | |
| 34 AudioTransportCapture() = default; | |
| 35 virtual ~AudioTransportCapture() = default; | |
| 36 }; | |
| 37 | |
| 38 // Creates an ADM instance with AudioTransportCapture callback. | |
| 39 rtc::scoped_refptr<AudioDeviceModule> CreateAudioDeviceWithTransportCapture( | |
|
the sun
2017/04/05 15:49:39
CreateAudioDeviceWithObserver
lliuu
2017/04/05 19:45:46
Done.
| |
| 40 const int32_t id, | |
| 41 const AudioDeviceModule::AudioLayer audio_layer, | |
| 42 AudioTransportCapture* transport_cb); | |
| 43 | |
| 44 } // namespace webrtc | |
| 45 | |
| 46 #endif // WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_TRANSPORT_CAPTURE_H_ | |
| OLD | NEW |