pub struct VideoInfo(_);
Expand description

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

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

Implementations

Parse caps to generate a VideoInfo.

caps

a gst::Caps

Returns

A VideoInfo, or None if caps couldn’t be parsed

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

Returns

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

Available on crate feature v1_16 only.
Available on crate feature v1_16 only.

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

Returns

TRUE if the conversion was successful.

dest_value

pointer to destination value

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)

Available on crate feature v1_18 only.

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.

This variant of 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

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

plane_size

array used to store the plane sizes

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Returns the type identifier of Self.
Type to get the Type from. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Ensures that the type has been registered with the type system.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Returns a SendValue clone of self.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.