videocontenttype [skip ci]

This commit is contained in:
overtake 2021-04-26 18:07:02 +03:00
parent 98849cb5b0
commit 8e2696f4a9
3 changed files with 15 additions and 1 deletions

View File

@ -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

View File

@ -184,6 +184,7 @@ typedef NS_ENUM(int32_t, OngoingGroupCallBroadcastPartStatus) {
};
typedef NS_ENUM(int32_t, OngoingGroupCallVideoContentType) {
OngoingGroupCallVideoContentTypeNone,
OngoingGroupCallVideoContentTypeGeneric,
OngoingGroupCallVideoContentTypeScreencast,
};

View File

@ -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<BroadcastPartTaskImpl>(task);
},
.outgoingAudioBitrateKbit = outgoingAudioBitrateKbit,
.videoContentType = videoContentType == OngoingGroupCallVideoContentTypeGeneric ? tgcalls::VideoContentType::Generic : tgcalls::VideoContentType::Screencast,
.videoContentType = _videoContentType,
.initialEnableNoiseSuppression = enableNoiseSuppression
}));
}