Struct gstreamer_video::video_meta::VideoMeta[][src]

#[repr(transparent)]
pub struct VideoMeta(_);
Expand description

Extra buffer metadata describing image properties

This meta can also be used by downstream elements to specifiy their buffer layout requirements for upstream. Upstream should try to fit those requirements, if possible, in order to prevent buffer copies.

This is done by passing a custom GstStructure to gst_query_add_allocation_meta() when handling the ALLOCATION query. This structure should be named ‘video-meta’ and can have the following fields:

  • padding-top (uint): extra pixels on the top
  • padding-bottom (uint): extra pixels on the bottom
  • padding-left (uint): extra pixels on the left side
  • padding-right (uint): extra pixels on the right side The padding fields have the same semantic as GstVideoMeta.alignment and so represent the paddings requested on produced video buffers.

Implementations

This is supported on crate feature v1_18 only.
This is supported on crate feature v1_18 only.

Compute the size, in bytes, of each video plane described in self including any padding and alignment constraint defined in self->alignment.

Returns

true if self’s alignment is valid and plane_size has been updated, false otherwise

plane_size

array used to store the plane sizes

This is supported on crate feature v1_18 only.

Compute the padded height of each plane from self (padded size divided by stride).

It is not valid to call this function with a meta associated to a TILED video format.

Returns

true if self’s alignment is valid and plane_height has been updated, false otherwise

plane_height

array used to store the plane height

This is supported on crate feature v1_18 only.

Set the alignment of self to alignment. This function checks that the paddings defined in alignment are compatible with the strides defined in self and will fail to update if they are not.

alignment

a GstVideoAlignment

Returns

true if alignment’s meta has been updated, false if not

Trait Implementations

Formats the value using the given formatter. 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 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.