Enum gstreamer_video::VideoFormat

source ·
#[non_exhaustive]
pub enum VideoFormat {
Show 138 variants Unknown, Encoded, I420, Yv12, Yuy2, Uyvy, Ayuv, Rgbx, Bgrx, Xrgb, Xbgr, Rgba, Bgra, Argb, Abgr, Rgb, Bgr, Y41b, Y42b, Yvyu, Y444, V210, V216, Nv12, Nv21, Gray8, Gray16Be, Gray16Le, V308, Rgb16, Bgr16, Rgb15, Bgr15, Uyvp, A420, Rgb8p, Yuv9, Yvu9, Iyu1, Argb64, Ayuv64, R210, I42010be, I42010le, I42210be, I42210le, Y44410be, Y44410le, Gbr, Gbr10be, Gbr10le, Nv16, Nv24, Nv1264z32, A42010be, A42010le, A42210be, A42210le, A44410be, A44410le, Nv61, P01010be, P01010le, Iyu2, Vyuy, Gbra, Gbra10be, Gbra10le, Gbr12be, Gbr12le, Gbra12be, Gbra12le, I42012be, I42012le, I42212be, I42212le, Y44412be, Y44412le, Gray10Le32, Nv1210le32, Nv1610le32, Nv1210le40, Y210, Y410, Vuya, Bgr10a2Le, Rgb10a2Le, Y44416be, Y44416le, P016Be, P016Le, P012Be, P012Le, Y212Be, Y212Le, Y412Be, Y412Le, Nv124l4, Nv1232l32, Rgbp, Bgrp, Av12, Argb64Le, Argb64Be, Rgba64Le, Rgba64Be, Bgra64Le, Bgra64Be, Abgr64Le, Abgr64Be, Nv1216l32s, Nv128l128, Nv1210be8l128, Nv1210le404l4, DmaDrm, Mt2110t, Mt2110r, A422, A444, A44412le, A44412be, A42212le, A42212be, A42012le, A42012be, A44416le, A44416be, A42216le, A42216be, A42016le, A42016be, Gbr16le, Gbr16be, Rbga, Y216Le, Y216Be, Y416Le, Y416Be,
}
Expand description

Enum value describing the most common video formats.

See the GStreamer raw video format design document for details about the layout and packing of these formats in memory.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Unknown

Unknown or unset video format id

§

Encoded

Encoded video format. Only ever use that in caps for special video formats in combination with non-system memory GstCapsFeatures where it does not make sense to specify a real video format.

§

I420

planar 4:2:0 YUV

§

Yv12

planar 4:2:0 YVU (like I420 but UV planes swapped)

§

Yuy2

packed 4:2:2 YUV (Y0-U0-Y1-V0 Y2-U2-Y3-V2 Y4 …)

§

Uyvy

packed 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 …)

§

Ayuv

packed 4:4:4 YUV with alpha channel (A0-Y0-U0-V0 …)

§

Rgbx

sparse rgb packed into 32 bit, space last

§

Bgrx

sparse reverse rgb packed into 32 bit, space last

§

Xrgb

sparse rgb packed into 32 bit, space first

§

Xbgr

sparse reverse rgb packed into 32 bit, space first

§

Rgba

rgb with alpha channel last

§

Bgra

reverse rgb with alpha channel last

§

Argb

rgb with alpha channel first

§

Abgr

reverse rgb with alpha channel first

§

Rgb

RGB packed into 24 bits without padding (R-G-B-R-G-B)

§

Bgr

reverse RGB packed into 24 bits without padding (B-G-R-B-G-R)

§

Y41b

planar 4:1:1 YUV

§

Y42b

planar 4:2:2 YUV

§

Yvyu

packed 4:2:2 YUV (Y0-V0-Y1-U0 Y2-V2-Y3-U2 Y4 …)

§

Y444

planar 4:4:4 YUV

§

V210

packed 4:2:2 10-bit YUV, complex format

§

V216

packed 4:2:2 16-bit YUV, Y0-U0-Y1-V1 order

§

Nv12

planar 4:2:0 YUV with interleaved UV plane

§

Nv21

planar 4:2:0 YUV with interleaved VU plane

§

Gray8

8-bit grayscale

§

Gray16Be

16-bit grayscale, most significant byte first

§

Gray16Le

16-bit grayscale, least significant byte first

§

V308

packed 4:4:4 YUV (Y-U-V …)

§

Rgb16

rgb 5-6-5 bits per component

§

Bgr16

reverse rgb 5-6-5 bits per component

§

Rgb15

rgb 5-5-5 bits per component

§

Bgr15

reverse rgb 5-5-5 bits per component

§

Uyvp

packed 10-bit 4:2:2 YUV (U0-Y0-V0-Y1 U2-Y2-V2-Y3 U4 …)

§

A420

planar 4:4:2:0 AYUV

§

Rgb8p

8-bit paletted RGB

§

Yuv9

planar 4:1:0 YUV

§

Yvu9

planar 4:1:0 YUV (like YUV9 but UV planes swapped)

§

Iyu1

packed 4:1:1 YUV (Cb-Y0-Y1-Cr-Y2-Y3 …)

§

Argb64

rgb with alpha channel first, 16 bits (native endianness) per channel

§

Ayuv64

packed 4:4:4 YUV with alpha channel, 16 bits (native endianness) per channel (A0-Y0-U0-V0 …)

§

R210

packed 4:4:4 RGB, 10 bits per channel

§

I42010be

planar 4:2:0 YUV, 10 bits per channel

§

I42010le

planar 4:2:0 YUV, 10 bits per channel

§

I42210be

planar 4:2:2 YUV, 10 bits per channel

§

I42210le

planar 4:2:2 YUV, 10 bits per channel

§

Y44410be

planar 4:4:4 YUV, 10 bits per channel (Since: 1.2)

§

Y44410le

planar 4:4:4 YUV, 10 bits per channel (Since: 1.2)

§

Gbr

planar 4:4:4 RGB, 8 bits per channel (Since: 1.2)

§

Gbr10be

planar 4:4:4 RGB, 10 bits per channel (Since: 1.2)

§

Gbr10le

planar 4:4:4 RGB, 10 bits per channel (Since: 1.2)

§

Nv16

planar 4:2:2 YUV with interleaved UV plane (Since: 1.2)

§

Nv24

planar 4:4:4 YUV with interleaved UV plane (Since: 1.2)

§

Nv1264z32

NV12 with 64x32 tiling in zigzag pattern (Since: 1.4)

§

A42010be

planar 4:4:2:0 YUV, 10 bits per channel (Since: 1.6)

§

A42010le

planar 4:4:2:0 YUV, 10 bits per channel (Since: 1.6)

§

A42210be

planar 4:4:2:2 YUV, 10 bits per channel (Since: 1.6)

§

A42210le

planar 4:4:2:2 YUV, 10 bits per channel (Since: 1.6)

§

A44410be

planar 4:4:4:4 YUV, 10 bits per channel (Since: 1.6)

§

A44410le

planar 4:4:4:4 YUV, 10 bits per channel (Since: 1.6)

§

Nv61

planar 4:2:2 YUV with interleaved VU plane (Since: 1.6)

§

P01010be

planar 4:2:0 YUV with interleaved UV plane, 10 bits per channel (Since: 1.10)

§

P01010le

planar 4:2:0 YUV with interleaved UV plane, 10 bits per channel (Since: 1.10)

§

Iyu2

packed 4:4:4 YUV (U-Y-V …) (Since: 1.10)

§

Vyuy

packed 4:2:2 YUV (V0-Y0-U0-Y1 V2-Y2-U2-Y3 V4 …)

§

Gbra

planar 4:4:4:4 ARGB, 8 bits per channel (Since: 1.12)

§

Gbra10be

planar 4:4:4:4 ARGB, 10 bits per channel (Since: 1.12)

§

Gbra10le

planar 4:4:4:4 ARGB, 10 bits per channel (Since: 1.12)

§

Gbr12be

planar 4:4:4 RGB, 12 bits per channel (Since: 1.12)

§

Gbr12le

planar 4:4:4 RGB, 12 bits per channel (Since: 1.12)

§

Gbra12be

planar 4:4:4:4 ARGB, 12 bits per channel (Since: 1.12)

§

Gbra12le

planar 4:4:4:4 ARGB, 12 bits per channel (Since: 1.12)

§

I42012be

planar 4:2:0 YUV, 12 bits per channel (Since: 1.12)

§

I42012le

planar 4:2:0 YUV, 12 bits per channel (Since: 1.12)

§

I42212be

planar 4:2:2 YUV, 12 bits per channel (Since: 1.12)

§

I42212le

planar 4:2:2 YUV, 12 bits per channel (Since: 1.12)

§

Y44412be

planar 4:4:4 YUV, 12 bits per channel (Since: 1.12)

§

Y44412le

planar 4:4:4 YUV, 12 bits per channel (Since: 1.12)

§

Gray10Le32

10-bit grayscale, packed into 32bit words (2 bits padding) (Since: 1.14)

§

Nv1210le32

10-bit variant of Nv12, packed into 32bit words (MSB 2 bits padding) (Since: 1.14)

§

Nv1610le32

10-bit variant of Nv16, packed into 32bit words (MSB 2 bits padding) (Since: 1.14)

§

Nv1210le40

Fully packed variant of NV12_10LE32 (Since: 1.16)

§

Y210

packed 4:2:2 YUV, 10 bits per channel (Since: 1.16)

§

Y410

packed 4:4:4 YUV, 10 bits per channel(A-V-Y-U…) (Since: 1.16)

§

Vuya

packed 4:4:4 YUV with alpha channel (V0-U0-Y0-A0…) (Since: 1.16)

§

Bgr10a2Le

packed 4:4:4 RGB with alpha channel(B-G-R-A), 10 bits for R/G/B channel and MSB 2 bits for alpha channel (Since: 1.16)

§

Rgb10a2Le

packed 4:4:4 RGB with alpha channel(R-G-B-A), 10 bits for R/G/B channel and MSB 2 bits for alpha channel (Since: 1.18)

§

Y44416be

planar 4:4:4 YUV, 16 bits per channel (Since: 1.18)

§

Y44416le

planar 4:4:4 YUV, 16 bits per channel (Since: 1.18)

§

P016Be

planar 4:2:0 YUV with interleaved UV plane, 16 bits per channel (Since: 1.18)

§

P016Le

planar 4:2:0 YUV with interleaved UV plane, 16 bits per channel (Since: 1.18)

§

P012Be

planar 4:2:0 YUV with interleaved UV plane, 12 bits per channel (Since: 1.18)

§

P012Le

planar 4:2:0 YUV with interleaved UV plane, 12 bits per channel (Since: 1.18)

§

Y212Be

packed 4:2:2 YUV, 12 bits per channel (Y-U-Y-V) (Since: 1.18)

§

Y212Le

packed 4:2:2 YUV, 12 bits per channel (Y-U-Y-V) (Since: 1.18)

§

Y412Be

packed 4:4:4:4 YUV, 12 bits per channel(U-Y-V-A…) (Since: 1.18)

§

Y412Le

packed 4:4:4:4 YUV, 12 bits per channel(U-Y-V-A…) (Since: 1.18)

§

Nv124l4

NV12 with 4x4 tiles in linear order.

§

Nv1232l32

NV12 with 32x32 tiles in linear order.

§

Rgbp

Planar 4:4:4 RGB, R-G-B order

§

Bgrp

Planar 4:4:4 RGB, B-G-R order

§

Av12

Planar 4:2:0 YUV with interleaved UV plane with alpha as 3rd plane.

§

Argb64Le

RGB with alpha channel first, 16 bits (little endian) per channel.

§

Argb64Be

RGB with alpha channel first, 16 bits (big endian) per channel.

§

Rgba64Le

RGB with alpha channel last, 16 bits (little endian) per channel.

§

Rgba64Be

RGB with alpha channel last, 16 bits (big endian) per channel.

§

Bgra64Le

Reverse RGB with alpha channel last, 16 bits (little endian) per channel.

§

Bgra64Be

Reverse RGB with alpha channel last, 16 bits (big endian) per channel.

§

Abgr64Le

Reverse RGB with alpha channel first, 16 bits (little endian) per channel.

§

Abgr64Be

Reverse RGB with alpha channel first, 16 bits (big endian) per channel.

§

Nv1216l32s

NV12 with 16x32 Y tiles and 16x16 UV tiles.

§

Nv128l128

NV12 with 8x128 tiles in linear order.

§

Nv1210be8l128

NV12 10bit big endian with 8x128 tiles in linear order.

§

Nv1210le404l4

Nv1210le40 with 4x4 pixels tiles (5 bytes per tile row). This format is produced by Verisilicon/Hantro decoders.

§

DmaDrm

DmaDrm represent the DMA DRM special format. It’s only used with memory:DMABuf GstCapsFeatures, where an extra parameter (drm-format) is required to define the image format and its memory layout.

§

Mt2110t

Mediatek 10bit NV12 little endian with 16x32 tiles in linear order, tile 2 bits.

§

Mt2110r

Mediatek 10bit NV12 little endian with 16x32 tiles in linear order, raster 2 bits.

§

A422

planar 4:4:2:2 YUV, 8 bits per channel

§

A444

planar 4:4:4:4 YUV, 8 bits per channel

§

A44412le

planar 4:4:4:4 YUV, 12 bits per channel

§

A44412be

planar 4:4:4:4 YUV, 12 bits per channel

§

A42212le

planar 4:4:2:2 YUV, 12 bits per channel

§

A42212be

planar 4:4:2:2 YUV, 12 bits per channel

§

A42012le

planar 4:4:2:0 YUV, 12 bits per channel

§

A42012be

planar 4:4:2:0 YUV, 12 bits per channel

§

A44416le

planar 4:4:4:4 YUV, 16 bits per channel

§

A44416be

planar 4:4:4:4 YUV, 16 bits per channel

§

A42216le

planar 4:4:2:2 YUV, 16 bits per channel

§

A42216be

planar 4:4:2:2 YUV, 16 bits per channel

§

A42016le

planar 4:4:2:0 YUV, 16 bits per channel

§

A42016be

planar 4:4:2:0 YUV, 16 bits per channel

§

Gbr16le

planar 4:4:4 RGB, 16 bits per channel

§

Gbr16be

planar 4:4:4 RGB, 16 bits per channel

§

Rbga

packed RGB with alpha, 8 bits per channel

§

Y216Le

packed 4:2:2 YUV, 16 bits per channel (Y-U-Y-V)

§

Y216Be

packed 4:2:2 YUV, 16 bits per channel (Y-U-Y-V)

§

Y416Le

packed 4:4:4:4 YUV, 16 bits per channel(U-Y-V-A)

§

Y416Be

packed 4:4:4:4 YUV, 16 bits per channel(U-Y-V-A)

Implementations§

source§

impl VideoFormat

source

pub fn from_fourcc(fourcc: u32) -> VideoFormat

source

pub fn from_string(format: &str) -> VideoFormat

source

pub fn to_fourcc(self) -> u32

source§

impl VideoFormat

source

pub fn from_masks( depth: u32, bpp: u32, endianness: VideoEndianness, red_mask: u32, blue_mask: u32, green_mask: u32, alpha_mask: u32, ) -> Self

source

pub fn to_str<'a>(self) -> &'a GStr

source

pub fn iter_raw() -> VideoFormatIterator

source

pub fn iter_any() -> impl Iterator<Item = VideoFormat>

Trait Implementations§

source§

impl Clone for VideoFormat

source§

fn clone(&self) -> VideoFormat

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VideoFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for VideoFormat

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<VideoFormat> for Value

source§

fn from(v: VideoFormat) -> Self

Converts to this type from the input type.
source§

impl From<VideoFormat> for VideoFormatInfo

source§

fn from(f: VideoFormat) -> Self

Converts to this type from the input type.
source§

impl FromStr for VideoFormat

§

type Err = BoolError

The associated error which can be returned from parsing.
source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl<'a> FromValue<'a> for VideoFormat

§

type Checker = GenericValueTypeChecker<VideoFormat>

Value type checker.
source§

unsafe fn from_value(value: &'a Value) -> Self

Get the contained value from a Value. Read more
source§

impl HasParamSpec for VideoFormat

§

type ParamSpec = ParamSpecEnum

§

type SetValue = VideoFormat

Preferred value to be used as setter for the associated ParamSpec.
§

type BuilderFn = fn(_: &str, _: VideoFormat) -> ParamSpecEnumBuilder<'_, VideoFormat>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl Hash for VideoFormat

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for VideoFormat

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for VideoFormat

source§

fn eq(&self, other: &VideoFormat) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for VideoFormat

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl StaticType for VideoFormat

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl ToValue for VideoFormat

source§

fn to_value(&self) -> Value

Convert a value to a Value.
source§

fn value_type(&self) -> Type

Returns the type identifier of self. Read more
source§

impl ValueType for VideoFormat

§

type Type = VideoFormat

Type to get the Type from. Read more
source§

impl Copy for VideoFormat

source§

impl Eq for VideoFormat

source§

impl StructuralPartialEq for VideoFormat

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> Property for T
where T: HasParamSpec,

§

type Value = T

source§

impl<T> PropertyGet for T
where T: HasParamSpec,

§

type Value = T

source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

source§

impl<T> StaticTypeExt for T
where T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToSendValue for T
where T: Send + ToValue + ?Sized,

source§

fn to_send_value(&self) -> SendValue

Returns a SendValue clone of self.
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.