GstVideo.VideoInfoDmaDrm

Fields

Name

Type

Access

Description

drm_fourcc

int

r/w

the fourcc defined by drm

drm_modifier

int

r/w

the drm modifier

vinfo

GstVideo.VideoInfo

r/w

the associated GstVideo.VideoInfo

Methods

class

from_caps (caps)

class

from_video_info (info, modifier)

class

init ()

class

new ()

class

new_from_caps (caps)

free ()

to_caps ()

to_video_info ()

Details

class GstVideo.VideoInfoDmaDrm

Information describing a DMABuf image properties. It wraps GstVideo.VideoInfo and adds DRM information such as drm-fourcc and drm-modifier, required for negotiation and mapping.

New in version 1.24.

classmethod from_caps(caps)[source]
Parameters:

caps (Gst.Caps) – a Gst.Caps

Returns:

True if caps could be parsed

drm_info:

GstVideo.VideoInfoDmaDrm

Return type:

(bool, drm_info: GstVideo.VideoInfoDmaDrm)

Parse caps and update info. Please note that the caps should be a dma drm caps. The GstVideo.video_is_dma_drm_caps() can be used to verify it before calling this function.

New in version 1.24.

classmethod from_video_info(info, modifier)[source]
Parameters:
Returns:

True if drm_info is filled correctly.

drm_info:

GstVideo.VideoInfoDmaDrm

Return type:

(bool, drm_info: GstVideo.VideoInfoDmaDrm)

Fills drm_info if info's format has a valid drm format and modifier is also valid

New in version 1.24.

classmethod init()[source]
Returns:

a GstVideo.VideoInfoDmaDrm

Return type:

drm_info: GstVideo.VideoInfoDmaDrm

Initialize drm_info with default values.

New in version 1.24.

classmethod new()[source]
Returns:

a new GstVideo.VideoInfoDmaDrm. Free it with GstVideo.VideoInfoDmaDrm.free().

Return type:

GstVideo.VideoInfoDmaDrm

Allocate a new GstVideo.VideoInfoDmaDrm that is also initialized with GstVideo.VideoInfoDmaDrm.init().

New in version 1.24.

classmethod new_from_caps(caps)[source]
Parameters:

caps (Gst.Caps) – a Gst.Caps

Returns:

A GstVideo.VideoInfoDmaDrm, or None if caps couldn’t be parsed.

Return type:

GstVideo.VideoInfoDmaDrm or None

Parse caps to generate a GstVideo.VideoInfoDmaDrm. Please note that the caps should be a dma drm caps. The GstVideo.video_is_dma_drm_caps() can be used to verify it before calling this function.

New in version 1.24.

free()[source]

Free a GstVideo.VideoInfoDmaDrm structure previously allocated with GstVideo.VideoInfoDmaDrm.new()

New in version 1.24.

to_caps()[source]
Returns:

a new Gst.Caps containing the info in self.

Return type:

Gst.Caps or None

Convert the values of self into a Gst.Caps. Please note that the caps returned will be a dma drm caps which sets format field to DMA_DRM, and contains a new drm-format field. The value of drm-format field is composed of a drm fourcc and a modifier, such as NV12:0x0100000000000002.

New in version 1.24.

to_video_info()[source]
Returns:

True if info is converted correctly.

info:

GstVideo.VideoInfo

Return type:

(bool, info: GstVideo.VideoInfo)

Convert the GstVideo.VideoInfoDmaDrm into a traditional GstVideo.VideoInfo with recognized video format. For DMA kind memory, the non linear DMA format should be recognized as GstVideo.VideoFormat.DMA_DRM. This helper function sets info's video format into the default value according to self's drm_fourcc field.

New in version 1.24.