]> git.nihav.org Git - nihav-player.git/commitdiff
nihed-cros-libva: update test to the current interface
authorKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 20 Oct 2023 16:33:27 +0000 (18:33 +0200)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Fri, 20 Oct 2023 16:33:27 +0000 (18:33 +0200)
nihed-cros-libva/src/lib.rs

index 511af4c2c3126ea269eb4ebe84e3057b10680186..a095c1c35e69b268195251c003417a989106672f 100644 (file)
@@ -60,7 +60,7 @@ mod tests {
         let height = va_image.height as usize;
 
         // We only support NV12 images
-        assert_eq!(va_image.format.fourcc, u32::from_ne_bytes(*b"NV12"));
+        assert_eq!(va_image.format.fourcc(), Ok(VAFourcc::NV12));
         // Consistency check
         assert_eq!(va_image.num_planes, 2);
 
@@ -103,7 +103,7 @@ mod tests {
             .iter()
             .any(|e| *e == bindings::VAEntrypoint::VAEntrypointVLD));
 
-        let format = bindings::constants::VA_RT_FORMAT_YUV420;
+        let format = RTFormat::YUV420;
         let width = 16;
         let height = 16;
 
@@ -127,7 +127,7 @@ mod tests {
                 None,
                 width,
                 height,
-                Some(UsageHint::USAGE_HINT_DECODER),
+                Some(UsageHint::Decoder.into()),
                 1,
             )
             .unwrap();