X-Git-Url: https://git.nihav.org/?a=blobdiff_plain;f=nihed-cros-libva%2Fsrc%2Fstatus.rs;h=5dac0bf84765f312d6bb6a56e5d994215294738e;hb=49bf1d79384ecf1b28822101233719fb1c1b29b1;hp=0cf3f5b0596767d44812d12e0905ddd53533691b;hpb=69e6ce021284f1ebaf148b38b236068d08249e0f;p=nihav-player.git diff --git a/nihed-cros-libva/src/status.rs b/nihed-cros-libva/src/status.rs index 0cf3f5b..5dac0bf 100644 --- a/nihed-cros-libva/src/status.rs +++ b/nihed-cros-libva/src/status.rs @@ -132,3 +132,25 @@ impl ConvertStatus for bindings::VAStatus { } } } + +/// Surface status. +#[repr(u32)] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum VASurfaceStatus { + /// Rendering in progress. + Rendering = 1, + /// Displaying in progress (not safe to render into it). + /// + /// This status is useful if surface is used as the source of an overlay. + Displaying = 2, + /// Not being rendered or displayed. + Ready = 3, + /// Indicate a skipped frame during encode. + Skipped = 8, +} + +impl std::fmt::Display for VASurfaceStatus { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self) + } +}