diff --git a/submodules/TelegramVoip/Sources/GroupCallContext.swift b/submodules/TelegramVoip/Sources/GroupCallContext.swift index 6fee46dc47..a0387af49b 100644 --- a/submodules/TelegramVoip/Sources/GroupCallContext.swift +++ b/submodules/TelegramVoip/Sources/GroupCallContext.swift @@ -155,6 +155,7 @@ public final class OngoingGroupCallContext { } public enum VideoContentType { + case none case generic case screencast } @@ -204,6 +205,8 @@ public final class OngoingGroupCallContext { _videoContentType = .generic case .screencast: _videoContentType = .screencast + case .none: + _videoContentType = .none } let videoSources = self.videoSources diff --git a/submodules/TgVoipWebrtc/PublicHeaders/TgVoipWebrtc/OngoingCallThreadLocalContext.h b/submodules/TgVoipWebrtc/PublicHeaders/TgVoipWebrtc/OngoingCallThreadLocalContext.h index 72d4ae5ca4..f27af30947 100644 --- a/submodules/TgVoipWebrtc/PublicHeaders/TgVoipWebrtc/OngoingCallThreadLocalContext.h +++ b/submodules/TgVoipWebrtc/PublicHeaders/TgVoipWebrtc/OngoingCallThreadLocalContext.h @@ -184,6 +184,7 @@ typedef NS_ENUM(int32_t, OngoingGroupCallBroadcastPartStatus) { }; typedef NS_ENUM(int32_t, OngoingGroupCallVideoContentType) { + OngoingGroupCallVideoContentTypeNone, OngoingGroupCallVideoContentTypeGeneric, OngoingGroupCallVideoContentTypeScreencast, }; diff --git a/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm b/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm index 639dd69195..6694d36309 100644 --- a/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm +++ b/submodules/TgVoipWebrtc/Sources/OngoingCallThreadLocalContext.mm @@ -867,6 +867,16 @@ private: _networkStateUpdated = [networkStateUpdated copy]; _videoCapturer = videoCapturer; + tgcalls::VideoContentType _videoContentType; + switch (videoContentType) { + case OngoingGroupCallVideoContentTypeGeneric: + _videoContentType = tgcalls::VideoContentType::Generic; + case OngoingGroupCallVideoContentTypeScreencast: + _videoContentType = tgcalls::VideoContentType::Screencast; + case OngoingGroupCallVideoContentTypeNone: + _videoContentType = tgcalls::VideoContentType::None; + } + __weak GroupCallThreadLocalContext *weakSelf = self; _instance.reset(new tgcalls::GroupInstanceCustomImpl((tgcalls::GroupInstanceDescriptor){ .threads = tgcalls::StaticThreads::getThreads(), @@ -944,7 +954,7 @@ private: return std::make_shared(task); }, .outgoingAudioBitrateKbit = outgoingAudioBitrateKbit, - .videoContentType = videoContentType == OngoingGroupCallVideoContentTypeGeneric ? tgcalls::VideoContentType::Generic : tgcalls::VideoContentType::Screencast, + .videoContentType = _videoContentType, .initialEnableNoiseSuppression = enableNoiseSuppression })); }