mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
face9da02b
Fixed a bug where the scroll to bottom button wasn't working Fixed an issue where searching was running on the main thread (which could cause UI issues) Updated the searching to interrupt the previous query when the search term changes Updated the in-conversation settings to be use the new config-based approach (deleted the OWSConversationSettingsViewController)
24 lines
1 KiB
Swift
24 lines
1 KiB
Swift
import WebRTC
|
|
|
|
extension CallVC : CameraManagerDelegate {
|
|
|
|
func handleVideoOutputCaptured(sampleBuffer: CMSampleBuffer) {
|
|
guard let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else { return }
|
|
|
|
let rtcPixelBuffer = RTCCVPixelBuffer(pixelBuffer: pixelBuffer)
|
|
let timestamp = CMTimeGetSeconds(CMSampleBufferGetPresentationTimeStamp(sampleBuffer))
|
|
let timestampNs = Int64(timestamp * 1000000000)
|
|
let rotation: RTCVideoRotation = {
|
|
switch UIDevice.current.orientation {
|
|
case .landscapeRight: return RTCVideoRotation._90
|
|
case .portraitUpsideDown: return RTCVideoRotation._180
|
|
case .landscapeLeft: return RTCVideoRotation._270
|
|
default: return RTCVideoRotation._0
|
|
}
|
|
}()
|
|
|
|
let frame = RTCVideoFrame(buffer: rtcPixelBuffer, rotation: rotation, timeStampNs: timestampNs)
|
|
frame.timeStamp = Int32(timestamp)
|
|
call.webRTCSession.handleLocalFrameCaptured(frame)
|
|
}
|
|
}
|