gstvideo.video_meta

Module for [VideoMeta] class

class VideoMeta

Types 1

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.

Fields
GstVideoMeta _cInstance
Methods
void * _cPtr() nothrow
gst.meta.Meta meta() @property nothrowGet `meta` field. Returns: parent #GstMeta
gst.buffer.Buffer buffer() @property nothrowGet `buffer` field. Returns: the buffer this metadata belongs to
void buffer(gst.buffer.Buffer propval) @property nothrowSet `buffer` field. Params: propval = the buffer this metadata belongs to
gstvideo.types.VideoFrameFlags flags() @property nothrowGet `flags` field. Returns: additional video flags
void flags(gstvideo.types.VideoFrameFlags propval) @property nothrowSet `flags` field. Params: propval = additional video flags
gstvideo.types.VideoFormat format() @property nothrowGet `format` field. Returns: the video format
void format(gstvideo.types.VideoFormat propval) @property nothrowSet `format` field. Params: propval = the video format
int id() @property nothrowGet `id` field. Returns: identifier of the frame
void id(int propval) @property nothrowSet `id` field. Params: propval = identifier of the frame
uint width() @property nothrowGet `width` field. Returns: the video width
void width(uint propval) @property nothrowSet `width` field. Params: propval = the video width
uint height() @property nothrowGet `height` field. Returns: the video height
void height(uint propval) @property nothrowSet `height` field. Params: propval = the video height
uint nPlanes() @property nothrowGet `nPlanes` field. Returns: the number of planes in the image
void nPlanes(uint propval) @property nothrowSet `nPlanes` field. Params: propval = the number of planes in the image
UnmapFuncType unmap() @property nothrowGet `unmap` field. Returns: unmap the memory of a plane
gstvideo.video_alignment.VideoAlignment alignment() @property nothrowGet `alignment` field. Returns: 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...
void alignment(gstvideo.video_alignment.VideoAlignment propval) @property nothrowSet `alignment` field. Params: propval = the paddings and alignment constraints of the video buffer. It is up to the caller of `[gstvideo.global.bufferAddVideoMetaFull]` to set it using [gstvideo.v...
bool getPlaneHeight(ref uint[] planeHeight) nothrowCompute the padded height of each plane from meta (padded size divided by stride).
bool getPlaneSize(ref size_t[] planeSize) nothrowCompute the size, in bytes, of each video plane described in meta including any padding and alignment constraint defined in meta->alignment.
bool map(uint plane, gst.map_info.MapInfo info, out void * data, out int stride, gst.types.MapFlags flags) nothrowMap the video plane with index plane in meta and return a pointer to the first byte of the plane and the stride of the plane.
bool unmap(uint plane, gst.map_info.MapInfo info) nothrowUnmap a previously mapped plane with [gstvideo.video_meta.VideoMeta.map].
Constructors
this(void * ptr, Flag!"Take" take)