| 182 | } |
| 183 | |
| 184 | pub struct MsmfStream { |
| 185 | /// Source reader for the media source (Arc for sharing with callback). |
| 186 | source_reader: Arc<SendableSourceReader>, |
| 187 | |
| 188 | /// Shared state with the callback. |
| 189 | shared: Arc<SharedState>, |
| 190 | |
| 191 | /// Linear buffer for frame data. |
| 192 | linear_buffer: Vec<u8>, |
| 193 | |
| 194 | /// Frame width in pixels. |
| 195 | width: u32, |
| 196 | |
| 197 | /// Frame height in pixels. |
| 198 | height: u32, |
| 199 | |
| 200 | /// Pixel format of the captured frames. |
| 201 | format: PixelFormat, |
| 202 | |
| 203 | /// Number of bytes per row in the frame. |
| 204 | line_width_bytes: usize, |
| 205 | |
| 206 | /// Monotonically increasing frame sequence number. |
| 207 | sequence: u64, |
| 208 | |
| 209 | /// Clock synchronizer for timestamp correction. |
| 210 | clock_sync: ClockSynchronizer, |
| 211 | } |
| 212 | |
| 213 | impl MsmfStream { |
| 214 | pub fn new(media_source: &IMFMediaSource, fmt: NegotiatedFormat) -> Result<Self> { |
nothing calls this directly
no outgoing calls
no test coverage detected