Chromium Code Reviews| Index: webrtc/modules/audio_device/include/audio_transport_capture.h |
| diff --git a/webrtc/modules/audio_device/include/audio_transport_capture.h b/webrtc/modules/audio_device/include/audio_transport_capture.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ccd5d3c222c6a41a2841b8e9c15facea28905e3c |
| --- /dev/null |
| +++ b/webrtc/modules/audio_device/include/audio_transport_capture.h |
| @@ -0,0 +1,46 @@ |
| +/* |
| + * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
| + * |
| + * Use of this source code is governed by a BSD-style license |
| + * that can be found in the LICENSE file in the root of the source |
| + * tree. An additional intellectual property rights grant can be found |
| + * in the file PATENTS. All contributing project authors may |
| + * be found in the AUTHORS file in the root of the source tree. |
| + */ |
| + |
| +#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.
|
| +#define WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_TRANSPORT_CAPTURE_H_ |
| + |
| +#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.
|
| +#include "webrtc/modules/audio_device/include/audio_device.h" |
| +#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.
|
| + |
| +namespace webrtc { |
| + |
| +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>
|
| + public: |
| + 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.
|
| + const size_t num_samples, |
| + const size_t bytes_per_sample, |
| + const size_t num_channels, |
| + const uint32_t samples_per_sec) = 0; |
| + |
| + 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.
|
| + const size_t num_samples, |
| + const size_t bytes_per_sample, |
| + const size_t num_channels, |
| + const uint32_t samples_per_sec) = 0; |
| + |
| + AudioTransportCapture() = default; |
| + virtual ~AudioTransportCapture() = default; |
| +}; |
| + |
| +// Creates an ADM instance with AudioTransportCapture callback. |
| +rtc::scoped_refptr<AudioDeviceModule> CreateAudioDeviceWithTransportCapture( |
|
the sun
2017/04/05 15:49:39
CreateAudioDeviceWithObserver
lliuu
2017/04/05 19:45:46
Done.
|
| + const int32_t id, |
| + const AudioDeviceModule::AudioLayer audio_layer, |
| + AudioTransportCapture* transport_cb); |
| + |
| +} // namespace webrtc |
| + |
| +#endif // WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_TRANSPORT_CAPTURE_H_ |