Skip to content

libs: updates for video info dma/drm

video-info-dma: add gst_video_info_dma_drm_is_equal()

Compares two #GstVideoInfoDmaDrm and returns whether they are equal or not.

video-info-dma: handle raw video caps

Right now if caps don't have memory:DMABuf caps feature and neither its format
is DMA_DRM the conversion to GstVideoInfoDmaDrm is halted. Though, it's
perfectly valid to only convert its internal GstVideoInfo, while leaving its DRM
fourcc and modifier as invalid to avoid repeating the task.

This patch enables that.


* It's split in two functions so they could reused in other parts of the code.
* The input precondition checks for fixed caps


* remove DRM fourcc and modifier precondition
* after generating the internal GstVideoInfo if the DRM fourcc and modifier are
  invalid, return raw video immediately.
* as gst_video_dma_drm_fourcc_to_string() can return NULL, validate returned

 gst_video_dma_drm_from_caps() and gst_video_info_dma_drm_new_from_caps()

* The input precondition checks for fixed caps
* if the caps aren't DMA/DRM but the caps feature is system memory, then parse
   the caps only for the internal GstVideoInfo and return.

Add a new test for these changes.

cc: @ndufresne, @He_Junyan

Merge request reports