| 47 | // --------------------------------------------------------------------------- |
| 48 | |
| 49 | pub struct AvfStream { |
| 50 | /// 核心采集会话(必须持有以维持引用计数) |
| 51 | session: Retained<AVCaptureSession>, |
| 52 | /// Delegate(必须持有) |
| 53 | _delegate: Retained<CaptureDelegate>, |
| 54 | /// 输入设备(必须持有) |
| 55 | _input: Retained<AVCaptureDeviceInput>, |
| 56 | /// 输出(必须持有) |
| 57 | _output: Retained<AVCaptureVideoDataOutput>, |
| 58 | |
| 59 | /// 帧数据接收端 |
| 60 | receiver: Receiver<AvfFrameData>, |
| 61 | /// 当前帧(借用给 Frame<'_> 时使用) |
| 62 | current_frame: Option<AvfFrameData>, |
| 63 | |
| 64 | /// 采集状态标志 |
| 65 | is_streaming: bool, |
| 66 | } |
| 67 | |
| 68 | /// # Safety |
| 69 | /// AVCapture 对象由 AVFoundation 内部线程安全地管理; |
nothing calls this directly
no outgoing calls
no test coverage detected