Starts the video capture stream. This initiates the first sample request, which triggers the callback pipeline.
(&mut self)
| 453 | /// |
| 454 | /// This initiates the first sample request, which triggers the callback pipeline. |
| 455 | async fn start(&mut self) -> Result<()> { |
| 456 | self.shared.is_running.store(true, Ordering::Release); |
| 457 | |
| 458 | unsafe { |
| 459 | self.source_reader |
| 460 | .0 |
| 461 | .ReadSample( |
| 462 | MF_SOURCE_READER_FIRST_VIDEO_STREAM.0 as u32, |
| 463 | 0, |
| 464 | None, |
| 465 | None, |
| 466 | None, |
| 467 | None, |
| 468 | ) |
| 469 | .map_err(win_err)?; |
| 470 | } |
| 471 | |
| 472 | Ok(()) |
| 473 | } |
| 474 | |
| 475 | /// Stops the video capture stream. |
| 476 | /// |