nihed-cros-libva: introduce more enums instead of constants
[nihav-player.git] / nihed-cros-libva / src / display.rs
index 9e7c3e0d91135daf809ba95fb6ed5f2e09fdef6b..171a73347b491102316ea64b25ae10f6c2abac3e 100644 (file)
@@ -12,6 +12,7 @@ use std::rc::Rc;
 use crate::bindings;
 use crate::config::Config;
 use crate::context::Context;
+use crate::formats::{RTFormat, VAFourcc};
 use crate::status::*;
 use crate::surface::Surface;
 use crate::UsageHints;
@@ -230,7 +231,7 @@ impl Display {
     ///
     /// # Arguments
     ///
-    /// * `rt_format` - The desired surface format. See `VA_RT_FORMAT_*`
+    /// * `rt_format` - The desired surface format.
     /// * `va_fourcc` - The desired pixel format (optional). See `VA_FOURCC_*`
     /// * `width` - Width for the create surfaces
     /// * `height` - Height for the created surfaces
@@ -238,8 +239,8 @@ impl Display {
     /// * `num_surfaces` - Number of surfaces to create
     pub fn create_surfaces(
         self: &Rc<Self>,
-        rt_format: u32,
-        va_fourcc: Option<u32>,
+        rt_format: RTFormat,
+        va_fourcc: Option<VAFourcc>,
         width: u32,
         height: u32,
         usage_hints: Option<UsageHints>,