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..a848ecb0c7d246a84118d01bbfb938afcbc3aee2 |
| --- /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_ |
| +#define WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_TRANSPORT_CAPTURE_H_ |
| + |
| +#include "webrtc/base/refcountedobject.h" |
| +#include "webrtc/modules/audio_device/include/audio_device.h" |
| +#include "webrtc/modules/include/module.h" |
| + |
| +namespace webrtc { |
| + |
| +class AudioTransportCapture { |
| + public: |
| + virtual void CaptureRecordedData( |
| + const void* audioSamples, const size_t nSamples, |
|
henrika_webrtc
2017/03/23 09:02:42
Can't we use new notation in this interface?
audio
lliuu
2017/03/24 00:12:58
Acknowledged.
|
| + const size_t nBytesPerSample, const size_t nChannels, |
| + const uint32_t samplesPerSec) = 0; |
| + |
| + virtual void CapturePlayoutData( |
| + const void* audioSamples, const size_t nSamples, |
| + const size_t nBytesPerSample, const size_t nChannels, |
| + const uint32_t samplesPerSec) = 0; |
| + |
| + AudioTransportCapture() = default; |
| + virtual ~AudioTransportCapture() = default; |
| +}; |
| + |
| +// Creates an ADM instance with AudioTransportCapture callback. |
| +rtc::scoped_refptr<AudioDeviceModule> |
| + CreateAudioDeviceWithTransportCapture( |
| + const int32_t id, |
| + const AudioDeviceModule::AudioLayer audio_layer, |
| + AudioTransportCapture* transport_cb); |
| + |
| +} // namespace webrtc |
| + |
| +#endif // WEBRTC_MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_TRANSPORT_CAPTURE_H_ |
| + |