]> git.nihav.org Git - nihav-player.git/commitdiff
videoplayer: support VP9 VAAPI decoder
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 30 Oct 2026 19:58:09 +0000 (20:58 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 30 Oct 2026 19:58:09 +0000 (20:58 +0100)
videoplayer/src/main.rs

index 6e8f885e44f92e4e47f0605ede524ff53288bfd3..595943cf2197427dbc26c8c739df5fcfe58f9419 100644 (file)
@@ -906,8 +906,12 @@ impl Player {
                 }
                 if video_dec.is_none() && self.play_video {
                     #[cfg(feature="hwaccel")]
-                    if info.get_name() == "h264" && self.use_hwaccel {
-                        let mut dec = new_h264_hwdec();
+                    if matches!(info.get_name(), "h264" | "vp9") && self.use_hwaccel {
+                        let mut dec = match info.get_name() {
+                                "h264" => new_h264_hwdec(),
+                                "vp9" => new_vp9_hwdec(),
+                                _ => unreachable!(),
+                            };
                         let dsupp = Box::new(NADecoderSupport::new());
                         let props = info.get_properties().get_video_info().unwrap();
                         if props.get_width() != 0 {