mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-02 00:17:02 +00:00
macos related changes
This commit is contained in:
parent
471bebc907
commit
d8332b0d83
@ -392,7 +392,7 @@ public final class OngoingGroupCallContext {
|
|||||||
public let mirrorHorizontally: Bool
|
public let mirrorHorizontally: Bool
|
||||||
public let mirrorVertically: Bool
|
public let mirrorVertically: Bool
|
||||||
|
|
||||||
init(frameData: CallVideoFrameData) {
|
public init(frameData: CallVideoFrameData) {
|
||||||
if let nativeBuffer = frameData.buffer as? CallVideoFrameNativePixelBuffer {
|
if let nativeBuffer = frameData.buffer as? CallVideoFrameNativePixelBuffer {
|
||||||
if CVPixelBufferGetPixelFormatType(nativeBuffer.pixelBuffer) == kCVPixelFormatType_32ARGB {
|
if CVPixelBufferGetPixelFormatType(nativeBuffer.pixelBuffer) == kCVPixelFormatType_32ARGB {
|
||||||
self.buffer = .argb(NativeBuffer(pixelBuffer: nativeBuffer.pixelBuffer))
|
self.buffer = .argb(NativeBuffer(pixelBuffer: nativeBuffer.pixelBuffer))
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import Cocoa
|
import Cocoa
|
||||||
import TgVoipWebrtc
|
import TgVoipWebrtc
|
||||||
|
import SwiftSignalKit
|
||||||
|
|
||||||
|
|
||||||
public enum OngoingCallVideoOrientation {
|
public enum OngoingCallVideoOrientation {
|
||||||
@ -79,6 +79,25 @@ public final class OngoingCallVideoCapturer {
|
|||||||
self.impl = OngoingCallThreadLocalContextVideoCapturer(deviceId: deviceId, keepLandscape: keepLandscape)
|
self.impl = OngoingCallThreadLocalContextVideoCapturer(deviceId: deviceId, keepLandscape: keepLandscape)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public func video() -> Signal<OngoingGroupCallContext.VideoFrameData, NoError> {
|
||||||
|
return Signal { [weak self] subscriber in
|
||||||
|
let disposable = MetaDisposable()
|
||||||
|
|
||||||
|
guard let strongSelf = self else {
|
||||||
|
return disposable
|
||||||
|
}
|
||||||
|
let innerDisposable = strongSelf.impl.addVideoOutput({ videoFrameData in
|
||||||
|
subscriber.putNext(OngoingGroupCallContext.VideoFrameData(frameData: videoFrameData))
|
||||||
|
})
|
||||||
|
disposable.set(ActionDisposable {
|
||||||
|
innerDisposable.dispose()
|
||||||
|
})
|
||||||
|
|
||||||
|
return disposable
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public func makeOutgoingVideoView(completion: @escaping (OngoingCallContextPresentationCallVideoView?) -> Void) {
|
public func makeOutgoingVideoView(completion: @escaping (OngoingCallContextPresentationCallVideoView?) -> Void) {
|
||||||
self.impl.makeOutgoingVideoView(false, completion: { view, _ in
|
self.impl.makeOutgoingVideoView(false, completion: { view, _ in
|
||||||
if let view = view {
|
if let view = view {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user