From 85fab70fcbd47a1dbc39f33b43c543fad34e0352 Mon Sep 17 00:00:00 2001 From: "andrei.haladok" Date: Tue, 10 Sep 2024 11:37:51 +0200 Subject: [PATCH] NCG-5940: added interface for call recording --- modules/audio_device/audio_device_generic.cc | 18 ++++++++++++++++++ modules/audio_device/audio_device_generic.h | 7 +++++++ modules/audio_device/include/audio_device.h | 7 +++++++ 3 files changed, 32 insertions(+) diff --git a/modules/audio_device/audio_device_generic.cc b/modules/audio_device/audio_device_generic.cc index 7b8cfd1734..19918ba52d 100644 --- a/modules/audio_device/audio_device_generic.cc +++ b/modules/audio_device/audio_device_generic.cc @@ -63,4 +63,22 @@ int AudioDeviceGeneric::GetRecordAudioParameters( } #endif // WEBRTC_IOS +// MARK: Nicegram NCG-5828 call recording +void AudioDeviceGeneric::InitNicegramCallRecording() { + RTC_LOG_F(LS_ERROR) << "Not supported on this platform"; +} + +void AudioDeviceGeneric::SetRecordOutputFolder(const std::string& path) { + RTC_LOG_F(LS_ERROR) << "Not supported on this platform"; +} + +void AudioDeviceGeneric::StartNicegramRecording() { + RTC_LOG_F(LS_ERROR) << "Not supported on this platform"; +} + +void AudioDeviceGeneric::StopNicegramRecording() { + RTC_LOG_F(LS_ERROR) << "Not supported on this platform"; +} +// + } // namespace webrtc diff --git a/modules/audio_device/audio_device_generic.h b/modules/audio_device/audio_device_generic.h index 41e24eb3b0..d30c2c5886 100644 --- a/modules/audio_device/audio_device_generic.h +++ b/modules/audio_device/audio_device_generic.h @@ -135,6 +135,13 @@ class AudioDeviceGeneric { virtual int GetRecordAudioParameters(AudioParameters* params) const; #endif // WEBRTC_IOS + // MARK: Nicegram NCG-5828 call recording + virtual void InitNicegramCallRecording(); + virtual void SetRecordOutputFolder(const std::string& path); + virtual void StartNicegramRecording(); + virtual void StopNicegramRecording(); + // + virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) = 0; virtual ~AudioDeviceGeneric() {} diff --git a/modules/audio_device/include/audio_device.h b/modules/audio_device/include/audio_device.h index 47d2aecfa7..d47d975822 100644 --- a/modules/audio_device/include/audio_device.h +++ b/modules/audio_device/include/audio_device.h @@ -171,6 +171,13 @@ class AudioDeviceModule : public webrtc::RefCountInterface { virtual int GetRecordAudioParameters(AudioParameters* params) const = 0; #endif // WEBRTC_IOS + // MARK: Nicegram NCG-5828 call recording + virtual void InitNicegramCallRecording() {} + virtual void SetRecordOutputFolder(const std::string& path) {} + virtual void StartNicegramRecording() {} + virtual void StopNicegramRecording() {} + // + protected: ~AudioDeviceModule() override {} };