[][src]Struct gstreamer_video::VideoInfo

pub struct VideoInfo(_);

Information describing image properties. This information can be filled in from GstCaps with VideoInfo::from_caps. The information is also used to store the specific video info when mapping a video frame with 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 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 gst::Caps.

Returns

a new 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]

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]

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

gst::Format of the src_value

src_value

value to convert

dest_format

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) -> bool[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 VideoInfo::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.

Feature: v1_18

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

Trait Implementations

impl Clone for VideoInfo[src]

impl Debug for VideoInfo[src]

impl Eq for VideoInfo[src]

impl PartialEq<VideoInfo> for VideoInfo[src]

impl Send for VideoInfo[src]

impl StaticType 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]

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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.