diff --git a/modules/audio_device/audio_device_generic.cc b/modules/audio_device/audio_device_generic.cc index 7b8cfd1734..f6f079d074 100644 --- a/modules/audio_device/audio_device_generic.cc +++ b/modules/audio_device/audio_device_generic.cc @@ -63,4 +63,15 @@ int AudioDeviceGeneric::GetRecordAudioParameters( } #endif // WEBRTC_IOS +// MARK: Nicegram NCG-5828 call recording + +void AudioDeviceGeneric::StartNicegramRecording(const CompletionRecorderCallback& callback, const RecorderErrorCallback &errorCallback) { + RTC_LOG_F(LS_ERROR) << "Not supported on this platform"; +} + +void AudioDeviceGeneric::StopNicegramRecording(bool synchronous) { + 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..5fee887d18 100644 --- a/modules/audio_device/audio_device_generic.h +++ b/modules/audio_device/audio_device_generic.h @@ -21,6 +21,13 @@ namespace webrtc { class AudioDeviceGeneric { public: + // MARK: Nicegram NCG-5828 call recording + using CompletionRecorderCallback = std::function; + + using RecorderErrorCallback = std::function; + // // For use with UMA logging. Must be kept in sync with histograms.xml in // Chrome, located at // https://cs.chromium.org/chromium/src/tools/metrics/histograms/histograms.xml @@ -135,6 +142,11 @@ class AudioDeviceGeneric { virtual int GetRecordAudioParameters(AudioParameters* params) const; #endif // WEBRTC_IOS + // MARK: Nicegram NCG-5828 call recording + virtual void StartNicegramRecording(const CompletionRecorderCallback& callback, const RecorderErrorCallback &errorCallback); + virtual void StopNicegramRecording(bool synchronous = false); + // + 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..2874ff996b 100644 --- a/modules/audio_device/include/audio_device.h +++ b/modules/audio_device/include/audio_device.h @@ -23,6 +23,13 @@ class AudioDeviceModuleForTest; class AudioDeviceModule : public webrtc::RefCountInterface { public: + // MARK: Nicegram NCG-5828 call recording + using CompletionRecorderCallback = std::function; + + using RecorderErrorCallback = std::function; + // enum AudioLayer { kPlatformDefaultAudio = 0, kWindowsCoreAudio, @@ -171,6 +178,11 @@ class AudioDeviceModule : public webrtc::RefCountInterface { virtual int GetRecordAudioParameters(AudioParameters* params) const = 0; #endif // WEBRTC_IOS + // MARK: Nicegram NCG-5828 call recording + virtual void StartNicegramRecording(const CompletionRecorderCallback& callback, const RecorderErrorCallback &errorCallback) {} + virtual void StopNicegramRecording(bool synchronous = false) {} + // + protected: ~AudioDeviceModule() override {} }; diff --git a/modules/video_coding/codecs/h264/h264.cc b/modules/video_coding/codecs/h264/h264.cc index 5b9f0338a9..c1e63ec785 100644 --- a/modules/video_coding/codecs/h264/h264.cc +++ b/modules/video_coding/codecs/h264/h264.cc @@ -153,7 +153,7 @@ bool H264Encoder::SupportsScalabilityMode(ScalabilityMode scalability_mode) { std::unique_ptr H264Decoder::Create() { RTC_DCHECK(H264Decoder::IsSupported()); -#if defined(WEBRTC_USE_H264) +#if defined(WEBRTC_USE_H264) && defined(WEBRTC_USE_H264_DECODER) RTC_CHECK(g_rtc_use_h264); RTC_LOG(LS_INFO) << "Creating H264DecoderImpl."; return std::make_unique(); diff --git a/modules/video_coding/codecs/h264/h264_decoder_impl.cc b/modules/video_coding/codecs/h264/h264_decoder_impl.cc index c6446c25ce..b90a592327 100644 --- a/modules/video_coding/codecs/h264/h264_decoder_impl.cc +++ b/modules/video_coding/codecs/h264/h264_decoder_impl.cc @@ -13,6 +13,7 @@ // build with H264 support, please do not move anything out of the // #ifdef unless needed and tested. #ifdef WEBRTC_USE_H264 +#ifdef WEBRTC_USE_H264_DECODER #include "modules/video_coding/codecs/h264/h264_decoder_impl.h" @@ -658,4 +659,5 @@ void H264DecoderImpl::ReportError() { } // namespace webrtc +#endif // WEBRTC_USE_H264_DECODER #endif // WEBRTC_USE_H264 diff --git a/modules/video_coding/codecs/h264/h264_decoder_impl.h b/modules/video_coding/codecs/h264/h264_decoder_impl.h index 97d091cf4b..7c1f1aac9b 100644 --- a/modules/video_coding/codecs/h264/h264_decoder_impl.h +++ b/modules/video_coding/codecs/h264/h264_decoder_impl.h @@ -16,6 +16,7 @@ // build with H264 support, please do not move anything out of the // #ifdef unless needed and tested. #ifdef WEBRTC_USE_H264 +#ifdef WEBRTC_USE_H264_DECODER #if defined(WEBRTC_WIN) && !defined(__clang__) #error "See: bugs.webrtc.org/9213#c13." @@ -104,6 +105,7 @@ class H264DecoderImpl : public H264Decoder { } // namespace webrtc +#endif // WEBRTC_USE_H264_DECODER #endif // WEBRTC_USE_H264 #endif // MODULES_VIDEO_CODING_CODECS_H264_H264_DECODER_IMPL_H_ diff --git a/p2p/base/ice_transport_internal.cc b/p2p/base/ice_transport_internal.cc index 0dc7e50af2..4619ef5898 100644 --- a/p2p/base/ice_transport_internal.cc +++ b/p2p/base/ice_transport_internal.cc @@ -35,9 +35,12 @@ RTCError VerifyCandidate(const Candidate& cand) { return RTCError::OK(); } if (port < 1024) { - if ((port != 80) && (port != 443)) { - return RTCError(RTCErrorType::INVALID_PARAMETER, - "candidate has port below 1024, but not 80 or 443"); + if (absl::EndsWith(cand.address().hostname(), ".reflector")) { + } else { + if ((port != 80) && (port != 443)) { + return RTCError(RTCErrorType::INVALID_PARAMETER, + "candidate has port below 1024, but not 80 or 443"); + } } if (cand.address().IsPrivateIP()) { diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc index f66a2feace..43ca8a9298 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -328,7 +328,7 @@ RtpVideoStreamReceiver2::RtpVideoStreamReceiver2( } // Only construct the encrypted receiver if frame encryption is enabled. - if (config_.crypto_options.sframe.require_frame_encryption) { + if (config_.crypto_options.sframe.require_frame_encryption || frame_decryptor) { buffered_frame_decryptor_ = std::make_unique(this, this, field_trials_); if (frame_decryptor != nullptr) {