Gjsify LogoGjsify Logo

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

Hierarchy

  • VideoMeta

Index

Constructors

Properties

alignment: VideoAlignment

the paddings and alignment constraints of the video buffer. It is up to the caller of gst_buffer_add_video_meta_full() to set it using gst_video_meta_set_alignment(), if they did not it defaults to no padding and no alignment. Since: 1.18

field
buffer: Gst.Buffer

the buffer this metadata belongs to

field

additional video flags

field

the video format

field
height: number

the video height

field
id: number

identifier of the frame

field
meta: Meta

parent #GstMeta

field
n_planes: number

the number of planes in the image

field
offset: number[]

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

field
stride: number[]

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

field
width: number

the video width

field
name: string

Methods

  • get_plane_height(): [boolean, number[]]
  • Compute the padded height of each plane from meta (padded size divided by stride).

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

    Returns [boolean, number[]]

  • get_plane_size(): [boolean, number[]]
  • Compute the size, in bytes, of each video plane described in meta including any padding and alignment constraint defined in meta->alignment.

    Returns [boolean, number[]]

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

    Parameters

    Returns boolean

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method