macOS AVFoundation camera backend. macOS AVFoundation 摄像头后端。
| 89 | /// macOS AVFoundation camera backend. |
| 90 | /// macOS AVFoundation 摄像头后端。 |
| 91 | pub(crate) struct AvfBackend { |
| 92 | /// Opaque handle to the ObjC session. `null` before `open()`. |
| 93 | /// ObjC 会话的不透明句柄。`open()` 前为 null。 |
| 94 | cam: *mut sys::AvfCameraOpaque, |
| 95 | |
| 96 | /// Owned buffer for the current frame's BGRA32 pixel data. |
| 97 | /// Borrowed by the `RawFrame<'_>` returned from `dequeue()`. |
| 98 | /// |
| 99 | /// 当前帧 BGRA32 像素数据的所有缓冲区。 |
| 100 | /// 由 `dequeue()` 返回的 `RawFrame<'_>` 借用。 |
| 101 | frame_buf: Vec<u8>, |
| 102 | } |
| 103 | |
| 104 | /// # Safety |
| 105 | /// `cam` is an opaque C pointer accessed only from one thread at a time. |
nothing calls this directly
no outgoing calls
no test coverage detected