Struct gstreamer_video::VideoInfo[][src]

pub struct VideoInfo(_);

Information describing image properties. This information can be filled in from GstCaps with Self::from_caps(). The information is also used to store the specific video info when mapping a video frame with [crate::VideoFrame::map()].

Use the provided macros to access the info in this structure.

Implementations

impl VideoInfo[src]

pub fn builder<'a>(
    format: VideoFormat,
    width: u32,
    height: u32
) -> VideoInfoBuilder<'a>
[src]

pub fn is_valid(&self) -> bool[src]

pub fn from_caps(caps: &CapsRef) -> Result<Self, BoolError>[src]

Parse caps and update self.

caps

a crate::gst::Caps

Returns

TRUE if caps could be parsed

pub fn to_caps(&self) -> Result<Caps, BoolError>[src]

Convert the values of self into a crate::gst::Caps.

Returns

a new crate::gst::Caps containing the info of self.

pub fn format(&self) -> VideoFormat[src]

pub fn format_info(&self) -> VideoFormatInfo[src]

pub fn width(&self) -> u32[src]

pub fn height(&self) -> u32[src]

pub fn field_height(&self) -> u32[src]

This is supported on crate feature v1_16 only.

pub fn interlace_mode(&self) -> VideoInterlaceMode[src]

pub fn flags(&self) -> VideoFlags[src]

pub fn size(&self) -> usize[src]

pub fn views(&self) -> u32[src]

pub fn chroma_site(&self) -> VideoChromaSite[src]

pub fn colorimetry(&self) -> VideoColorimetry[src]

pub fn par(&self) -> Fraction[src]

pub fn fps(&self) -> Fraction[src]

pub fn offset(&self) -> &[usize][src]

pub fn stride(&self) -> &[i32][src]

pub fn multiview_mode(&self) -> VideoMultiviewMode[src]

pub fn multiview_flags(&self) -> VideoMultiviewFlags[src]

pub fn field_order(&self) -> VideoFieldOrder[src]

This is supported on crate feature v1_12 only.

pub fn has_alpha(&self) -> bool[src]

pub fn is_gray(&self) -> bool[src]

pub fn is_rgb(&self) -> bool[src]

pub fn is_yuv(&self) -> bool[src]

pub fn is_interlaced(&self) -> bool[src]

pub fn n_planes(&self) -> u32[src]

pub fn n_components(&self) -> u32[src]

pub fn convert<V: Into<GenericFormattedValue>, U: SpecificFormattedValue>(
    &self,
    src_val: V
) -> Option<U>
[src]

Converts among various crate::gst::Format types. This function handles GST_FORMAT_BYTES, GST_FORMAT_TIME, and GST_FORMAT_DEFAULT. For raw video, GST_FORMAT_DEFAULT corresponds to video frames. This function can be used to handle pad queries of the type GST_QUERY_CONVERT.

src_format

crate::gst::Format of the src_value

src_value

value to convert

dest_format

crate::gst::Format of the dest_value

dest_value

pointer to destination value

Returns

TRUE if the conversion was successful.

pub fn convert_generic<V: Into<GenericFormattedValue>>(
    &self,
    src_val: V,
    dest_fmt: Format
) -> Option<GenericFormattedValue>
[src]

pub fn align(&mut self, align: &mut VideoAlignment) -> Result<(), BoolError>[src]

Adjust the offset and stride fields in self so that the padding and stride alignment in align is respected.

Extra padding will be added to the right side when stride alignment padding is required and align will be updated with the new padding values.

align

alignment parameters

Returns

false if alignment could not be applied, e.g. because the size of a frame can’t be represented as a 32 bit integer (Since: 1.12)

pub fn align_full(
    &mut self,
    align: &mut VideoAlignment
) -> Result<[usize; 4], BoolError>
[src]

This is supported on crate feature v1_18 only.

This variant of Self::align() provides the updated size, in bytes, of each video plane after the alignment, including all horizontal and vertical paddings.

In case of GST_VIDEO_INTERLACE_MODE_ALTERNATE info, the returned sizes are the ones used to hold a single field, not the full frame.

align

alignment parameters

plane_size

array used to store the plane sizes

Returns

false if alignment could not be applied, e.g. because the size of a frame can’t be represented as a 32 bit integer

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

Trait Implementations

impl Clone for VideoInfo[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for VideoInfo[src]

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

Formats the value using the given formatter. Read more

impl PartialEq<VideoInfo> for VideoInfo[src]

fn eq(&self, other: &Self) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl StaticType for VideoInfo[src]

fn static_type() -> Type[src]

Returns the type identifier of Self.

impl ValueType for VideoInfo[src]

type Type = Self

Type to get the Type from. Read more

impl Eq for VideoInfo[src]

impl Send for VideoInfo[src]

impl Sync for VideoInfo[src]

Auto Trait Implementations

impl RefUnwindSafe for VideoInfo

impl Unpin for VideoInfo

impl UnwindSafe for VideoInfo

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

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

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

impl<T> ToSendValue for T where
    T: Send + ToValue + ?Sized
[src]

pub fn to_send_value(&self) -> SendValue[src]

Returns a SendValue clone of self.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<'a, T, C> FromValueOptional<'a> for T where
    C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError>,
    T: FromValue<'a, Checker = C>, 
[src]