Struct gstreamer_video::VideoInfo[][src]

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 and update info.

caps

a gst::Caps

Returns

TRUE if caps could be parsed

info

VideoInfo

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

Returns

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

This is supported on crate feature v1_16 only.
This is supported on crate feature v1_12 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)

This is supported 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 !=.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

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

recently added

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.