2018-04-23 17:34:22 +00:00
|
|
|
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
|
|
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
2021-04-01 13:58:41 +00:00
|
|
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
2017-08-10 21:41:55 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
use glib::{prelude::*, translate::*, GStr};
|
2017-08-10 21:41:55 +00:00
|
|
|
|
2024-02-12 14:26:01 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
|
|
#[non_exhaustive]
|
|
|
|
#[doc(alias = "GstAncillaryMetaField")]
|
|
|
|
pub enum AncillaryMetaField {
|
|
|
|
#[doc(alias = "GST_ANCILLARY_META_FIELD_PROGRESSIVE")]
|
|
|
|
Progressive,
|
|
|
|
#[doc(alias = "GST_ANCILLARY_META_FIELD_INTERLACED_FIRST")]
|
|
|
|
InterlacedFirst,
|
|
|
|
#[doc(alias = "GST_ANCILLARY_META_FIELD_INTERLACED_SECOND")]
|
|
|
|
InterlacedSecond,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl IntoGlib for AncillaryMetaField {
|
|
|
|
type GlibType = ffi::GstAncillaryMetaField;
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
fn into_glib(self) -> ffi::GstAncillaryMetaField {
|
|
|
|
match self {
|
|
|
|
Self::Progressive => ffi::GST_ANCILLARY_META_FIELD_PROGRESSIVE,
|
|
|
|
Self::InterlacedFirst => ffi::GST_ANCILLARY_META_FIELD_INTERLACED_FIRST,
|
|
|
|
Self::InterlacedSecond => ffi::GST_ANCILLARY_META_FIELD_INTERLACED_SECOND,
|
|
|
|
Self::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl FromGlib<ffi::GstAncillaryMetaField> for AncillaryMetaField {
|
|
|
|
#[inline]
|
|
|
|
unsafe fn from_glib(value: ffi::GstAncillaryMetaField) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
|
|
|
|
match value {
|
|
|
|
ffi::GST_ANCILLARY_META_FIELD_PROGRESSIVE => Self::Progressive,
|
|
|
|
ffi::GST_ANCILLARY_META_FIELD_INTERLACED_FIRST => Self::InterlacedFirst,
|
|
|
|
ffi::GST_ANCILLARY_META_FIELD_INTERLACED_SECOND => Self::InterlacedSecond,
|
|
|
|
value => Self::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
impl StaticType for AncillaryMetaField {
|
|
|
|
#[inline]
|
|
|
|
#[doc(alias = "gst_ancillary_meta_field_get_type")]
|
|
|
|
fn static_type() -> glib::Type {
|
|
|
|
unsafe { from_glib(ffi::gst_ancillary_meta_field_get_type()) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
impl glib::HasParamSpec for AncillaryMetaField {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
|
|
|
Self::ParamSpec::builder_with_default
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
impl glib::value::ValueType for AncillaryMetaField {
|
|
|
|
type Type = Self;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for AncillaryMetaField {
|
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
impl ToValue for AncillaryMetaField {
|
|
|
|
#[inline]
|
|
|
|
fn to_value(&self) -> glib::Value {
|
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
|
|
|
unsafe {
|
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
impl From<AncillaryMetaField> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: AncillaryMetaField) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-15 20:37:18 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
|
|
#[non_exhaustive]
|
|
|
|
#[doc(alias = "GstColorBalanceType")]
|
|
|
|
pub enum ColorBalanceType {
|
|
|
|
#[doc(alias = "GST_COLOR_BALANCE_HARDWARE")]
|
|
|
|
Hardware,
|
|
|
|
#[doc(alias = "GST_COLOR_BALANCE_SOFTWARE")]
|
|
|
|
Software,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl IntoGlib for ColorBalanceType {
|
|
|
|
type GlibType = ffi::GstColorBalanceType;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-11-15 20:37:18 +00:00
|
|
|
fn into_glib(self) -> ffi::GstColorBalanceType {
|
|
|
|
match self {
|
|
|
|
Self::Hardware => ffi::GST_COLOR_BALANCE_HARDWARE,
|
|
|
|
Self::Software => ffi::GST_COLOR_BALANCE_SOFTWARE,
|
|
|
|
Self::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl FromGlib<ffi::GstColorBalanceType> for ColorBalanceType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-11-15 20:37:18 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstColorBalanceType) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2021-11-15 20:37:18 +00:00
|
|
|
match value {
|
|
|
|
ffi::GST_COLOR_BALANCE_HARDWARE => Self::Hardware,
|
|
|
|
ffi::GST_COLOR_BALANCE_SOFTWARE => Self::Software,
|
|
|
|
value => Self::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for ColorBalanceType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_color_balance_type_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2021-11-15 20:37:18 +00:00
|
|
|
unsafe { from_glib(ffi::gst_color_balance_type_get_type()) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for ColorBalanceType {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-15 20:37:18 +00:00
|
|
|
impl glib::value::ValueType for ColorBalanceType {
|
|
|
|
type Type = Self;
|
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for ColorBalanceType {
|
2021-11-15 20:37:18 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-11-15 20:37:18 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ToValue for ColorBalanceType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-11-15 20:37:18 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
|
|
|
unsafe {
|
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-11-15 20:37:18 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<ColorBalanceType> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: ColorBalanceType) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-09-12 16:39:10 +00:00
|
|
|
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
|
2021-12-22 01:26:20 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
|
|
#[non_exhaustive]
|
|
|
|
#[doc(alias = "GstNavigationCommand")]
|
|
|
|
pub enum NavigationCommand {
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_INVALID")]
|
|
|
|
Invalid,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_MENU1")]
|
|
|
|
Menu1,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_MENU2")]
|
|
|
|
Menu2,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_MENU3")]
|
|
|
|
Menu3,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_MENU4")]
|
|
|
|
Menu4,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_MENU5")]
|
|
|
|
Menu5,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_MENU6")]
|
|
|
|
Menu6,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_MENU7")]
|
|
|
|
Menu7,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_LEFT")]
|
|
|
|
Left,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_RIGHT")]
|
|
|
|
Right,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_UP")]
|
|
|
|
Up,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_DOWN")]
|
|
|
|
Down,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_ACTIVATE")]
|
|
|
|
Activate,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_PREV_ANGLE")]
|
|
|
|
PrevAngle,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_COMMAND_NEXT_ANGLE")]
|
|
|
|
NextAngle,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl IntoGlib for NavigationCommand {
|
|
|
|
type GlibType = ffi::GstNavigationCommand;
|
|
|
|
|
|
|
|
fn into_glib(self) -> ffi::GstNavigationCommand {
|
|
|
|
match self {
|
|
|
|
Self::Invalid => ffi::GST_NAVIGATION_COMMAND_INVALID,
|
|
|
|
Self::Menu1 => ffi::GST_NAVIGATION_COMMAND_MENU1,
|
|
|
|
Self::Menu2 => ffi::GST_NAVIGATION_COMMAND_MENU2,
|
|
|
|
Self::Menu3 => ffi::GST_NAVIGATION_COMMAND_MENU3,
|
|
|
|
Self::Menu4 => ffi::GST_NAVIGATION_COMMAND_MENU4,
|
|
|
|
Self::Menu5 => ffi::GST_NAVIGATION_COMMAND_MENU5,
|
|
|
|
Self::Menu6 => ffi::GST_NAVIGATION_COMMAND_MENU6,
|
|
|
|
Self::Menu7 => ffi::GST_NAVIGATION_COMMAND_MENU7,
|
|
|
|
Self::Left => ffi::GST_NAVIGATION_COMMAND_LEFT,
|
|
|
|
Self::Right => ffi::GST_NAVIGATION_COMMAND_RIGHT,
|
|
|
|
Self::Up => ffi::GST_NAVIGATION_COMMAND_UP,
|
|
|
|
Self::Down => ffi::GST_NAVIGATION_COMMAND_DOWN,
|
|
|
|
Self::Activate => ffi::GST_NAVIGATION_COMMAND_ACTIVATE,
|
|
|
|
Self::PrevAngle => ffi::GST_NAVIGATION_COMMAND_PREV_ANGLE,
|
|
|
|
Self::NextAngle => ffi::GST_NAVIGATION_COMMAND_NEXT_ANGLE,
|
|
|
|
Self::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl FromGlib<ffi::GstNavigationCommand> for NavigationCommand {
|
|
|
|
unsafe fn from_glib(value: ffi::GstNavigationCommand) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2021-12-22 01:26:20 +00:00
|
|
|
match value {
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_INVALID => Self::Invalid,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_MENU1 => Self::Menu1,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_MENU2 => Self::Menu2,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_MENU3 => Self::Menu3,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_MENU4 => Self::Menu4,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_MENU5 => Self::Menu5,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_MENU6 => Self::Menu6,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_MENU7 => Self::Menu7,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_LEFT => Self::Left,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_RIGHT => Self::Right,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_UP => Self::Up,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_DOWN => Self::Down,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_ACTIVATE => Self::Activate,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_PREV_ANGLE => Self::PrevAngle,
|
|
|
|
ffi::GST_NAVIGATION_COMMAND_NEXT_ANGLE => Self::NextAngle,
|
|
|
|
value => Self::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for NavigationCommand {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_navigation_command_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2021-12-22 01:26:20 +00:00
|
|
|
unsafe { from_glib(ffi::gst_navigation_command_get_type()) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for NavigationCommand {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-22 01:26:20 +00:00
|
|
|
impl glib::value::ValueType for NavigationCommand {
|
|
|
|
type Type = Self;
|
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for NavigationCommand {
|
2021-12-22 01:26:20 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ToValue for NavigationCommand {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
|
|
|
unsafe {
|
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<NavigationCommand> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: NavigationCommand) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-22 01:26:20 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
|
|
#[non_exhaustive]
|
|
|
|
#[doc(alias = "GstNavigationEventType")]
|
|
|
|
pub enum NavigationEventType {
|
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_INVALID")]
|
|
|
|
Invalid,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_KEY_PRESS")]
|
|
|
|
KeyPress,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_KEY_RELEASE")]
|
|
|
|
KeyRelease,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS")]
|
|
|
|
MouseButtonPress,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE")]
|
|
|
|
MouseButtonRelease,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_MOUSE_MOVE")]
|
|
|
|
MouseMove,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_COMMAND")]
|
|
|
|
Command,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2021-12-22 01:26:20 +00:00
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_MOUSE_SCROLL")]
|
|
|
|
MouseScroll,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
2022-03-31 07:34:23 +00:00
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_TOUCH_DOWN")]
|
|
|
|
TouchDown,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
2022-03-31 07:34:23 +00:00
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_TOUCH_MOTION")]
|
|
|
|
TouchMotion,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
2022-03-31 07:34:23 +00:00
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_TOUCH_UP")]
|
|
|
|
TouchUp,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
2022-03-31 07:34:23 +00:00
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_TOUCH_FRAME")]
|
|
|
|
TouchFrame,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
2022-03-31 07:34:23 +00:00
|
|
|
#[doc(alias = "GST_NAVIGATION_EVENT_TOUCH_CANCEL")]
|
|
|
|
TouchCancel,
|
2021-12-22 01:26:20 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl IntoGlib for NavigationEventType {
|
|
|
|
type GlibType = ffi::GstNavigationEventType;
|
|
|
|
|
|
|
|
fn into_glib(self) -> ffi::GstNavigationEventType {
|
|
|
|
match self {
|
|
|
|
Self::Invalid => ffi::GST_NAVIGATION_EVENT_INVALID,
|
|
|
|
Self::KeyPress => ffi::GST_NAVIGATION_EVENT_KEY_PRESS,
|
|
|
|
Self::KeyRelease => ffi::GST_NAVIGATION_EVENT_KEY_RELEASE,
|
|
|
|
Self::MouseButtonPress => ffi::GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS,
|
|
|
|
Self::MouseButtonRelease => ffi::GST_NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE,
|
|
|
|
Self::MouseMove => ffi::GST_NAVIGATION_EVENT_MOUSE_MOVE,
|
|
|
|
Self::Command => ffi::GST_NAVIGATION_EVENT_COMMAND,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-12-22 01:26:20 +00:00
|
|
|
Self::MouseScroll => ffi::GST_NAVIGATION_EVENT_MOUSE_SCROLL,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
Self::TouchDown => ffi::GST_NAVIGATION_EVENT_TOUCH_DOWN,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
Self::TouchMotion => ffi::GST_NAVIGATION_EVENT_TOUCH_MOTION,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
Self::TouchUp => ffi::GST_NAVIGATION_EVENT_TOUCH_UP,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
Self::TouchFrame => ffi::GST_NAVIGATION_EVENT_TOUCH_FRAME,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
Self::TouchCancel => ffi::GST_NAVIGATION_EVENT_TOUCH_CANCEL,
|
2021-12-22 01:26:20 +00:00
|
|
|
Self::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl FromGlib<ffi::GstNavigationEventType> for NavigationEventType {
|
|
|
|
unsafe fn from_glib(value: ffi::GstNavigationEventType) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2021-12-22 01:26:20 +00:00
|
|
|
match value {
|
|
|
|
ffi::GST_NAVIGATION_EVENT_INVALID => Self::Invalid,
|
|
|
|
ffi::GST_NAVIGATION_EVENT_KEY_PRESS => Self::KeyPress,
|
|
|
|
ffi::GST_NAVIGATION_EVENT_KEY_RELEASE => Self::KeyRelease,
|
|
|
|
ffi::GST_NAVIGATION_EVENT_MOUSE_BUTTON_PRESS => Self::MouseButtonPress,
|
|
|
|
ffi::GST_NAVIGATION_EVENT_MOUSE_BUTTON_RELEASE => Self::MouseButtonRelease,
|
|
|
|
ffi::GST_NAVIGATION_EVENT_MOUSE_MOVE => Self::MouseMove,
|
|
|
|
ffi::GST_NAVIGATION_EVENT_COMMAND => Self::Command,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-12-22 01:26:20 +00:00
|
|
|
ffi::GST_NAVIGATION_EVENT_MOUSE_SCROLL => Self::MouseScroll,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
ffi::GST_NAVIGATION_EVENT_TOUCH_DOWN => Self::TouchDown,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
ffi::GST_NAVIGATION_EVENT_TOUCH_MOTION => Self::TouchMotion,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
ffi::GST_NAVIGATION_EVENT_TOUCH_UP => Self::TouchUp,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
ffi::GST_NAVIGATION_EVENT_TOUCH_FRAME => Self::TouchFrame,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
ffi::GST_NAVIGATION_EVENT_TOUCH_CANCEL => Self::TouchCancel,
|
2021-12-22 01:26:20 +00:00
|
|
|
value => Self::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for NavigationEventType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_navigation_event_type_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2021-12-22 01:26:20 +00:00
|
|
|
unsafe { from_glib(ffi::gst_navigation_event_type_get_type()) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for NavigationEventType {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-22 01:26:20 +00:00
|
|
|
impl glib::value::ValueType for NavigationEventType {
|
|
|
|
type Type = Self;
|
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for NavigationEventType {
|
2021-12-22 01:26:20 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ToValue for NavigationEventType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
|
|
|
unsafe {
|
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<NavigationEventType> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: NavigationEventType) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-22 01:26:20 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
|
|
#[non_exhaustive]
|
|
|
|
#[doc(alias = "GstNavigationMessageType")]
|
|
|
|
pub enum NavigationMessageType {
|
|
|
|
#[doc(alias = "GST_NAVIGATION_MESSAGE_INVALID")]
|
|
|
|
Invalid,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_MESSAGE_MOUSE_OVER")]
|
|
|
|
MouseOver,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED")]
|
|
|
|
CommandsChanged,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_MESSAGE_ANGLES_CHANGED")]
|
|
|
|
AnglesChanged,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_MESSAGE_EVENT")]
|
|
|
|
Event,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl IntoGlib for NavigationMessageType {
|
|
|
|
type GlibType = ffi::GstNavigationMessageType;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
fn into_glib(self) -> ffi::GstNavigationMessageType {
|
|
|
|
match self {
|
|
|
|
Self::Invalid => ffi::GST_NAVIGATION_MESSAGE_INVALID,
|
|
|
|
Self::MouseOver => ffi::GST_NAVIGATION_MESSAGE_MOUSE_OVER,
|
|
|
|
Self::CommandsChanged => ffi::GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED,
|
|
|
|
Self::AnglesChanged => ffi::GST_NAVIGATION_MESSAGE_ANGLES_CHANGED,
|
|
|
|
Self::Event => ffi::GST_NAVIGATION_MESSAGE_EVENT,
|
|
|
|
Self::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl FromGlib<ffi::GstNavigationMessageType> for NavigationMessageType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstNavigationMessageType) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2021-12-22 01:26:20 +00:00
|
|
|
match value {
|
|
|
|
ffi::GST_NAVIGATION_MESSAGE_INVALID => Self::Invalid,
|
|
|
|
ffi::GST_NAVIGATION_MESSAGE_MOUSE_OVER => Self::MouseOver,
|
|
|
|
ffi::GST_NAVIGATION_MESSAGE_COMMANDS_CHANGED => Self::CommandsChanged,
|
|
|
|
ffi::GST_NAVIGATION_MESSAGE_ANGLES_CHANGED => Self::AnglesChanged,
|
|
|
|
ffi::GST_NAVIGATION_MESSAGE_EVENT => Self::Event,
|
|
|
|
value => Self::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for NavigationMessageType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_navigation_message_type_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2021-12-22 01:26:20 +00:00
|
|
|
unsafe { from_glib(ffi::gst_navigation_message_type_get_type()) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for NavigationMessageType {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-22 01:26:20 +00:00
|
|
|
impl glib::value::ValueType for NavigationMessageType {
|
|
|
|
type Type = Self;
|
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for NavigationMessageType {
|
2021-12-22 01:26:20 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ToValue for NavigationMessageType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
|
|
|
unsafe {
|
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<NavigationMessageType> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: NavigationMessageType) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-22 01:26:20 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
|
|
#[non_exhaustive]
|
|
|
|
#[doc(alias = "GstNavigationQueryType")]
|
|
|
|
pub enum NavigationQueryType {
|
|
|
|
#[doc(alias = "GST_NAVIGATION_QUERY_INVALID")]
|
|
|
|
Invalid,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_QUERY_COMMANDS")]
|
|
|
|
Commands,
|
|
|
|
#[doc(alias = "GST_NAVIGATION_QUERY_ANGLES")]
|
|
|
|
Angles,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl IntoGlib for NavigationQueryType {
|
|
|
|
type GlibType = ffi::GstNavigationQueryType;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
fn into_glib(self) -> ffi::GstNavigationQueryType {
|
|
|
|
match self {
|
|
|
|
Self::Invalid => ffi::GST_NAVIGATION_QUERY_INVALID,
|
|
|
|
Self::Commands => ffi::GST_NAVIGATION_QUERY_COMMANDS,
|
|
|
|
Self::Angles => ffi::GST_NAVIGATION_QUERY_ANGLES,
|
|
|
|
Self::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl FromGlib<ffi::GstNavigationQueryType> for NavigationQueryType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstNavigationQueryType) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2021-12-22 01:26:20 +00:00
|
|
|
match value {
|
|
|
|
ffi::GST_NAVIGATION_QUERY_INVALID => Self::Invalid,
|
|
|
|
ffi::GST_NAVIGATION_QUERY_COMMANDS => Self::Commands,
|
|
|
|
ffi::GST_NAVIGATION_QUERY_ANGLES => Self::Angles,
|
|
|
|
value => Self::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for NavigationQueryType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_navigation_query_type_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2021-12-22 01:26:20 +00:00
|
|
|
unsafe { from_glib(ffi::gst_navigation_query_type_get_type()) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for NavigationQueryType {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-22 01:26:20 +00:00
|
|
|
impl glib::value::ValueType for NavigationQueryType {
|
|
|
|
type Type = Self;
|
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for NavigationQueryType {
|
2021-12-22 01:26:20 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ToValue for NavigationQueryType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
|
|
|
unsafe {
|
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-12-22 01:26:20 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<NavigationQueryType> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: NavigationQueryType) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-01-30 21:12:07 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoAFDSpec")]
|
2019-05-15 23:18:26 +00:00
|
|
|
pub enum VideoAFDSpec {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_SPEC_DVB_ETSI")]
|
2019-05-15 23:18:26 +00:00
|
|
|
DvbEtsi,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_SPEC_ATSC_A53")]
|
2019-05-15 23:18:26 +00:00
|
|
|
AtscA53,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_SPEC_SMPTE_ST2016_1")]
|
2019-05-15 23:18:26 +00:00
|
|
|
SmpteSt20161,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2019-05-15 23:18:26 +00:00
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoAFDSpec {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoAFDSpec;
|
2019-05-15 23:18:26 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoAFDSpec {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::DvbEtsi => ffi::GST_VIDEO_AFD_SPEC_DVB_ETSI,
|
|
|
|
Self::AtscA53 => ffi::GST_VIDEO_AFD_SPEC_ATSC_A53,
|
|
|
|
Self::SmpteSt20161 => ffi::GST_VIDEO_AFD_SPEC_SMPTE_ST2016_1,
|
|
|
|
Self::__Unknown(value) => value,
|
2019-05-15 23:18:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2019-05-15 23:18:26 +00:00
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoAFDSpec> for VideoAFDSpec {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoAFDSpec) -> Self {
|
2019-05-15 23:18:26 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2019-05-15 23:18:26 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_AFD_SPEC_DVB_ETSI => Self::DvbEtsi,
|
|
|
|
ffi::GST_VIDEO_AFD_SPEC_ATSC_A53 => Self::AtscA53,
|
|
|
|
ffi::GST_VIDEO_AFD_SPEC_SMPTE_ST2016_1 => Self::SmpteSt20161,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2019-05-15 23:18:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2019-05-15 23:18:26 +00:00
|
|
|
impl StaticType for VideoAFDSpec {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_afd_spec_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_afd_spec_get_type()) }
|
2019-05-15 23:18:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoAFDSpec {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoAFDSpec {
|
|
|
|
type Type = Self;
|
2019-05-15 23:18:26 +00:00
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoAFDSpec {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2019-05-15 23:18:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoAFDSpec {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2019-05-15 23:18:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoAFDSpec> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoAFDSpec) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2019-05-15 23:18:26 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-30 16:51:41 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoAFDValue")]
|
2019-05-15 23:18:26 +00:00
|
|
|
pub enum VideoAFDValue {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_UNAVAILABLE")]
|
2019-05-15 23:18:26 +00:00
|
|
|
Unavailable,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_16_9_TOP_ALIGNED")]
|
2019-05-15 23:18:26 +00:00
|
|
|
_169TopAligned,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_14_9_TOP_ALIGNED")]
|
2019-05-15 23:18:26 +00:00
|
|
|
_149TopAligned,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_GREATER_THAN_16_9")]
|
2019-05-15 23:18:26 +00:00
|
|
|
GreaterThan169,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_4_3_FULL_16_9_FULL")]
|
2019-05-15 23:18:26 +00:00
|
|
|
_43Full169Full,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_4_3_FULL_4_3_PILLAR")]
|
2019-05-15 23:18:26 +00:00
|
|
|
_43Full43Pillar,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_16_9_LETTER_16_9_FULL")]
|
2019-05-15 23:18:26 +00:00
|
|
|
_169Letter169Full,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_14_9_LETTER_14_9_PILLAR")]
|
2019-05-15 23:18:26 +00:00
|
|
|
_149Letter149Pillar,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_4_3_FULL_14_9_CENTER")]
|
2019-05-15 23:18:26 +00:00
|
|
|
_43Full149Center,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_16_9_LETTER_14_9_CENTER")]
|
2019-05-15 23:18:26 +00:00
|
|
|
_169Letter149Center,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_AFD_16_9_LETTER_4_3_CENTER")]
|
2019-05-15 23:18:26 +00:00
|
|
|
_169Letter43Center,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2019-05-15 23:18:26 +00:00
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoAFDValue {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoAFDValue;
|
2019-05-15 23:18:26 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoAFDValue {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Unavailable => ffi::GST_VIDEO_AFD_UNAVAILABLE,
|
|
|
|
Self::_169TopAligned => ffi::GST_VIDEO_AFD_16_9_TOP_ALIGNED,
|
|
|
|
Self::_149TopAligned => ffi::GST_VIDEO_AFD_14_9_TOP_ALIGNED,
|
|
|
|
Self::GreaterThan169 => ffi::GST_VIDEO_AFD_GREATER_THAN_16_9,
|
|
|
|
Self::_43Full169Full => ffi::GST_VIDEO_AFD_4_3_FULL_16_9_FULL,
|
|
|
|
Self::_43Full43Pillar => ffi::GST_VIDEO_AFD_4_3_FULL_4_3_PILLAR,
|
|
|
|
Self::_169Letter169Full => ffi::GST_VIDEO_AFD_16_9_LETTER_16_9_FULL,
|
|
|
|
Self::_149Letter149Pillar => ffi::GST_VIDEO_AFD_14_9_LETTER_14_9_PILLAR,
|
|
|
|
Self::_43Full149Center => ffi::GST_VIDEO_AFD_4_3_FULL_14_9_CENTER,
|
|
|
|
Self::_169Letter149Center => ffi::GST_VIDEO_AFD_16_9_LETTER_14_9_CENTER,
|
|
|
|
Self::_169Letter43Center => ffi::GST_VIDEO_AFD_16_9_LETTER_4_3_CENTER,
|
|
|
|
Self::__Unknown(value) => value,
|
2019-05-15 23:18:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2019-05-15 23:18:26 +00:00
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoAFDValue> for VideoAFDValue {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoAFDValue) -> Self {
|
2019-05-15 23:18:26 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2019-05-15 23:18:26 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_AFD_UNAVAILABLE => Self::Unavailable,
|
|
|
|
ffi::GST_VIDEO_AFD_16_9_TOP_ALIGNED => Self::_169TopAligned,
|
|
|
|
ffi::GST_VIDEO_AFD_14_9_TOP_ALIGNED => Self::_149TopAligned,
|
|
|
|
ffi::GST_VIDEO_AFD_GREATER_THAN_16_9 => Self::GreaterThan169,
|
|
|
|
ffi::GST_VIDEO_AFD_4_3_FULL_16_9_FULL => Self::_43Full169Full,
|
|
|
|
ffi::GST_VIDEO_AFD_4_3_FULL_4_3_PILLAR => Self::_43Full43Pillar,
|
|
|
|
ffi::GST_VIDEO_AFD_16_9_LETTER_16_9_FULL => Self::_169Letter169Full,
|
|
|
|
ffi::GST_VIDEO_AFD_14_9_LETTER_14_9_PILLAR => Self::_149Letter149Pillar,
|
|
|
|
ffi::GST_VIDEO_AFD_4_3_FULL_14_9_CENTER => Self::_43Full149Center,
|
|
|
|
ffi::GST_VIDEO_AFD_16_9_LETTER_14_9_CENTER => Self::_169Letter149Center,
|
|
|
|
ffi::GST_VIDEO_AFD_16_9_LETTER_4_3_CENTER => Self::_169Letter43Center,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2019-05-15 23:18:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2019-05-15 23:18:26 +00:00
|
|
|
impl StaticType for VideoAFDValue {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_afd_value_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_afd_value_get_type()) }
|
2019-05-15 23:18:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoAFDValue {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoAFDValue {
|
|
|
|
type Type = Self;
|
2019-05-15 23:18:26 +00:00
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoAFDValue {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2019-05-15 23:18:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoAFDValue {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2019-05-15 23:18:26 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoAFDValue> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoAFDValue) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-30 16:51:41 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoAlphaMode")]
|
2020-04-30 16:51:41 +00:00
|
|
|
pub enum VideoAlphaMode {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_ALPHA_MODE_COPY")]
|
2020-04-30 16:51:41 +00:00
|
|
|
Copy,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_ALPHA_MODE_SET")]
|
2020-04-30 16:51:41 +00:00
|
|
|
Set,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_ALPHA_MODE_MULT")]
|
2020-04-30 16:51:41 +00:00
|
|
|
Mult,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoAlphaMode {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoAlphaMode;
|
2020-04-30 16:51:41 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoAlphaMode {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Copy => ffi::GST_VIDEO_ALPHA_MODE_COPY,
|
|
|
|
Self::Set => ffi::GST_VIDEO_ALPHA_MODE_SET,
|
|
|
|
Self::Mult => ffi::GST_VIDEO_ALPHA_MODE_MULT,
|
|
|
|
Self::__Unknown(value) => value,
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoAlphaMode> for VideoAlphaMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoAlphaMode) -> Self {
|
2020-04-30 16:51:41 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2020-04-30 16:51:41 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_ALPHA_MODE_COPY => Self::Copy,
|
|
|
|
ffi::GST_VIDEO_ALPHA_MODE_SET => Self::Set,
|
|
|
|
ffi::GST_VIDEO_ALPHA_MODE_MULT => Self::Mult,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoAlphaMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_alpha_mode_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_alpha_mode_get_type()) }
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoAlphaMode {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoAlphaMode {
|
|
|
|
type Type = Self;
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoAlphaMode {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoAlphaMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2020-04-30 16:51:41 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoAlphaMode> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoAlphaMode) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-04 09:51:15 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
|
|
#[non_exhaustive]
|
|
|
|
#[doc(alias = "GstVideoAncillaryDID")]
|
|
|
|
pub enum VideoAncillaryDID {
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID_UNDEFINED")]
|
|
|
|
Undefined,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID_DELETION")]
|
|
|
|
Deletion,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_FIRST")]
|
|
|
|
Hanc3gAudioDataFirst,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_LAST")]
|
|
|
|
Hanc3gAudioDataLast,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_FIRST")]
|
|
|
|
HancHdtvAudioDataFirst,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_LAST")]
|
|
|
|
HancHdtvAudioDataLast,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_FIRST")]
|
|
|
|
HancSdtvAudioData1First,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_LAST")]
|
|
|
|
HancSdtvAudioData1Last,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID_CAMERA_POSITION")]
|
|
|
|
CameraPosition,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID_HANC_ERROR_DETECTION")]
|
|
|
|
HancErrorDetection,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_FIRST")]
|
|
|
|
HancSdtvAudioData2First,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_LAST")]
|
|
|
|
HancSdtvAudioData2Last,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl IntoGlib for VideoAncillaryDID {
|
|
|
|
type GlibType = ffi::GstVideoAncillaryDID;
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
fn into_glib(self) -> ffi::GstVideoAncillaryDID {
|
|
|
|
match self {
|
|
|
|
Self::Undefined => ffi::GST_VIDEO_ANCILLARY_DID_UNDEFINED,
|
|
|
|
Self::Deletion => ffi::GST_VIDEO_ANCILLARY_DID_DELETION,
|
|
|
|
Self::Hanc3gAudioDataFirst => ffi::GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_FIRST,
|
|
|
|
Self::Hanc3gAudioDataLast => ffi::GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_LAST,
|
|
|
|
Self::HancHdtvAudioDataFirst => ffi::GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_FIRST,
|
|
|
|
Self::HancHdtvAudioDataLast => ffi::GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_LAST,
|
|
|
|
Self::HancSdtvAudioData1First => {
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_FIRST
|
|
|
|
}
|
|
|
|
Self::HancSdtvAudioData1Last => {
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_LAST
|
|
|
|
}
|
|
|
|
Self::CameraPosition => ffi::GST_VIDEO_ANCILLARY_DID_CAMERA_POSITION,
|
|
|
|
Self::HancErrorDetection => ffi::GST_VIDEO_ANCILLARY_DID_HANC_ERROR_DETECTION,
|
|
|
|
Self::HancSdtvAudioData2First => {
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_FIRST
|
|
|
|
}
|
|
|
|
Self::HancSdtvAudioData2Last => {
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_LAST
|
|
|
|
}
|
|
|
|
Self::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl FromGlib<ffi::GstVideoAncillaryDID> for VideoAncillaryDID {
|
|
|
|
#[inline]
|
|
|
|
unsafe fn from_glib(value: ffi::GstVideoAncillaryDID) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
|
|
|
|
match value {
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_UNDEFINED => Self::Undefined,
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_DELETION => Self::Deletion,
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_FIRST => Self::Hanc3gAudioDataFirst,
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_3G_AUDIO_DATA_LAST => Self::Hanc3gAudioDataLast,
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_FIRST => Self::HancHdtvAudioDataFirst,
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_HDTV_AUDIO_DATA_LAST => Self::HancHdtvAudioDataLast,
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_FIRST => {
|
|
|
|
Self::HancSdtvAudioData1First
|
|
|
|
}
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_1_LAST => {
|
|
|
|
Self::HancSdtvAudioData1Last
|
|
|
|
}
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_CAMERA_POSITION => Self::CameraPosition,
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_ERROR_DETECTION => Self::HancErrorDetection,
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_FIRST => {
|
|
|
|
Self::HancSdtvAudioData2First
|
|
|
|
}
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID_HANC_SDTV_AUDIO_DATA_2_LAST => {
|
|
|
|
Self::HancSdtvAudioData2Last
|
|
|
|
}
|
|
|
|
value => Self::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
impl StaticType for VideoAncillaryDID {
|
|
|
|
#[inline]
|
|
|
|
#[doc(alias = "gst_video_ancillary_did_get_type")]
|
|
|
|
fn static_type() -> glib::Type {
|
|
|
|
unsafe { from_glib(ffi::gst_video_ancillary_did_get_type()) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
impl glib::HasParamSpec for VideoAncillaryDID {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
|
|
|
Self::ParamSpec::builder_with_default
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
impl glib::value::ValueType for VideoAncillaryDID {
|
|
|
|
type Type = Self;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoAncillaryDID {
|
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
impl ToValue for VideoAncillaryDID {
|
|
|
|
#[inline]
|
|
|
|
fn to_value(&self) -> glib::Value {
|
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
|
|
|
unsafe {
|
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
impl From<VideoAncillaryDID> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoAncillaryDID) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
|
|
#[non_exhaustive]
|
|
|
|
#[doc(alias = "GstVideoAncillaryDID16")]
|
|
|
|
pub enum VideoAncillaryDID16 {
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID16_S334_EIA_708")]
|
|
|
|
S334Eia708,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID16_S334_EIA_608")]
|
|
|
|
S334Eia608,
|
|
|
|
#[doc(alias = "GST_VIDEO_ANCILLARY_DID16_S2016_3_AFD_BAR")]
|
|
|
|
S20163AfdBar,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl IntoGlib for VideoAncillaryDID16 {
|
|
|
|
type GlibType = ffi::GstVideoAncillaryDID16;
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
fn into_glib(self) -> ffi::GstVideoAncillaryDID16 {
|
|
|
|
match self {
|
|
|
|
Self::S334Eia708 => ffi::GST_VIDEO_ANCILLARY_DID16_S334_EIA_708,
|
|
|
|
Self::S334Eia608 => ffi::GST_VIDEO_ANCILLARY_DID16_S334_EIA_608,
|
|
|
|
Self::S20163AfdBar => ffi::GST_VIDEO_ANCILLARY_DID16_S2016_3_AFD_BAR,
|
|
|
|
Self::__Unknown(value) => value,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl FromGlib<ffi::GstVideoAncillaryDID16> for VideoAncillaryDID16 {
|
|
|
|
#[inline]
|
|
|
|
unsafe fn from_glib(value: ffi::GstVideoAncillaryDID16) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
|
|
|
|
match value {
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID16_S334_EIA_708 => Self::S334Eia708,
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID16_S334_EIA_608 => Self::S334Eia608,
|
|
|
|
ffi::GST_VIDEO_ANCILLARY_DID16_S2016_3_AFD_BAR => Self::S20163AfdBar,
|
|
|
|
value => Self::__Unknown(value),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
impl StaticType for VideoAncillaryDID16 {
|
|
|
|
#[inline]
|
|
|
|
#[doc(alias = "gst_video_ancillary_di_d16_get_type")]
|
|
|
|
fn static_type() -> glib::Type {
|
|
|
|
unsafe { from_glib(ffi::gst_video_ancillary_di_d16_get_type()) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
impl glib::HasParamSpec for VideoAncillaryDID16 {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
|
|
|
Self::ParamSpec::builder_with_default
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
impl glib::value::ValueType for VideoAncillaryDID16 {
|
|
|
|
type Type = Self;
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoAncillaryDID16 {
|
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
impl ToValue for VideoAncillaryDID16 {
|
|
|
|
#[inline]
|
|
|
|
fn to_value(&self) -> glib::Value {
|
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
|
|
|
unsafe {
|
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
|
|
|
#[inline]
|
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
|
|
|
impl From<VideoAncillaryDID16> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoAncillaryDID16) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoCaptionType")]
|
2019-05-15 21:35:19 +00:00
|
|
|
pub enum VideoCaptionType {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_CAPTION_TYPE_UNKNOWN")]
|
2019-05-15 21:35:19 +00:00
|
|
|
Unknown,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_CAPTION_TYPE_CEA608_RAW")]
|
2019-05-15 21:35:19 +00:00
|
|
|
Cea608Raw,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_CAPTION_TYPE_CEA608_S334_1A")]
|
2019-05-15 21:35:19 +00:00
|
|
|
Cea608S3341a,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_CAPTION_TYPE_CEA708_RAW")]
|
2019-05-15 21:35:19 +00:00
|
|
|
Cea708Raw,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_CAPTION_TYPE_CEA708_CDP")]
|
2019-05-15 21:35:19 +00:00
|
|
|
Cea708Cdp,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-12-07 11:11:04 +00:00
|
|
|
impl VideoCaptionType {
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_caption_type_to_caps")]
|
2022-10-18 15:16:11 +00:00
|
|
|
pub fn to_caps(self) -> gst::Caps {
|
2020-12-07 11:11:04 +00:00
|
|
|
assert_initialized_main_thread!();
|
2021-04-27 15:10:39 +00:00
|
|
|
unsafe { from_glib_full(ffi::gst_video_caption_type_to_caps(self.into_glib())) }
|
2020-12-07 11:11:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2019-05-15 21:35:19 +00:00
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoCaptionType {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoCaptionType;
|
2019-05-15 21:35:19 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoCaptionType {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Unknown => ffi::GST_VIDEO_CAPTION_TYPE_UNKNOWN,
|
|
|
|
Self::Cea608Raw => ffi::GST_VIDEO_CAPTION_TYPE_CEA608_RAW,
|
|
|
|
Self::Cea608S3341a => ffi::GST_VIDEO_CAPTION_TYPE_CEA608_S334_1A,
|
|
|
|
Self::Cea708Raw => ffi::GST_VIDEO_CAPTION_TYPE_CEA708_RAW,
|
|
|
|
Self::Cea708Cdp => ffi::GST_VIDEO_CAPTION_TYPE_CEA708_CDP,
|
|
|
|
Self::__Unknown(value) => value,
|
2019-05-15 21:35:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2019-05-15 21:35:19 +00:00
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoCaptionType> for VideoCaptionType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoCaptionType) -> Self {
|
2019-05-15 21:35:19 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2019-05-15 21:35:19 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_CAPTION_TYPE_UNKNOWN => Self::Unknown,
|
|
|
|
ffi::GST_VIDEO_CAPTION_TYPE_CEA608_RAW => Self::Cea608Raw,
|
|
|
|
ffi::GST_VIDEO_CAPTION_TYPE_CEA608_S334_1A => Self::Cea608S3341a,
|
|
|
|
ffi::GST_VIDEO_CAPTION_TYPE_CEA708_RAW => Self::Cea708Raw,
|
|
|
|
ffi::GST_VIDEO_CAPTION_TYPE_CEA708_CDP => Self::Cea708Cdp,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2019-05-15 21:35:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2019-05-15 21:35:19 +00:00
|
|
|
impl StaticType for VideoCaptionType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_caption_type_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_caption_type_get_type()) }
|
2019-05-15 21:35:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoCaptionType {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoCaptionType {
|
|
|
|
type Type = Self;
|
2019-05-15 21:35:19 +00:00
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoCaptionType {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2019-05-15 21:35:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoCaptionType {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2019-05-15 21:35:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoCaptionType> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoCaptionType) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-30 21:12:07 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoChromaMode")]
|
2020-01-30 21:12:07 +00:00
|
|
|
pub enum VideoChromaMode {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_CHROMA_MODE_FULL")]
|
2020-01-30 21:12:07 +00:00
|
|
|
Full,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY")]
|
2020-01-30 21:12:07 +00:00
|
|
|
UpsampleOnly,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY")]
|
2020-01-30 21:12:07 +00:00
|
|
|
DownsampleOnly,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_CHROMA_MODE_NONE")]
|
2020-01-30 21:12:07 +00:00
|
|
|
None,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoChromaMode {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoChromaMode;
|
2020-01-30 21:12:07 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoChromaMode {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Full => ffi::GST_VIDEO_CHROMA_MODE_FULL,
|
|
|
|
Self::UpsampleOnly => ffi::GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY,
|
|
|
|
Self::DownsampleOnly => ffi::GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY,
|
|
|
|
Self::None => ffi::GST_VIDEO_CHROMA_MODE_NONE,
|
|
|
|
Self::__Unknown(value) => value,
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoChromaMode> for VideoChromaMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoChromaMode) -> Self {
|
2020-01-30 21:12:07 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2020-01-30 21:12:07 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_CHROMA_MODE_FULL => Self::Full,
|
|
|
|
ffi::GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY => Self::UpsampleOnly,
|
|
|
|
ffi::GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY => Self::DownsampleOnly,
|
|
|
|
ffi::GST_VIDEO_CHROMA_MODE_NONE => Self::None,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoChromaMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_chroma_mode_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_chroma_mode_get_type()) }
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoChromaMode {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoChromaMode {
|
|
|
|
type Type = Self;
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoChromaMode {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoChromaMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoChromaMode> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoChromaMode) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoColorMatrix")]
|
2017-08-11 09:29:23 +00:00
|
|
|
pub enum VideoColorMatrix {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_UNKNOWN")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Unknown,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_RGB")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Rgb,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_FCC")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Fcc,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_BT709")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Bt709,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_BT601")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Bt601,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_SMPTE240M")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Smpte240m,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_BT2020")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Bt2020,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-12-07 11:11:04 +00:00
|
|
|
impl VideoColorMatrix {
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_color_matrix_from_iso")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn from_iso(value: u32) -> VideoColorMatrix {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe { from_glib(ffi::gst_video_color_matrix_from_iso(value)) }
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_color_matrix_to_iso")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn to_iso(self) -> u32 {
|
|
|
|
assert_initialized_main_thread!();
|
2021-04-27 15:10:39 +00:00
|
|
|
unsafe { ffi::gst_video_color_matrix_to_iso(self.into_glib()) }
|
2020-12-07 11:11:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-11 09:29:23 +00:00
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoColorMatrix {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoColorMatrix;
|
2017-08-11 09:29:23 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoColorMatrix {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Unknown => ffi::GST_VIDEO_COLOR_MATRIX_UNKNOWN,
|
|
|
|
Self::Rgb => ffi::GST_VIDEO_COLOR_MATRIX_RGB,
|
|
|
|
Self::Fcc => ffi::GST_VIDEO_COLOR_MATRIX_FCC,
|
|
|
|
Self::Bt709 => ffi::GST_VIDEO_COLOR_MATRIX_BT709,
|
|
|
|
Self::Bt601 => ffi::GST_VIDEO_COLOR_MATRIX_BT601,
|
|
|
|
Self::Smpte240m => ffi::GST_VIDEO_COLOR_MATRIX_SMPTE240M,
|
|
|
|
Self::Bt2020 => ffi::GST_VIDEO_COLOR_MATRIX_BT2020,
|
|
|
|
Self::__Unknown(value) => value,
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoColorMatrix> for VideoColorMatrix {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoColorMatrix) -> Self {
|
2017-08-11 09:29:23 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2017-11-05 17:01:15 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_COLOR_MATRIX_UNKNOWN => Self::Unknown,
|
|
|
|
ffi::GST_VIDEO_COLOR_MATRIX_RGB => Self::Rgb,
|
|
|
|
ffi::GST_VIDEO_COLOR_MATRIX_FCC => Self::Fcc,
|
|
|
|
ffi::GST_VIDEO_COLOR_MATRIX_BT709 => Self::Bt709,
|
|
|
|
ffi::GST_VIDEO_COLOR_MATRIX_BT601 => Self::Bt601,
|
|
|
|
ffi::GST_VIDEO_COLOR_MATRIX_SMPTE240M => Self::Smpte240m,
|
|
|
|
ffi::GST_VIDEO_COLOR_MATRIX_BT2020 => Self::Bt2020,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoColorMatrix {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_color_matrix_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_color_matrix_get_type()) }
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoColorMatrix {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoColorMatrix {
|
|
|
|
type Type = Self;
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoColorMatrix {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoColorMatrix {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoColorMatrix> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoColorMatrix) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoColorPrimaries")]
|
2017-08-11 09:29:23 +00:00
|
|
|
pub enum VideoColorPrimaries {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_UNKNOWN")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Unknown,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_BT709")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Bt709,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_BT470M")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Bt470m,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_BT470BG")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Bt470bg,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTE170M")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Smpte170m,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTE240M")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Smpte240m,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_FILM")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Film,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_BT2020")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Bt2020,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_ADOBERGB")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Adobergb,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTEST428")]
|
2019-04-23 14:32:09 +00:00
|
|
|
Smptest428,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTERP431")]
|
2019-04-23 14:32:09 +00:00
|
|
|
Smpterp431,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432")]
|
2019-04-23 14:32:09 +00:00
|
|
|
Smpteeg432,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_EBU3213")]
|
2019-04-23 14:32:09 +00:00
|
|
|
Ebu3213,
|
2017-08-11 09:29:23 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-12-07 11:11:04 +00:00
|
|
|
impl VideoColorPrimaries {
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_color_primaries_from_iso")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn from_iso(value: u32) -> VideoColorPrimaries {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe { from_glib(ffi::gst_video_color_primaries_from_iso(value)) }
|
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
//#[doc(alias = "gst_video_color_primaries_get_info")]
|
2021-05-03 18:35:37 +00:00
|
|
|
//#[doc(alias = "get_info")]
|
2022-10-18 15:16:11 +00:00
|
|
|
//pub fn info(self) -> /*Ignored*/VideoColorPrimariesInfo {
|
2020-12-07 11:11:04 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_video_color_primaries_get_info() }
|
|
|
|
//}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
2022-07-18 10:25:36 +00:00
|
|
|
#[doc(alias = "gst_video_color_primaries_is_equivalent")]
|
|
|
|
pub fn is_equivalent(self, other: VideoColorPrimaries) -> bool {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe {
|
|
|
|
from_glib(ffi::gst_video_color_primaries_is_equivalent(
|
|
|
|
self.into_glib(),
|
|
|
|
other.into_glib(),
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_color_primaries_to_iso")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn to_iso(self) -> u32 {
|
|
|
|
assert_initialized_main_thread!();
|
2021-04-27 15:10:39 +00:00
|
|
|
unsafe { ffi::gst_video_color_primaries_to_iso(self.into_glib()) }
|
2020-12-07 11:11:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-11 09:29:23 +00:00
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoColorPrimaries {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoColorPrimaries;
|
2017-08-11 09:29:23 +00:00
|
|
|
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoColorPrimaries {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Unknown => ffi::GST_VIDEO_COLOR_PRIMARIES_UNKNOWN,
|
|
|
|
Self::Bt709 => ffi::GST_VIDEO_COLOR_PRIMARIES_BT709,
|
|
|
|
Self::Bt470m => ffi::GST_VIDEO_COLOR_PRIMARIES_BT470M,
|
|
|
|
Self::Bt470bg => ffi::GST_VIDEO_COLOR_PRIMARIES_BT470BG,
|
|
|
|
Self::Smpte170m => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTE170M,
|
|
|
|
Self::Smpte240m => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTE240M,
|
|
|
|
Self::Film => ffi::GST_VIDEO_COLOR_PRIMARIES_FILM,
|
|
|
|
Self::Bt2020 => ffi::GST_VIDEO_COLOR_PRIMARIES_BT2020,
|
|
|
|
Self::Adobergb => ffi::GST_VIDEO_COLOR_PRIMARIES_ADOBERGB,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Smptest428 => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTEST428,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Smpterp431 => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTERP431,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Smpteeg432 => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Ebu3213 => ffi::GST_VIDEO_COLOR_PRIMARIES_EBU3213,
|
|
|
|
Self::__Unknown(value) => value,
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoColorPrimaries> for VideoColorPrimaries {
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoColorPrimaries) -> Self {
|
2017-08-11 09:29:23 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2017-11-05 17:01:15 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_UNKNOWN => Self::Unknown,
|
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_BT709 => Self::Bt709,
|
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_BT470M => Self::Bt470m,
|
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_BT470BG => Self::Bt470bg,
|
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTE170M => Self::Smpte170m,
|
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTE240M => Self::Smpte240m,
|
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_FILM => Self::Film,
|
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_BT2020 => Self::Bt2020,
|
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_ADOBERGB => Self::Adobergb,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTEST428 => Self::Smptest428,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTERP431 => Self::Smpterp431,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432 => Self::Smpteeg432,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_COLOR_PRIMARIES_EBU3213 => Self::Ebu3213,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoColorPrimaries {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_color_primaries_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_color_primaries_get_type()) }
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoColorPrimaries {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoColorPrimaries {
|
|
|
|
type Type = Self;
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoColorPrimaries {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoColorPrimaries {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoColorPrimaries> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoColorPrimaries) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-30 21:12:07 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoDitherMethod")]
|
2020-01-30 21:12:07 +00:00
|
|
|
pub enum VideoDitherMethod {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_DITHER_NONE")]
|
2020-01-30 21:12:07 +00:00
|
|
|
None,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_DITHER_VERTERR")]
|
2020-01-30 21:12:07 +00:00
|
|
|
Verterr,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_DITHER_FLOYD_STEINBERG")]
|
2020-01-30 21:12:07 +00:00
|
|
|
FloydSteinberg,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_DITHER_SIERRA_LITE")]
|
2020-01-30 21:12:07 +00:00
|
|
|
SierraLite,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_DITHER_BAYER")]
|
2020-01-30 21:12:07 +00:00
|
|
|
Bayer,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoDitherMethod {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoDitherMethod;
|
2020-01-30 21:12:07 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoDitherMethod {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::None => ffi::GST_VIDEO_DITHER_NONE,
|
|
|
|
Self::Verterr => ffi::GST_VIDEO_DITHER_VERTERR,
|
|
|
|
Self::FloydSteinberg => ffi::GST_VIDEO_DITHER_FLOYD_STEINBERG,
|
|
|
|
Self::SierraLite => ffi::GST_VIDEO_DITHER_SIERRA_LITE,
|
|
|
|
Self::Bayer => ffi::GST_VIDEO_DITHER_BAYER,
|
|
|
|
Self::__Unknown(value) => value,
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoDitherMethod> for VideoDitherMethod {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoDitherMethod) -> Self {
|
2020-01-30 21:12:07 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2020-01-30 21:12:07 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_DITHER_NONE => Self::None,
|
|
|
|
ffi::GST_VIDEO_DITHER_VERTERR => Self::Verterr,
|
|
|
|
ffi::GST_VIDEO_DITHER_FLOYD_STEINBERG => Self::FloydSteinberg,
|
|
|
|
ffi::GST_VIDEO_DITHER_SIERRA_LITE => Self::SierraLite,
|
|
|
|
ffi::GST_VIDEO_DITHER_BAYER => Self::Bayer,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoDitherMethod {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_dither_method_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_dither_method_get_type()) }
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoDitherMethod {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoDitherMethod {
|
|
|
|
type Type = Self;
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoDitherMethod {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoDitherMethod {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoDitherMethod> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoDitherMethod) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoFieldOrder")]
|
2017-08-11 09:29:23 +00:00
|
|
|
pub enum VideoFieldOrder {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FIELD_ORDER_UNKNOWN")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Unknown,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST")]
|
2017-08-11 09:29:23 +00:00
|
|
|
TopFieldFirst,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST")]
|
2017-08-11 09:29:23 +00:00
|
|
|
BottomFieldFirst,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-12-07 11:11:04 +00:00
|
|
|
impl VideoFieldOrder {
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_field_order_from_string")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn from_string(order: &str) -> VideoFieldOrder {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe {
|
|
|
|
from_glib(ffi::gst_video_field_order_from_string(
|
|
|
|
order.to_glib_none().0,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-28 16:52:26 +00:00
|
|
|
impl std::fmt::Display for VideoFieldOrder {
|
2020-12-07 11:11:04 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
2020-12-07 11:11:04 +00:00
|
|
|
f.write_str(&self.to_str())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-11 09:29:23 +00:00
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoFieldOrder {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoFieldOrder;
|
2017-08-11 09:29:23 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoFieldOrder {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Unknown => ffi::GST_VIDEO_FIELD_ORDER_UNKNOWN,
|
|
|
|
Self::TopFieldFirst => ffi::GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST,
|
|
|
|
Self::BottomFieldFirst => ffi::GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST,
|
|
|
|
Self::__Unknown(value) => value,
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoFieldOrder> for VideoFieldOrder {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoFieldOrder) -> Self {
|
2017-08-11 09:29:23 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2017-11-05 17:01:15 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FIELD_ORDER_UNKNOWN => Self::Unknown,
|
|
|
|
ffi::GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST => Self::TopFieldFirst,
|
|
|
|
ffi::GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST => Self::BottomFieldFirst,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoFieldOrder {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_field_order_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_field_order_get_type()) }
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoFieldOrder {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoFieldOrder {
|
|
|
|
type Type = Self;
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoFieldOrder {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoFieldOrder {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoFieldOrder> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoFieldOrder) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-05 09:57:29 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoFormat")]
|
2017-08-10 21:41:55 +00:00
|
|
|
pub enum VideoFormat {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_UNKNOWN")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Unknown,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_ENCODED")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Encoded,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_I420")]
|
2017-08-10 21:41:55 +00:00
|
|
|
I420,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_YV12")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Yv12,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_YUY2")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Yuy2,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_UYVY")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Uyvy,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_AYUV")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Ayuv,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_RGBx")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Rgbx,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_BGRx")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Bgrx,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_xRGB")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Xrgb,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_xBGR")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Xbgr,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_RGBA")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Rgba,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_BGRA")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Bgra,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_ARGB")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Argb,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_ABGR")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Abgr,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_RGB")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Rgb,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_BGR")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Bgr,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y41B")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Y41b,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y42B")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Y42b,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_YVYU")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Yvyu,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y444")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Y444,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_v210")]
|
2017-08-10 21:41:55 +00:00
|
|
|
V210,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_v216")]
|
2017-08-10 21:41:55 +00:00
|
|
|
V216,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV12")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Nv12,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV21")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Nv21,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GRAY8")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gray8,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GRAY16_BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gray16Be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GRAY16_LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gray16Le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_v308")]
|
2017-08-10 21:41:55 +00:00
|
|
|
V308,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_RGB16")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Rgb16,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_BGR16")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Bgr16,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_RGB15")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Rgb15,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_BGR15")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Bgr15,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_UYVP")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Uyvp,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A420")]
|
2017-08-10 21:41:55 +00:00
|
|
|
A420,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_RGB8P")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Rgb8p,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_YUV9")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Yuv9,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_YVU9")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Yvu9,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_IYU1")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Iyu1,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_ARGB64")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Argb64,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_AYUV64")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Ayuv64,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_r210")]
|
2017-08-10 21:41:55 +00:00
|
|
|
R210,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_I420_10BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
I42010be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_I420_10LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
I42010le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_I422_10BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
I42210be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_I422_10LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
I42210le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y444_10BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Y44410be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y444_10LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Y44410le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GBR")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gbr,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GBR_10BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gbr10be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GBR_10LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gbr10le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV16")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Nv16,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV24")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Nv24,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV12_64Z32")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Nv1264z32,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A420_10BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
A42010be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A420_10LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
A42010le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A422_10BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
A42210be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A422_10LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
A42210le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A444_10BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
A44410be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A444_10LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
A44410le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV61")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Nv61,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_P010_10BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
P01010be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_P010_10LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
P01010le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_IYU2")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Iyu2,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_VYUY")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Vyuy,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GBRA")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gbra,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GBRA_10BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gbra10be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GBRA_10LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gbra10le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GBR_12BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gbr12be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GBR_12LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gbr12le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GBRA_12BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gbra12be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GBRA_12LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Gbra12le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_I420_12BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
I42012be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_I420_12LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
I42012le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_I422_12BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
I42212be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_I422_12LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
I42212le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y444_12BE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Y44412be,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y444_12LE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Y44412le,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GRAY10_LE32")]
|
2018-03-15 08:24:56 +00:00
|
|
|
Gray10Le32,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV12_10LE32")]
|
2018-03-15 08:24:56 +00:00
|
|
|
Nv1210le32,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV16_10LE32")]
|
2018-03-15 08:24:56 +00:00
|
|
|
Nv1610le32,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV12_10LE40")]
|
2019-04-23 14:32:09 +00:00
|
|
|
Nv1210le40,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y210")]
|
2019-04-23 14:32:09 +00:00
|
|
|
Y210,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y410")]
|
2019-04-23 14:32:09 +00:00
|
|
|
Y410,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_VUYA")]
|
2019-04-23 14:32:09 +00:00
|
|
|
Vuya,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_BGR10A2_LE")]
|
2019-04-23 14:32:09 +00:00
|
|
|
Bgr10a2Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_RGB10A2_LE")]
|
2020-04-30 16:51:41 +00:00
|
|
|
Rgb10a2Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y444_16BE")]
|
2020-04-30 16:51:41 +00:00
|
|
|
Y44416be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y444_16LE")]
|
2020-04-30 16:51:41 +00:00
|
|
|
Y44416le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_P016_BE")]
|
2020-04-30 16:51:41 +00:00
|
|
|
P016Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_P016_LE")]
|
2020-04-30 16:51:41 +00:00
|
|
|
P016Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_P012_BE")]
|
2020-04-30 16:51:41 +00:00
|
|
|
P012Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_P012_LE")]
|
2020-04-30 16:51:41 +00:00
|
|
|
P012Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y212_BE")]
|
2020-04-30 16:51:41 +00:00
|
|
|
Y212Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y212_LE")]
|
2020-04-30 16:51:41 +00:00
|
|
|
Y212Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y412_BE")]
|
2020-04-30 16:51:41 +00:00
|
|
|
Y412Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_Y412_LE")]
|
2020-04-30 16:51:41 +00:00
|
|
|
Y412Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV12_4L4")]
|
2020-08-11 07:49:37 +00:00
|
|
|
Nv124l4,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV12_32L32")]
|
2020-08-11 07:49:37 +00:00
|
|
|
Nv1232l32,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-04-17 10:11:52 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_RGBP")]
|
|
|
|
Rgbp,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-04-17 10:11:52 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_BGRP")]
|
|
|
|
Bgrp,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-04-17 10:11:52 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_AV12")]
|
|
|
|
Av12,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-10-30 11:27:17 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_ARGB64_LE")]
|
|
|
|
Argb64Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-10-30 11:27:17 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_ARGB64_BE")]
|
|
|
|
Argb64Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-10-30 11:27:17 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_RGBA64_LE")]
|
|
|
|
Rgba64Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-10-30 11:27:17 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_RGBA64_BE")]
|
|
|
|
Rgba64Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-10-30 11:27:17 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_BGRA64_LE")]
|
|
|
|
Bgra64Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-10-30 11:27:17 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_BGRA64_BE")]
|
|
|
|
Bgra64Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-10-30 11:27:17 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_ABGR64_LE")]
|
|
|
|
Abgr64Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-10-30 11:27:17 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_ABGR64_BE")]
|
|
|
|
Abgr64Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
2022-03-15 13:34:51 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV12_16L32S")]
|
|
|
|
Nv1216l32s,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
2022-03-31 07:34:23 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV12_8L128")]
|
|
|
|
Nv128l128,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
|
2022-03-31 07:34:23 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV12_10BE_8L128")]
|
|
|
|
Nv1210be8l128,
|
2023-07-04 14:20:58 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_NV12_10LE40_4L4")]
|
|
|
|
Nv1210le404l4,
|
2023-08-07 08:07:37 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_DMA_DRM")]
|
|
|
|
DmaDrm,
|
2023-08-28 16:30:21 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_MT2110T")]
|
|
|
|
Mt2110t,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_MT2110R")]
|
|
|
|
Mt2110r,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A422")]
|
|
|
|
A422,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A444")]
|
|
|
|
A444,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A444_12LE")]
|
|
|
|
A44412le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A444_12BE")]
|
|
|
|
A44412be,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A422_12LE")]
|
|
|
|
A42212le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A422_12BE")]
|
|
|
|
A42212be,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A420_12LE")]
|
|
|
|
A42012le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A420_12BE")]
|
|
|
|
A42012be,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A444_16LE")]
|
|
|
|
A44416le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A444_16BE")]
|
|
|
|
A44416be,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A422_16LE")]
|
|
|
|
A42216le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A422_16BE")]
|
|
|
|
A42216be,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A420_16LE")]
|
|
|
|
A42016le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_A420_16BE")]
|
|
|
|
A42016be,
|
2023-10-02 16:44:35 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GBR_16LE")]
|
|
|
|
Gbr16le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_GBR_16BE")]
|
|
|
|
Gbr16be,
|
2023-12-19 09:03:22 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
|
|
|
|
#[doc(alias = "GST_VIDEO_FORMAT_RBGA")]
|
|
|
|
Rbga,
|
2017-08-10 21:41:55 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-12-07 11:11:04 +00:00
|
|
|
impl VideoFormat {
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_format_from_fourcc")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn from_fourcc(fourcc: u32) -> VideoFormat {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe { from_glib(ffi::gst_video_format_from_fourcc(fourcc)) }
|
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_format_from_string")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn from_string(format: &str) -> VideoFormat {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe { from_glib(ffi::gst_video_format_from_string(format.to_glib_none().0)) }
|
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
//#[doc(alias = "gst_video_format_get_palette")]
|
2021-05-03 18:35:37 +00:00
|
|
|
//#[doc(alias = "get_palette")]
|
2022-06-30 05:22:05 +00:00
|
|
|
//pub fn palette(self) -> (/*Unimplemented*/Option<Basic: Pointer>, usize) {
|
2020-12-07 11:11:04 +00:00
|
|
|
// unsafe { TODO: call ffi:gst_video_format_get_palette() }
|
|
|
|
//}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_format_to_fourcc")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn to_fourcc(self) -> u32 {
|
|
|
|
assert_initialized_main_thread!();
|
2021-04-27 15:10:39 +00:00
|
|
|
unsafe { ffi::gst_video_format_to_fourcc(self.into_glib()) }
|
2020-12-07 11:11:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-28 16:52:26 +00:00
|
|
|
impl std::fmt::Display for VideoFormat {
|
2020-12-07 11:11:04 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
2020-12-07 11:11:04 +00:00
|
|
|
f.write_str(&self.to_str())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-10 21:41:55 +00:00
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoFormat {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoFormat;
|
2017-08-10 21:41:55 +00:00
|
|
|
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoFormat {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Unknown => ffi::GST_VIDEO_FORMAT_UNKNOWN,
|
|
|
|
Self::Encoded => ffi::GST_VIDEO_FORMAT_ENCODED,
|
|
|
|
Self::I420 => ffi::GST_VIDEO_FORMAT_I420,
|
|
|
|
Self::Yv12 => ffi::GST_VIDEO_FORMAT_YV12,
|
|
|
|
Self::Yuy2 => ffi::GST_VIDEO_FORMAT_YUY2,
|
|
|
|
Self::Uyvy => ffi::GST_VIDEO_FORMAT_UYVY,
|
|
|
|
Self::Ayuv => ffi::GST_VIDEO_FORMAT_AYUV,
|
|
|
|
Self::Rgbx => ffi::GST_VIDEO_FORMAT_RGBx,
|
|
|
|
Self::Bgrx => ffi::GST_VIDEO_FORMAT_BGRx,
|
|
|
|
Self::Xrgb => ffi::GST_VIDEO_FORMAT_xRGB,
|
|
|
|
Self::Xbgr => ffi::GST_VIDEO_FORMAT_xBGR,
|
|
|
|
Self::Rgba => ffi::GST_VIDEO_FORMAT_RGBA,
|
|
|
|
Self::Bgra => ffi::GST_VIDEO_FORMAT_BGRA,
|
|
|
|
Self::Argb => ffi::GST_VIDEO_FORMAT_ARGB,
|
|
|
|
Self::Abgr => ffi::GST_VIDEO_FORMAT_ABGR,
|
|
|
|
Self::Rgb => ffi::GST_VIDEO_FORMAT_RGB,
|
|
|
|
Self::Bgr => ffi::GST_VIDEO_FORMAT_BGR,
|
|
|
|
Self::Y41b => ffi::GST_VIDEO_FORMAT_Y41B,
|
|
|
|
Self::Y42b => ffi::GST_VIDEO_FORMAT_Y42B,
|
|
|
|
Self::Yvyu => ffi::GST_VIDEO_FORMAT_YVYU,
|
|
|
|
Self::Y444 => ffi::GST_VIDEO_FORMAT_Y444,
|
|
|
|
Self::V210 => ffi::GST_VIDEO_FORMAT_v210,
|
|
|
|
Self::V216 => ffi::GST_VIDEO_FORMAT_v216,
|
|
|
|
Self::Nv12 => ffi::GST_VIDEO_FORMAT_NV12,
|
|
|
|
Self::Nv21 => ffi::GST_VIDEO_FORMAT_NV21,
|
|
|
|
Self::Gray8 => ffi::GST_VIDEO_FORMAT_GRAY8,
|
|
|
|
Self::Gray16Be => ffi::GST_VIDEO_FORMAT_GRAY16_BE,
|
|
|
|
Self::Gray16Le => ffi::GST_VIDEO_FORMAT_GRAY16_LE,
|
|
|
|
Self::V308 => ffi::GST_VIDEO_FORMAT_v308,
|
|
|
|
Self::Rgb16 => ffi::GST_VIDEO_FORMAT_RGB16,
|
|
|
|
Self::Bgr16 => ffi::GST_VIDEO_FORMAT_BGR16,
|
|
|
|
Self::Rgb15 => ffi::GST_VIDEO_FORMAT_RGB15,
|
|
|
|
Self::Bgr15 => ffi::GST_VIDEO_FORMAT_BGR15,
|
|
|
|
Self::Uyvp => ffi::GST_VIDEO_FORMAT_UYVP,
|
|
|
|
Self::A420 => ffi::GST_VIDEO_FORMAT_A420,
|
|
|
|
Self::Rgb8p => ffi::GST_VIDEO_FORMAT_RGB8P,
|
|
|
|
Self::Yuv9 => ffi::GST_VIDEO_FORMAT_YUV9,
|
|
|
|
Self::Yvu9 => ffi::GST_VIDEO_FORMAT_YVU9,
|
|
|
|
Self::Iyu1 => ffi::GST_VIDEO_FORMAT_IYU1,
|
|
|
|
Self::Argb64 => ffi::GST_VIDEO_FORMAT_ARGB64,
|
|
|
|
Self::Ayuv64 => ffi::GST_VIDEO_FORMAT_AYUV64,
|
|
|
|
Self::R210 => ffi::GST_VIDEO_FORMAT_r210,
|
|
|
|
Self::I42010be => ffi::GST_VIDEO_FORMAT_I420_10BE,
|
|
|
|
Self::I42010le => ffi::GST_VIDEO_FORMAT_I420_10LE,
|
|
|
|
Self::I42210be => ffi::GST_VIDEO_FORMAT_I422_10BE,
|
|
|
|
Self::I42210le => ffi::GST_VIDEO_FORMAT_I422_10LE,
|
|
|
|
Self::Y44410be => ffi::GST_VIDEO_FORMAT_Y444_10BE,
|
|
|
|
Self::Y44410le => ffi::GST_VIDEO_FORMAT_Y444_10LE,
|
|
|
|
Self::Gbr => ffi::GST_VIDEO_FORMAT_GBR,
|
|
|
|
Self::Gbr10be => ffi::GST_VIDEO_FORMAT_GBR_10BE,
|
|
|
|
Self::Gbr10le => ffi::GST_VIDEO_FORMAT_GBR_10LE,
|
|
|
|
Self::Nv16 => ffi::GST_VIDEO_FORMAT_NV16,
|
|
|
|
Self::Nv24 => ffi::GST_VIDEO_FORMAT_NV24,
|
|
|
|
Self::Nv1264z32 => ffi::GST_VIDEO_FORMAT_NV12_64Z32,
|
|
|
|
Self::A42010be => ffi::GST_VIDEO_FORMAT_A420_10BE,
|
|
|
|
Self::A42010le => ffi::GST_VIDEO_FORMAT_A420_10LE,
|
|
|
|
Self::A42210be => ffi::GST_VIDEO_FORMAT_A422_10BE,
|
|
|
|
Self::A42210le => ffi::GST_VIDEO_FORMAT_A422_10LE,
|
|
|
|
Self::A44410be => ffi::GST_VIDEO_FORMAT_A444_10BE,
|
|
|
|
Self::A44410le => ffi::GST_VIDEO_FORMAT_A444_10LE,
|
|
|
|
Self::Nv61 => ffi::GST_VIDEO_FORMAT_NV61,
|
|
|
|
Self::P01010be => ffi::GST_VIDEO_FORMAT_P010_10BE,
|
|
|
|
Self::P01010le => ffi::GST_VIDEO_FORMAT_P010_10LE,
|
|
|
|
Self::Iyu2 => ffi::GST_VIDEO_FORMAT_IYU2,
|
|
|
|
Self::Vyuy => ffi::GST_VIDEO_FORMAT_VYUY,
|
|
|
|
Self::Gbra => ffi::GST_VIDEO_FORMAT_GBRA,
|
|
|
|
Self::Gbra10be => ffi::GST_VIDEO_FORMAT_GBRA_10BE,
|
|
|
|
Self::Gbra10le => ffi::GST_VIDEO_FORMAT_GBRA_10LE,
|
|
|
|
Self::Gbr12be => ffi::GST_VIDEO_FORMAT_GBR_12BE,
|
|
|
|
Self::Gbr12le => ffi::GST_VIDEO_FORMAT_GBR_12LE,
|
|
|
|
Self::Gbra12be => ffi::GST_VIDEO_FORMAT_GBRA_12BE,
|
|
|
|
Self::Gbra12le => ffi::GST_VIDEO_FORMAT_GBRA_12LE,
|
|
|
|
Self::I42012be => ffi::GST_VIDEO_FORMAT_I420_12BE,
|
|
|
|
Self::I42012le => ffi::GST_VIDEO_FORMAT_I420_12LE,
|
|
|
|
Self::I42212be => ffi::GST_VIDEO_FORMAT_I422_12BE,
|
|
|
|
Self::I42212le => ffi::GST_VIDEO_FORMAT_I422_12LE,
|
|
|
|
Self::Y44412be => ffi::GST_VIDEO_FORMAT_Y444_12BE,
|
|
|
|
Self::Y44412le => ffi::GST_VIDEO_FORMAT_Y444_12LE,
|
|
|
|
Self::Gray10Le32 => ffi::GST_VIDEO_FORMAT_GRAY10_LE32,
|
|
|
|
Self::Nv1210le32 => ffi::GST_VIDEO_FORMAT_NV12_10LE32,
|
|
|
|
Self::Nv1610le32 => ffi::GST_VIDEO_FORMAT_NV16_10LE32,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Nv1210le40 => ffi::GST_VIDEO_FORMAT_NV12_10LE40,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Y210 => ffi::GST_VIDEO_FORMAT_Y210,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Y410 => ffi::GST_VIDEO_FORMAT_Y410,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Vuya => ffi::GST_VIDEO_FORMAT_VUYA,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Bgr10a2Le => ffi::GST_VIDEO_FORMAT_BGR10A2_LE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Rgb10a2Le => ffi::GST_VIDEO_FORMAT_RGB10A2_LE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Y44416be => ffi::GST_VIDEO_FORMAT_Y444_16BE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Y44416le => ffi::GST_VIDEO_FORMAT_Y444_16LE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::P016Be => ffi::GST_VIDEO_FORMAT_P016_BE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::P016Le => ffi::GST_VIDEO_FORMAT_P016_LE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::P012Be => ffi::GST_VIDEO_FORMAT_P012_BE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::P012Le => ffi::GST_VIDEO_FORMAT_P012_LE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Y212Be => ffi::GST_VIDEO_FORMAT_Y212_BE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Y212Le => ffi::GST_VIDEO_FORMAT_Y212_LE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Y412Be => ffi::GST_VIDEO_FORMAT_Y412_BE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Y412Le => ffi::GST_VIDEO_FORMAT_Y412_LE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Nv124l4 => ffi::GST_VIDEO_FORMAT_NV12_4L4,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Nv1232l32 => ffi::GST_VIDEO_FORMAT_NV12_32L32,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-04-17 10:11:52 +00:00
|
|
|
Self::Rgbp => ffi::GST_VIDEO_FORMAT_RGBP,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-04-17 10:11:52 +00:00
|
|
|
Self::Bgrp => ffi::GST_VIDEO_FORMAT_BGRP,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-04-17 10:11:52 +00:00
|
|
|
Self::Av12 => ffi::GST_VIDEO_FORMAT_AV12,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
Self::Argb64Le => ffi::GST_VIDEO_FORMAT_ARGB64_LE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
Self::Argb64Be => ffi::GST_VIDEO_FORMAT_ARGB64_BE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
Self::Rgba64Le => ffi::GST_VIDEO_FORMAT_RGBA64_LE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
Self::Rgba64Be => ffi::GST_VIDEO_FORMAT_RGBA64_BE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
Self::Bgra64Le => ffi::GST_VIDEO_FORMAT_BGRA64_LE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
Self::Bgra64Be => ffi::GST_VIDEO_FORMAT_BGRA64_BE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
Self::Abgr64Le => ffi::GST_VIDEO_FORMAT_ABGR64_LE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
Self::Abgr64Be => ffi::GST_VIDEO_FORMAT_ABGR64_BE,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-15 13:34:51 +00:00
|
|
|
Self::Nv1216l32s => ffi::GST_VIDEO_FORMAT_NV12_16L32S,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
Self::Nv128l128 => ffi::GST_VIDEO_FORMAT_NV12_8L128,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
Self::Nv1210be8l128 => ffi::GST_VIDEO_FORMAT_NV12_10BE_8L128,
|
2023-07-04 14:20:58 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::Nv1210le404l4 => ffi::GST_VIDEO_FORMAT_NV12_10LE40_4L4,
|
2023-08-07 08:07:37 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::DmaDrm => ffi::GST_VIDEO_FORMAT_DMA_DRM,
|
2023-08-28 16:30:21 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::Mt2110t => ffi::GST_VIDEO_FORMAT_MT2110T,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::Mt2110r => ffi::GST_VIDEO_FORMAT_MT2110R,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A422 => ffi::GST_VIDEO_FORMAT_A422,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A444 => ffi::GST_VIDEO_FORMAT_A444,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A44412le => ffi::GST_VIDEO_FORMAT_A444_12LE,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A44412be => ffi::GST_VIDEO_FORMAT_A444_12BE,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A42212le => ffi::GST_VIDEO_FORMAT_A422_12LE,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A42212be => ffi::GST_VIDEO_FORMAT_A422_12BE,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A42012le => ffi::GST_VIDEO_FORMAT_A420_12LE,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A42012be => ffi::GST_VIDEO_FORMAT_A420_12BE,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A44416le => ffi::GST_VIDEO_FORMAT_A444_16LE,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A44416be => ffi::GST_VIDEO_FORMAT_A444_16BE,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A42216le => ffi::GST_VIDEO_FORMAT_A422_16LE,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A42216be => ffi::GST_VIDEO_FORMAT_A422_16BE,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A42016le => ffi::GST_VIDEO_FORMAT_A420_16LE,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::A42016be => ffi::GST_VIDEO_FORMAT_A420_16BE,
|
2023-10-02 16:44:35 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::Gbr16le => ffi::GST_VIDEO_FORMAT_GBR_16LE,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::Gbr16be => ffi::GST_VIDEO_FORMAT_GBR_16BE,
|
2023-12-19 09:03:22 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
Self::Rbga => ffi::GST_VIDEO_FORMAT_RBGA,
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::__Unknown(value) => value,
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoFormat> for VideoFormat {
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoFormat) -> Self {
|
2017-08-10 21:41:55 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2017-11-05 17:01:15 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_UNKNOWN => Self::Unknown,
|
|
|
|
ffi::GST_VIDEO_FORMAT_ENCODED => Self::Encoded,
|
|
|
|
ffi::GST_VIDEO_FORMAT_I420 => Self::I420,
|
|
|
|
ffi::GST_VIDEO_FORMAT_YV12 => Self::Yv12,
|
|
|
|
ffi::GST_VIDEO_FORMAT_YUY2 => Self::Yuy2,
|
|
|
|
ffi::GST_VIDEO_FORMAT_UYVY => Self::Uyvy,
|
|
|
|
ffi::GST_VIDEO_FORMAT_AYUV => Self::Ayuv,
|
|
|
|
ffi::GST_VIDEO_FORMAT_RGBx => Self::Rgbx,
|
|
|
|
ffi::GST_VIDEO_FORMAT_BGRx => Self::Bgrx,
|
|
|
|
ffi::GST_VIDEO_FORMAT_xRGB => Self::Xrgb,
|
|
|
|
ffi::GST_VIDEO_FORMAT_xBGR => Self::Xbgr,
|
|
|
|
ffi::GST_VIDEO_FORMAT_RGBA => Self::Rgba,
|
|
|
|
ffi::GST_VIDEO_FORMAT_BGRA => Self::Bgra,
|
|
|
|
ffi::GST_VIDEO_FORMAT_ARGB => Self::Argb,
|
|
|
|
ffi::GST_VIDEO_FORMAT_ABGR => Self::Abgr,
|
|
|
|
ffi::GST_VIDEO_FORMAT_RGB => Self::Rgb,
|
|
|
|
ffi::GST_VIDEO_FORMAT_BGR => Self::Bgr,
|
|
|
|
ffi::GST_VIDEO_FORMAT_Y41B => Self::Y41b,
|
|
|
|
ffi::GST_VIDEO_FORMAT_Y42B => Self::Y42b,
|
|
|
|
ffi::GST_VIDEO_FORMAT_YVYU => Self::Yvyu,
|
|
|
|
ffi::GST_VIDEO_FORMAT_Y444 => Self::Y444,
|
|
|
|
ffi::GST_VIDEO_FORMAT_v210 => Self::V210,
|
|
|
|
ffi::GST_VIDEO_FORMAT_v216 => Self::V216,
|
|
|
|
ffi::GST_VIDEO_FORMAT_NV12 => Self::Nv12,
|
|
|
|
ffi::GST_VIDEO_FORMAT_NV21 => Self::Nv21,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GRAY8 => Self::Gray8,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GRAY16_BE => Self::Gray16Be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GRAY16_LE => Self::Gray16Le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_v308 => Self::V308,
|
|
|
|
ffi::GST_VIDEO_FORMAT_RGB16 => Self::Rgb16,
|
|
|
|
ffi::GST_VIDEO_FORMAT_BGR16 => Self::Bgr16,
|
|
|
|
ffi::GST_VIDEO_FORMAT_RGB15 => Self::Rgb15,
|
|
|
|
ffi::GST_VIDEO_FORMAT_BGR15 => Self::Bgr15,
|
|
|
|
ffi::GST_VIDEO_FORMAT_UYVP => Self::Uyvp,
|
|
|
|
ffi::GST_VIDEO_FORMAT_A420 => Self::A420,
|
|
|
|
ffi::GST_VIDEO_FORMAT_RGB8P => Self::Rgb8p,
|
|
|
|
ffi::GST_VIDEO_FORMAT_YUV9 => Self::Yuv9,
|
|
|
|
ffi::GST_VIDEO_FORMAT_YVU9 => Self::Yvu9,
|
|
|
|
ffi::GST_VIDEO_FORMAT_IYU1 => Self::Iyu1,
|
|
|
|
ffi::GST_VIDEO_FORMAT_ARGB64 => Self::Argb64,
|
|
|
|
ffi::GST_VIDEO_FORMAT_AYUV64 => Self::Ayuv64,
|
|
|
|
ffi::GST_VIDEO_FORMAT_r210 => Self::R210,
|
|
|
|
ffi::GST_VIDEO_FORMAT_I420_10BE => Self::I42010be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_I420_10LE => Self::I42010le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_I422_10BE => Self::I42210be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_I422_10LE => Self::I42210le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_Y444_10BE => Self::Y44410be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_Y444_10LE => Self::Y44410le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GBR => Self::Gbr,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GBR_10BE => Self::Gbr10be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GBR_10LE => Self::Gbr10le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_NV16 => Self::Nv16,
|
|
|
|
ffi::GST_VIDEO_FORMAT_NV24 => Self::Nv24,
|
|
|
|
ffi::GST_VIDEO_FORMAT_NV12_64Z32 => Self::Nv1264z32,
|
|
|
|
ffi::GST_VIDEO_FORMAT_A420_10BE => Self::A42010be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_A420_10LE => Self::A42010le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_A422_10BE => Self::A42210be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_A422_10LE => Self::A42210le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_A444_10BE => Self::A44410be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_A444_10LE => Self::A44410le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_NV61 => Self::Nv61,
|
|
|
|
ffi::GST_VIDEO_FORMAT_P010_10BE => Self::P01010be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_P010_10LE => Self::P01010le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_IYU2 => Self::Iyu2,
|
|
|
|
ffi::GST_VIDEO_FORMAT_VYUY => Self::Vyuy,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GBRA => Self::Gbra,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GBRA_10BE => Self::Gbra10be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GBRA_10LE => Self::Gbra10le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GBR_12BE => Self::Gbr12be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GBR_12LE => Self::Gbr12le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GBRA_12BE => Self::Gbra12be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GBRA_12LE => Self::Gbra12le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_I420_12BE => Self::I42012be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_I420_12LE => Self::I42012le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_I422_12BE => Self::I42212be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_I422_12LE => Self::I42212le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_Y444_12BE => Self::Y44412be,
|
|
|
|
ffi::GST_VIDEO_FORMAT_Y444_12LE => Self::Y44412le,
|
|
|
|
ffi::GST_VIDEO_FORMAT_GRAY10_LE32 => Self::Gray10Le32,
|
|
|
|
ffi::GST_VIDEO_FORMAT_NV12_10LE32 => Self::Nv1210le32,
|
|
|
|
ffi::GST_VIDEO_FORMAT_NV16_10LE32 => Self::Nv1610le32,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_NV12_10LE40 => Self::Nv1210le40,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_Y210 => Self::Y210,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_Y410 => Self::Y410,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_VUYA => Self::Vuya,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_BGR10A2_LE => Self::Bgr10a2Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_RGB10A2_LE => Self::Rgb10a2Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_Y444_16BE => Self::Y44416be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_Y444_16LE => Self::Y44416le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_P016_BE => Self::P016Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_P016_LE => Self::P016Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_P012_BE => Self::P012Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_P012_LE => Self::P012Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_Y212_BE => Self::Y212Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_Y212_LE => Self::Y212Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_Y412_BE => Self::Y412Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_Y412_LE => Self::Y412Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_NV12_4L4 => Self::Nv124l4,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_NV12_32L32 => Self::Nv1232l32,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-04-17 10:11:52 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_RGBP => Self::Rgbp,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-04-17 10:11:52 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_BGRP => Self::Bgrp,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-04-17 10:11:52 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_AV12 => Self::Av12,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_ARGB64_LE => Self::Argb64Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_ARGB64_BE => Self::Argb64Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_RGBA64_LE => Self::Rgba64Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_RGBA64_BE => Self::Rgba64Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_BGRA64_LE => Self::Bgra64Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_BGRA64_BE => Self::Bgra64Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_ABGR64_LE => Self::Abgr64Le,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
2021-10-30 11:27:17 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_ABGR64_BE => Self::Abgr64Be,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-15 13:34:51 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_NV12_16L32S => Self::Nv1216l32s,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_NV12_8L128 => Self::Nv128l128,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_22")]
|
2022-03-31 07:34:23 +00:00
|
|
|
ffi::GST_VIDEO_FORMAT_NV12_10BE_8L128 => Self::Nv1210be8l128,
|
2023-07-04 14:20:58 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_NV12_10LE40_4L4 => Self::Nv1210le404l4,
|
2023-08-07 08:07:37 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_DMA_DRM => Self::DmaDrm,
|
2023-08-28 16:30:21 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_MT2110T => Self::Mt2110t,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_MT2110R => Self::Mt2110r,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A422 => Self::A422,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A444 => Self::A444,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A444_12LE => Self::A44412le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A444_12BE => Self::A44412be,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A422_12LE => Self::A42212le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A422_12BE => Self::A42212be,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A420_12LE => Self::A42012le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A420_12BE => Self::A42012be,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A444_16LE => Self::A44416le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A444_16BE => Self::A44416be,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A422_16LE => Self::A42216le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A422_16BE => Self::A42216be,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A420_16LE => Self::A42016le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_A420_16BE => Self::A42016be,
|
2023-10-02 16:44:35 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_GBR_16LE => Self::Gbr16le,
|
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_GBR_16BE => Self::Gbr16be,
|
2023-12-19 09:03:22 +00:00
|
|
|
#[cfg(feature = "v1_24")]
|
|
|
|
ffi::GST_VIDEO_FORMAT_RBGA => Self::Rbga,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoFormat {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_format_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_format_get_type()) }
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoFormat {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoFormat {
|
|
|
|
type Type = Self;
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoFormat {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoFormat {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoFormat> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoFormat) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-30 21:12:07 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoGammaMode")]
|
2020-01-30 21:12:07 +00:00
|
|
|
pub enum VideoGammaMode {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_GAMMA_MODE_NONE")]
|
2020-01-30 21:12:07 +00:00
|
|
|
None,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_GAMMA_MODE_REMAP")]
|
2020-01-30 21:12:07 +00:00
|
|
|
Remap,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoGammaMode {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoGammaMode;
|
2020-01-30 21:12:07 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoGammaMode {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::None => ffi::GST_VIDEO_GAMMA_MODE_NONE,
|
|
|
|
Self::Remap => ffi::GST_VIDEO_GAMMA_MODE_REMAP,
|
|
|
|
Self::__Unknown(value) => value,
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoGammaMode> for VideoGammaMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoGammaMode) -> Self {
|
2020-01-30 21:12:07 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2020-01-30 21:12:07 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_GAMMA_MODE_NONE => Self::None,
|
|
|
|
ffi::GST_VIDEO_GAMMA_MODE_REMAP => Self::Remap,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoGammaMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_gamma_mode_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_gamma_mode_get_type()) }
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoGammaMode {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoGammaMode {
|
|
|
|
type Type = Self;
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoGammaMode {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoGammaMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoGammaMode> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoGammaMode) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoInterlaceMode")]
|
2017-08-10 21:41:55 +00:00
|
|
|
pub enum VideoInterlaceMode {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_INTERLACE_MODE_PROGRESSIVE")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Progressive,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_INTERLACE_MODE_INTERLEAVED")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Interleaved,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_INTERLACE_MODE_MIXED")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Mixed,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_INTERLACE_MODE_FIELDS")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Fields,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_INTERLACE_MODE_ALTERNATE")]
|
2019-04-23 14:32:09 +00:00
|
|
|
Alternate,
|
2017-08-10 21:41:55 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-12-07 11:11:04 +00:00
|
|
|
impl VideoInterlaceMode {
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_interlace_mode_from_string")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn from_string(mode: &str) -> VideoInterlaceMode {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe {
|
|
|
|
from_glib(ffi::gst_video_interlace_mode_from_string(
|
|
|
|
mode.to_glib_none().0,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-06 09:13:12 +00:00
|
|
|
pub fn to_str<'a>(self) -> &'a GStr {
|
2020-12-07 11:11:04 +00:00
|
|
|
unsafe {
|
2023-01-06 09:13:12 +00:00
|
|
|
GStr::from_ptr(
|
2021-04-27 15:10:39 +00:00
|
|
|
ffi::gst_video_interlace_mode_to_string(self.into_glib())
|
2020-12-07 11:11:04 +00:00
|
|
|
.as_ref()
|
|
|
|
.expect("gst_video_interlace_mode_to_string returned NULL"),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-28 16:52:26 +00:00
|
|
|
impl std::fmt::Display for VideoInterlaceMode {
|
2020-12-07 11:11:04 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
2020-12-07 11:11:04 +00:00
|
|
|
f.write_str(&self.to_str())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-10 21:41:55 +00:00
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoInterlaceMode {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoInterlaceMode;
|
2017-08-10 21:41:55 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoInterlaceMode {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Progressive => ffi::GST_VIDEO_INTERLACE_MODE_PROGRESSIVE,
|
|
|
|
Self::Interleaved => ffi::GST_VIDEO_INTERLACE_MODE_INTERLEAVED,
|
|
|
|
Self::Mixed => ffi::GST_VIDEO_INTERLACE_MODE_MIXED,
|
|
|
|
Self::Fields => ffi::GST_VIDEO_INTERLACE_MODE_FIELDS,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Alternate => ffi::GST_VIDEO_INTERLACE_MODE_ALTERNATE,
|
|
|
|
Self::__Unknown(value) => value,
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoInterlaceMode> for VideoInterlaceMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoInterlaceMode) -> Self {
|
2017-08-10 21:41:55 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2017-11-05 17:01:15 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_INTERLACE_MODE_PROGRESSIVE => Self::Progressive,
|
|
|
|
ffi::GST_VIDEO_INTERLACE_MODE_INTERLEAVED => Self::Interleaved,
|
|
|
|
ffi::GST_VIDEO_INTERLACE_MODE_MIXED => Self::Mixed,
|
|
|
|
ffi::GST_VIDEO_INTERLACE_MODE_FIELDS => Self::Fields,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_16")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_INTERLACE_MODE_ALTERNATE => Self::Alternate,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoInterlaceMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_interlace_mode_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_interlace_mode_get_type()) }
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoInterlaceMode {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoInterlaceMode {
|
|
|
|
type Type = Self;
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoInterlaceMode {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoInterlaceMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2017-12-16 08:56:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoInterlaceMode> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoInterlaceMode) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-30 21:12:07 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoMatrixMode")]
|
2020-01-30 21:12:07 +00:00
|
|
|
pub enum VideoMatrixMode {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MATRIX_MODE_FULL")]
|
2020-01-30 21:12:07 +00:00
|
|
|
Full,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MATRIX_MODE_INPUT_ONLY")]
|
2020-01-30 21:12:07 +00:00
|
|
|
InputOnly,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY")]
|
2020-01-30 21:12:07 +00:00
|
|
|
OutputOnly,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MATRIX_MODE_NONE")]
|
2020-01-30 21:12:07 +00:00
|
|
|
None,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoMatrixMode {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoMatrixMode;
|
2020-01-30 21:12:07 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoMatrixMode {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Full => ffi::GST_VIDEO_MATRIX_MODE_FULL,
|
|
|
|
Self::InputOnly => ffi::GST_VIDEO_MATRIX_MODE_INPUT_ONLY,
|
|
|
|
Self::OutputOnly => ffi::GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY,
|
|
|
|
Self::None => ffi::GST_VIDEO_MATRIX_MODE_NONE,
|
|
|
|
Self::__Unknown(value) => value,
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoMatrixMode> for VideoMatrixMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoMatrixMode) -> Self {
|
2020-01-30 21:12:07 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2020-01-30 21:12:07 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_MATRIX_MODE_FULL => Self::Full,
|
|
|
|
ffi::GST_VIDEO_MATRIX_MODE_INPUT_ONLY => Self::InputOnly,
|
|
|
|
ffi::GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY => Self::OutputOnly,
|
|
|
|
ffi::GST_VIDEO_MATRIX_MODE_NONE => Self::None,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoMatrixMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_matrix_mode_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_matrix_mode_get_type()) }
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoMatrixMode {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoMatrixMode {
|
|
|
|
type Type = Self;
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoMatrixMode {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoMatrixMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoMatrixMode> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoMatrixMode) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoMultiviewFramePacking")]
|
2017-12-16 08:56:19 +00:00
|
|
|
pub enum VideoMultiviewFramePacking {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE")]
|
2017-12-16 08:56:19 +00:00
|
|
|
None,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO")]
|
2017-12-16 08:56:19 +00:00
|
|
|
Mono,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT")]
|
2017-12-16 08:56:19 +00:00
|
|
|
Left,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT")]
|
2017-12-16 08:56:19 +00:00
|
|
|
Right,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE")]
|
2017-12-16 08:56:19 +00:00
|
|
|
SideBySide,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX")]
|
2017-12-16 08:56:19 +00:00
|
|
|
SideBySideQuincunx,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED")]
|
2017-12-16 08:56:19 +00:00
|
|
|
ColumnInterleaved,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED")]
|
2017-12-16 08:56:19 +00:00
|
|
|
RowInterleaved,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM")]
|
2017-12-16 08:56:19 +00:00
|
|
|
TopBottom,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD")]
|
2017-12-16 08:56:19 +00:00
|
|
|
Checkerboard,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoMultiviewFramePacking {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoMultiviewFramePacking;
|
2017-12-16 08:56:19 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoMultiviewFramePacking {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::None => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE,
|
|
|
|
Self::Mono => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO,
|
|
|
|
Self::Left => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT,
|
|
|
|
Self::Right => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT,
|
|
|
|
Self::SideBySide => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE,
|
|
|
|
Self::SideBySideQuincunx => {
|
2020-11-22 09:50:37 +00:00
|
|
|
ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX
|
2019-06-18 10:12:00 +00:00
|
|
|
}
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::ColumnInterleaved => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED,
|
|
|
|
Self::RowInterleaved => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED,
|
|
|
|
Self::TopBottom => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM,
|
|
|
|
Self::Checkerboard => ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD,
|
|
|
|
Self::__Unknown(value) => value,
|
2017-12-16 08:56:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoMultiviewFramePacking> for VideoMultiviewFramePacking {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoMultiviewFramePacking) -> Self {
|
2017-12-16 08:56:19 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2017-12-16 08:56:19 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE => Self::None,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO => Self::Mono,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT => Self::Left,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT => Self::Right,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE => Self::SideBySide,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX => {
|
|
|
|
Self::SideBySideQuincunx
|
|
|
|
}
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED => Self::ColumnInterleaved,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED => Self::RowInterleaved,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM => Self::TopBottom,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD => Self::Checkerboard,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2017-12-16 08:56:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoMultiviewFramePacking {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_multiview_frame_packing_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_multiview_frame_packing_get_type()) }
|
2017-12-16 08:56:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoMultiviewFramePacking {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoMultiviewFramePacking {
|
|
|
|
type Type = Self;
|
2017-12-16 08:56:19 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoMultiviewFramePacking {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2017-12-16 08:56:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoMultiviewFramePacking {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoMultiviewFramePacking> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoMultiviewFramePacking) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoMultiviewMode")]
|
2017-08-11 09:29:23 +00:00
|
|
|
pub enum VideoMultiviewMode {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_NONE")]
|
2017-08-11 09:29:23 +00:00
|
|
|
None,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_MONO")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Mono,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_LEFT")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Left,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_RIGHT")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Right,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE")]
|
2017-08-11 09:29:23 +00:00
|
|
|
SideBySide,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX")]
|
2017-08-11 09:29:23 +00:00
|
|
|
SideBySideQuincunx,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED")]
|
2017-08-11 09:29:23 +00:00
|
|
|
ColumnInterleaved,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED")]
|
2017-08-11 09:29:23 +00:00
|
|
|
RowInterleaved,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM")]
|
2017-08-11 09:29:23 +00:00
|
|
|
TopBottom,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Checkerboard,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME")]
|
2017-08-11 09:29:23 +00:00
|
|
|
FrameByFrame,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME")]
|
2017-08-11 09:29:23 +00:00
|
|
|
MultiviewFrameByFrame,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_SEPARATED")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Separated,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-12-07 11:11:04 +00:00
|
|
|
impl VideoMultiviewMode {
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_multiview_mode_from_caps_string")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn from_caps_string(caps_mview_mode: &str) -> VideoMultiviewMode {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe {
|
|
|
|
from_glib(ffi::gst_video_multiview_mode_from_caps_string(
|
|
|
|
caps_mview_mode.to_glib_none().0,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_multiview_mode_to_caps_string")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn to_caps_string(self) -> Option<glib::GString> {
|
|
|
|
assert_initialized_main_thread!();
|
2021-04-27 15:10:39 +00:00
|
|
|
unsafe {
|
|
|
|
from_glib_none(ffi::gst_video_multiview_mode_to_caps_string(
|
|
|
|
self.into_glib(),
|
|
|
|
))
|
|
|
|
}
|
2020-12-07 11:11:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-11 09:29:23 +00:00
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoMultiviewMode {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoMultiviewMode;
|
2017-08-11 09:29:23 +00:00
|
|
|
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoMultiviewMode {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::None => ffi::GST_VIDEO_MULTIVIEW_MODE_NONE,
|
|
|
|
Self::Mono => ffi::GST_VIDEO_MULTIVIEW_MODE_MONO,
|
|
|
|
Self::Left => ffi::GST_VIDEO_MULTIVIEW_MODE_LEFT,
|
|
|
|
Self::Right => ffi::GST_VIDEO_MULTIVIEW_MODE_RIGHT,
|
|
|
|
Self::SideBySide => ffi::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE,
|
|
|
|
Self::SideBySideQuincunx => ffi::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX,
|
|
|
|
Self::ColumnInterleaved => ffi::GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED,
|
|
|
|
Self::RowInterleaved => ffi::GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED,
|
|
|
|
Self::TopBottom => ffi::GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM,
|
|
|
|
Self::Checkerboard => ffi::GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD,
|
|
|
|
Self::FrameByFrame => ffi::GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME,
|
|
|
|
Self::MultiviewFrameByFrame => ffi::GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME,
|
|
|
|
Self::Separated => ffi::GST_VIDEO_MULTIVIEW_MODE_SEPARATED,
|
|
|
|
Self::__Unknown(value) => value,
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoMultiviewMode> for VideoMultiviewMode {
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoMultiviewMode) -> Self {
|
2017-08-11 09:29:23 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2017-11-05 17:01:15 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_NONE => Self::None,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_MONO => Self::Mono,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_LEFT => Self::Left,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_RIGHT => Self::Right,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE => Self::SideBySide,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX => Self::SideBySideQuincunx,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED => Self::ColumnInterleaved,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED => Self::RowInterleaved,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM => Self::TopBottom,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD => Self::Checkerboard,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME => Self::FrameByFrame,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME => Self::MultiviewFrameByFrame,
|
|
|
|
ffi::GST_VIDEO_MULTIVIEW_MODE_SEPARATED => Self::Separated,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoMultiviewMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_multiview_mode_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_multiview_mode_get_type()) }
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoMultiviewMode {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoMultiviewMode {
|
|
|
|
type Type = Self;
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoMultiviewMode {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoMultiviewMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoMultiviewMode> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoMultiviewMode) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-02-19 16:42:38 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
|
|
|
#[non_exhaustive]
|
|
|
|
#[doc(alias = "GstVideoOrientationMethod")]
|
|
|
|
pub enum VideoOrientationMethod {
|
|
|
|
#[doc(alias = "GST_VIDEO_ORIENTATION_IDENTITY")]
|
|
|
|
Identity,
|
|
|
|
#[doc(alias = "GST_VIDEO_ORIENTATION_90R")]
|
|
|
|
_90r,
|
|
|
|
#[doc(alias = "GST_VIDEO_ORIENTATION_180")]
|
|
|
|
_180,
|
|
|
|
#[doc(alias = "GST_VIDEO_ORIENTATION_90L")]
|
|
|
|
_90l,
|
|
|
|
#[doc(alias = "GST_VIDEO_ORIENTATION_HORIZ")]
|
|
|
|
Horiz,
|
|
|
|
#[doc(alias = "GST_VIDEO_ORIENTATION_VERT")]
|
|
|
|
Vert,
|
|
|
|
#[doc(alias = "GST_VIDEO_ORIENTATION_UL_LR")]
|
|
|
|
UlLr,
|
|
|
|
#[doc(alias = "GST_VIDEO_ORIENTATION_UR_LL")]
|
|
|
|
UrLl,
|
|
|
|
#[doc(alias = "GST_VIDEO_ORIENTATION_AUTO")]
|
|
|
|
Auto,
|
|
|
|
#[doc(alias = "GST_VIDEO_ORIENTATION_CUSTOM")]
|
|
|
|
Custom,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoOrientationMethod {
|
2021-02-19 16:42:38 +00:00
|
|
|
type GlibType = ffi::GstVideoOrientationMethod;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoOrientationMethod {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Identity => ffi::GST_VIDEO_ORIENTATION_IDENTITY,
|
|
|
|
Self::_90r => ffi::GST_VIDEO_ORIENTATION_90R,
|
|
|
|
Self::_180 => ffi::GST_VIDEO_ORIENTATION_180,
|
|
|
|
Self::_90l => ffi::GST_VIDEO_ORIENTATION_90L,
|
|
|
|
Self::Horiz => ffi::GST_VIDEO_ORIENTATION_HORIZ,
|
|
|
|
Self::Vert => ffi::GST_VIDEO_ORIENTATION_VERT,
|
|
|
|
Self::UlLr => ffi::GST_VIDEO_ORIENTATION_UL_LR,
|
|
|
|
Self::UrLl => ffi::GST_VIDEO_ORIENTATION_UR_LL,
|
|
|
|
Self::Auto => ffi::GST_VIDEO_ORIENTATION_AUTO,
|
|
|
|
Self::Custom => ffi::GST_VIDEO_ORIENTATION_CUSTOM,
|
|
|
|
Self::__Unknown(value) => value,
|
2021-02-19 16:42:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
|
|
|
impl FromGlib<ffi::GstVideoOrientationMethod> for VideoOrientationMethod {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-02-19 16:42:38 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoOrientationMethod) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2021-02-19 16:42:38 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_ORIENTATION_IDENTITY => Self::Identity,
|
|
|
|
ffi::GST_VIDEO_ORIENTATION_90R => Self::_90r,
|
|
|
|
ffi::GST_VIDEO_ORIENTATION_180 => Self::_180,
|
|
|
|
ffi::GST_VIDEO_ORIENTATION_90L => Self::_90l,
|
|
|
|
ffi::GST_VIDEO_ORIENTATION_HORIZ => Self::Horiz,
|
|
|
|
ffi::GST_VIDEO_ORIENTATION_VERT => Self::Vert,
|
|
|
|
ffi::GST_VIDEO_ORIENTATION_UL_LR => Self::UlLr,
|
|
|
|
ffi::GST_VIDEO_ORIENTATION_UR_LL => Self::UrLl,
|
|
|
|
ffi::GST_VIDEO_ORIENTATION_AUTO => Self::Auto,
|
|
|
|
ffi::GST_VIDEO_ORIENTATION_CUSTOM => Self::Custom,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2021-02-19 16:42:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoOrientationMethod {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_orientation_method_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2021-02-19 16:42:38 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_orientation_method_get_type()) }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoOrientationMethod {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoOrientationMethod {
|
|
|
|
type Type = Self;
|
2021-02-19 16:42:38 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoOrientationMethod {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2021-02-19 16:42:38 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoOrientationMethod {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2021-02-19 16:42:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoOrientationMethod> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoOrientationMethod) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-30 21:12:07 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoPrimariesMode")]
|
2020-01-30 21:12:07 +00:00
|
|
|
pub enum VideoPrimariesMode {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_PRIMARIES_MODE_NONE")]
|
2020-01-30 21:12:07 +00:00
|
|
|
None,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY")]
|
2020-01-30 21:12:07 +00:00
|
|
|
MergeOnly,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_PRIMARIES_MODE_FAST")]
|
2020-01-30 21:12:07 +00:00
|
|
|
Fast,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoPrimariesMode {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoPrimariesMode;
|
2020-01-30 21:12:07 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoPrimariesMode {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::None => ffi::GST_VIDEO_PRIMARIES_MODE_NONE,
|
|
|
|
Self::MergeOnly => ffi::GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY,
|
|
|
|
Self::Fast => ffi::GST_VIDEO_PRIMARIES_MODE_FAST,
|
|
|
|
Self::__Unknown(value) => value,
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoPrimariesMode> for VideoPrimariesMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoPrimariesMode) -> Self {
|
2020-01-30 21:12:07 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2020-01-30 21:12:07 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_PRIMARIES_MODE_NONE => Self::None,
|
|
|
|
ffi::GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY => Self::MergeOnly,
|
|
|
|
ffi::GST_VIDEO_PRIMARIES_MODE_FAST => Self::Fast,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoPrimariesMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_primaries_mode_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_primaries_mode_get_type()) }
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoPrimariesMode {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoPrimariesMode {
|
|
|
|
type Type = Self;
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoPrimariesMode {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoPrimariesMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoPrimariesMode> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoPrimariesMode) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-01-30 21:12:07 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoResamplerMethod")]
|
2020-01-30 21:12:07 +00:00
|
|
|
pub enum VideoResamplerMethod {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_RESAMPLER_METHOD_NEAREST")]
|
2020-01-30 21:12:07 +00:00
|
|
|
Nearest,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_RESAMPLER_METHOD_LINEAR")]
|
2020-01-30 21:12:07 +00:00
|
|
|
Linear,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_RESAMPLER_METHOD_CUBIC")]
|
2020-01-30 21:12:07 +00:00
|
|
|
Cubic,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_RESAMPLER_METHOD_SINC")]
|
2020-01-30 21:12:07 +00:00
|
|
|
Sinc,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_RESAMPLER_METHOD_LANCZOS")]
|
2020-01-30 21:12:07 +00:00
|
|
|
Lanczos,
|
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoResamplerMethod {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoResamplerMethod;
|
2020-01-30 21:12:07 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoResamplerMethod {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Nearest => ffi::GST_VIDEO_RESAMPLER_METHOD_NEAREST,
|
|
|
|
Self::Linear => ffi::GST_VIDEO_RESAMPLER_METHOD_LINEAR,
|
|
|
|
Self::Cubic => ffi::GST_VIDEO_RESAMPLER_METHOD_CUBIC,
|
|
|
|
Self::Sinc => ffi::GST_VIDEO_RESAMPLER_METHOD_SINC,
|
|
|
|
Self::Lanczos => ffi::GST_VIDEO_RESAMPLER_METHOD_LANCZOS,
|
|
|
|
Self::__Unknown(value) => value,
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoResamplerMethod> for VideoResamplerMethod {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoResamplerMethod) -> Self {
|
2020-01-30 21:12:07 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2020-01-30 21:12:07 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_RESAMPLER_METHOD_NEAREST => Self::Nearest,
|
|
|
|
ffi::GST_VIDEO_RESAMPLER_METHOD_LINEAR => Self::Linear,
|
|
|
|
ffi::GST_VIDEO_RESAMPLER_METHOD_CUBIC => Self::Cubic,
|
|
|
|
ffi::GST_VIDEO_RESAMPLER_METHOD_SINC => Self::Sinc,
|
|
|
|
ffi::GST_VIDEO_RESAMPLER_METHOD_LANCZOS => Self::Lanczos,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoResamplerMethod {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_resampler_method_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_resampler_method_get_type()) }
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoResamplerMethod {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoResamplerMethod {
|
|
|
|
type Type = Self;
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoResamplerMethod {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2020-01-30 21:12:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoResamplerMethod {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoResamplerMethod> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoResamplerMethod) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoTileMode")]
|
2017-08-10 21:41:55 +00:00
|
|
|
pub enum VideoTileMode {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TILE_MODE_UNKNOWN")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Unknown,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TILE_MODE_ZFLIPZ_2X2")]
|
2017-08-10 21:41:55 +00:00
|
|
|
Zflipz2x2,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TILE_MODE_LINEAR")]
|
2020-08-11 07:49:37 +00:00
|
|
|
Linear,
|
2017-08-10 21:41:55 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoTileMode {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoTileMode;
|
2017-08-10 21:41:55 +00:00
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoTileMode {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Unknown => ffi::GST_VIDEO_TILE_MODE_UNKNOWN,
|
|
|
|
Self::Zflipz2x2 => ffi::GST_VIDEO_TILE_MODE_ZFLIPZ_2X2,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Linear => ffi::GST_VIDEO_TILE_MODE_LINEAR,
|
|
|
|
Self::__Unknown(value) => value,
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoTileMode> for VideoTileMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoTileMode) -> Self {
|
2017-08-10 21:41:55 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2017-11-05 17:01:15 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_TILE_MODE_UNKNOWN => Self::Unknown,
|
|
|
|
ffi::GST_VIDEO_TILE_MODE_ZFLIPZ_2X2 => Self::Zflipz2x2,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_TILE_MODE_LINEAR => Self::Linear,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoTileMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_tile_mode_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_tile_mode_get_type()) }
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoTileMode {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoTileMode {
|
|
|
|
type Type = Self;
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoTileMode {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoTileMode {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2017-08-10 21:41:55 +00:00
|
|
|
}
|
|
|
|
}
|
2017-08-11 09:29:23 +00:00
|
|
|
|
2022-11-26 09:28:05 +00:00
|
|
|
impl From<VideoTileMode> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoTileMode) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 10:12:00 +00:00
|
|
|
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
|
2020-04-12 15:55:06 +00:00
|
|
|
#[non_exhaustive]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GstVideoTransferFunction")]
|
2017-08-11 09:29:23 +00:00
|
|
|
pub enum VideoTransferFunction {
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_UNKNOWN")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Unknown,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_GAMMA10")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Gamma10,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_GAMMA18")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Gamma18,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_GAMMA20")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Gamma20,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_GAMMA22")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Gamma22,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_BT709")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Bt709,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_SMPTE240M")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Smpte240m,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_SRGB")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Srgb,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_GAMMA28")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Gamma28,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_LOG100")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Log100,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_LOG316")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Log316,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_BT2020_12")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Bt202012,
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_ADOBERGB")]
|
2017-08-11 09:29:23 +00:00
|
|
|
Adobergb,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_BT2020_10")]
|
2020-04-30 16:51:41 +00:00
|
|
|
Bt202010,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_SMPTE2084")]
|
2020-04-30 16:51:41 +00:00
|
|
|
Smpte2084,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_ARIB_STD_B67")]
|
2020-04-30 16:51:41 +00:00
|
|
|
AribStdB67,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-18 14:23:05 +00:00
|
|
|
#[doc(alias = "GST_VIDEO_TRANSFER_BT601")]
|
2020-08-11 07:49:37 +00:00
|
|
|
Bt601,
|
2017-08-11 09:29:23 +00:00
|
|
|
#[doc(hidden)]
|
|
|
|
__Unknown(i32),
|
|
|
|
}
|
|
|
|
|
2020-12-07 11:11:04 +00:00
|
|
|
impl VideoTransferFunction {
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-04-17 10:11:52 +00:00
|
|
|
#[doc(alias = "gst_video_transfer_function_decode")]
|
|
|
|
pub fn decode(self, val: f64) -> f64 {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe { ffi::gst_video_transfer_function_decode(self.into_glib(), val) }
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_20")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_20")))]
|
2021-04-17 10:11:52 +00:00
|
|
|
#[doc(alias = "gst_video_transfer_function_encode")]
|
|
|
|
pub fn encode(self, val: f64) -> f64 {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe { ffi::gst_video_transfer_function_encode(self.into_glib(), val) }
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_transfer_function_from_iso")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn from_iso(value: u32) -> VideoTransferFunction {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe { from_glib(ffi::gst_video_transfer_function_from_iso(value)) }
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_transfer_function_is_equivalent")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn is_equivalent(self, from_bpp: u32, to_func: VideoTransferFunction, to_bpp: u32) -> bool {
|
|
|
|
assert_initialized_main_thread!();
|
|
|
|
unsafe {
|
|
|
|
from_glib(ffi::gst_video_transfer_function_is_equivalent(
|
2021-04-27 15:10:39 +00:00
|
|
|
self.into_glib(),
|
2020-12-07 11:11:04 +00:00
|
|
|
from_bpp,
|
2021-04-27 15:10:39 +00:00
|
|
|
to_func.into_glib(),
|
2020-12-07 11:11:04 +00:00
|
|
|
to_bpp,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
|
|
|
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_video_transfer_function_to_iso")]
|
2020-12-07 11:11:04 +00:00
|
|
|
pub fn to_iso(self) -> u32 {
|
|
|
|
assert_initialized_main_thread!();
|
2021-04-27 15:10:39 +00:00
|
|
|
unsafe { ffi::gst_video_transfer_function_to_iso(self.into_glib()) }
|
2020-12-07 11:11:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-11 09:29:23 +00:00
|
|
|
#[doc(hidden)]
|
2021-04-27 15:10:39 +00:00
|
|
|
impl IntoGlib for VideoTransferFunction {
|
2020-11-22 09:50:37 +00:00
|
|
|
type GlibType = ffi::GstVideoTransferFunction;
|
2017-08-11 09:29:23 +00:00
|
|
|
|
2021-04-27 15:10:39 +00:00
|
|
|
fn into_glib(self) -> ffi::GstVideoTransferFunction {
|
|
|
|
match self {
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Unknown => ffi::GST_VIDEO_TRANSFER_UNKNOWN,
|
|
|
|
Self::Gamma10 => ffi::GST_VIDEO_TRANSFER_GAMMA10,
|
|
|
|
Self::Gamma18 => ffi::GST_VIDEO_TRANSFER_GAMMA18,
|
|
|
|
Self::Gamma20 => ffi::GST_VIDEO_TRANSFER_GAMMA20,
|
|
|
|
Self::Gamma22 => ffi::GST_VIDEO_TRANSFER_GAMMA22,
|
|
|
|
Self::Bt709 => ffi::GST_VIDEO_TRANSFER_BT709,
|
|
|
|
Self::Smpte240m => ffi::GST_VIDEO_TRANSFER_SMPTE240M,
|
|
|
|
Self::Srgb => ffi::GST_VIDEO_TRANSFER_SRGB,
|
|
|
|
Self::Gamma28 => ffi::GST_VIDEO_TRANSFER_GAMMA28,
|
|
|
|
Self::Log100 => ffi::GST_VIDEO_TRANSFER_LOG100,
|
|
|
|
Self::Log316 => ffi::GST_VIDEO_TRANSFER_LOG316,
|
|
|
|
Self::Bt202012 => ffi::GST_VIDEO_TRANSFER_BT2020_12,
|
|
|
|
Self::Adobergb => ffi::GST_VIDEO_TRANSFER_ADOBERGB,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Bt202010 => ffi::GST_VIDEO_TRANSFER_BT2020_10,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Smpte2084 => ffi::GST_VIDEO_TRANSFER_SMPTE2084,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::AribStdB67 => ffi::GST_VIDEO_TRANSFER_ARIB_STD_B67,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-04-25 16:45:59 +00:00
|
|
|
Self::Bt601 => ffi::GST_VIDEO_TRANSFER_BT601,
|
|
|
|
Self::__Unknown(value) => value,
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#[doc(hidden)]
|
2020-11-22 09:50:37 +00:00
|
|
|
impl FromGlib<ffi::GstVideoTransferFunction> for VideoTransferFunction {
|
2020-12-08 13:00:17 +00:00
|
|
|
unsafe fn from_glib(value: ffi::GstVideoTransferFunction) -> Self {
|
2017-08-11 09:29:23 +00:00
|
|
|
skip_assert_initialized!();
|
2023-01-24 08:40:31 +00:00
|
|
|
|
2017-11-05 17:01:15 +00:00
|
|
|
match value {
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_TRANSFER_UNKNOWN => Self::Unknown,
|
|
|
|
ffi::GST_VIDEO_TRANSFER_GAMMA10 => Self::Gamma10,
|
|
|
|
ffi::GST_VIDEO_TRANSFER_GAMMA18 => Self::Gamma18,
|
|
|
|
ffi::GST_VIDEO_TRANSFER_GAMMA20 => Self::Gamma20,
|
|
|
|
ffi::GST_VIDEO_TRANSFER_GAMMA22 => Self::Gamma22,
|
|
|
|
ffi::GST_VIDEO_TRANSFER_BT709 => Self::Bt709,
|
|
|
|
ffi::GST_VIDEO_TRANSFER_SMPTE240M => Self::Smpte240m,
|
|
|
|
ffi::GST_VIDEO_TRANSFER_SRGB => Self::Srgb,
|
|
|
|
ffi::GST_VIDEO_TRANSFER_GAMMA28 => Self::Gamma28,
|
|
|
|
ffi::GST_VIDEO_TRANSFER_LOG100 => Self::Log100,
|
|
|
|
ffi::GST_VIDEO_TRANSFER_LOG316 => Self::Log316,
|
|
|
|
ffi::GST_VIDEO_TRANSFER_BT2020_12 => Self::Bt202012,
|
|
|
|
ffi::GST_VIDEO_TRANSFER_ADOBERGB => Self::Adobergb,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_TRANSFER_BT2020_10 => Self::Bt202010,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_TRANSFER_SMPTE2084 => Self::Smpte2084,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_TRANSFER_ARIB_STD_B67 => Self::AribStdB67,
|
2023-05-04 05:51:18 +00:00
|
|
|
#[cfg(feature = "v1_18")]
|
2021-05-23 16:27:13 +00:00
|
|
|
ffi::GST_VIDEO_TRANSFER_BT601 => Self::Bt601,
|
2021-04-25 16:45:59 +00:00
|
|
|
value => Self::__Unknown(value),
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl StaticType for VideoTransferFunction {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2023-08-28 16:52:26 +00:00
|
|
|
#[doc(alias = "gst_video_transfer_function_get_type")]
|
2023-07-06 13:05:38 +00:00
|
|
|
fn static_type() -> glib::Type {
|
2020-11-22 09:50:37 +00:00
|
|
|
unsafe { from_glib(ffi::gst_video_transfer_function_get_type()) }
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-01-31 08:48:29 +00:00
|
|
|
impl glib::HasParamSpec for VideoTransferFunction {
|
|
|
|
type ParamSpec = glib::ParamSpecEnum;
|
|
|
|
type SetValue = Self;
|
|
|
|
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;
|
|
|
|
|
|
|
|
fn param_spec_builder() -> Self::BuilderFn {
|
2023-08-28 16:52:26 +00:00
|
|
|
Self::ParamSpec::builder_with_default
|
2023-01-31 08:48:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl glib::value::ValueType for VideoTransferFunction {
|
|
|
|
type Type = Self;
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
|
2023-07-06 13:05:38 +00:00
|
|
|
unsafe impl<'a> glib::value::FromValue<'a> for VideoTransferFunction {
|
2021-04-19 16:24:43 +00:00
|
|
|
type Checker = glib::value::GenericValueTypeChecker<Self>;
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe fn from_value(value: &'a glib::Value) -> Self {
|
|
|
|
skip_assert_initialized!();
|
2020-11-22 09:50:37 +00:00
|
|
|
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-19 16:24:43 +00:00
|
|
|
impl ToValue for VideoTransferFunction {
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn to_value(&self) -> glib::Value {
|
2021-04-25 16:45:59 +00:00
|
|
|
let mut value = glib::Value::for_value_type::<Self>();
|
2021-04-19 16:24:43 +00:00
|
|
|
unsafe {
|
2021-04-27 15:10:39 +00:00
|
|
|
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
|
2021-04-19 16:24:43 +00:00
|
|
|
}
|
|
|
|
value
|
|
|
|
}
|
|
|
|
|
2023-01-03 18:56:00 +00:00
|
|
|
#[inline]
|
2021-04-19 16:24:43 +00:00
|
|
|
fn value_type(&self) -> glib::Type {
|
|
|
|
Self::static_type()
|
2017-08-11 09:29:23 +00:00
|
|
|
}
|
|
|
|
}
|
2022-11-26 09:28:05 +00:00
|
|
|
|
|
|
|
impl From<VideoTransferFunction> for glib::Value {
|
|
|
|
#[inline]
|
|
|
|
fn from(v: VideoTransferFunction) -> Self {
|
|
|
|
skip_assert_initialized!();
|
|
|
|
ToValue::to_value(&v)
|
|
|
|
}
|
|
|
|
}
|