Runt
2025-07-27 7b3ecfffc59d2d980d9f7628365b64c20fe015be
LiveProject/views/VideoRendererView.swift
@@ -9,6 +9,7 @@
struct VideoRendererView: UIViewRepresentable {
    @Binding var pixelBuffer: CVPixelBuffer?
    @Binding var rotate:Int?;
    //用 Coordinator 缓存实例
    func makeCoordinator() -> Coordinator {
@@ -24,7 +25,12 @@
            //print("updateUIView")
            context.coordinator.renderer.display(pixelBuffer: buffer)
        }
        if let angle = rotate{
            //print("updateUIView rotate \(angle)")
            context.coordinator.renderer.updateRotate(angle: angle)
        }
    }
    class Coordinator {
        let mtkView: MTKView