Commit c16412dd authored by Matthew Waters's avatar Matthew Waters

gl/download: add support for output memory:NVMM buffers

Currently RGBA-only.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1071>
parent 94f0d9c6
This diff is collapsed.
......@@ -43,7 +43,8 @@ typedef enum
{
GST_GL_DOWNLOAD_MODE_PASSTHROUGH,
GST_GL_DOWNLOAD_MODE_PBO_TRANSFERS,
GST_GL_DOWNLOAD_MODE_DMABUF_EXPORTS
GST_GL_DOWNLOAD_MODE_DMABUF_EXPORTS,
GST_GL_DOWNLOAD_MODE_NVMM,
} GstGlDownloadMode;
struct _GstGLDownloadElement
......
......@@ -133,10 +133,17 @@ if ['darwin', 'ios'].contains(host_system)
gl_objc_args += ['-fobjc-arc']
endif
extra_c_args = []
# gl_nvmm and nvbuf_utils_dep are set in gst-libs/gst/gl/meson.build
if gl_nvmm
extra_c_args += ['-DHAVE_NVMM']
optional_deps += [nvbuf_utils_dep]
endif
gstopengl = library('gstopengl',
opengl_sources,
c_args : gst_plugins_base_args,
objc_args : gst_plugins_base_args + gl_objc_args,
c_args : gst_plugins_base_args + extra_c_args,
objc_args : gst_plugins_base_args + gl_objc_args + extra_c_args,
link_args : noseh_link_args,
include_directories : [configinc],
dependencies : [gstgl_dep, video_dep,
......
......@@ -923,6 +923,8 @@ if host_system == 'android' and need_win_android != 'no' and need_platform_egl !
endif
endif
gl_nvmm = false
nvbuf_utils_dep = unneeded_dep
if egl_dep.found()
# XXX: provide options for this?
# c_args and c_link_args can also cover this case just fine e.g.:
......@@ -931,6 +933,7 @@ if egl_dep.found()
nvbuf_utils_h = cc.has_header('nvbuf_utils.h')
if nvbuf_utils_dep.found() and nvbuf_utils_h
gl_misc_deps += [nvbuf_utils_dep]
gl_nvmm = true
gl_cpp_args += ['-DHAVE_NVMM']
endif
endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment