Package org.freedesktop.gstreamer.video
Class VideoInfoDmaDrm
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.freedesktop.gstreamer.video.VideoInfoDmaDrm
- All Implemented Interfaces:
Proxy
Information describing a DMABuf image properties. It wraps
GstVideoInfo
and
adds DRM information such as drm-fourcc and drm-modifier, required for
negotiation and mapping.-
Constructor Summary
ConstructorDescriptionAllocate a newGstVideoInfoDmaDrm
that is also initialized with gst_video_info_dma_drm_init().VideoInfoDmaDrm
(MemorySegment address) Create a VideoInfoDmaDrm proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionvoid
free()
Free aGstVideoInfoDmaDrm
structure previously allocated with gst_video_info_dma_drm_new()static VideoInfoDmaDrm
Parsecaps
to generate aGstVideoInfoDmaDrm
.static boolean
fromVideoInfo
(VideoInfoDmaDrm drmInfo, VideoInfo info, long modifier) FillsdrmInfo
ifinfo
's format has a valid drm format andmodifier
is also validstatic MemoryLayout
The memory layout of the native struct.static Type
getType()
Get the GType of the VideoInfoDmaDrm classstatic void
init
(VideoInfoDmaDrm drmInfo) InitializedrmInfo
with default values.int
Read the value of the fielddrm_fourcc
.long
Read the value of the fielddrm_modifier
.Read the value of the fieldvinfo
.toCaps()
Convert the values of this VideoInfoDmaDrm into aGstCaps
.boolean
toVideoInfo
(VideoInfo info) Convert theGstVideoInfoDmaDrm
into a traditionalGstVideoInfo
with recognized video format.static boolean
withCaps
(VideoInfoDmaDrm drmInfo, Caps caps) Parsecaps
and updateinfo
.void
writeDrmFourcc
(int drmFourcc) Write a value in the fielddrm_fourcc
.void
writeDrmModifier
(long drmModifier) Write a value in the fielddrm_modifier
.void
writeVinfo
(VideoInfo vinfo) Write a value in the fieldvinfo
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
VideoInfoDmaDrm
Create a VideoInfoDmaDrm proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
VideoInfoDmaDrm
public VideoInfoDmaDrm()Allocate a newGstVideoInfoDmaDrm
that is also initialized with gst_video_info_dma_drm_init().
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readVinfo
Read the value of the fieldvinfo
.- Returns:
- The value of the field
vinfo
-
writeVinfo
Write a value in the fieldvinfo
.- Parameters:
vinfo
- The new value for the fieldvinfo
-
readDrmFourcc
public int readDrmFourcc()Read the value of the fielddrm_fourcc
.- Returns:
- The value of the field
drm_fourcc
-
writeDrmFourcc
public void writeDrmFourcc(int drmFourcc) Write a value in the fielddrm_fourcc
.- Parameters:
drmFourcc
- The new value for the fielddrm_fourcc
-
readDrmModifier
public long readDrmModifier()Read the value of the fielddrm_modifier
.- Returns:
- The value of the field
drm_modifier
-
writeDrmModifier
public void writeDrmModifier(long drmModifier) Write a value in the fielddrm_modifier
.- Parameters:
drmModifier
- The new value for the fielddrm_modifier
-
fromCaps
Parsecaps
to generate aGstVideoInfoDmaDrm
. Please note that thecaps
should be a dma drm caps. The gst_video_is_dma_drm_caps() can be used to verify it before calling this function.- Parameters:
caps
- aGstCaps
- Returns:
- A
GstVideoInfoDmaDrm
, ornull
ifcaps
couldn't be parsed.
-
withCaps
Parsecaps
and updateinfo
. Please note that thecaps
should be a dma drm caps. The gst_video_is_dma_drm_caps() can be used to verify it before calling this function.- Parameters:
drmInfo
-GstVideoInfoDmaDrm
caps
- aGstCaps
- Returns:
- TRUE if
caps
could be parsed
-
fromVideoInfo
FillsdrmInfo
ifinfo
's format has a valid drm format andmodifier
is also valid- Parameters:
drmInfo
-GstVideoInfoDmaDrm
info
- aGstVideoInfo
modifier
- the associated modifier value.- Returns:
true
ifdrmInfo
is filled correctly.
-
init
InitializedrmInfo
with default values.- Parameters:
drmInfo
- aGstVideoInfoDmaDrm
-
free
public void free()Free aGstVideoInfoDmaDrm
structure previously allocated with gst_video_info_dma_drm_new() -
toCaps
Convert the values of this VideoInfoDmaDrm into aGstCaps
. Please note that thecaps
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.- Returns:
- a new
GstCaps
containing the info in this VideoInfoDmaDrm.
-
toVideoInfo
Convert theGstVideoInfoDmaDrm
into a traditionalGstVideoInfo
with recognized video format. For DMA kind memory, the non linear DMA format should be recognized asGST_VIDEO_FORMAT_DMA_DRM
. This helper function setsinfo
's video format into the default value according to this VideoInfoDmaDrm's drm_fourcc field.- Parameters:
info
-GstVideoInfo
- Returns:
true
ifinfo
is converted correctly.
-