mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Implement screencasting
This commit is contained in:
@@ -335,8 +335,12 @@ extension OngoingCallThreadLocalContext: OngoingCallThreadLocalContextProtocol {
|
||||
public final class OngoingCallVideoCapturer {
|
||||
internal let impl: OngoingCallThreadLocalContextVideoCapturer
|
||||
|
||||
public init(keepLandscape: Bool = false) {
|
||||
self.impl = OngoingCallThreadLocalContextVideoCapturer(deviceId: "", keepLandscape: keepLandscape)
|
||||
public init(keepLandscape: Bool = false, isCustom: Bool = false) {
|
||||
if isCustom {
|
||||
self.impl = OngoingCallThreadLocalContextVideoCapturer.withExternalSampleBufferProvider()
|
||||
} else {
|
||||
self.impl = OngoingCallThreadLocalContextVideoCapturer(deviceId: "", keepLandscape: keepLandscape)
|
||||
}
|
||||
}
|
||||
|
||||
public func switchVideoInput(isFront: Bool) {
|
||||
@@ -383,6 +387,14 @@ public final class OngoingCallVideoCapturer {
|
||||
public func setIsVideoEnabled(_ value: Bool) {
|
||||
self.impl.setIsVideoEnabled(value)
|
||||
}
|
||||
|
||||
public func injectSampleBuffer(_ sampleBuffer: CMSampleBuffer) {
|
||||
self.impl.submitSampleBuffer(sampleBuffer)
|
||||
}
|
||||
|
||||
public func injectPixelBuffer(_ pixelBuffer: CVPixelBuffer) {
|
||||
self.impl.submitPixelBuffer(pixelBuffer)
|
||||
}
|
||||
}
|
||||
|
||||
extension OngoingCallThreadLocalContextWebrtc: OngoingCallThreadLocalContextProtocol {
|
||||
|
||||
Reference in New Issue
Block a user