gstreamer_video

Struct VideoFormatInfo

Source
pub struct VideoFormatInfo(/* private fields */);
Expand description

Information for a video format.

Implementations§

Source§

impl VideoFormatInfo

Source

pub unsafe fn from_ptr(format_info: *const GstVideoFormatInfo) -> Self

Source

pub fn from_format(format: VideoFormat) -> Self

Source

pub fn format(&self) -> VideoFormat

Source

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

Source

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

Source

pub fn flags(&self) -> VideoFormatFlags

Source

pub fn bits(&self) -> u32

Source

pub fn n_components(&self) -> u32

Source

pub fn shift(&self) -> &[u32]

Source

pub fn depth(&self) -> &[u32]

Source

pub fn pixel_stride(&self) -> &[i32]

Source

pub fn n_planes(&self) -> u32

Source

pub fn plane(&self) -> &[u32]

Source

pub fn poffset(&self) -> &[u32]

Source

pub fn w_sub(&self) -> &[u32]

Source

pub fn h_sub(&self) -> &[u32]

Source

pub fn tile_mode(&self) -> VideoTileMode

Source

pub fn tile_ws(&self) -> u32

👎Deprecated: Since 1.22
Source

pub fn tile_hs(&self) -> u32

👎Deprecated: Since 1.22
Source

pub fn unpack_format(&self) -> VideoFormat

Source

pub fn pack_lines(&self) -> i32

Source

pub fn has_alpha(&self) -> bool

Source

pub fn has_palette(&self) -> bool

Source

pub fn has_subtiles(&self) -> bool

Source

pub fn is_complex(&self) -> bool

Source

pub fn is_gray(&self) -> bool

Source

pub fn is_le(&self) -> bool

Source

pub fn is_rgb(&self) -> bool

Source

pub fn is_tiled(&self) -> bool

Source

pub fn is_yuv(&self) -> bool

Source

pub fn scale_width(&self, component: u8, width: u32) -> u32

Source

pub fn scale_height(&self, component: u8, height: u32) -> u32

Source

pub fn unpack( &self, flags: VideoPackFlags, dest: &mut [u8], src: &[&[u8]], stride: &[i32], x: i32, y: i32, width: i32, )

Source

pub fn pack( &self, flags: VideoPackFlags, src: &[u8], src_stride: i32, dest: &mut [&mut [u8]], dest_stride: &[i32], chroma_site: VideoChromaSite, y: i32, width: i32, )

Source

pub fn range_offsets(&self, range: VideoColorRange) -> ([i32; 4], [i32; 4])

Source

pub fn extrapolate_stride(&self, plane: u32, stride: u32) -> u32

Extrapolate plane stride from the first stride of an image. This helper is useful to support legacy API were only one stride is supported.

§plane

a plane number

§stride

The fist plane stride

§Returns

The extrapolated stride for plane

Source

pub fn tile_info(&self, plane: u32) -> &VideoTileInfo

Trait Implementations§

Source§

impl Clone for VideoFormatInfo

Source§

fn clone(&self) -> VideoFormatInfo

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 VideoFormatInfo

Source§

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

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

impl Display for VideoFormatInfo

Source§

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

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

impl From<VideoFormat> for VideoFormatInfo

Source§

fn from(f: VideoFormat) -> Self

Converts to this type from the input type.
Source§

impl FromStr for VideoFormatInfo

Source§

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 Ord for VideoFormatInfo

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,

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

impl PartialEq for VideoFormatInfo

Source§

fn eq(&self, other: &Self) -> 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 VideoFormatInfo

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 Copy for VideoFormatInfo

Source§

impl Eq for VideoFormatInfo

Source§

impl Send for VideoFormatInfo

Source§

impl Sync for VideoFormatInfo

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 u8)

🔬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> 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> ToOwned for T
where T: Clone,

Source§

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> 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> TransparentType for T

Source§

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

Source§

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, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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.