Update instructions and fix build

This commit is contained in:
isaac 2026-05-01 00:49:47 +02:00
parent ebe43c72c6
commit 2edd2ffea7
9 changed files with 63 additions and 13 deletions

View file

@ -86,6 +86,7 @@ final class ScreencastInProcessIPCContext: ScreencastIPCContext {
enableNoiseSuppression: false,
disableAudioInput: true,
enableSystemMute: false,
useReferenceImpl: false,
prioritizeVP8: false,
logPath: "",
onMutedSpeechActivityDetected: { _ in },

View file

@ -1856,12 +1856,17 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
}
var prioritizeVP8 = false
#if DEBUG && false
prioritizeVP8 = "".isEmpty
#endif
if let data = self.accountContext.currentAppConfiguration.with({ $0 }).data, let value = data["ios_calls_prioritize_vp8"] as? Double {
prioritizeVP8 = value != 0.0
}
var useReferenceImpl = false
#if DEBUG && true
useReferenceImpl = "".isEmpty
#endif
if let data = self.accountContext.currentAppConfiguration.with({ $0 }).data, let value = data["ios_calls_group_reference_impl"] as? Double {
useReferenceImpl = value != 0.0
}
genericCallContext = .call(OngoingGroupCallContext(audioSessionActive: contextAudioSessionActive, video: self.videoCapturer, requestMediaChannelDescriptions: { [weak self] ssrcs, completion in
let disposable = MetaDisposable()
@ -1881,7 +1886,7 @@ public final class PresentationGroupCallImpl: PresentationGroupCall {
self.requestCall(movingFromBroadcastToRtc: false)
}
}
}, outgoingAudioBitrateKbit: outgoingAudioBitrateKbit, videoContentType: self.isVideoEnabled ? .generic : .none, enableNoiseSuppression: false, disableAudioInput: self.isStream, enableSystemMute: self.accountContext.sharedContext.immediateExperimentalUISettings.experimentalCallMute, prioritizeVP8: prioritizeVP8, logPath: allocateCallLogPath(account: self.account), onMutedSpeechActivityDetected: { [weak self] value in
}, outgoingAudioBitrateKbit: outgoingAudioBitrateKbit,videoContentType: self.isVideoEnabled ? .generic : .none, enableNoiseSuppression: false, disableAudioInput: self.isStream, enableSystemMute: self.accountContext.sharedContext.immediateExperimentalUISettings.experimentalCallMute, useReferenceImpl: useReferenceImpl, prioritizeVP8: prioritizeVP8, logPath: allocateCallLogPath(account: self.account), onMutedSpeechActivityDetected: { [weak self] value in
Queue.mainQueue().async {
guard let self else {
return

View file

@ -512,6 +512,7 @@ public final class OngoingGroupCallContext {
enableNoiseSuppression: Bool,
disableAudioInput: Bool,
enableSystemMute: Bool,
useReferenceImpl: Bool,
prioritizeVP8: Bool,
logPath: String,
onMutedSpeechActivityDetected: @escaping (Bool) -> Void,
@ -663,7 +664,8 @@ public final class OngoingGroupCallContext {
return encryptionContext.decrypt(message: data, userId: userId)
}
}
}
},
useReferenceImpl: useReferenceImpl
)
#else
self.context = GroupCallThreadLocalContext(
@ -773,7 +775,8 @@ public final class OngoingGroupCallContext {
return encryptionContext.decrypt(message: data, userId: userId)
}
}
}
},
useReferenceImpl: useReferenceImpl
)
#endif
@ -1223,10 +1226,10 @@ public final class OngoingGroupCallContext {
}
}
public init(inputDeviceId: String = "", outputDeviceId: String = "", audioSessionActive: Signal<Bool, NoError>, video: OngoingCallVideoCapturer?, requestMediaChannelDescriptions: @escaping (Set<UInt32>, @escaping ([MediaChannelDescription]) -> Void) -> Disposable, rejoinNeeded: @escaping () -> Void, outgoingAudioBitrateKbit: Int32?, videoContentType: VideoContentType, enableNoiseSuppression: Bool, disableAudioInput: Bool, enableSystemMute: Bool, prioritizeVP8: Bool, logPath: String, onMutedSpeechActivityDetected: @escaping (Bool) -> Void, isConference: Bool, audioIsActiveByDefault: Bool, isStream: Bool, sharedAudioDevice: OngoingCallContext.AudioDevice?, encryptionContext: OngoingGroupCallEncryptionContext?) {
public init(inputDeviceId: String = "", outputDeviceId: String = "", audioSessionActive: Signal<Bool, NoError>, video: OngoingCallVideoCapturer?, requestMediaChannelDescriptions: @escaping (Set<UInt32>, @escaping ([MediaChannelDescription]) -> Void) -> Disposable, rejoinNeeded: @escaping () -> Void, outgoingAudioBitrateKbit: Int32?, videoContentType: VideoContentType, enableNoiseSuppression: Bool, disableAudioInput: Bool, enableSystemMute: Bool, useReferenceImpl: Bool, prioritizeVP8: Bool, logPath: String, onMutedSpeechActivityDetected: @escaping (Bool) -> Void, isConference: Bool, audioIsActiveByDefault: Bool, isStream: Bool, sharedAudioDevice: OngoingCallContext.AudioDevice?, encryptionContext: OngoingGroupCallEncryptionContext?) {
let queue = self.queue
self.impl = QueueLocalObject(queue: queue, generate: {
return Impl(queue: queue, inputDeviceId: inputDeviceId, outputDeviceId: outputDeviceId, audioSessionActive: audioSessionActive, video: video, requestMediaChannelDescriptions: requestMediaChannelDescriptions, rejoinNeeded: rejoinNeeded, outgoingAudioBitrateKbit: outgoingAudioBitrateKbit, videoContentType: videoContentType, enableNoiseSuppression: enableNoiseSuppression, disableAudioInput: disableAudioInput, enableSystemMute: enableSystemMute, prioritizeVP8: prioritizeVP8, logPath: logPath, onMutedSpeechActivityDetected: onMutedSpeechActivityDetected, isConference: isConference, audioIsActiveByDefault: audioIsActiveByDefault, isStream: isStream, sharedAudioDevice: sharedAudioDevice, encryptionContext: encryptionContext)
return Impl(queue: queue, inputDeviceId: inputDeviceId, outputDeviceId: outputDeviceId, audioSessionActive: audioSessionActive, video: video, requestMediaChannelDescriptions: requestMediaChannelDescriptions, rejoinNeeded: rejoinNeeded, outgoingAudioBitrateKbit: outgoingAudioBitrateKbit, videoContentType: videoContentType, enableNoiseSuppression: enableNoiseSuppression, disableAudioInput: disableAudioInput, enableSystemMute: enableSystemMute, useReferenceImpl: useReferenceImpl, prioritizeVP8: prioritizeVP8, logPath: logPath, onMutedSpeechActivityDetected: onMutedSpeechActivityDetected, isConference: isConference, audioIsActiveByDefault: audioIsActiveByDefault, isStream: isStream, sharedAudioDevice: sharedAudioDevice, encryptionContext: encryptionContext)
})
}

View file

@ -458,7 +458,8 @@ onMutedSpeechActivityDetected:(void (^ _Nullable)(bool))onMutedSpeechActivityDet
audioDevice:(SharedCallAudioDevice * _Nullable)audioDevice
isConference:(bool)isConference
isActiveByDefault:(bool)isActiveByDefault
encryptDecrypt:(NSData * _Nullable (^ _Nullable)(NSData * _Nonnull, int64_t, bool, int32_t))encryptDecrypt;
encryptDecrypt:(NSData * _Nullable (^ _Nullable)(NSData * _Nonnull, int64_t, bool, int32_t))encryptDecrypt
useReferenceImpl:(bool)useReferenceImpl;
- (void)stop:(void (^ _Nullable)())completion;

View file

@ -34,6 +34,7 @@
#import "group/GroupInstanceImpl.h"
#import "group/GroupInstanceCustomImpl.h"
#import "group/GroupInstanceReferenceImpl.h"
#import "VideoCaptureInterfaceImpl.h"
@ -2388,7 +2389,8 @@ onMutedSpeechActivityDetected:(void (^ _Nullable)(bool))onMutedSpeechActivityDet
audioDevice:(SharedCallAudioDevice * _Nullable)audioDevice
isConference:(bool)isConference
isActiveByDefault:(bool)isActiveByDefault
encryptDecrypt:(NSData * _Nullable (^ _Nullable)(NSData * _Nonnull, int64_t, bool, int32_t))encryptDecrypt {
encryptDecrypt:(NSData * _Nullable (^ _Nullable)(NSData * _Nonnull, int64_t, bool, int32_t))encryptDecrypt
useReferenceImpl:(bool)useReferenceImpl {
self = [super init];
if (self != nil) {
_queue = queue;
@ -2471,7 +2473,7 @@ encryptDecrypt:(NSData * _Nullable (^ _Nullable)(NSData * _Nonnull, int64_t, boo
}
__weak GroupCallThreadLocalContext *weakSelf = self;
_instance.reset(new tgcalls::GroupInstanceCustomImpl((tgcalls::GroupInstanceDescriptor){
tgcalls::GroupInstanceDescriptor descriptor = (tgcalls::GroupInstanceDescriptor){
.threads = tgcalls::StaticThreads::getThreads(),
.config = config,
.statsLogPath = statsLogPathValue,
@ -2699,7 +2701,12 @@ encryptDecrypt:(NSData * _Nullable (^ _Nullable)(NSData * _Nonnull, int64_t, boo
},
.e2eEncryptDecrypt = mappedEncryptDecrypt,
.isConference = isConference
}));
};
if (useReferenceImpl) {
_instance.reset(new tgcalls::GroupInstanceReferenceImpl(std::move(descriptor)));
} else {
_instance.reset(new tgcalls::GroupInstanceCustomImpl(std::move(descriptor)));
}
}
return self;
}