Implement screencasting

This commit is contained in:
Ali
2021-05-04 22:29:03 +04:00
parent e0afab1f4a
commit 549e3642d5
33 changed files with 1461 additions and 462 deletions

View File

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