Struct gstreamer_video::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

§

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 + PartialOrd,

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 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> 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,

§

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>,

§

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>,

§

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.