GstVideo.VideoFrame

Fields

Name

Type

Access

Description

buffer

Gst.Buffer

r/w

the mapped buffer

data

[object]

r/w

pointers to the plane data

flags

GstVideo.VideoFrameFlags

r/w

GstVideo.VideoFrameFlags for the frame

id

int

r/w

id of the mapped frame. the id can for example be used to identify the frame in case of multiview video.

info

GstVideo.VideoInfo

r/w

the GstVideo.VideoInfo

map

[Gst.MapInfo]

r/w

mappings of the planes

meta

object

r/w

pointer to metadata if any

Methods

class

map_id (info, buffer, id, flags)

copy (src)

copy_plane (src, plane)

unmap ()

Details

class GstVideo.VideoFrame

A video frame obtained from GstVideo.VideoFrame.map()

classmethod map_id(info, buffer, id, flags)
Parameters:
Returns:

True on success.

frame:

pointer to GstVideo.VideoFrame

Return type:

(bool, frame: GstVideo.VideoFrame)

Use info and buffer to fill in the values of frame with the video frame information of frame id.

When id is -1, the default frame is mapped. When id != -1, this function will return False when there is no GstVideo.VideoMeta with that id.

All video planes of buffer will be mapped and the pointers will be set in frame->data.

copy(src)
Parameters:

src (GstVideo.VideoFrame) – a GstVideo.VideoFrame

Returns:

True if the contents could be copied.

Return type:

bool

Copy the contents from src to self.

Note: Since: 1.18, self dimensions are allowed to be smaller than src dimensions.

copy_plane(src, plane)
Parameters:
Returns:

True if the contents could be copied.

Return type:

bool

Copy the plane with index plane from src to self.

Note: Since: 1.18, self dimensions are allowed to be smaller than src dimensions.

unmap()

Unmap the memory previously mapped with GstVideo.VideoFrame.map.