VideoMeta

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.

Constructors

this
this(void* ptr, Flag!"Take" take)

Members

Aliases

UnmapFuncType
alias UnmapFuncType = bool function(GstVideoMeta* meta, uint plane, GstMapInfo* info)

Function alias for field unmap

Functions

cPtr
void* cPtr()
getPlaneHeight
bool getPlaneHeight(uint[] planeHeight)

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

getPlaneSize
bool getPlaneSize(size_t[] planeSize)

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

map
bool map(uint plane, gst.map_info.MapInfo info, void* data, int stride, gst.types.MapFlags flags)

Map 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.

unmap
bool unmap(uint plane, gst.map_info.MapInfo info)

Unmap a previously mapped plane with gstvideo.video_meta.VideoMeta.map.

Properties

alignment
gstvideo.video_alignment.VideoAlignment alignment [@property getter]

Get field alignment.

buffer
gst.buffer.Buffer buffer [@property getter]

Get field buffer.

buffer
gst.buffer.Buffer buffer [@property setter]

Set field buffer.

flags
gstvideo.types.VideoFrameFlags flags [@property getter]

Get field flags.

flags
gstvideo.types.VideoFrameFlags flags [@property setter]

Set field flags.

format
gstvideo.types.VideoFormat format [@property getter]

Get field format.

format
gstvideo.types.VideoFormat format [@property setter]

Set field format.

height
uint height [@property getter]

Get field height.

height
uint height [@property setter]

Set field height.

id
int id [@property getter]

Get field id.

id
int id [@property setter]

Set field id.

meta
gst.meta.Meta meta [@property getter]

Get field meta.

nPlanes
uint nPlanes [@property getter]

Get field nPlanes.

nPlanes
uint nPlanes [@property setter]

Set field nPlanes.

unmap
UnmapFuncType unmap [@property getter]

Get field unmap.

width
uint width [@property getter]

Get field width.

width
uint width [@property setter]

Set field width.

Static functions

getInfo
gst.meta_info.MetaInfo getInfo()