Various improvements

This commit is contained in:
Ilya Laktyushin
2025-11-05 20:25:07 +04:00
parent 16cd9b3c29
commit bda836f032
5 changed files with 77 additions and 34 deletions

View File

@@ -110,7 +110,8 @@ final class LiveStreamMediaSource {
kCVPixelBufferPoolMinimumBufferCountKey as String: 3 as NSNumber
]
let pixelBufferOptions: [String: Any] = [
kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA as NSNumber,
//kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32BGRA as NSNumber,
kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange as NSNumber,
kCVPixelBufferWidthKey as String: UInt32(width),
kCVPixelBufferHeightKey as String: UInt32(height)
]
@@ -168,7 +169,8 @@ final class LiveStreamMediaSource {
outputDimensions: CGSize(width: 720.0, height: 1280.0),
textScale: 1.0,
videoDuration: nil,
additionalVideoDuration: nil
additionalVideoDuration: nil,
outputsYuvBuffers: true
)
self.mainVideoOutput = CameraVideoOutput(sink: { [weak self] buffer, mirror in