// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use glib::translate::*;
use glib::value::FromValue;
use glib::value::FromValueOptional;
use glib::value::SetValue;
use glib::value::Value;
use glib::StaticType;
use glib::Type;
use gobject_sys;
use gst_video_sys;

#[cfg(any(feature = "v1_18", feature = "dox"))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoAFDSpec {
    DvbEtsi,
    AtscA53,
    SmpteSt20161,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
#[doc(hidden)]
impl ToGlib for VideoAFDSpec {
    type GlibType = gst_video_sys::GstVideoAFDSpec;

    fn to_glib(&self) -> gst_video_sys::GstVideoAFDSpec {
        match *self {
            VideoAFDSpec::DvbEtsi => gst_video_sys::GST_VIDEO_AFD_SPEC_DVB_ETSI,
            VideoAFDSpec::AtscA53 => gst_video_sys::GST_VIDEO_AFD_SPEC_ATSC_A53,
            VideoAFDSpec::SmpteSt20161 => gst_video_sys::GST_VIDEO_AFD_SPEC_SMPTE_ST2016_1,
            VideoAFDSpec::__Unknown(value) => value,
        }
    }
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoAFDSpec> for VideoAFDSpec {
    fn from_glib(value: gst_video_sys::GstVideoAFDSpec) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoAFDSpec::DvbEtsi,
            1 => VideoAFDSpec::AtscA53,
            2 => VideoAFDSpec::SmpteSt20161,
            value => VideoAFDSpec::__Unknown(value),
        }
    }
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
impl StaticType for VideoAFDSpec {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_afd_spec_get_type()) }
    }
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
impl<'a> FromValueOptional<'a> for VideoAFDSpec {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
impl<'a> FromValue<'a> for VideoAFDSpec {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
impl SetValue for VideoAFDSpec {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoAFDValue {
    Unavailable,
    _169TopAligned,
    _149TopAligned,
    GreaterThan169,
    _43Full169Full,
    _43Full43Pillar,
    _169Letter169Full,
    _149Letter149Pillar,
    _43Full149Center,
    _169Letter149Center,
    _169Letter43Center,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
#[doc(hidden)]
impl ToGlib for VideoAFDValue {
    type GlibType = gst_video_sys::GstVideoAFDValue;

    fn to_glib(&self) -> gst_video_sys::GstVideoAFDValue {
        match *self {
            VideoAFDValue::Unavailable => gst_video_sys::GST_VIDEO_AFD_UNAVAILABLE,
            VideoAFDValue::_169TopAligned => gst_video_sys::GST_VIDEO_AFD_16_9_TOP_ALIGNED,
            VideoAFDValue::_149TopAligned => gst_video_sys::GST_VIDEO_AFD_14_9_TOP_ALIGNED,
            VideoAFDValue::GreaterThan169 => gst_video_sys::GST_VIDEO_AFD_GREATER_THAN_16_9,
            VideoAFDValue::_43Full169Full => gst_video_sys::GST_VIDEO_AFD_4_3_FULL_16_9_FULL,
            VideoAFDValue::_43Full43Pillar => gst_video_sys::GST_VIDEO_AFD_4_3_FULL_4_3_PILLAR,
            VideoAFDValue::_169Letter169Full => gst_video_sys::GST_VIDEO_AFD_16_9_LETTER_16_9_FULL,
            VideoAFDValue::_149Letter149Pillar => {
                gst_video_sys::GST_VIDEO_AFD_14_9_LETTER_14_9_PILLAR
            }
            VideoAFDValue::_43Full149Center => gst_video_sys::GST_VIDEO_AFD_4_3_FULL_14_9_CENTER,
            VideoAFDValue::_169Letter149Center => {
                gst_video_sys::GST_VIDEO_AFD_16_9_LETTER_14_9_CENTER
            }
            VideoAFDValue::_169Letter43Center => {
                gst_video_sys::GST_VIDEO_AFD_16_9_LETTER_4_3_CENTER
            }
            VideoAFDValue::__Unknown(value) => value,
        }
    }
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoAFDValue> for VideoAFDValue {
    fn from_glib(value: gst_video_sys::GstVideoAFDValue) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoAFDValue::Unavailable,
            2 => VideoAFDValue::_169TopAligned,
            3 => VideoAFDValue::_149TopAligned,
            4 => VideoAFDValue::GreaterThan169,
            8 => VideoAFDValue::_43Full169Full,
            9 => VideoAFDValue::_43Full43Pillar,
            10 => VideoAFDValue::_169Letter169Full,
            11 => VideoAFDValue::_149Letter149Pillar,
            13 => VideoAFDValue::_43Full149Center,
            14 => VideoAFDValue::_169Letter149Center,
            15 => VideoAFDValue::_169Letter43Center,
            value => VideoAFDValue::__Unknown(value),
        }
    }
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
impl StaticType for VideoAFDValue {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_afd_value_get_type()) }
    }
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
impl<'a> FromValueOptional<'a> for VideoAFDValue {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
impl<'a> FromValue<'a> for VideoAFDValue {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

#[cfg(any(feature = "v1_18", feature = "dox"))]
impl SetValue for VideoAFDValue {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoAlphaMode {
    Copy,
    Set,
    Mult,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoAlphaMode {
    type GlibType = gst_video_sys::GstVideoAlphaMode;

    fn to_glib(&self) -> gst_video_sys::GstVideoAlphaMode {
        match *self {
            VideoAlphaMode::Copy => gst_video_sys::GST_VIDEO_ALPHA_MODE_COPY,
            VideoAlphaMode::Set => gst_video_sys::GST_VIDEO_ALPHA_MODE_SET,
            VideoAlphaMode::Mult => gst_video_sys::GST_VIDEO_ALPHA_MODE_MULT,
            VideoAlphaMode::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoAlphaMode> for VideoAlphaMode {
    fn from_glib(value: gst_video_sys::GstVideoAlphaMode) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoAlphaMode::Copy,
            1 => VideoAlphaMode::Set,
            2 => VideoAlphaMode::Mult,
            value => VideoAlphaMode::__Unknown(value),
        }
    }
}

impl StaticType for VideoAlphaMode {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_alpha_mode_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoAlphaMode {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoAlphaMode {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoAlphaMode {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[cfg(any(feature = "v1_16", feature = "dox"))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoCaptionType {
    Unknown,
    Cea608Raw,
    Cea608S3341a,
    Cea708Raw,
    Cea708Cdp,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(any(feature = "v1_16", feature = "dox"))]
#[doc(hidden)]
impl ToGlib for VideoCaptionType {
    type GlibType = gst_video_sys::GstVideoCaptionType;

    fn to_glib(&self) -> gst_video_sys::GstVideoCaptionType {
        match *self {
            VideoCaptionType::Unknown => gst_video_sys::GST_VIDEO_CAPTION_TYPE_UNKNOWN,
            VideoCaptionType::Cea608Raw => gst_video_sys::GST_VIDEO_CAPTION_TYPE_CEA608_RAW,
            VideoCaptionType::Cea608S3341a => gst_video_sys::GST_VIDEO_CAPTION_TYPE_CEA608_S334_1A,
            VideoCaptionType::Cea708Raw => gst_video_sys::GST_VIDEO_CAPTION_TYPE_CEA708_RAW,
            VideoCaptionType::Cea708Cdp => gst_video_sys::GST_VIDEO_CAPTION_TYPE_CEA708_CDP,
            VideoCaptionType::__Unknown(value) => value,
        }
    }
}

#[cfg(any(feature = "v1_16", feature = "dox"))]
#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoCaptionType> for VideoCaptionType {
    fn from_glib(value: gst_video_sys::GstVideoCaptionType) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoCaptionType::Unknown,
            1 => VideoCaptionType::Cea608Raw,
            2 => VideoCaptionType::Cea608S3341a,
            3 => VideoCaptionType::Cea708Raw,
            4 => VideoCaptionType::Cea708Cdp,
            value => VideoCaptionType::__Unknown(value),
        }
    }
}

#[cfg(any(feature = "v1_16", feature = "dox"))]
impl StaticType for VideoCaptionType {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_caption_type_get_type()) }
    }
}

#[cfg(any(feature = "v1_16", feature = "dox"))]
impl<'a> FromValueOptional<'a> for VideoCaptionType {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

#[cfg(any(feature = "v1_16", feature = "dox"))]
impl<'a> FromValue<'a> for VideoCaptionType {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

#[cfg(any(feature = "v1_16", feature = "dox"))]
impl SetValue for VideoCaptionType {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoChromaMode {
    Full,
    UpsampleOnly,
    DownsampleOnly,
    None,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoChromaMode {
    type GlibType = gst_video_sys::GstVideoChromaMode;

    fn to_glib(&self) -> gst_video_sys::GstVideoChromaMode {
        match *self {
            VideoChromaMode::Full => gst_video_sys::GST_VIDEO_CHROMA_MODE_FULL,
            VideoChromaMode::UpsampleOnly => gst_video_sys::GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY,
            VideoChromaMode::DownsampleOnly => gst_video_sys::GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY,
            VideoChromaMode::None => gst_video_sys::GST_VIDEO_CHROMA_MODE_NONE,
            VideoChromaMode::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoChromaMode> for VideoChromaMode {
    fn from_glib(value: gst_video_sys::GstVideoChromaMode) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoChromaMode::Full,
            1 => VideoChromaMode::UpsampleOnly,
            2 => VideoChromaMode::DownsampleOnly,
            3 => VideoChromaMode::None,
            value => VideoChromaMode::__Unknown(value),
        }
    }
}

impl StaticType for VideoChromaMode {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_chroma_mode_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoChromaMode {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoChromaMode {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoChromaMode {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoColorMatrix {
    Unknown,
    Rgb,
    Fcc,
    Bt709,
    Bt601,
    Smpte240m,
    Bt2020,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoColorMatrix {
    type GlibType = gst_video_sys::GstVideoColorMatrix;

    fn to_glib(&self) -> gst_video_sys::GstVideoColorMatrix {
        match *self {
            VideoColorMatrix::Unknown => gst_video_sys::GST_VIDEO_COLOR_MATRIX_UNKNOWN,
            VideoColorMatrix::Rgb => gst_video_sys::GST_VIDEO_COLOR_MATRIX_RGB,
            VideoColorMatrix::Fcc => gst_video_sys::GST_VIDEO_COLOR_MATRIX_FCC,
            VideoColorMatrix::Bt709 => gst_video_sys::GST_VIDEO_COLOR_MATRIX_BT709,
            VideoColorMatrix::Bt601 => gst_video_sys::GST_VIDEO_COLOR_MATRIX_BT601,
            VideoColorMatrix::Smpte240m => gst_video_sys::GST_VIDEO_COLOR_MATRIX_SMPTE240M,
            VideoColorMatrix::Bt2020 => gst_video_sys::GST_VIDEO_COLOR_MATRIX_BT2020,
            VideoColorMatrix::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoColorMatrix> for VideoColorMatrix {
    fn from_glib(value: gst_video_sys::GstVideoColorMatrix) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoColorMatrix::Unknown,
            1 => VideoColorMatrix::Rgb,
            2 => VideoColorMatrix::Fcc,
            3 => VideoColorMatrix::Bt709,
            4 => VideoColorMatrix::Bt601,
            5 => VideoColorMatrix::Smpte240m,
            6 => VideoColorMatrix::Bt2020,
            value => VideoColorMatrix::__Unknown(value),
        }
    }
}

impl StaticType for VideoColorMatrix {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_color_matrix_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoColorMatrix {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoColorMatrix {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoColorMatrix {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoColorPrimaries {
    Unknown,
    Bt709,
    Bt470m,
    Bt470bg,
    Smpte170m,
    Smpte240m,
    Film,
    Bt2020,
    Adobergb,
    #[cfg(any(feature = "v1_16", feature = "dox"))]
    Smptest428,
    #[cfg(any(feature = "v1_16", feature = "dox"))]
    Smpterp431,
    #[cfg(any(feature = "v1_16", feature = "dox"))]
    Smpteeg432,
    #[cfg(any(feature = "v1_16", feature = "dox"))]
    Ebu3213,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoColorPrimaries {
    type GlibType = gst_video_sys::GstVideoColorPrimaries;

    fn to_glib(&self) -> gst_video_sys::GstVideoColorPrimaries {
        match *self {
            VideoColorPrimaries::Unknown => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_UNKNOWN,
            VideoColorPrimaries::Bt709 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_BT709,
            VideoColorPrimaries::Bt470m => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_BT470M,
            VideoColorPrimaries::Bt470bg => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_BT470BG,
            VideoColorPrimaries::Smpte170m => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_SMPTE170M,
            VideoColorPrimaries::Smpte240m => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_SMPTE240M,
            VideoColorPrimaries::Film => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_FILM,
            VideoColorPrimaries::Bt2020 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_BT2020,
            VideoColorPrimaries::Adobergb => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_ADOBERGB,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            VideoColorPrimaries::Smptest428 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_SMPTEST428,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            VideoColorPrimaries::Smpterp431 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_SMPTERP431,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            VideoColorPrimaries::Smpteeg432 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            VideoColorPrimaries::Ebu3213 => gst_video_sys::GST_VIDEO_COLOR_PRIMARIES_EBU3213,
            VideoColorPrimaries::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoColorPrimaries> for VideoColorPrimaries {
    fn from_glib(value: gst_video_sys::GstVideoColorPrimaries) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoColorPrimaries::Unknown,
            1 => VideoColorPrimaries::Bt709,
            2 => VideoColorPrimaries::Bt470m,
            3 => VideoColorPrimaries::Bt470bg,
            4 => VideoColorPrimaries::Smpte170m,
            5 => VideoColorPrimaries::Smpte240m,
            6 => VideoColorPrimaries::Film,
            7 => VideoColorPrimaries::Bt2020,
            8 => VideoColorPrimaries::Adobergb,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            9 => VideoColorPrimaries::Smptest428,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            10 => VideoColorPrimaries::Smpterp431,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            11 => VideoColorPrimaries::Smpteeg432,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            12 => VideoColorPrimaries::Ebu3213,
            value => VideoColorPrimaries::__Unknown(value),
        }
    }
}

impl StaticType for VideoColorPrimaries {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_color_primaries_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoColorPrimaries {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoColorPrimaries {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoColorPrimaries {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoDitherMethod {
    None,
    Verterr,
    FloydSteinberg,
    SierraLite,
    Bayer,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoDitherMethod {
    type GlibType = gst_video_sys::GstVideoDitherMethod;

    fn to_glib(&self) -> gst_video_sys::GstVideoDitherMethod {
        match *self {
            VideoDitherMethod::None => gst_video_sys::GST_VIDEO_DITHER_NONE,
            VideoDitherMethod::Verterr => gst_video_sys::GST_VIDEO_DITHER_VERTERR,
            VideoDitherMethod::FloydSteinberg => gst_video_sys::GST_VIDEO_DITHER_FLOYD_STEINBERG,
            VideoDitherMethod::SierraLite => gst_video_sys::GST_VIDEO_DITHER_SIERRA_LITE,
            VideoDitherMethod::Bayer => gst_video_sys::GST_VIDEO_DITHER_BAYER,
            VideoDitherMethod::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoDitherMethod> for VideoDitherMethod {
    fn from_glib(value: gst_video_sys::GstVideoDitherMethod) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoDitherMethod::None,
            1 => VideoDitherMethod::Verterr,
            2 => VideoDitherMethod::FloydSteinberg,
            3 => VideoDitherMethod::SierraLite,
            4 => VideoDitherMethod::Bayer,
            value => VideoDitherMethod::__Unknown(value),
        }
    }
}

impl StaticType for VideoDitherMethod {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_dither_method_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoDitherMethod {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoDitherMethod {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoDitherMethod {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[cfg(any(feature = "v1_12", feature = "dox"))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoFieldOrder {
    Unknown,
    TopFieldFirst,
    BottomFieldFirst,
    #[doc(hidden)]
    __Unknown(i32),
}

#[cfg(any(feature = "v1_12", feature = "dox"))]
#[doc(hidden)]
impl ToGlib for VideoFieldOrder {
    type GlibType = gst_video_sys::GstVideoFieldOrder;

    fn to_glib(&self) -> gst_video_sys::GstVideoFieldOrder {
        match *self {
            VideoFieldOrder::Unknown => gst_video_sys::GST_VIDEO_FIELD_ORDER_UNKNOWN,
            VideoFieldOrder::TopFieldFirst => gst_video_sys::GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST,
            VideoFieldOrder::BottomFieldFirst => {
                gst_video_sys::GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST
            }
            VideoFieldOrder::__Unknown(value) => value,
        }
    }
}

#[cfg(any(feature = "v1_12", feature = "dox"))]
#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoFieldOrder> for VideoFieldOrder {
    fn from_glib(value: gst_video_sys::GstVideoFieldOrder) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoFieldOrder::Unknown,
            1 => VideoFieldOrder::TopFieldFirst,
            2 => VideoFieldOrder::BottomFieldFirst,
            value => VideoFieldOrder::__Unknown(value),
        }
    }
}

#[cfg(any(feature = "v1_12", feature = "dox"))]
impl StaticType for VideoFieldOrder {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_field_order_get_type()) }
    }
}

#[cfg(any(feature = "v1_12", feature = "dox"))]
impl<'a> FromValueOptional<'a> for VideoFieldOrder {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

#[cfg(any(feature = "v1_12", feature = "dox"))]
impl<'a> FromValue<'a> for VideoFieldOrder {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

#[cfg(any(feature = "v1_12", feature = "dox"))]
impl SetValue for VideoFieldOrder {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoFormat {
    Unknown,
    Encoded,
    I420,
    Yv12,
    Yuy2,
    Uyvy,
    Ayuv,
    Rgbx,
    Bgrx,
    Xrgb,
    Xbgr,
    Rgba,
    Bgra,
    Argb,
    Abgr,
    Rgb,
    Bgr,
    Y41b,
    Y42b,
    Yvyu,
    Y444,
    V210,
    V216,
    Nv12,
    Nv21,
    Gray8,
    Gray16Be,
    Gray16Le,
    V308,
    Rgb16,
    Bgr16,
    Rgb15,
    Bgr15,
    Uyvp,
    A420,
    Rgb8p,
    Yuv9,
    Yvu9,
    Iyu1,
    Argb64,
    Ayuv64,
    R210,
    I42010be,
    I42010le,
    I42210be,
    I42210le,
    Y44410be,
    Y44410le,
    Gbr,
    Gbr10be,
    Gbr10le,
    Nv16,
    Nv24,
    Nv1264z32,
    A42010be,
    A42010le,
    A42210be,
    A42210le,
    A44410be,
    A44410le,
    Nv61,
    #[cfg(any(feature = "v1_10", feature = "dox"))]
    P01010be,
    #[cfg(any(feature = "v1_10", feature = "dox"))]
    P01010le,
    #[cfg(any(feature = "v1_10", feature = "dox"))]
    Iyu2,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    Vyuy,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    Gbra,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    Gbra10be,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    Gbra10le,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    Gbr12be,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    Gbr12le,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    Gbra12be,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    Gbra12le,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    I42012be,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    I42012le,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    I42212be,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    I42212le,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    Y44412be,
    #[cfg(any(feature = "v1_12", feature = "dox"))]
    Y44412le,
    #[cfg(any(feature = "v1_14", feature = "dox"))]
    Gray10Le32,
    #[cfg(any(feature = "v1_14", feature = "dox"))]
    Nv1210le32,
    #[cfg(any(feature = "v1_14", feature = "dox"))]
    Nv1610le32,
    #[cfg(any(feature = "v1_16", feature = "dox"))]
    Nv1210le40,
    #[cfg(any(feature = "v1_16", feature = "dox"))]
    Y210,
    #[cfg(any(feature = "v1_16", feature = "dox"))]
    Y410,
    #[cfg(any(feature = "v1_16", feature = "dox"))]
    Vuya,
    #[cfg(any(feature = "v1_16", feature = "dox"))]
    Bgr10a2Le,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    Rgb10a2Le,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    Y44416be,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    Y44416le,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    P016Be,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    P016Le,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    P012Be,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    P012Le,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    Y212Be,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    Y212Le,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    Y412Be,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    Y412Le,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoFormat {
    type GlibType = gst_video_sys::GstVideoFormat;

    fn to_glib(&self) -> gst_video_sys::GstVideoFormat {
        match *self {
            VideoFormat::Unknown => gst_video_sys::GST_VIDEO_FORMAT_UNKNOWN,
            VideoFormat::Encoded => gst_video_sys::GST_VIDEO_FORMAT_ENCODED,
            VideoFormat::I420 => gst_video_sys::GST_VIDEO_FORMAT_I420,
            VideoFormat::Yv12 => gst_video_sys::GST_VIDEO_FORMAT_YV12,
            VideoFormat::Yuy2 => gst_video_sys::GST_VIDEO_FORMAT_YUY2,
            VideoFormat::Uyvy => gst_video_sys::GST_VIDEO_FORMAT_UYVY,
            VideoFormat::Ayuv => gst_video_sys::GST_VIDEO_FORMAT_AYUV,
            VideoFormat::Rgbx => gst_video_sys::GST_VIDEO_FORMAT_RGBx,
            VideoFormat::Bgrx => gst_video_sys::GST_VIDEO_FORMAT_BGRx,
            VideoFormat::Xrgb => gst_video_sys::GST_VIDEO_FORMAT_xRGB,
            VideoFormat::Xbgr => gst_video_sys::GST_VIDEO_FORMAT_xBGR,
            VideoFormat::Rgba => gst_video_sys::GST_VIDEO_FORMAT_RGBA,
            VideoFormat::Bgra => gst_video_sys::GST_VIDEO_FORMAT_BGRA,
            VideoFormat::Argb => gst_video_sys::GST_VIDEO_FORMAT_ARGB,
            VideoFormat::Abgr => gst_video_sys::GST_VIDEO_FORMAT_ABGR,
            VideoFormat::Rgb => gst_video_sys::GST_VIDEO_FORMAT_RGB,
            VideoFormat::Bgr => gst_video_sys::GST_VIDEO_FORMAT_BGR,
            VideoFormat::Y41b => gst_video_sys::GST_VIDEO_FORMAT_Y41B,
            VideoFormat::Y42b => gst_video_sys::GST_VIDEO_FORMAT_Y42B,
            VideoFormat::Yvyu => gst_video_sys::GST_VIDEO_FORMAT_YVYU,
            VideoFormat::Y444 => gst_video_sys::GST_VIDEO_FORMAT_Y444,
            VideoFormat::V210 => gst_video_sys::GST_VIDEO_FORMAT_v210,
            VideoFormat::V216 => gst_video_sys::GST_VIDEO_FORMAT_v216,
            VideoFormat::Nv12 => gst_video_sys::GST_VIDEO_FORMAT_NV12,
            VideoFormat::Nv21 => gst_video_sys::GST_VIDEO_FORMAT_NV21,
            VideoFormat::Gray8 => gst_video_sys::GST_VIDEO_FORMAT_GRAY8,
            VideoFormat::Gray16Be => gst_video_sys::GST_VIDEO_FORMAT_GRAY16_BE,
            VideoFormat::Gray16Le => gst_video_sys::GST_VIDEO_FORMAT_GRAY16_LE,
            VideoFormat::V308 => gst_video_sys::GST_VIDEO_FORMAT_v308,
            VideoFormat::Rgb16 => gst_video_sys::GST_VIDEO_FORMAT_RGB16,
            VideoFormat::Bgr16 => gst_video_sys::GST_VIDEO_FORMAT_BGR16,
            VideoFormat::Rgb15 => gst_video_sys::GST_VIDEO_FORMAT_RGB15,
            VideoFormat::Bgr15 => gst_video_sys::GST_VIDEO_FORMAT_BGR15,
            VideoFormat::Uyvp => gst_video_sys::GST_VIDEO_FORMAT_UYVP,
            VideoFormat::A420 => gst_video_sys::GST_VIDEO_FORMAT_A420,
            VideoFormat::Rgb8p => gst_video_sys::GST_VIDEO_FORMAT_RGB8P,
            VideoFormat::Yuv9 => gst_video_sys::GST_VIDEO_FORMAT_YUV9,
            VideoFormat::Yvu9 => gst_video_sys::GST_VIDEO_FORMAT_YVU9,
            VideoFormat::Iyu1 => gst_video_sys::GST_VIDEO_FORMAT_IYU1,
            VideoFormat::Argb64 => gst_video_sys::GST_VIDEO_FORMAT_ARGB64,
            VideoFormat::Ayuv64 => gst_video_sys::GST_VIDEO_FORMAT_AYUV64,
            VideoFormat::R210 => gst_video_sys::GST_VIDEO_FORMAT_r210,
            VideoFormat::I42010be => gst_video_sys::GST_VIDEO_FORMAT_I420_10BE,
            VideoFormat::I42010le => gst_video_sys::GST_VIDEO_FORMAT_I420_10LE,
            VideoFormat::I42210be => gst_video_sys::GST_VIDEO_FORMAT_I422_10BE,
            VideoFormat::I42210le => gst_video_sys::GST_VIDEO_FORMAT_I422_10LE,
            VideoFormat::Y44410be => gst_video_sys::GST_VIDEO_FORMAT_Y444_10BE,
            VideoFormat::Y44410le => gst_video_sys::GST_VIDEO_FORMAT_Y444_10LE,
            VideoFormat::Gbr => gst_video_sys::GST_VIDEO_FORMAT_GBR,
            VideoFormat::Gbr10be => gst_video_sys::GST_VIDEO_FORMAT_GBR_10BE,
            VideoFormat::Gbr10le => gst_video_sys::GST_VIDEO_FORMAT_GBR_10LE,
            VideoFormat::Nv16 => gst_video_sys::GST_VIDEO_FORMAT_NV16,
            VideoFormat::Nv24 => gst_video_sys::GST_VIDEO_FORMAT_NV24,
            VideoFormat::Nv1264z32 => gst_video_sys::GST_VIDEO_FORMAT_NV12_64Z32,
            VideoFormat::A42010be => gst_video_sys::GST_VIDEO_FORMAT_A420_10BE,
            VideoFormat::A42010le => gst_video_sys::GST_VIDEO_FORMAT_A420_10LE,
            VideoFormat::A42210be => gst_video_sys::GST_VIDEO_FORMAT_A422_10BE,
            VideoFormat::A42210le => gst_video_sys::GST_VIDEO_FORMAT_A422_10LE,
            VideoFormat::A44410be => gst_video_sys::GST_VIDEO_FORMAT_A444_10BE,
            VideoFormat::A44410le => gst_video_sys::GST_VIDEO_FORMAT_A444_10LE,
            VideoFormat::Nv61 => gst_video_sys::GST_VIDEO_FORMAT_NV61,
            #[cfg(any(feature = "v1_10", feature = "dox"))]
            VideoFormat::P01010be => gst_video_sys::GST_VIDEO_FORMAT_P010_10BE,
            #[cfg(any(feature = "v1_10", feature = "dox"))]
            VideoFormat::P01010le => gst_video_sys::GST_VIDEO_FORMAT_P010_10LE,
            #[cfg(any(feature = "v1_10", feature = "dox"))]
            VideoFormat::Iyu2 => gst_video_sys::GST_VIDEO_FORMAT_IYU2,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::Vyuy => gst_video_sys::GST_VIDEO_FORMAT_VYUY,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::Gbra => gst_video_sys::GST_VIDEO_FORMAT_GBRA,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::Gbra10be => gst_video_sys::GST_VIDEO_FORMAT_GBRA_10BE,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::Gbra10le => gst_video_sys::GST_VIDEO_FORMAT_GBRA_10LE,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::Gbr12be => gst_video_sys::GST_VIDEO_FORMAT_GBR_12BE,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::Gbr12le => gst_video_sys::GST_VIDEO_FORMAT_GBR_12LE,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::Gbra12be => gst_video_sys::GST_VIDEO_FORMAT_GBRA_12BE,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::Gbra12le => gst_video_sys::GST_VIDEO_FORMAT_GBRA_12LE,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::I42012be => gst_video_sys::GST_VIDEO_FORMAT_I420_12BE,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::I42012le => gst_video_sys::GST_VIDEO_FORMAT_I420_12LE,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::I42212be => gst_video_sys::GST_VIDEO_FORMAT_I422_12BE,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::I42212le => gst_video_sys::GST_VIDEO_FORMAT_I422_12LE,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::Y44412be => gst_video_sys::GST_VIDEO_FORMAT_Y444_12BE,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            VideoFormat::Y44412le => gst_video_sys::GST_VIDEO_FORMAT_Y444_12LE,
            #[cfg(any(feature = "v1_14", feature = "dox"))]
            VideoFormat::Gray10Le32 => gst_video_sys::GST_VIDEO_FORMAT_GRAY10_LE32,
            #[cfg(any(feature = "v1_14", feature = "dox"))]
            VideoFormat::Nv1210le32 => gst_video_sys::GST_VIDEO_FORMAT_NV12_10LE32,
            #[cfg(any(feature = "v1_14", feature = "dox"))]
            VideoFormat::Nv1610le32 => gst_video_sys::GST_VIDEO_FORMAT_NV16_10LE32,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            VideoFormat::Nv1210le40 => gst_video_sys::GST_VIDEO_FORMAT_NV12_10LE40,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            VideoFormat::Y210 => gst_video_sys::GST_VIDEO_FORMAT_Y210,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            VideoFormat::Y410 => gst_video_sys::GST_VIDEO_FORMAT_Y410,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            VideoFormat::Vuya => gst_video_sys::GST_VIDEO_FORMAT_VUYA,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            VideoFormat::Bgr10a2Le => gst_video_sys::GST_VIDEO_FORMAT_BGR10A2_LE,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoFormat::Rgb10a2Le => gst_video_sys::GST_VIDEO_FORMAT_RGB10A2_LE,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoFormat::Y44416be => gst_video_sys::GST_VIDEO_FORMAT_Y444_16BE,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoFormat::Y44416le => gst_video_sys::GST_VIDEO_FORMAT_Y444_16LE,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoFormat::P016Be => gst_video_sys::GST_VIDEO_FORMAT_P016_BE,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoFormat::P016Le => gst_video_sys::GST_VIDEO_FORMAT_P016_LE,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoFormat::P012Be => gst_video_sys::GST_VIDEO_FORMAT_P012_BE,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoFormat::P012Le => gst_video_sys::GST_VIDEO_FORMAT_P012_LE,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoFormat::Y212Be => gst_video_sys::GST_VIDEO_FORMAT_Y212_BE,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoFormat::Y212Le => gst_video_sys::GST_VIDEO_FORMAT_Y212_LE,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoFormat::Y412Be => gst_video_sys::GST_VIDEO_FORMAT_Y412_BE,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoFormat::Y412Le => gst_video_sys::GST_VIDEO_FORMAT_Y412_LE,
            VideoFormat::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoFormat> for VideoFormat {
    fn from_glib(value: gst_video_sys::GstVideoFormat) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoFormat::Unknown,
            1 => VideoFormat::Encoded,
            2 => VideoFormat::I420,
            3 => VideoFormat::Yv12,
            4 => VideoFormat::Yuy2,
            5 => VideoFormat::Uyvy,
            6 => VideoFormat::Ayuv,
            7 => VideoFormat::Rgbx,
            8 => VideoFormat::Bgrx,
            9 => VideoFormat::Xrgb,
            10 => VideoFormat::Xbgr,
            11 => VideoFormat::Rgba,
            12 => VideoFormat::Bgra,
            13 => VideoFormat::Argb,
            14 => VideoFormat::Abgr,
            15 => VideoFormat::Rgb,
            16 => VideoFormat::Bgr,
            17 => VideoFormat::Y41b,
            18 => VideoFormat::Y42b,
            19 => VideoFormat::Yvyu,
            20 => VideoFormat::Y444,
            21 => VideoFormat::V210,
            22 => VideoFormat::V216,
            23 => VideoFormat::Nv12,
            24 => VideoFormat::Nv21,
            25 => VideoFormat::Gray8,
            26 => VideoFormat::Gray16Be,
            27 => VideoFormat::Gray16Le,
            28 => VideoFormat::V308,
            29 => VideoFormat::Rgb16,
            30 => VideoFormat::Bgr16,
            31 => VideoFormat::Rgb15,
            32 => VideoFormat::Bgr15,
            33 => VideoFormat::Uyvp,
            34 => VideoFormat::A420,
            35 => VideoFormat::Rgb8p,
            36 => VideoFormat::Yuv9,
            37 => VideoFormat::Yvu9,
            38 => VideoFormat::Iyu1,
            39 => VideoFormat::Argb64,
            40 => VideoFormat::Ayuv64,
            41 => VideoFormat::R210,
            42 => VideoFormat::I42010be,
            43 => VideoFormat::I42010le,
            44 => VideoFormat::I42210be,
            45 => VideoFormat::I42210le,
            46 => VideoFormat::Y44410be,
            47 => VideoFormat::Y44410le,
            48 => VideoFormat::Gbr,
            49 => VideoFormat::Gbr10be,
            50 => VideoFormat::Gbr10le,
            51 => VideoFormat::Nv16,
            52 => VideoFormat::Nv24,
            53 => VideoFormat::Nv1264z32,
            54 => VideoFormat::A42010be,
            55 => VideoFormat::A42010le,
            56 => VideoFormat::A42210be,
            57 => VideoFormat::A42210le,
            58 => VideoFormat::A44410be,
            59 => VideoFormat::A44410le,
            60 => VideoFormat::Nv61,
            #[cfg(any(feature = "v1_10", feature = "dox"))]
            61 => VideoFormat::P01010be,
            #[cfg(any(feature = "v1_10", feature = "dox"))]
            62 => VideoFormat::P01010le,
            #[cfg(any(feature = "v1_10", feature = "dox"))]
            63 => VideoFormat::Iyu2,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            64 => VideoFormat::Vyuy,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            65 => VideoFormat::Gbra,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            66 => VideoFormat::Gbra10be,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            67 => VideoFormat::Gbra10le,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            68 => VideoFormat::Gbr12be,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            69 => VideoFormat::Gbr12le,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            70 => VideoFormat::Gbra12be,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            71 => VideoFormat::Gbra12le,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            72 => VideoFormat::I42012be,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            73 => VideoFormat::I42012le,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            74 => VideoFormat::I42212be,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            75 => VideoFormat::I42212le,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            76 => VideoFormat::Y44412be,
            #[cfg(any(feature = "v1_12", feature = "dox"))]
            77 => VideoFormat::Y44412le,
            #[cfg(any(feature = "v1_14", feature = "dox"))]
            78 => VideoFormat::Gray10Le32,
            #[cfg(any(feature = "v1_14", feature = "dox"))]
            79 => VideoFormat::Nv1210le32,
            #[cfg(any(feature = "v1_14", feature = "dox"))]
            80 => VideoFormat::Nv1610le32,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            81 => VideoFormat::Nv1210le40,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            82 => VideoFormat::Y210,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            83 => VideoFormat::Y410,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            84 => VideoFormat::Vuya,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            85 => VideoFormat::Bgr10a2Le,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            86 => VideoFormat::Rgb10a2Le,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            87 => VideoFormat::Y44416be,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            88 => VideoFormat::Y44416le,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            89 => VideoFormat::P016Be,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            90 => VideoFormat::P016Le,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            91 => VideoFormat::P012Be,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            92 => VideoFormat::P012Le,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            93 => VideoFormat::Y212Be,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            94 => VideoFormat::Y212Le,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            95 => VideoFormat::Y412Be,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            96 => VideoFormat::Y412Le,
            value => VideoFormat::__Unknown(value),
        }
    }
}

impl StaticType for VideoFormat {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_format_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoFormat {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoFormat {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoFormat {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoGammaMode {
    None,
    Remap,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoGammaMode {
    type GlibType = gst_video_sys::GstVideoGammaMode;

    fn to_glib(&self) -> gst_video_sys::GstVideoGammaMode {
        match *self {
            VideoGammaMode::None => gst_video_sys::GST_VIDEO_GAMMA_MODE_NONE,
            VideoGammaMode::Remap => gst_video_sys::GST_VIDEO_GAMMA_MODE_REMAP,
            VideoGammaMode::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoGammaMode> for VideoGammaMode {
    fn from_glib(value: gst_video_sys::GstVideoGammaMode) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoGammaMode::None,
            1 => VideoGammaMode::Remap,
            value => VideoGammaMode::__Unknown(value),
        }
    }
}

impl StaticType for VideoGammaMode {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_gamma_mode_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoGammaMode {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoGammaMode {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoGammaMode {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoInterlaceMode {
    Progressive,
    Interleaved,
    Mixed,
    Fields,
    #[cfg(any(feature = "v1_16", feature = "dox"))]
    Alternate,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoInterlaceMode {
    type GlibType = gst_video_sys::GstVideoInterlaceMode;

    fn to_glib(&self) -> gst_video_sys::GstVideoInterlaceMode {
        match *self {
            VideoInterlaceMode::Progressive => gst_video_sys::GST_VIDEO_INTERLACE_MODE_PROGRESSIVE,
            VideoInterlaceMode::Interleaved => gst_video_sys::GST_VIDEO_INTERLACE_MODE_INTERLEAVED,
            VideoInterlaceMode::Mixed => gst_video_sys::GST_VIDEO_INTERLACE_MODE_MIXED,
            VideoInterlaceMode::Fields => gst_video_sys::GST_VIDEO_INTERLACE_MODE_FIELDS,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            VideoInterlaceMode::Alternate => gst_video_sys::GST_VIDEO_INTERLACE_MODE_ALTERNATE,
            VideoInterlaceMode::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoInterlaceMode> for VideoInterlaceMode {
    fn from_glib(value: gst_video_sys::GstVideoInterlaceMode) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoInterlaceMode::Progressive,
            1 => VideoInterlaceMode::Interleaved,
            2 => VideoInterlaceMode::Mixed,
            3 => VideoInterlaceMode::Fields,
            #[cfg(any(feature = "v1_16", feature = "dox"))]
            4 => VideoInterlaceMode::Alternate,
            value => VideoInterlaceMode::__Unknown(value),
        }
    }
}

impl StaticType for VideoInterlaceMode {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_interlace_mode_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoInterlaceMode {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoInterlaceMode {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoInterlaceMode {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoMatrixMode {
    Full,
    InputOnly,
    OutputOnly,
    None,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoMatrixMode {
    type GlibType = gst_video_sys::GstVideoMatrixMode;

    fn to_glib(&self) -> gst_video_sys::GstVideoMatrixMode {
        match *self {
            VideoMatrixMode::Full => gst_video_sys::GST_VIDEO_MATRIX_MODE_FULL,
            VideoMatrixMode::InputOnly => gst_video_sys::GST_VIDEO_MATRIX_MODE_INPUT_ONLY,
            VideoMatrixMode::OutputOnly => gst_video_sys::GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY,
            VideoMatrixMode::None => gst_video_sys::GST_VIDEO_MATRIX_MODE_NONE,
            VideoMatrixMode::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoMatrixMode> for VideoMatrixMode {
    fn from_glib(value: gst_video_sys::GstVideoMatrixMode) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoMatrixMode::Full,
            1 => VideoMatrixMode::InputOnly,
            2 => VideoMatrixMode::OutputOnly,
            3 => VideoMatrixMode::None,
            value => VideoMatrixMode::__Unknown(value),
        }
    }
}

impl StaticType for VideoMatrixMode {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_matrix_mode_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoMatrixMode {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoMatrixMode {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoMatrixMode {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoMultiviewFramePacking {
    None,
    Mono,
    Left,
    Right,
    SideBySide,
    SideBySideQuincunx,
    ColumnInterleaved,
    RowInterleaved,
    TopBottom,
    Checkerboard,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoMultiviewFramePacking {
    type GlibType = gst_video_sys::GstVideoMultiviewFramePacking;

    fn to_glib(&self) -> gst_video_sys::GstVideoMultiviewFramePacking {
        match *self {
            VideoMultiviewFramePacking::None => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE
            }
            VideoMultiviewFramePacking::Mono => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO
            }
            VideoMultiviewFramePacking::Left => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT
            }
            VideoMultiviewFramePacking::Right => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT
            }
            VideoMultiviewFramePacking::SideBySide => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE
            }
            VideoMultiviewFramePacking::SideBySideQuincunx => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX
            }
            VideoMultiviewFramePacking::ColumnInterleaved => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED
            }
            VideoMultiviewFramePacking::RowInterleaved => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED
            }
            VideoMultiviewFramePacking::TopBottom => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM
            }
            VideoMultiviewFramePacking::Checkerboard => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD
            }
            VideoMultiviewFramePacking::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoMultiviewFramePacking> for VideoMultiviewFramePacking {
    fn from_glib(value: gst_video_sys::GstVideoMultiviewFramePacking) -> Self {
        skip_assert_initialized!();
        match value {
            -1 => VideoMultiviewFramePacking::None,
            0 => VideoMultiviewFramePacking::Mono,
            1 => VideoMultiviewFramePacking::Left,
            2 => VideoMultiviewFramePacking::Right,
            3 => VideoMultiviewFramePacking::SideBySide,
            4 => VideoMultiviewFramePacking::SideBySideQuincunx,
            5 => VideoMultiviewFramePacking::ColumnInterleaved,
            6 => VideoMultiviewFramePacking::RowInterleaved,
            7 => VideoMultiviewFramePacking::TopBottom,
            8 => VideoMultiviewFramePacking::Checkerboard,
            value => VideoMultiviewFramePacking::__Unknown(value),
        }
    }
}

impl StaticType for VideoMultiviewFramePacking {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_multiview_frame_packing_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoMultiviewFramePacking {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoMultiviewFramePacking {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoMultiviewFramePacking {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoMultiviewMode {
    None,
    Mono,
    Left,
    Right,
    SideBySide,
    SideBySideQuincunx,
    ColumnInterleaved,
    RowInterleaved,
    TopBottom,
    Checkerboard,
    FrameByFrame,
    MultiviewFrameByFrame,
    Separated,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoMultiviewMode {
    type GlibType = gst_video_sys::GstVideoMultiviewMode;

    fn to_glib(&self) -> gst_video_sys::GstVideoMultiviewMode {
        match *self {
            VideoMultiviewMode::None => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_NONE,
            VideoMultiviewMode::Mono => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_MONO,
            VideoMultiviewMode::Left => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_LEFT,
            VideoMultiviewMode::Right => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_RIGHT,
            VideoMultiviewMode::SideBySide => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE,
            VideoMultiviewMode::SideBySideQuincunx => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX
            }
            VideoMultiviewMode::ColumnInterleaved => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED
            }
            VideoMultiviewMode::RowInterleaved => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED
            }
            VideoMultiviewMode::TopBottom => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM,
            VideoMultiviewMode::Checkerboard => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD
            }
            VideoMultiviewMode::FrameByFrame => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME
            }
            VideoMultiviewMode::MultiviewFrameByFrame => {
                gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME
            }
            VideoMultiviewMode::Separated => gst_video_sys::GST_VIDEO_MULTIVIEW_MODE_SEPARATED,
            VideoMultiviewMode::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoMultiviewMode> for VideoMultiviewMode {
    fn from_glib(value: gst_video_sys::GstVideoMultiviewMode) -> Self {
        skip_assert_initialized!();
        match value {
            -1 => VideoMultiviewMode::None,
            0 => VideoMultiviewMode::Mono,
            1 => VideoMultiviewMode::Left,
            2 => VideoMultiviewMode::Right,
            3 => VideoMultiviewMode::SideBySide,
            4 => VideoMultiviewMode::SideBySideQuincunx,
            5 => VideoMultiviewMode::ColumnInterleaved,
            6 => VideoMultiviewMode::RowInterleaved,
            7 => VideoMultiviewMode::TopBottom,
            8 => VideoMultiviewMode::Checkerboard,
            32 => VideoMultiviewMode::FrameByFrame,
            33 => VideoMultiviewMode::MultiviewFrameByFrame,
            34 => VideoMultiviewMode::Separated,
            value => VideoMultiviewMode::__Unknown(value),
        }
    }
}

impl StaticType for VideoMultiviewMode {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_multiview_mode_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoMultiviewMode {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoMultiviewMode {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoMultiviewMode {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoPrimariesMode {
    None,
    MergeOnly,
    Fast,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoPrimariesMode {
    type GlibType = gst_video_sys::GstVideoPrimariesMode;

    fn to_glib(&self) -> gst_video_sys::GstVideoPrimariesMode {
        match *self {
            VideoPrimariesMode::None => gst_video_sys::GST_VIDEO_PRIMARIES_MODE_NONE,
            VideoPrimariesMode::MergeOnly => gst_video_sys::GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY,
            VideoPrimariesMode::Fast => gst_video_sys::GST_VIDEO_PRIMARIES_MODE_FAST,
            VideoPrimariesMode::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoPrimariesMode> for VideoPrimariesMode {
    fn from_glib(value: gst_video_sys::GstVideoPrimariesMode) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoPrimariesMode::None,
            1 => VideoPrimariesMode::MergeOnly,
            2 => VideoPrimariesMode::Fast,
            value => VideoPrimariesMode::__Unknown(value),
        }
    }
}

impl StaticType for VideoPrimariesMode {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_primaries_mode_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoPrimariesMode {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoPrimariesMode {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoPrimariesMode {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoResamplerMethod {
    Nearest,
    Linear,
    Cubic,
    Sinc,
    Lanczos,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoResamplerMethod {
    type GlibType = gst_video_sys::GstVideoResamplerMethod;

    fn to_glib(&self) -> gst_video_sys::GstVideoResamplerMethod {
        match *self {
            VideoResamplerMethod::Nearest => gst_video_sys::GST_VIDEO_RESAMPLER_METHOD_NEAREST,
            VideoResamplerMethod::Linear => gst_video_sys::GST_VIDEO_RESAMPLER_METHOD_LINEAR,
            VideoResamplerMethod::Cubic => gst_video_sys::GST_VIDEO_RESAMPLER_METHOD_CUBIC,
            VideoResamplerMethod::Sinc => gst_video_sys::GST_VIDEO_RESAMPLER_METHOD_SINC,
            VideoResamplerMethod::Lanczos => gst_video_sys::GST_VIDEO_RESAMPLER_METHOD_LANCZOS,
            VideoResamplerMethod::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoResamplerMethod> for VideoResamplerMethod {
    fn from_glib(value: gst_video_sys::GstVideoResamplerMethod) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoResamplerMethod::Nearest,
            1 => VideoResamplerMethod::Linear,
            2 => VideoResamplerMethod::Cubic,
            3 => VideoResamplerMethod::Sinc,
            4 => VideoResamplerMethod::Lanczos,
            value => VideoResamplerMethod::__Unknown(value),
        }
    }
}

impl StaticType for VideoResamplerMethod {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_resampler_method_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoResamplerMethod {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoResamplerMethod {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoResamplerMethod {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoTileMode {
    Unknown,
    Zflipz2x2,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoTileMode {
    type GlibType = gst_video_sys::GstVideoTileMode;

    fn to_glib(&self) -> gst_video_sys::GstVideoTileMode {
        match *self {
            VideoTileMode::Unknown => gst_video_sys::GST_VIDEO_TILE_MODE_UNKNOWN,
            VideoTileMode::Zflipz2x2 => gst_video_sys::GST_VIDEO_TILE_MODE_ZFLIPZ_2X2,
            VideoTileMode::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoTileMode> for VideoTileMode {
    fn from_glib(value: gst_video_sys::GstVideoTileMode) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoTileMode::Unknown,
            65536 => VideoTileMode::Zflipz2x2,
            value => VideoTileMode::__Unknown(value),
        }
    }
}

impl StaticType for VideoTileMode {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_tile_mode_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoTileMode {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoTileMode {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoTileMode {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
pub enum VideoTransferFunction {
    Unknown,
    Gamma10,
    Gamma18,
    Gamma20,
    Gamma22,
    Bt709,
    Smpte240m,
    Srgb,
    Gamma28,
    Log100,
    Log316,
    Bt202012,
    Adobergb,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    Bt202010,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    Smpte2084,
    #[cfg(any(feature = "v1_18", feature = "dox"))]
    AribStdB67,
    #[doc(hidden)]
    __Unknown(i32),
}

#[doc(hidden)]
impl ToGlib for VideoTransferFunction {
    type GlibType = gst_video_sys::GstVideoTransferFunction;

    fn to_glib(&self) -> gst_video_sys::GstVideoTransferFunction {
        match *self {
            VideoTransferFunction::Unknown => gst_video_sys::GST_VIDEO_TRANSFER_UNKNOWN,
            VideoTransferFunction::Gamma10 => gst_video_sys::GST_VIDEO_TRANSFER_GAMMA10,
            VideoTransferFunction::Gamma18 => gst_video_sys::GST_VIDEO_TRANSFER_GAMMA18,
            VideoTransferFunction::Gamma20 => gst_video_sys::GST_VIDEO_TRANSFER_GAMMA20,
            VideoTransferFunction::Gamma22 => gst_video_sys::GST_VIDEO_TRANSFER_GAMMA22,
            VideoTransferFunction::Bt709 => gst_video_sys::GST_VIDEO_TRANSFER_BT709,
            VideoTransferFunction::Smpte240m => gst_video_sys::GST_VIDEO_TRANSFER_SMPTE240M,
            VideoTransferFunction::Srgb => gst_video_sys::GST_VIDEO_TRANSFER_SRGB,
            VideoTransferFunction::Gamma28 => gst_video_sys::GST_VIDEO_TRANSFER_GAMMA28,
            VideoTransferFunction::Log100 => gst_video_sys::GST_VIDEO_TRANSFER_LOG100,
            VideoTransferFunction::Log316 => gst_video_sys::GST_VIDEO_TRANSFER_LOG316,
            VideoTransferFunction::Bt202012 => gst_video_sys::GST_VIDEO_TRANSFER_BT2020_12,
            VideoTransferFunction::Adobergb => gst_video_sys::GST_VIDEO_TRANSFER_ADOBERGB,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoTransferFunction::Bt202010 => gst_video_sys::GST_VIDEO_TRANSFER_BT2020_10,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoTransferFunction::Smpte2084 => gst_video_sys::GST_VIDEO_TRANSFER_SMPTE2084,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            VideoTransferFunction::AribStdB67 => gst_video_sys::GST_VIDEO_TRANSFER_ARIB_STD_B67,
            VideoTransferFunction::__Unknown(value) => value,
        }
    }
}

#[doc(hidden)]
impl FromGlib<gst_video_sys::GstVideoTransferFunction> for VideoTransferFunction {
    fn from_glib(value: gst_video_sys::GstVideoTransferFunction) -> Self {
        skip_assert_initialized!();
        match value {
            0 => VideoTransferFunction::Unknown,
            1 => VideoTransferFunction::Gamma10,
            2 => VideoTransferFunction::Gamma18,
            3 => VideoTransferFunction::Gamma20,
            4 => VideoTransferFunction::Gamma22,
            5 => VideoTransferFunction::Bt709,
            6 => VideoTransferFunction::Smpte240m,
            7 => VideoTransferFunction::Srgb,
            8 => VideoTransferFunction::Gamma28,
            9 => VideoTransferFunction::Log100,
            10 => VideoTransferFunction::Log316,
            11 => VideoTransferFunction::Bt202012,
            12 => VideoTransferFunction::Adobergb,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            13 => VideoTransferFunction::Bt202010,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            14 => VideoTransferFunction::Smpte2084,
            #[cfg(any(feature = "v1_18", feature = "dox"))]
            15 => VideoTransferFunction::AribStdB67,
            value => VideoTransferFunction::__Unknown(value),
        }
    }
}

impl StaticType for VideoTransferFunction {
    fn static_type() -> Type {
        unsafe { from_glib(gst_video_sys::gst_video_transfer_function_get_type()) }
    }
}

impl<'a> FromValueOptional<'a> for VideoTransferFunction {
    unsafe fn from_value_optional(value: &Value) -> Option<Self> {
        Some(FromValue::from_value(value))
    }
}

impl<'a> FromValue<'a> for VideoTransferFunction {
    unsafe fn from_value(value: &Value) -> Self {
        from_glib(gobject_sys::g_value_get_enum(value.to_glib_none().0))
    }
}

impl SetValue for VideoTransferFunction {
    unsafe fn set_value(value: &mut Value, this: &Self) {
        gobject_sys::g_value_set_enum(value.to_glib_none_mut().0, this.to_glib())
    }
}
