Package org.freedesktop.gstreamer.video
Class VideoInfoDmaDrm
java.lang.Object
org.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.- Since:
- 1.24
-
Constructor Summary
ConstructorsConstructorDescriptionAllocate a newGstVideoInfoDmaDrmthat 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 TypeMethodDescriptionvoidfree()Free aGstVideoInfoDmaDrmstructure previously allocated with gst_video_info_dma_drm_new()static VideoInfoDmaDrmParsecapsto generate aGstVideoInfoDmaDrm.static booleanfromVideoInfo(VideoInfoDmaDrm drmInfo, VideoInfo info, long modifier) FillsdrmInfoifinfo'sformat has a valid drm format andmodifieris also validstatic MemoryLayoutThe memory layout of the native struct.static @Nullable TypegetType()Get the GType of the VideoInfoDmaDrm classstatic voidinit(VideoInfoDmaDrm drmInfo) InitializedrmInfowith default values.intRead the value of the fielddrm_fourcc.longRead the value of the fielddrm_modifier.@Nullable VideoInfoRead the value of the fieldvinfo.@Nullable CapstoCaps()Convert the values of this VideoInfoDmaDrm into aGstCaps.booleantoVideoInfo(VideoInfo info) Convert theGstVideoInfoDmaDrminto a traditionalGstVideoInfowith recognized video format.static booleanwithCaps(VideoInfoDmaDrm drmInfo, Caps caps) Parsecapsand updateinfo.Please note that thecapsshould be a dma drm caps.voidwriteDrmFourcc(int drmFourcc) Write a value in the fielddrm_fourcc.voidwriteDrmModifier(long drmModifier) Write a value in the fielddrm_modifier.voidwriteVinfo(@Nullable VideoInfo vinfo) Write a value in the fieldvinfo.Methods inherited from class org.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 newGstVideoInfoDmaDrmthat is also initialized with gst_video_info_dma_drm_init().- Since:
- 1.24
-
-
Method Details
-
getType
Get the GType of the VideoInfoDmaDrm class- Returns:
- the GType
-
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
Parsecapsto generate aGstVideoInfoDmaDrm. Please note that thecapsshould 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, ornullifcapscouldn't be parsed. - Since:
- 1.24
-
withCaps
Parsecapsand updateinfo.Please note that thecapsshould be a dma drm caps. The gst_video_is_dma_drm_caps() can be used to verify it before calling this function.- Parameters:
drmInfo-GstVideoInfoDmaDrmcaps- aGstCaps- Returns:
- TRUE if
capscould be parsed - Since:
- 1.24
-
fromVideoInfo
FillsdrmInfoifinfo'sformat has a valid drm format andmodifieris also valid- Parameters:
drmInfo-GstVideoInfoDmaDrminfo- aGstVideoInfomodifier- the associated modifier value.- Returns:
trueifdrmInfois filled correctly.- Since:
- 1.24
-
init
InitializedrmInfowith default values.- Parameters:
drmInfo- aGstVideoInfoDmaDrm- Since:
- 1.24
-
free
public void free()Free aGstVideoInfoDmaDrmstructure previously allocated with gst_video_info_dma_drm_new()- Since:
- 1.24
-
toCaps
Convert the values of this VideoInfoDmaDrm into aGstCaps. Please note that thecapsreturned 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
GstCapscontaining the info indrmInfo. - Since:
- 1.24
-
toVideoInfo
Convert theGstVideoInfoDmaDrminto a traditionalGstVideoInfowith recognized video format. For DMA kind memory, the non linear DMA format should be recognized asGST_VIDEO_FORMAT_DMA_DRM. This helper function setsinfo'svideo format into the default value according todrmInfo'sdrm_fourcc field.- Parameters:
info-GstVideoInfo- Returns:
trueifinfois converted correctly.- Since:
- 1.24
-