gst: Add support for DMA_DRM / explicit modifiers

Gstreamer 1.24 added and largely switched to a new, modifier aware
DMABuf API. Unfortunately that breaks the existing DMABuf support in the
PW Gst element.

Add support for the new API.
This commit is contained in:
Robert Mader 2024-02-02 02:20:29 +01:00
parent f2f60ee0ec
commit f1b75fc6f8
6 changed files with 417 additions and 169 deletions

View file

@ -364,6 +364,7 @@ gst_deps_def = {
}
gst_dep = []
gst_dma_drm_found = false
foreach depname, kwargs: gst_deps_def
dep = dependency(depname, required: gst_option, kwargs: kwargs)
summary({depname: dep.found()}, bool_yn: true, section: 'GStreamer modules')
@ -376,6 +377,10 @@ foreach depname, kwargs: gst_deps_def
break
endif
gst_dep += [dep]
if depname == 'gstreamer-allocators-1.0' and dep.version().version_compare('>= 1.23.1')
gst_dma_drm_found = true
endif
endforeach
# This code relies on the array being empty if any dependency was not found
@ -384,6 +389,9 @@ summary({'gstreamer-device-provider': gst_dp_found}, bool_yn: true, section: 'Ba
cdata.set('HAVE_GSTREAMER_DEVICE_PROVIDER', get_option('gstreamer-device-provider').allowed())
summary({'gstreamer DMA_DRM support': gst_dma_drm_found}, bool_yn: true, section: 'Backend')
cdata.set('HAVE_GSTREAMER_DMA_DRM', gst_dma_drm_found)
webrtc_dep = dependency('webrtc-audio-processing-1',
version : ['>= 1.2' ],
required : false)