()
| 27 | static FFMPEG_INIT: Once = Once::new(); |
| 28 | |
| 29 | fn ensure_ffmpeg_initialized() { |
| 30 | FFMPEG_INIT.call_once(|| { |
| 31 | if let Err(e) = ffmpeg::init() { |
| 32 | eprintln!("ffmpeg init failed: {e}"); |
| 33 | } |
| 34 | ffmpeg::util::log::set_level(ffmpeg::util::log::Level::Error); |
| 35 | }); |
| 36 | } |
| 37 | |
| 38 | pub(crate) struct VideoContext { |
| 39 | video_player: Option<VideoPlayer>, |