GstVideoMeta

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.Query.addAllocationMeta 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.

Since 1.24 it can be serialized using gst.meta.Meta.serialize and gst.meta.Meta.deserialize.

Members

Variables

alignment
GstVideoAlignment alignment;

the paddings and alignment constraints of the video buffer. It is up to the caller of [gstvideo.global.bufferAddVideoMetaFull] to set it using gstvideo.video_meta.VideoMeta.setAlignment, if they did not it defaults to no padding and no alignment. Since: 1.18

buffer
GstBuffer* buffer;

the buffer this metadata belongs to

flags
GstVideoFrameFlags flags;

additional video flags

format
GstVideoFormat format;

the video format

height
uint height;

the video height

id
int id;

identifier of the frame

map
bool function(GstVideoMeta* meta, uint plane, GstMapInfo* info, void** data, int* stride, GstMapFlags flags) map;

map the memory of a plane

meta
GstMeta meta;

parent #GstMeta

nPlanes
uint nPlanes;

the number of planes in the image

offset
size_t[4] offset;

array of offsets for the planes. This field might not always be valid, it is used by the default implementation of @map.

stride
int[4] stride;

array of strides for the planes. This field might not always be valid, it is used by the default implementation of @map.

unmap
bool function(GstVideoMeta* meta, uint plane, GstMapInfo* info) unmap;

unmap the memory of a plane

width
uint width;

the video width