gstreamer-rs/gstreamer-video/src/auto/enums.rs

4345 lines
144 KiB
Rust
Raw Normal View History

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)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT
use glib::{prelude::*, translate::*, GStr};
#[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)
}
}
#[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;
#[inline]
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 {
#[inline]
unsafe fn from_glib(value: ffi::GstColorBalanceType) -> Self {
skip_assert_initialized!();
match value {
ffi::GST_COLOR_BALANCE_HARDWARE => Self::Hardware,
ffi::GST_COLOR_BALANCE_SOFTWARE => Self::Software,
value => Self::__Unknown(value),
}
}
}
impl StaticType for ColorBalanceType {
#[inline]
#[doc(alias = "gst_color_balance_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_color_balance_type_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for ColorBalanceType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for ColorBalanceType {
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))
}
}
impl ToValue for ColorBalanceType {
#[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()
}
}
impl From<ColorBalanceType> for glib::Value {
#[inline]
fn from(v: ColorBalanceType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[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!();
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 {
#[inline]
#[doc(alias = "gst_navigation_command_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_navigation_command_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for NavigationCommand {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for NavigationCommand {
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))
}
}
impl ToValue for NavigationCommand {
#[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()
}
}
impl From<NavigationCommand> for glib::Value {
#[inline]
fn from(v: NavigationCommand) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[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,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_NAVIGATION_EVENT_MOUSE_SCROLL")]
MouseScroll,
#[cfg(feature = "v1_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
#[doc(alias = "GST_NAVIGATION_EVENT_TOUCH_DOWN")]
TouchDown,
#[cfg(feature = "v1_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
#[doc(alias = "GST_NAVIGATION_EVENT_TOUCH_MOTION")]
TouchMotion,
#[cfg(feature = "v1_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
#[doc(alias = "GST_NAVIGATION_EVENT_TOUCH_UP")]
TouchUp,
#[cfg(feature = "v1_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
#[doc(alias = "GST_NAVIGATION_EVENT_TOUCH_FRAME")]
TouchFrame,
#[cfg(feature = "v1_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
#[doc(alias = "GST_NAVIGATION_EVENT_TOUCH_CANCEL")]
TouchCancel,
#[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,
#[cfg(feature = "v1_18")]
Self::MouseScroll => ffi::GST_NAVIGATION_EVENT_MOUSE_SCROLL,
#[cfg(feature = "v1_22")]
Self::TouchDown => ffi::GST_NAVIGATION_EVENT_TOUCH_DOWN,
#[cfg(feature = "v1_22")]
Self::TouchMotion => ffi::GST_NAVIGATION_EVENT_TOUCH_MOTION,
#[cfg(feature = "v1_22")]
Self::TouchUp => ffi::GST_NAVIGATION_EVENT_TOUCH_UP,
#[cfg(feature = "v1_22")]
Self::TouchFrame => ffi::GST_NAVIGATION_EVENT_TOUCH_FRAME,
#[cfg(feature = "v1_22")]
Self::TouchCancel => ffi::GST_NAVIGATION_EVENT_TOUCH_CANCEL,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstNavigationEventType> for NavigationEventType {
unsafe fn from_glib(value: ffi::GstNavigationEventType) -> Self {
skip_assert_initialized!();
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,
#[cfg(feature = "v1_18")]
ffi::GST_NAVIGATION_EVENT_MOUSE_SCROLL => Self::MouseScroll,
#[cfg(feature = "v1_22")]
ffi::GST_NAVIGATION_EVENT_TOUCH_DOWN => Self::TouchDown,
#[cfg(feature = "v1_22")]
ffi::GST_NAVIGATION_EVENT_TOUCH_MOTION => Self::TouchMotion,
#[cfg(feature = "v1_22")]
ffi::GST_NAVIGATION_EVENT_TOUCH_UP => Self::TouchUp,
#[cfg(feature = "v1_22")]
ffi::GST_NAVIGATION_EVENT_TOUCH_FRAME => Self::TouchFrame,
#[cfg(feature = "v1_22")]
ffi::GST_NAVIGATION_EVENT_TOUCH_CANCEL => Self::TouchCancel,
value => Self::__Unknown(value),
}
}
}
impl StaticType for NavigationEventType {
#[inline]
#[doc(alias = "gst_navigation_event_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_navigation_event_type_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for NavigationEventType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for NavigationEventType {
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))
}
}
impl ToValue for NavigationEventType {
#[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()
}
}
impl From<NavigationEventType> for glib::Value {
#[inline]
fn from(v: NavigationEventType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[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;
#[inline]
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 {
#[inline]
unsafe fn from_glib(value: ffi::GstNavigationMessageType) -> Self {
skip_assert_initialized!();
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 {
#[inline]
#[doc(alias = "gst_navigation_message_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_navigation_message_type_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for NavigationMessageType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for NavigationMessageType {
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))
}
}
impl ToValue for NavigationMessageType {
#[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()
}
}
impl From<NavigationMessageType> for glib::Value {
#[inline]
fn from(v: NavigationMessageType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[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;
#[inline]
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 {
#[inline]
unsafe fn from_glib(value: ffi::GstNavigationQueryType) -> Self {
skip_assert_initialized!();
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 {
#[inline]
#[doc(alias = "gst_navigation_query_type_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_navigation_query_type_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
impl glib::value::ValueType for NavigationQueryType {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for NavigationQueryType {
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))
}
}
impl ToValue for NavigationQueryType {
#[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()
}
}
impl From<NavigationQueryType> for glib::Value {
#[inline]
fn from(v: NavigationQueryType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoAFDSpec")]
pub enum VideoAFDSpec {
#[doc(alias = "GST_VIDEO_AFD_SPEC_DVB_ETSI")]
DvbEtsi,
#[doc(alias = "GST_VIDEO_AFD_SPEC_ATSC_A53")]
AtscA53,
#[doc(alias = "GST_VIDEO_AFD_SPEC_SMPTE_ST2016_1")]
SmpteSt20161,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(hidden)]
impl IntoGlib for VideoAFDSpec {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoAFDSpec;
#[inline]
fn into_glib(self) -> ffi::GstVideoAFDSpec {
match self {
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,
}
}
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(hidden)]
2020-11-22 09:50:37 +00:00
impl FromGlib<ffi::GstVideoAFDSpec> for VideoAFDSpec {
#[inline]
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstVideoAFDSpec) -> Self {
skip_assert_initialized!();
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,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
impl StaticType for VideoAFDSpec {
#[inline]
#[doc(alias = "gst_video_afd_spec_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_afd_spec_get_type()) }
}
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
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 {
Self::ParamSpec::builder_with_default
}
}
#[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;
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
unsafe impl<'a> glib::value::FromValue<'a> for VideoAFDSpec {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2021-04-19 16:24:43 +00:00
impl ToValue for VideoAFDSpec {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
impl From<VideoAFDSpec> for glib::Value {
#[inline]
fn from(v: VideoAFDSpec) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-30 16:51:41 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoAFDValue")]
pub enum VideoAFDValue {
#[doc(alias = "GST_VIDEO_AFD_UNAVAILABLE")]
Unavailable,
#[doc(alias = "GST_VIDEO_AFD_16_9_TOP_ALIGNED")]
_169TopAligned,
#[doc(alias = "GST_VIDEO_AFD_14_9_TOP_ALIGNED")]
_149TopAligned,
#[doc(alias = "GST_VIDEO_AFD_GREATER_THAN_16_9")]
GreaterThan169,
#[doc(alias = "GST_VIDEO_AFD_4_3_FULL_16_9_FULL")]
_43Full169Full,
#[doc(alias = "GST_VIDEO_AFD_4_3_FULL_4_3_PILLAR")]
_43Full43Pillar,
#[doc(alias = "GST_VIDEO_AFD_16_9_LETTER_16_9_FULL")]
_169Letter169Full,
#[doc(alias = "GST_VIDEO_AFD_14_9_LETTER_14_9_PILLAR")]
_149Letter149Pillar,
#[doc(alias = "GST_VIDEO_AFD_4_3_FULL_14_9_CENTER")]
_43Full149Center,
#[doc(alias = "GST_VIDEO_AFD_16_9_LETTER_14_9_CENTER")]
_169Letter149Center,
#[doc(alias = "GST_VIDEO_AFD_16_9_LETTER_4_3_CENTER")]
_169Letter43Center,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(hidden)]
impl IntoGlib for VideoAFDValue {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoAFDValue;
#[inline]
fn into_glib(self) -> ffi::GstVideoAFDValue {
match self {
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,
}
}
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(hidden)]
2020-11-22 09:50:37 +00:00
impl FromGlib<ffi::GstVideoAFDValue> for VideoAFDValue {
#[inline]
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstVideoAFDValue) -> Self {
skip_assert_initialized!();
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,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
impl StaticType for VideoAFDValue {
#[inline]
#[doc(alias = "gst_video_afd_value_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_afd_value_get_type()) }
}
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
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 {
Self::ParamSpec::builder_with_default
}
}
#[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;
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
unsafe impl<'a> glib::value::FromValue<'a> for VideoAFDValue {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
2021-04-19 16:24:43 +00:00
impl ToValue for VideoAFDValue {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
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]
#[doc(alias = "GstVideoAlphaMode")]
2020-04-30 16:51:41 +00:00
pub enum VideoAlphaMode {
#[doc(alias = "GST_VIDEO_ALPHA_MODE_COPY")]
2020-04-30 16:51:41 +00:00
Copy,
#[doc(alias = "GST_VIDEO_ALPHA_MODE_SET")]
2020-04-30 16:51:41 +00:00
Set,
#[doc(alias = "GST_VIDEO_ALPHA_MODE_MULT")]
2020-04-30 16:51:41 +00:00
Mult,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for VideoAlphaMode {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoAlphaMode;
2020-04-30 16:51:41 +00:00
#[inline]
fn into_glib(self) -> ffi::GstVideoAlphaMode {
match self {
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 {
#[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!();
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,
value => Self::__Unknown(value),
2020-04-30 16:51:41 +00:00
}
}
}
impl StaticType for VideoAlphaMode {
#[inline]
#[doc(alias = "gst_video_alpha_mode_get_type")]
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
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
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
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoAlphaMode {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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 {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[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
}
}
impl From<VideoAlphaMode> for glib::Value {
#[inline]
fn from(v: VideoAlphaMode) -> 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 = "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)
}
}
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoCaptionType")]
pub enum VideoCaptionType {
#[doc(alias = "GST_VIDEO_CAPTION_TYPE_UNKNOWN")]
Unknown,
#[doc(alias = "GST_VIDEO_CAPTION_TYPE_CEA608_RAW")]
Cea608Raw,
#[doc(alias = "GST_VIDEO_CAPTION_TYPE_CEA608_S334_1A")]
Cea608S3341a,
#[doc(alias = "GST_VIDEO_CAPTION_TYPE_CEA708_RAW")]
Cea708Raw,
#[doc(alias = "GST_VIDEO_CAPTION_TYPE_CEA708_CDP")]
Cea708Cdp,
#[doc(hidden)]
__Unknown(i32),
}
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
impl VideoCaptionType {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_video_caption_type_to_caps")]
pub fn to_caps(self) -> gst::Caps {
assert_initialized_main_thread!();
unsafe { from_glib_full(ffi::gst_video_caption_type_to_caps(self.into_glib())) }
}
}
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[doc(hidden)]
impl IntoGlib for VideoCaptionType {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoCaptionType;
#[inline]
fn into_glib(self) -> ffi::GstVideoCaptionType {
match self {
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,
}
}
}
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[doc(hidden)]
2020-11-22 09:50:37 +00:00
impl FromGlib<ffi::GstVideoCaptionType> for VideoCaptionType {
#[inline]
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstVideoCaptionType) -> Self {
skip_assert_initialized!();
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,
value => Self::__Unknown(value),
}
}
}
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
impl StaticType for VideoCaptionType {
#[inline]
#[doc(alias = "gst_video_caption_type_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_caption_type_get_type()) }
}
}
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
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 {
Self::ParamSpec::builder_with_default
}
}
#[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;
}
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
unsafe impl<'a> glib::value::FromValue<'a> for VideoCaptionType {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
2021-04-19 16:24:43 +00:00
impl ToValue for VideoCaptionType {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
impl From<VideoCaptionType> for glib::Value {
#[inline]
fn from(v: VideoCaptionType) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoChromaMode")]
pub enum VideoChromaMode {
#[doc(alias = "GST_VIDEO_CHROMA_MODE_FULL")]
Full,
#[doc(alias = "GST_VIDEO_CHROMA_MODE_UPSAMPLE_ONLY")]
UpsampleOnly,
#[doc(alias = "GST_VIDEO_CHROMA_MODE_DOWNSAMPLE_ONLY")]
DownsampleOnly,
#[doc(alias = "GST_VIDEO_CHROMA_MODE_NONE")]
None,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for VideoChromaMode {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoChromaMode;
#[inline]
fn into_glib(self) -> ffi::GstVideoChromaMode {
match self {
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,
}
}
}
#[doc(hidden)]
2020-11-22 09:50:37 +00:00
impl FromGlib<ffi::GstVideoChromaMode> for VideoChromaMode {
#[inline]
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstVideoChromaMode) -> Self {
skip_assert_initialized!();
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,
value => Self::__Unknown(value),
}
}
}
impl StaticType for VideoChromaMode {
#[inline]
#[doc(alias = "gst_video_chroma_mode_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_chroma_mode_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
2021-04-19 16:24:43 +00:00
impl glib::value::ValueType for VideoChromaMode {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoChromaMode {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
2021-04-19 16:24:43 +00:00
impl ToValue for VideoChromaMode {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<VideoChromaMode> for glib::Value {
#[inline]
fn from(v: VideoChromaMode) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoColorMatrix")]
2017-08-11 09:29:23 +00:00
pub enum VideoColorMatrix {
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_UNKNOWN")]
2017-08-11 09:29:23 +00:00
Unknown,
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_RGB")]
2017-08-11 09:29:23 +00:00
Rgb,
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_FCC")]
2017-08-11 09:29:23 +00:00
Fcc,
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_BT709")]
2017-08-11 09:29:23 +00:00
Bt709,
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_BT601")]
2017-08-11 09:29:23 +00:00
Bt601,
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_SMPTE240M")]
2017-08-11 09:29:23 +00:00
Smpte240m,
#[doc(alias = "GST_VIDEO_COLOR_MATRIX_BT2020")]
2017-08-11 09:29:23 +00:00
Bt2020,
#[doc(hidden)]
__Unknown(i32),
}
impl VideoColorMatrix {
#[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")]
pub fn from_iso(value: u32) -> VideoColorMatrix {
assert_initialized_main_thread!();
unsafe { from_glib(ffi::gst_video_color_matrix_from_iso(value)) }
}
#[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")]
pub fn to_iso(self) -> u32 {
assert_initialized_main_thread!();
unsafe { ffi::gst_video_color_matrix_to_iso(self.into_glib()) }
}
}
2017-08-11 09:29:23 +00:00
#[doc(hidden)]
impl IntoGlib for VideoColorMatrix {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoColorMatrix;
2017-08-11 09:29:23 +00:00
#[inline]
fn into_glib(self) -> ffi::GstVideoColorMatrix {
match self {
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 {
#[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!();
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,
value => Self::__Unknown(value),
2017-08-11 09:29:23 +00:00
}
}
}
impl StaticType for VideoColorMatrix {
#[inline]
#[doc(alias = "gst_video_color_matrix_get_type")]
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
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
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
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoColorMatrix {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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 {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[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
}
}
impl From<VideoColorMatrix> for glib::Value {
#[inline]
fn from(v: VideoColorMatrix) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoColorPrimaries")]
2017-08-11 09:29:23 +00:00
pub enum VideoColorPrimaries {
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_UNKNOWN")]
2017-08-11 09:29:23 +00:00
Unknown,
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_BT709")]
2017-08-11 09:29:23 +00:00
Bt709,
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_BT470M")]
2017-08-11 09:29:23 +00:00
Bt470m,
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_BT470BG")]
2017-08-11 09:29:23 +00:00
Bt470bg,
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTE170M")]
2017-08-11 09:29:23 +00:00
Smpte170m,
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTE240M")]
2017-08-11 09:29:23 +00:00
Smpte240m,
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_FILM")]
2017-08-11 09:29:23 +00:00
Film,
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_BT2020")]
2017-08-11 09:29:23 +00:00
Bt2020,
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_ADOBERGB")]
2017-08-11 09:29:23 +00:00
Adobergb,
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTEST428")]
2019-04-23 14:32:09 +00:00
Smptest428,
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTERP431")]
2019-04-23 14:32:09 +00:00
Smpterp431,
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[doc(alias = "GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432")]
2019-04-23 14:32:09 +00:00
Smpteeg432,
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[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),
}
impl VideoColorPrimaries {
#[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")]
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")]
//#[doc(alias = "get_info")]
//pub fn info(self) -> /*Ignored*/VideoColorPrimariesInfo {
// unsafe { TODO: call ffi:gst_video_color_primaries_get_info() }
//}
#[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(),
))
}
}
#[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")]
pub fn to_iso(self) -> u32 {
assert_initialized_main_thread!();
unsafe { ffi::gst_video_color_primaries_to_iso(self.into_glib()) }
}
}
2017-08-11 09:29:23 +00:00
#[doc(hidden)]
impl IntoGlib for VideoColorPrimaries {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoColorPrimaries;
2017-08-11 09:29:23 +00:00
fn into_glib(self) -> ffi::GstVideoColorPrimaries {
match self {
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,
#[cfg(feature = "v1_16")]
Self::Smptest428 => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTEST428,
#[cfg(feature = "v1_16")]
Self::Smpterp431 => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTERP431,
#[cfg(feature = "v1_16")]
Self::Smpteeg432 => ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432,
#[cfg(feature = "v1_16")]
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!();
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,
#[cfg(feature = "v1_16")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTEST428 => Self::Smptest428,
#[cfg(feature = "v1_16")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTERP431 => Self::Smpterp431,
#[cfg(feature = "v1_16")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_COLOR_PRIMARIES_SMPTEEG432 => Self::Smpteeg432,
#[cfg(feature = "v1_16")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_COLOR_PRIMARIES_EBU3213 => Self::Ebu3213,
value => Self::__Unknown(value),
2017-08-11 09:29:23 +00:00
}
}
}
impl StaticType for VideoColorPrimaries {
#[inline]
#[doc(alias = "gst_video_color_primaries_get_type")]
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
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
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
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoColorPrimaries {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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 {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[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
}
}
impl From<VideoColorPrimaries> for glib::Value {
#[inline]
fn from(v: VideoColorPrimaries) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoDitherMethod")]
pub enum VideoDitherMethod {
#[doc(alias = "GST_VIDEO_DITHER_NONE")]
None,
#[doc(alias = "GST_VIDEO_DITHER_VERTERR")]
Verterr,
#[doc(alias = "GST_VIDEO_DITHER_FLOYD_STEINBERG")]
FloydSteinberg,
#[doc(alias = "GST_VIDEO_DITHER_SIERRA_LITE")]
SierraLite,
#[doc(alias = "GST_VIDEO_DITHER_BAYER")]
Bayer,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for VideoDitherMethod {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoDitherMethod;
#[inline]
fn into_glib(self) -> ffi::GstVideoDitherMethod {
match self {
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,
}
}
}
#[doc(hidden)]
2020-11-22 09:50:37 +00:00
impl FromGlib<ffi::GstVideoDitherMethod> for VideoDitherMethod {
#[inline]
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstVideoDitherMethod) -> Self {
skip_assert_initialized!();
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,
value => Self::__Unknown(value),
}
}
}
impl StaticType for VideoDitherMethod {
#[inline]
#[doc(alias = "gst_video_dither_method_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_dither_method_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
2021-04-19 16:24:43 +00:00
impl glib::value::ValueType for VideoDitherMethod {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoDitherMethod {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
2021-04-19 16:24:43 +00:00
impl ToValue for VideoDitherMethod {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<VideoDitherMethod> for glib::Value {
#[inline]
fn from(v: VideoDitherMethod) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoFieldOrder")]
2017-08-11 09:29:23 +00:00
pub enum VideoFieldOrder {
#[doc(alias = "GST_VIDEO_FIELD_ORDER_UNKNOWN")]
2017-08-11 09:29:23 +00:00
Unknown,
#[doc(alias = "GST_VIDEO_FIELD_ORDER_TOP_FIELD_FIRST")]
2017-08-11 09:29:23 +00:00
TopFieldFirst,
#[doc(alias = "GST_VIDEO_FIELD_ORDER_BOTTOM_FIELD_FIRST")]
2017-08-11 09:29:23 +00:00
BottomFieldFirst,
#[doc(hidden)]
__Unknown(i32),
}
impl VideoFieldOrder {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_video_field_order_from_string")]
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,
))
}
}
}
impl std::fmt::Display for VideoFieldOrder {
#[inline]
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.write_str(&self.to_str())
}
}
2017-08-11 09:29:23 +00:00
#[doc(hidden)]
impl IntoGlib for VideoFieldOrder {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoFieldOrder;
2017-08-11 09:29:23 +00:00
#[inline]
fn into_glib(self) -> ffi::GstVideoFieldOrder {
match self {
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 {
#[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!();
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,
value => Self::__Unknown(value),
2017-08-11 09:29:23 +00:00
}
}
}
impl StaticType for VideoFieldOrder {
#[inline]
#[doc(alias = "gst_video_field_order_get_type")]
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
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
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
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoFieldOrder {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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 {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[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
}
}
impl From<VideoFieldOrder> for glib::Value {
#[inline]
fn from(v: VideoFieldOrder) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoFormat")]
pub enum VideoFormat {
#[doc(alias = "GST_VIDEO_FORMAT_UNKNOWN")]
Unknown,
#[doc(alias = "GST_VIDEO_FORMAT_ENCODED")]
Encoded,
#[doc(alias = "GST_VIDEO_FORMAT_I420")]
I420,
#[doc(alias = "GST_VIDEO_FORMAT_YV12")]
Yv12,
#[doc(alias = "GST_VIDEO_FORMAT_YUY2")]
Yuy2,
#[doc(alias = "GST_VIDEO_FORMAT_UYVY")]
Uyvy,
#[doc(alias = "GST_VIDEO_FORMAT_AYUV")]
Ayuv,
#[doc(alias = "GST_VIDEO_FORMAT_RGBx")]
Rgbx,
#[doc(alias = "GST_VIDEO_FORMAT_BGRx")]
Bgrx,
#[doc(alias = "GST_VIDEO_FORMAT_xRGB")]
Xrgb,
#[doc(alias = "GST_VIDEO_FORMAT_xBGR")]
Xbgr,
#[doc(alias = "GST_VIDEO_FORMAT_RGBA")]
Rgba,
#[doc(alias = "GST_VIDEO_FORMAT_BGRA")]
Bgra,
#[doc(alias = "GST_VIDEO_FORMAT_ARGB")]
Argb,
#[doc(alias = "GST_VIDEO_FORMAT_ABGR")]
Abgr,
#[doc(alias = "GST_VIDEO_FORMAT_RGB")]
Rgb,
#[doc(alias = "GST_VIDEO_FORMAT_BGR")]
Bgr,
#[doc(alias = "GST_VIDEO_FORMAT_Y41B")]
Y41b,
#[doc(alias = "GST_VIDEO_FORMAT_Y42B")]
Y42b,
#[doc(alias = "GST_VIDEO_FORMAT_YVYU")]
Yvyu,
#[doc(alias = "GST_VIDEO_FORMAT_Y444")]
Y444,
#[doc(alias = "GST_VIDEO_FORMAT_v210")]
V210,
#[doc(alias = "GST_VIDEO_FORMAT_v216")]
V216,
#[doc(alias = "GST_VIDEO_FORMAT_NV12")]
Nv12,
#[doc(alias = "GST_VIDEO_FORMAT_NV21")]
Nv21,
#[doc(alias = "GST_VIDEO_FORMAT_GRAY8")]
Gray8,
#[doc(alias = "GST_VIDEO_FORMAT_GRAY16_BE")]
Gray16Be,
#[doc(alias = "GST_VIDEO_FORMAT_GRAY16_LE")]
Gray16Le,
#[doc(alias = "GST_VIDEO_FORMAT_v308")]
V308,
#[doc(alias = "GST_VIDEO_FORMAT_RGB16")]
Rgb16,
#[doc(alias = "GST_VIDEO_FORMAT_BGR16")]
Bgr16,
#[doc(alias = "GST_VIDEO_FORMAT_RGB15")]
Rgb15,
#[doc(alias = "GST_VIDEO_FORMAT_BGR15")]
Bgr15,
#[doc(alias = "GST_VIDEO_FORMAT_UYVP")]
Uyvp,
#[doc(alias = "GST_VIDEO_FORMAT_A420")]
A420,
#[doc(alias = "GST_VIDEO_FORMAT_RGB8P")]
Rgb8p,
#[doc(alias = "GST_VIDEO_FORMAT_YUV9")]
Yuv9,
#[doc(alias = "GST_VIDEO_FORMAT_YVU9")]
Yvu9,
#[doc(alias = "GST_VIDEO_FORMAT_IYU1")]
Iyu1,
#[doc(alias = "GST_VIDEO_FORMAT_ARGB64")]
Argb64,
#[doc(alias = "GST_VIDEO_FORMAT_AYUV64")]
Ayuv64,
#[doc(alias = "GST_VIDEO_FORMAT_r210")]
R210,
#[doc(alias = "GST_VIDEO_FORMAT_I420_10BE")]
I42010be,
#[doc(alias = "GST_VIDEO_FORMAT_I420_10LE")]
I42010le,
#[doc(alias = "GST_VIDEO_FORMAT_I422_10BE")]
I42210be,
#[doc(alias = "GST_VIDEO_FORMAT_I422_10LE")]
I42210le,
#[doc(alias = "GST_VIDEO_FORMAT_Y444_10BE")]
Y44410be,
#[doc(alias = "GST_VIDEO_FORMAT_Y444_10LE")]
Y44410le,
#[doc(alias = "GST_VIDEO_FORMAT_GBR")]
Gbr,
#[doc(alias = "GST_VIDEO_FORMAT_GBR_10BE")]
Gbr10be,
#[doc(alias = "GST_VIDEO_FORMAT_GBR_10LE")]
Gbr10le,
#[doc(alias = "GST_VIDEO_FORMAT_NV16")]
Nv16,
#[doc(alias = "GST_VIDEO_FORMAT_NV24")]
Nv24,
#[doc(alias = "GST_VIDEO_FORMAT_NV12_64Z32")]
Nv1264z32,
#[doc(alias = "GST_VIDEO_FORMAT_A420_10BE")]
A42010be,
#[doc(alias = "GST_VIDEO_FORMAT_A420_10LE")]
A42010le,
#[doc(alias = "GST_VIDEO_FORMAT_A422_10BE")]
A42210be,
#[doc(alias = "GST_VIDEO_FORMAT_A422_10LE")]
A42210le,
#[doc(alias = "GST_VIDEO_FORMAT_A444_10BE")]
A44410be,
#[doc(alias = "GST_VIDEO_FORMAT_A444_10LE")]
A44410le,
#[doc(alias = "GST_VIDEO_FORMAT_NV61")]
Nv61,
#[doc(alias = "GST_VIDEO_FORMAT_P010_10BE")]
P01010be,
#[doc(alias = "GST_VIDEO_FORMAT_P010_10LE")]
P01010le,
#[doc(alias = "GST_VIDEO_FORMAT_IYU2")]
Iyu2,
#[doc(alias = "GST_VIDEO_FORMAT_VYUY")]
Vyuy,
#[doc(alias = "GST_VIDEO_FORMAT_GBRA")]
Gbra,
#[doc(alias = "GST_VIDEO_FORMAT_GBRA_10BE")]
Gbra10be,
#[doc(alias = "GST_VIDEO_FORMAT_GBRA_10LE")]
Gbra10le,
#[doc(alias = "GST_VIDEO_FORMAT_GBR_12BE")]
Gbr12be,
#[doc(alias = "GST_VIDEO_FORMAT_GBR_12LE")]
Gbr12le,
#[doc(alias = "GST_VIDEO_FORMAT_GBRA_12BE")]
Gbra12be,
#[doc(alias = "GST_VIDEO_FORMAT_GBRA_12LE")]
Gbra12le,
#[doc(alias = "GST_VIDEO_FORMAT_I420_12BE")]
I42012be,
#[doc(alias = "GST_VIDEO_FORMAT_I420_12LE")]
I42012le,
#[doc(alias = "GST_VIDEO_FORMAT_I422_12BE")]
I42212be,
#[doc(alias = "GST_VIDEO_FORMAT_I422_12LE")]
I42212le,
#[doc(alias = "GST_VIDEO_FORMAT_Y444_12BE")]
Y44412be,
#[doc(alias = "GST_VIDEO_FORMAT_Y444_12LE")]
Y44412le,
#[doc(alias = "GST_VIDEO_FORMAT_GRAY10_LE32")]
2018-03-15 08:24:56 +00:00
Gray10Le32,
#[doc(alias = "GST_VIDEO_FORMAT_NV12_10LE32")]
2018-03-15 08:24:56 +00:00
Nv1210le32,
#[doc(alias = "GST_VIDEO_FORMAT_NV16_10LE32")]
2018-03-15 08:24:56 +00:00
Nv1610le32,
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[doc(alias = "GST_VIDEO_FORMAT_NV12_10LE40")]
2019-04-23 14:32:09 +00:00
Nv1210le40,
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[doc(alias = "GST_VIDEO_FORMAT_Y210")]
2019-04-23 14:32:09 +00:00
Y210,
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[doc(alias = "GST_VIDEO_FORMAT_Y410")]
2019-04-23 14:32:09 +00:00
Y410,
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[doc(alias = "GST_VIDEO_FORMAT_VUYA")]
2019-04-23 14:32:09 +00:00
Vuya,
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[doc(alias = "GST_VIDEO_FORMAT_BGR10A2_LE")]
2019-04-23 14:32:09 +00:00
Bgr10a2Le,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_RGB10A2_LE")]
2020-04-30 16:51:41 +00:00
Rgb10a2Le,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_Y444_16BE")]
2020-04-30 16:51:41 +00:00
Y44416be,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_Y444_16LE")]
2020-04-30 16:51:41 +00:00
Y44416le,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_P016_BE")]
2020-04-30 16:51:41 +00:00
P016Be,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_P016_LE")]
2020-04-30 16:51:41 +00:00
P016Le,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_P012_BE")]
2020-04-30 16:51:41 +00:00
P012Be,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_P012_LE")]
2020-04-30 16:51:41 +00:00
P012Le,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_Y212_BE")]
2020-04-30 16:51:41 +00:00
Y212Be,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_Y212_LE")]
2020-04-30 16:51:41 +00:00
Y212Le,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_Y412_BE")]
2020-04-30 16:51:41 +00:00
Y412Be,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_Y412_LE")]
2020-04-30 16:51:41 +00:00
Y412Le,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_NV12_4L4")]
2020-08-11 07:49:37 +00:00
Nv124l4,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_FORMAT_NV12_32L32")]
2020-08-11 07:49:37 +00:00
Nv1232l32,
#[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,
#[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,
#[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,
#[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,
#[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,
#[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,
#[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,
#[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,
#[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,
#[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,
#[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,
#[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,
#[cfg(feature = "v1_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
#[doc(alias = "GST_VIDEO_FORMAT_NV12_8L128")]
Nv128l128,
#[cfg(feature = "v1_22")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]
#[doc(alias = "GST_VIDEO_FORMAT_NV12_10BE_8L128")]
Nv1210be8l128,
#[cfg(feature = "v1_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
#[doc(alias = "GST_VIDEO_FORMAT_NV12_10LE40_4L4")]
Nv1210le404l4,
#[cfg(feature = "v1_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
#[doc(alias = "GST_VIDEO_FORMAT_DMA_DRM")]
DmaDrm,
#[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,
#[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,
#[cfg(feature = "v1_24")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_24")))]
#[doc(alias = "GST_VIDEO_FORMAT_RBGA")]
Rbga,
#[doc(hidden)]
__Unknown(i32),
}
impl VideoFormat {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_video_format_from_fourcc")]
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")]
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")]
//#[doc(alias = "get_palette")]
2022-06-30 05:22:05 +00:00
//pub fn palette(self) -> (/*Unimplemented*/Option<Basic: Pointer>, usize) {
// unsafe { TODO: call ffi:gst_video_format_get_palette() }
//}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_video_format_to_fourcc")]
pub fn to_fourcc(self) -> u32 {
assert_initialized_main_thread!();
unsafe { ffi::gst_video_format_to_fourcc(self.into_glib()) }
}
}
impl std::fmt::Display for VideoFormat {
#[inline]
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.write_str(&self.to_str())
}
}
#[doc(hidden)]
impl IntoGlib for VideoFormat {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoFormat;
fn into_glib(self) -> ffi::GstVideoFormat {
match self {
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,
#[cfg(feature = "v1_16")]
Self::Nv1210le40 => ffi::GST_VIDEO_FORMAT_NV12_10LE40,
#[cfg(feature = "v1_16")]
Self::Y210 => ffi::GST_VIDEO_FORMAT_Y210,
#[cfg(feature = "v1_16")]
Self::Y410 => ffi::GST_VIDEO_FORMAT_Y410,
#[cfg(feature = "v1_16")]
Self::Vuya => ffi::GST_VIDEO_FORMAT_VUYA,
#[cfg(feature = "v1_16")]
Self::Bgr10a2Le => ffi::GST_VIDEO_FORMAT_BGR10A2_LE,
#[cfg(feature = "v1_18")]
Self::Rgb10a2Le => ffi::GST_VIDEO_FORMAT_RGB10A2_LE,
#[cfg(feature = "v1_18")]
Self::Y44416be => ffi::GST_VIDEO_FORMAT_Y444_16BE,
#[cfg(feature = "v1_18")]
Self::Y44416le => ffi::GST_VIDEO_FORMAT_Y444_16LE,
#[cfg(feature = "v1_18")]
Self::P016Be => ffi::GST_VIDEO_FORMAT_P016_BE,
#[cfg(feature = "v1_18")]
Self::P016Le => ffi::GST_VIDEO_FORMAT_P016_LE,
#[cfg(feature = "v1_18")]
Self::P012Be => ffi::GST_VIDEO_FORMAT_P012_BE,
#[cfg(feature = "v1_18")]
Self::P012Le => ffi::GST_VIDEO_FORMAT_P012_LE,
#[cfg(feature = "v1_18")]
Self::Y212Be => ffi::GST_VIDEO_FORMAT_Y212_BE,
#[cfg(feature = "v1_18")]
Self::Y212Le => ffi::GST_VIDEO_FORMAT_Y212_LE,
#[cfg(feature = "v1_18")]
Self::Y412Be => ffi::GST_VIDEO_FORMAT_Y412_BE,
#[cfg(feature = "v1_18")]
Self::Y412Le => ffi::GST_VIDEO_FORMAT_Y412_LE,
#[cfg(feature = "v1_18")]
Self::Nv124l4 => ffi::GST_VIDEO_FORMAT_NV12_4L4,
#[cfg(feature = "v1_18")]
Self::Nv1232l32 => ffi::GST_VIDEO_FORMAT_NV12_32L32,
#[cfg(feature = "v1_20")]
2021-04-17 10:11:52 +00:00
Self::Rgbp => ffi::GST_VIDEO_FORMAT_RGBP,
#[cfg(feature = "v1_20")]
2021-04-17 10:11:52 +00:00
Self::Bgrp => ffi::GST_VIDEO_FORMAT_BGRP,
#[cfg(feature = "v1_20")]
2021-04-17 10:11:52 +00:00
Self::Av12 => ffi::GST_VIDEO_FORMAT_AV12,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
Self::Argb64Le => ffi::GST_VIDEO_FORMAT_ARGB64_LE,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
Self::Argb64Be => ffi::GST_VIDEO_FORMAT_ARGB64_BE,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
Self::Rgba64Le => ffi::GST_VIDEO_FORMAT_RGBA64_LE,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
Self::Rgba64Be => ffi::GST_VIDEO_FORMAT_RGBA64_BE,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
Self::Bgra64Le => ffi::GST_VIDEO_FORMAT_BGRA64_LE,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
Self::Bgra64Be => ffi::GST_VIDEO_FORMAT_BGRA64_BE,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
Self::Abgr64Le => ffi::GST_VIDEO_FORMAT_ABGR64_LE,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
Self::Abgr64Be => ffi::GST_VIDEO_FORMAT_ABGR64_BE,
#[cfg(feature = "v1_22")]
2022-03-15 13:34:51 +00:00
Self::Nv1216l32s => ffi::GST_VIDEO_FORMAT_NV12_16L32S,
#[cfg(feature = "v1_22")]
Self::Nv128l128 => ffi::GST_VIDEO_FORMAT_NV12_8L128,
#[cfg(feature = "v1_22")]
Self::Nv1210be8l128 => ffi::GST_VIDEO_FORMAT_NV12_10BE_8L128,
#[cfg(feature = "v1_24")]
Self::Nv1210le404l4 => ffi::GST_VIDEO_FORMAT_NV12_10LE40_4L4,
#[cfg(feature = "v1_24")]
Self::DmaDrm => ffi::GST_VIDEO_FORMAT_DMA_DRM,
#[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,
#[cfg(feature = "v1_24")]
Self::Gbr16le => ffi::GST_VIDEO_FORMAT_GBR_16LE,
#[cfg(feature = "v1_24")]
Self::Gbr16be => ffi::GST_VIDEO_FORMAT_GBR_16BE,
#[cfg(feature = "v1_24")]
Self::Rbga => ffi::GST_VIDEO_FORMAT_RBGA,
Self::__Unknown(value) => value,
}
}
}
#[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 {
skip_assert_initialized!();
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,
#[cfg(feature = "v1_16")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_NV12_10LE40 => Self::Nv1210le40,
#[cfg(feature = "v1_16")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_Y210 => Self::Y210,
#[cfg(feature = "v1_16")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_Y410 => Self::Y410,
#[cfg(feature = "v1_16")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_VUYA => Self::Vuya,
#[cfg(feature = "v1_16")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_BGR10A2_LE => Self::Bgr10a2Le,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_RGB10A2_LE => Self::Rgb10a2Le,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_Y444_16BE => Self::Y44416be,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_Y444_16LE => Self::Y44416le,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_P016_BE => Self::P016Be,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_P016_LE => Self::P016Le,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_P012_BE => Self::P012Be,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_P012_LE => Self::P012Le,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_Y212_BE => Self::Y212Be,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_Y212_LE => Self::Y212Le,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_Y412_BE => Self::Y412Be,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_Y412_LE => Self::Y412Le,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_NV12_4L4 => Self::Nv124l4,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_FORMAT_NV12_32L32 => Self::Nv1232l32,
#[cfg(feature = "v1_20")]
2021-04-17 10:11:52 +00:00
ffi::GST_VIDEO_FORMAT_RGBP => Self::Rgbp,
#[cfg(feature = "v1_20")]
2021-04-17 10:11:52 +00:00
ffi::GST_VIDEO_FORMAT_BGRP => Self::Bgrp,
#[cfg(feature = "v1_20")]
2021-04-17 10:11:52 +00:00
ffi::GST_VIDEO_FORMAT_AV12 => Self::Av12,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
ffi::GST_VIDEO_FORMAT_ARGB64_LE => Self::Argb64Le,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
ffi::GST_VIDEO_FORMAT_ARGB64_BE => Self::Argb64Be,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
ffi::GST_VIDEO_FORMAT_RGBA64_LE => Self::Rgba64Le,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
ffi::GST_VIDEO_FORMAT_RGBA64_BE => Self::Rgba64Be,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
ffi::GST_VIDEO_FORMAT_BGRA64_LE => Self::Bgra64Le,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
ffi::GST_VIDEO_FORMAT_BGRA64_BE => Self::Bgra64Be,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
ffi::GST_VIDEO_FORMAT_ABGR64_LE => Self::Abgr64Le,
#[cfg(feature = "v1_20")]
2021-10-30 11:27:17 +00:00
ffi::GST_VIDEO_FORMAT_ABGR64_BE => Self::Abgr64Be,
#[cfg(feature = "v1_22")]
2022-03-15 13:34:51 +00:00
ffi::GST_VIDEO_FORMAT_NV12_16L32S => Self::Nv1216l32s,
#[cfg(feature = "v1_22")]
ffi::GST_VIDEO_FORMAT_NV12_8L128 => Self::Nv128l128,
#[cfg(feature = "v1_22")]
ffi::GST_VIDEO_FORMAT_NV12_10BE_8L128 => Self::Nv1210be8l128,
#[cfg(feature = "v1_24")]
ffi::GST_VIDEO_FORMAT_NV12_10LE40_4L4 => Self::Nv1210le404l4,
#[cfg(feature = "v1_24")]
ffi::GST_VIDEO_FORMAT_DMA_DRM => Self::DmaDrm,
#[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,
#[cfg(feature = "v1_24")]
ffi::GST_VIDEO_FORMAT_GBR_16LE => Self::Gbr16le,
#[cfg(feature = "v1_24")]
ffi::GST_VIDEO_FORMAT_GBR_16BE => Self::Gbr16be,
#[cfg(feature = "v1_24")]
ffi::GST_VIDEO_FORMAT_RBGA => Self::Rbga,
value => Self::__Unknown(value),
}
}
}
impl StaticType for VideoFormat {
#[inline]
#[doc(alias = "gst_video_format_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_format_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
2021-04-19 16:24:43 +00:00
impl glib::value::ValueType for VideoFormat {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoFormat {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
2021-04-19 16:24:43 +00:00
impl ToValue for VideoFormat {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<VideoFormat> for glib::Value {
#[inline]
fn from(v: VideoFormat) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoGammaMode")]
pub enum VideoGammaMode {
#[doc(alias = "GST_VIDEO_GAMMA_MODE_NONE")]
None,
#[doc(alias = "GST_VIDEO_GAMMA_MODE_REMAP")]
Remap,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for VideoGammaMode {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoGammaMode;
#[inline]
fn into_glib(self) -> ffi::GstVideoGammaMode {
match self {
Self::None => ffi::GST_VIDEO_GAMMA_MODE_NONE,
Self::Remap => ffi::GST_VIDEO_GAMMA_MODE_REMAP,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
2020-11-22 09:50:37 +00:00
impl FromGlib<ffi::GstVideoGammaMode> for VideoGammaMode {
#[inline]
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstVideoGammaMode) -> Self {
skip_assert_initialized!();
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,
value => Self::__Unknown(value),
}
}
}
impl StaticType for VideoGammaMode {
#[inline]
#[doc(alias = "gst_video_gamma_mode_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_gamma_mode_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
2021-04-19 16:24:43 +00:00
impl glib::value::ValueType for VideoGammaMode {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoGammaMode {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
2021-04-19 16:24:43 +00:00
impl ToValue for VideoGammaMode {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<VideoGammaMode> for glib::Value {
#[inline]
fn from(v: VideoGammaMode) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoInterlaceMode")]
pub enum VideoInterlaceMode {
#[doc(alias = "GST_VIDEO_INTERLACE_MODE_PROGRESSIVE")]
Progressive,
#[doc(alias = "GST_VIDEO_INTERLACE_MODE_INTERLEAVED")]
Interleaved,
#[doc(alias = "GST_VIDEO_INTERLACE_MODE_MIXED")]
Mixed,
#[doc(alias = "GST_VIDEO_INTERLACE_MODE_FIELDS")]
Fields,
#[cfg(feature = "v1_16")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_16")))]
#[doc(alias = "GST_VIDEO_INTERLACE_MODE_ALTERNATE")]
2019-04-23 14:32:09 +00:00
Alternate,
#[doc(hidden)]
__Unknown(i32),
}
impl VideoInterlaceMode {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_video_interlace_mode_from_string")]
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,
))
}
}
pub fn to_str<'a>(self) -> &'a GStr {
unsafe {
GStr::from_ptr(
ffi::gst_video_interlace_mode_to_string(self.into_glib())
.as_ref()
.expect("gst_video_interlace_mode_to_string returned NULL"),
)
}
}
}
impl std::fmt::Display for VideoInterlaceMode {
#[inline]
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
f.write_str(&self.to_str())
}
}
#[doc(hidden)]
impl IntoGlib for VideoInterlaceMode {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoInterlaceMode;
#[inline]
fn into_glib(self) -> ffi::GstVideoInterlaceMode {
match self {
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,
#[cfg(feature = "v1_16")]
Self::Alternate => ffi::GST_VIDEO_INTERLACE_MODE_ALTERNATE,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
2020-11-22 09:50:37 +00:00
impl FromGlib<ffi::GstVideoInterlaceMode> for VideoInterlaceMode {
#[inline]
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstVideoInterlaceMode) -> Self {
skip_assert_initialized!();
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,
#[cfg(feature = "v1_16")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_INTERLACE_MODE_ALTERNATE => Self::Alternate,
value => Self::__Unknown(value),
}
}
}
impl StaticType for VideoInterlaceMode {
#[inline]
#[doc(alias = "gst_video_interlace_mode_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_interlace_mode_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
2021-04-19 16:24:43 +00:00
impl glib::value::ValueType for VideoInterlaceMode {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoInterlaceMode {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
2021-04-19 16:24:43 +00:00
impl ToValue for VideoInterlaceMode {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<VideoInterlaceMode> for glib::Value {
#[inline]
fn from(v: VideoInterlaceMode) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoMatrixMode")]
pub enum VideoMatrixMode {
#[doc(alias = "GST_VIDEO_MATRIX_MODE_FULL")]
Full,
#[doc(alias = "GST_VIDEO_MATRIX_MODE_INPUT_ONLY")]
InputOnly,
#[doc(alias = "GST_VIDEO_MATRIX_MODE_OUTPUT_ONLY")]
OutputOnly,
#[doc(alias = "GST_VIDEO_MATRIX_MODE_NONE")]
None,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for VideoMatrixMode {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoMatrixMode;
#[inline]
fn into_glib(self) -> ffi::GstVideoMatrixMode {
match self {
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,
}
}
}
#[doc(hidden)]
2020-11-22 09:50:37 +00:00
impl FromGlib<ffi::GstVideoMatrixMode> for VideoMatrixMode {
#[inline]
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstVideoMatrixMode) -> Self {
skip_assert_initialized!();
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,
value => Self::__Unknown(value),
}
}
}
impl StaticType for VideoMatrixMode {
#[inline]
#[doc(alias = "gst_video_matrix_mode_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_matrix_mode_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
2021-04-19 16:24:43 +00:00
impl glib::value::ValueType for VideoMatrixMode {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoMatrixMode {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
2021-04-19 16:24:43 +00:00
impl ToValue for VideoMatrixMode {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<VideoMatrixMode> for glib::Value {
#[inline]
fn from(v: VideoMatrixMode) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoMultiviewFramePacking")]
pub enum VideoMultiviewFramePacking {
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_NONE")]
None,
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_MONO")]
Mono,
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_LEFT")]
Left,
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_RIGHT")]
Right,
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE")]
SideBySide,
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_SIDE_BY_SIDE_QUINCUNX")]
SideBySideQuincunx,
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_COLUMN_INTERLEAVED")]
ColumnInterleaved,
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_ROW_INTERLEAVED")]
RowInterleaved,
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_TOP_BOTTOM")]
TopBottom,
#[doc(alias = "GST_VIDEO_MULTIVIEW_FRAME_PACKING_CHECKERBOARD")]
Checkerboard,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for VideoMultiviewFramePacking {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoMultiviewFramePacking;
#[inline]
fn into_glib(self) -> ffi::GstVideoMultiviewFramePacking {
match self {
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
}
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,
}
}
}
#[doc(hidden)]
2020-11-22 09:50:37 +00:00
impl FromGlib<ffi::GstVideoMultiviewFramePacking> for VideoMultiviewFramePacking {
#[inline]
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstVideoMultiviewFramePacking) -> Self {
skip_assert_initialized!();
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,
value => Self::__Unknown(value),
}
}
}
impl StaticType for VideoMultiviewFramePacking {
#[inline]
#[doc(alias = "gst_video_multiview_frame_packing_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_multiview_frame_packing_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
2021-04-19 16:24:43 +00:00
impl glib::value::ValueType for VideoMultiviewFramePacking {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoMultiviewFramePacking {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
2021-04-19 16:24:43 +00:00
impl ToValue for VideoMultiviewFramePacking {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<VideoMultiviewFramePacking> for glib::Value {
#[inline]
fn from(v: VideoMultiviewFramePacking) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoMultiviewMode")]
2017-08-11 09:29:23 +00:00
pub enum VideoMultiviewMode {
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_NONE")]
2017-08-11 09:29:23 +00:00
None,
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_MONO")]
2017-08-11 09:29:23 +00:00
Mono,
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_LEFT")]
2017-08-11 09:29:23 +00:00
Left,
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_RIGHT")]
2017-08-11 09:29:23 +00:00
Right,
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE")]
2017-08-11 09:29:23 +00:00
SideBySide,
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_SIDE_BY_SIDE_QUINCUNX")]
2017-08-11 09:29:23 +00:00
SideBySideQuincunx,
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_COLUMN_INTERLEAVED")]
2017-08-11 09:29:23 +00:00
ColumnInterleaved,
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_ROW_INTERLEAVED")]
2017-08-11 09:29:23 +00:00
RowInterleaved,
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_TOP_BOTTOM")]
2017-08-11 09:29:23 +00:00
TopBottom,
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_CHECKERBOARD")]
2017-08-11 09:29:23 +00:00
Checkerboard,
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_FRAME_BY_FRAME")]
2017-08-11 09:29:23 +00:00
FrameByFrame,
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_MULTIVIEW_FRAME_BY_FRAME")]
2017-08-11 09:29:23 +00:00
MultiviewFrameByFrame,
#[doc(alias = "GST_VIDEO_MULTIVIEW_MODE_SEPARATED")]
2017-08-11 09:29:23 +00:00
Separated,
#[doc(hidden)]
__Unknown(i32),
}
impl VideoMultiviewMode {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_video_multiview_mode_from_caps_string")]
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")]
pub fn to_caps_string(self) -> Option<glib::GString> {
assert_initialized_main_thread!();
unsafe {
from_glib_none(ffi::gst_video_multiview_mode_to_caps_string(
self.into_glib(),
))
}
}
}
2017-08-11 09:29:23 +00:00
#[doc(hidden)]
impl IntoGlib for VideoMultiviewMode {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoMultiviewMode;
2017-08-11 09:29:23 +00:00
fn into_glib(self) -> ffi::GstVideoMultiviewMode {
match self {
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!();
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,
value => Self::__Unknown(value),
2017-08-11 09:29:23 +00:00
}
}
}
impl StaticType for VideoMultiviewMode {
#[inline]
#[doc(alias = "gst_video_multiview_mode_get_type")]
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
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
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
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoMultiviewMode {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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 {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<VideoMultiviewMode> for glib::Value {
#[inline]
fn from(v: VideoMultiviewMode) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[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)]
impl IntoGlib for VideoOrientationMethod {
type GlibType = ffi::GstVideoOrientationMethod;
#[inline]
fn into_glib(self) -> ffi::GstVideoOrientationMethod {
match self {
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,
}
}
}
#[doc(hidden)]
impl FromGlib<ffi::GstVideoOrientationMethod> for VideoOrientationMethod {
#[inline]
unsafe fn from_glib(value: ffi::GstVideoOrientationMethod) -> Self {
skip_assert_initialized!();
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,
value => Self::__Unknown(value),
}
}
}
impl StaticType for VideoOrientationMethod {
#[inline]
#[doc(alias = "gst_video_orientation_method_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::gst_video_orientation_method_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
2021-04-19 16:24:43 +00:00
impl glib::value::ValueType for VideoOrientationMethod {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoOrientationMethod {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[inline]
2021-04-19 16:24:43 +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))
}
}
2021-04-19 16:24:43 +00:00
impl ToValue for VideoOrientationMethod {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<VideoOrientationMethod> for glib::Value {
#[inline]
fn from(v: VideoOrientationMethod) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoPrimariesMode")]
pub enum VideoPrimariesMode {
#[doc(alias = "GST_VIDEO_PRIMARIES_MODE_NONE")]
None,
#[doc(alias = "GST_VIDEO_PRIMARIES_MODE_MERGE_ONLY")]
MergeOnly,
#[doc(alias = "GST_VIDEO_PRIMARIES_MODE_FAST")]
Fast,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for VideoPrimariesMode {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoPrimariesMode;
#[inline]
fn into_glib(self) -> ffi::GstVideoPrimariesMode {
match self {
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,
}
}
}
#[doc(hidden)]
2020-11-22 09:50:37 +00:00
impl FromGlib<ffi::GstVideoPrimariesMode> for VideoPrimariesMode {
#[inline]
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstVideoPrimariesMode) -> Self {
skip_assert_initialized!();
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,
value => Self::__Unknown(value),
}
}
}
impl StaticType for VideoPrimariesMode {
#[inline]
#[doc(alias = "gst_video_primaries_mode_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_primaries_mode_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
2021-04-19 16:24:43 +00:00
impl glib::value::ValueType for VideoPrimariesMode {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoPrimariesMode {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
2021-04-19 16:24:43 +00:00
impl ToValue for VideoPrimariesMode {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[inline]
2021-04-19 16:24:43 +00:00
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}
impl From<VideoPrimariesMode> for glib::Value {
#[inline]
fn from(v: VideoPrimariesMode) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoResamplerMethod")]
pub enum VideoResamplerMethod {
#[doc(alias = "GST_VIDEO_RESAMPLER_METHOD_NEAREST")]
Nearest,
#[doc(alias = "GST_VIDEO_RESAMPLER_METHOD_LINEAR")]
Linear,
#[doc(alias = "GST_VIDEO_RESAMPLER_METHOD_CUBIC")]
Cubic,
#[doc(alias = "GST_VIDEO_RESAMPLER_METHOD_SINC")]
Sinc,
#[doc(alias = "GST_VIDEO_RESAMPLER_METHOD_LANCZOS")]
Lanczos,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for VideoResamplerMethod {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoResamplerMethod;
#[inline]
fn into_glib(self) -> ffi::GstVideoResamplerMethod {
match self {
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,
}
}
}
#[doc(hidden)]
2020-11-22 09:50:37 +00:00
impl FromGlib<ffi::GstVideoResamplerMethod> for VideoResamplerMethod {
#[inline]
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstVideoResamplerMethod) -> Self {
skip_assert_initialized!();
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,
value => Self::__Unknown(value),
}
}
}
impl StaticType for VideoResamplerMethod {
#[inline]
#[doc(alias = "gst_video_resampler_method_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_resampler_method_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
2021-04-19 16:24:43 +00:00
impl glib::value::ValueType for VideoResamplerMethod {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoResamplerMethod {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
2021-04-19 16:24:43 +00:00
impl ToValue for VideoResamplerMethod {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[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
}
}
impl From<VideoResamplerMethod> for glib::Value {
#[inline]
fn from(v: VideoResamplerMethod) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoTileMode")]
pub enum VideoTileMode {
#[doc(alias = "GST_VIDEO_TILE_MODE_UNKNOWN")]
Unknown,
#[doc(alias = "GST_VIDEO_TILE_MODE_ZFLIPZ_2X2")]
Zflipz2x2,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_TILE_MODE_LINEAR")]
2020-08-11 07:49:37 +00:00
Linear,
#[doc(hidden)]
__Unknown(i32),
}
#[doc(hidden)]
impl IntoGlib for VideoTileMode {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoTileMode;
#[inline]
fn into_glib(self) -> ffi::GstVideoTileMode {
match self {
Self::Unknown => ffi::GST_VIDEO_TILE_MODE_UNKNOWN,
Self::Zflipz2x2 => ffi::GST_VIDEO_TILE_MODE_ZFLIPZ_2X2,
#[cfg(feature = "v1_18")]
Self::Linear => ffi::GST_VIDEO_TILE_MODE_LINEAR,
Self::__Unknown(value) => value,
}
}
}
#[doc(hidden)]
2020-11-22 09:50:37 +00:00
impl FromGlib<ffi::GstVideoTileMode> for VideoTileMode {
#[inline]
2020-12-08 13:00:17 +00:00
unsafe fn from_glib(value: ffi::GstVideoTileMode) -> Self {
skip_assert_initialized!();
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,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_TILE_MODE_LINEAR => Self::Linear,
value => Self::__Unknown(value),
}
}
}
impl StaticType for VideoTileMode {
#[inline]
#[doc(alias = "gst_video_tile_mode_get_type")]
fn static_type() -> glib::Type {
2020-11-22 09:50:37 +00:00
unsafe { from_glib(ffi::gst_video_tile_mode_get_type()) }
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
2021-04-19 16:24:43 +00:00
impl glib::value::ValueType for VideoTileMode {
type Type = Self;
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoTileMode {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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))
}
}
2021-04-19 16:24:43 +00:00
impl ToValue for VideoTileMode {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[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
impl From<VideoTileMode> for glib::Value {
#[inline]
fn from(v: VideoTileMode) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
2020-04-12 15:55:06 +00:00
#[non_exhaustive]
#[doc(alias = "GstVideoTransferFunction")]
2017-08-11 09:29:23 +00:00
pub enum VideoTransferFunction {
#[doc(alias = "GST_VIDEO_TRANSFER_UNKNOWN")]
2017-08-11 09:29:23 +00:00
Unknown,
#[doc(alias = "GST_VIDEO_TRANSFER_GAMMA10")]
2017-08-11 09:29:23 +00:00
Gamma10,
#[doc(alias = "GST_VIDEO_TRANSFER_GAMMA18")]
2017-08-11 09:29:23 +00:00
Gamma18,
#[doc(alias = "GST_VIDEO_TRANSFER_GAMMA20")]
2017-08-11 09:29:23 +00:00
Gamma20,
#[doc(alias = "GST_VIDEO_TRANSFER_GAMMA22")]
2017-08-11 09:29:23 +00:00
Gamma22,
#[doc(alias = "GST_VIDEO_TRANSFER_BT709")]
2017-08-11 09:29:23 +00:00
Bt709,
#[doc(alias = "GST_VIDEO_TRANSFER_SMPTE240M")]
2017-08-11 09:29:23 +00:00
Smpte240m,
#[doc(alias = "GST_VIDEO_TRANSFER_SRGB")]
2017-08-11 09:29:23 +00:00
Srgb,
#[doc(alias = "GST_VIDEO_TRANSFER_GAMMA28")]
2017-08-11 09:29:23 +00:00
Gamma28,
#[doc(alias = "GST_VIDEO_TRANSFER_LOG100")]
2017-08-11 09:29:23 +00:00
Log100,
#[doc(alias = "GST_VIDEO_TRANSFER_LOG316")]
2017-08-11 09:29:23 +00:00
Log316,
#[doc(alias = "GST_VIDEO_TRANSFER_BT2020_12")]
2017-08-11 09:29:23 +00:00
Bt202012,
#[doc(alias = "GST_VIDEO_TRANSFER_ADOBERGB")]
2017-08-11 09:29:23 +00:00
Adobergb,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_TRANSFER_BT2020_10")]
2020-04-30 16:51:41 +00:00
Bt202010,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_TRANSFER_SMPTE2084")]
2020-04-30 16:51:41 +00:00
Smpte2084,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[doc(alias = "GST_VIDEO_TRANSFER_ARIB_STD_B67")]
2020-04-30 16:51:41 +00:00
AribStdB67,
#[cfg(feature = "v1_18")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))]
#[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),
}
impl VideoTransferFunction {
#[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) }
}
#[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) }
}
#[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")]
pub fn from_iso(value: u32) -> VideoTransferFunction {
assert_initialized_main_thread!();
unsafe { from_glib(ffi::gst_video_transfer_function_from_iso(value)) }
}
#[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")]
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(
self.into_glib(),
from_bpp,
to_func.into_glib(),
to_bpp,
))
}
}
#[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")]
pub fn to_iso(self) -> u32 {
assert_initialized_main_thread!();
unsafe { ffi::gst_video_transfer_function_to_iso(self.into_glib()) }
}
}
2017-08-11 09:29:23 +00:00
#[doc(hidden)]
impl IntoGlib for VideoTransferFunction {
2020-11-22 09:50:37 +00:00
type GlibType = ffi::GstVideoTransferFunction;
2017-08-11 09:29:23 +00:00
fn into_glib(self) -> ffi::GstVideoTransferFunction {
match self {
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,
#[cfg(feature = "v1_18")]
Self::Bt202010 => ffi::GST_VIDEO_TRANSFER_BT2020_10,
#[cfg(feature = "v1_18")]
Self::Smpte2084 => ffi::GST_VIDEO_TRANSFER_SMPTE2084,
#[cfg(feature = "v1_18")]
Self::AribStdB67 => ffi::GST_VIDEO_TRANSFER_ARIB_STD_B67,
#[cfg(feature = "v1_18")]
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!();
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,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_TRANSFER_BT2020_10 => Self::Bt202010,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_TRANSFER_SMPTE2084 => Self::Smpte2084,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_TRANSFER_ARIB_STD_B67 => Self::AribStdB67,
#[cfg(feature = "v1_18")]
2021-05-23 16:27:13 +00:00
ffi::GST_VIDEO_TRANSFER_BT601 => Self::Bt601,
value => Self::__Unknown(value),
2017-08-11 09:29:23 +00:00
}
}
}
impl StaticType for VideoTransferFunction {
#[inline]
#[doc(alias = "gst_video_transfer_function_get_type")]
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
}
}
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 {
Self::ParamSpec::builder_with_default
}
}
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
}
unsafe impl<'a> glib::value::FromValue<'a> for VideoTransferFunction {
2021-04-19 16:24:43 +00:00
type Checker = glib::value::GenericValueTypeChecker<Self>;
#[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 {
#[inline]
2021-04-19 16:24:43 +00:00
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
2021-04-19 16:24:43 +00:00
unsafe {
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
}
#[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
}
}
impl From<VideoTransferFunction> for glib::Value {
#[inline]
fn from(v: VideoTransferFunction) -> Self {
skip_assert_initialized!();
ToValue::to_value(&v)
}
}