diff --git a/girs/GstGLEGL-1.0.gir b/girs/GstGLEGL-1.0.gir new file mode 100644 index 0000000000..0aa3a6ca97 --- /dev/null +++ b/girs/GstGLEGL-1.0.gir @@ -0,0 +1,914 @@ + + + + + + + + + + + #GstEGLImage represents and holds an `EGLImage` handle. + +A #GstEGLImage can be created from a dmabuf with gst_egl_image_from_dmabuf(), +or gst_egl_image_from_dmabuf_direct(), or #GstGLMemoryEGL provides a +#GstAllocator to allocate `EGLImage`'s bound to and OpenGL texture. + + + + + + + + + + + + + + + + + + + + + + + + + + + + a new #GstEGLImage wrapping @image + + + + + a #GstGLContext (must be an EGL context) + + + + the image to wrap + + + + the #GstGLFormat + + + + user data + + + + called when @user_data is no longer needed + + + + + + + + + + + + + + + + + + + + + + + + + + + + the `EGLImage` of @image + + + + + a #GstEGLImage + + + + + + Checks if the given @context can emulate @format using a limited subset of +RGB texture formats. Such @format is then suitable for importing using +gst_egl_image_from_dmabuf() even when GL supports the video format as +external-only or not at all. + + + #TRUE if @format can be emulated + + + + + a #GstGLContext (must be an EGL context) + + + + a #GstVideoFormat + + + + + + Creates an EGL image that imports the dmabuf FD. The dmabuf data +is passed as RGBA data. Shaders later take this "RGBA" data and +convert it from its true format (described by in_info) to actual +RGBA output. For example, with I420, three EGL images are created, +one for each @plane, each EGL image with a single-channel R format. +With NV12, two EGL images are created, one with R format, one +with RG format etc. + + + a #GstEGLImage wrapping @dmabuf or %NULL on failure + + + + + a #GstGLContext (must be an EGL context) + + + + the DMA-Buf file descriptor + + + + the #GstVideoInfo in @dmabuf + + + + the plane in @in_info to create and #GstEGLImage for + + + + the byte-offset in the data + + + + + + Creates an EGL image that imports the dmabuf FD. The dmabuf data +is passed directly as the format described in in_info. This is +useful if the hardware is capable of performing color space conversions +internally. The appropriate DRM format is picked, and the EGL image +is created with this DRM format. + +Another notable difference to gst_egl_image_from_dmabuf() +is that this function creates one EGL image for all planes, not one for +a single plane. + + + a #GstEGLImage wrapping @dmabuf or %NULL on failure + + + + + a #GstGLContext (must be an EGL context) + + + + Array of DMABuf file descriptors + + + + Array of offsets, relative to the DMABuf + + + + the #GstVideoInfo + + + + + + Creates an EGL image that imports the dmabuf FD. The dmabuf data +is passed directly as the format described in @in_info. This is +useful if the hardware is capable of performing color space conversions +internally. The appropriate DRM format is picked, and the EGL image +is created with this DRM format. + +Another notable difference to gst_egl_image_from_dmabuf() +is that this function creates one EGL image for all planes, not one for +a single plane. + + + a #GstEGLImage wrapping @dmabuf or %NULL on failure + + + + + a #GstGLContext (must be an EGL context) + + + + Array of DMABuf file descriptors + + + + Array of offsets, relative to the DMABuf + + + + the #GstVideoInfo + + + + GL texture target this GstEGLImage is intended for + + + + + + Creates an EGL image that imports the dmabuf FD. The dmabuf data is passed +directly as the format described in @in_info. This is useful if the hardware +is capable of performing color space conversions internally. + +Another notable difference to gst_egl_image_from_dmabuf() is that this +function creates one EGL image for all planes, not one for a single plane. + + + a #GstEGLImage wrapping @dmabuf or %NULL on failure + + + + + a #GstGLContext (must be an EGL context) + + + + number of planes (obtained from a #GstVideoMeta) + + + + Array of DMABuf file descriptors + + + + Array of offsets, relative to the DMABuf + + + + the #GstVideoInfoDmaDrm + + + + GL texture target this GstEGLImage is intended for + + + + + + + + a #GstEGLImage wrapping @gl_mem or %NULL on failure + + + + + a #GstGLContext (must be an EGL context) + + + + a #GstGLMemory + + + + additional attributes to add to the `eglCreateImage`() call. + + + + + + + Function to be called when the GstEGLImage is destroyed. It should free +the associated `EGLImage` if necessary + + + + + + + a #GstEGLImage + + + + user data passed to gst_egl_image_new_wrapped() + + + + + + + + + + + + + + + + + + + + the contents of a #GstGLDisplayEGL are private and should only be accessed +through the provided API + + + Create a new #GstGLDisplayEGL using the default EGL_DEFAULT_DISPLAY. + + + a new #GstGLDisplayEGL or %NULL + + + + + Create a new surfaceless #GstGLDisplayEGL using the Mesa3D +EGL_PLATFORM_SURFACELESS_MESA extension. + + + a new #GstGLDisplayEGL or %NULL + + + + + + + + + + + + + + + + Creates a EGL display connection from a native Display. + +This function will return the same value for multiple calls with the same +@display. + + + a new #GstGLDisplayEGL + + + + + an existing #GstGLDisplay + + + + + + Attempts to create a new `EGLDisplay` from @display. If @type is +%GST_GL_DISPLAY_TYPE_ANY or %GST_GL_DISPLAY_TYPE_EGL_SURFACELESS, then +@display must be 0. @type must not be %GST_GL_DISPLAY_TYPE_NONE. + + + A `EGLDisplay` or `EGL_NO_DISPLAY` + + + + + a #GstGLDisplayType + + + + pointer to a display (or 0) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the contents of a #GstGLDisplayEGLDevice are private and should only be accessed +through the provided API + + + Create a new #GstGLDisplayEGLDevice with an EGLDevice supported device + + + a new #GstGLDisplayEGLDevice or %NULL + + + + + the index of device to use + + + + + + Creates a new #GstGLDisplayEGLDevice with EGLDeviceEXT . +The @device must be created using EGLDevice enumeration. + + + a new #GstGLDisplayEGLDevice + + + + + an existing EGLDeviceEXT + + + + + + + + + + + + + + + + + + Opaque #GstGLDisplayEGLDeviceClass struct + + + + + + + + + + + + #GstGLMemoryEGL is created or wrapped through gst_gl_base_memory_alloc() +with #GstGLVideoAllocationParams. + + + + + + + + + + + + + + + + The EGLDisplay @mem is associated with + + + + + a #GstGLMemoryEGL + + + + + + + + The EGLImage held by @mem + + + + + a #GstGLMemoryEGL + + + + + + Initializes the GL Memory allocator. It is safe to call this function +multiple times. This must be called before any other GstGLMemoryEGL operation. + + + + + + + + Opaque #GstGLMemoryEGLAllocator struct + + + + + + + + + + + + The #GstGLMemoryEGLAllocatorClass only contains private data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The name of the GL Memory EGL allocator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the short string representation of @err + + + + + an EGL error code + + + + + + Checks if the given @context can emulate @format using a limited subset of +RGB texture formats. Such @format is then suitable for importing using +gst_egl_image_from_dmabuf() even when GL supports the video format as +external-only or not at all. + + + #TRUE if @format can be emulated + + + + + a #GstGLContext (must be an EGL context) + + + + a #GstVideoFormat + + + + + + Creates an EGL image that imports the dmabuf FD. The dmabuf data +is passed as RGBA data. Shaders later take this "RGBA" data and +convert it from its true format (described by in_info) to actual +RGBA output. For example, with I420, three EGL images are created, +one for each @plane, each EGL image with a single-channel R format. +With NV12, two EGL images are created, one with R format, one +with RG format etc. + + + a #GstEGLImage wrapping @dmabuf or %NULL on failure + + + + + a #GstGLContext (must be an EGL context) + + + + the DMA-Buf file descriptor + + + + the #GstVideoInfo in @dmabuf + + + + the plane in @in_info to create and #GstEGLImage for + + + + the byte-offset in the data + + + + + + Creates an EGL image that imports the dmabuf FD. The dmabuf data +is passed directly as the format described in in_info. This is +useful if the hardware is capable of performing color space conversions +internally. The appropriate DRM format is picked, and the EGL image +is created with this DRM format. + +Another notable difference to gst_egl_image_from_dmabuf() +is that this function creates one EGL image for all planes, not one for +a single plane. + + + a #GstEGLImage wrapping @dmabuf or %NULL on failure + + + + + a #GstGLContext (must be an EGL context) + + + + Array of DMABuf file descriptors + + + + Array of offsets, relative to the DMABuf + + + + the #GstVideoInfo + + + + + + Creates an EGL image that imports the dmabuf FD. The dmabuf data +is passed directly as the format described in @in_info. This is +useful if the hardware is capable of performing color space conversions +internally. The appropriate DRM format is picked, and the EGL image +is created with this DRM format. + +Another notable difference to gst_egl_image_from_dmabuf() +is that this function creates one EGL image for all planes, not one for +a single plane. + + + a #GstEGLImage wrapping @dmabuf or %NULL on failure + + + + + a #GstGLContext (must be an EGL context) + + + + Array of DMABuf file descriptors + + + + Array of offsets, relative to the DMABuf + + + + the #GstVideoInfo + + + + GL texture target this GstEGLImage is intended for + + + + + + Creates an EGL image that imports the dmabuf FD. The dmabuf data is passed +directly as the format described in @in_info. This is useful if the hardware +is capable of performing color space conversions internally. + +Another notable difference to gst_egl_image_from_dmabuf() is that this +function creates one EGL image for all planes, not one for a single plane. + + + a #GstEGLImage wrapping @dmabuf or %NULL on failure + + + + + a #GstGLContext (must be an EGL context) + + + + number of planes (obtained from a #GstVideoMeta) + + + + Array of DMABuf file descriptors + + + + Array of offsets, relative to the DMABuf + + + + the #GstVideoInfoDmaDrm + + + + GL texture target this GstEGLImage is intended for + + + + + + + + a #GstEGLImage wrapping @gl_mem or %NULL on failure + + + + + a #GstGLContext (must be an EGL context) + + + + a #GstGLMemory + + + + additional attributes to add to the `eglCreateImage`() call. + + + + + + Initializes the GL Memory allocator. It is safe to call this function +multiple times. This must be called before any other GstGLMemoryEGL operation. + + + + + + + #GstGLDisplayEGL represents a connection to an EGL `EGLDisplay` handle created +internally (gst_gl_display_egl_new() or gst_gl_display_egl_new_surfaceless()) +or wrapped by the application (gst_gl_display_egl_new_with_egl_display()) + + + #GstGLDisplayEGLDevice represents a `EGLDeviceEXT` handle created internally +(gst_gl_display_egl_device_new()) or wrapped by the application +(gst_gl_display_egl_device_new_with_egl_device()) + + + + + whether @mem is a #GstGLMemoryEGL + + + + + a #GstMemory to test + + + + + + diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build b/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build index 6222803917..a2a12b2e4f 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build +++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build @@ -1154,10 +1154,10 @@ if build_gstgl 'dependencies' : [video_dep, gst_dep, gst_base_dep], } library_def += {'gir': [gir]} + gl_gir = ['GstGL-1.0'] if not static_build gl_gir = gnome.generate_gir(gstgl, kwargs: gir) - library_def += {'gir_targets': library_def.get('gir_targets', []) + [gl_gir]} - library_def += {'gir': [gir]} + library_def += {'gir_targets': [gl_gir]} gen_sources += [gl_gir] endif endif @@ -1176,6 +1176,7 @@ if build_gstgl if gl_x11_headers.length() > 0 install_headers(gl_x11_headers, subdir : 'gstreamer-1.0/gst/gl/x11') + library_def = {'lib': gstgl} pkg_name = 'gstreamer-gl-x11-1.0' pkgconfig.generate( libraries : [gstgl], @@ -1193,19 +1194,18 @@ if build_gstgl 'identifier_prefix' : 'Gst', 'symbol_prefix' : 'gst', 'export_packages' : 'gstreamer-gl-x11-1.0', - 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'], + 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', gl_gir[0]], 'install' : true, 'extra_args' : gir_init_section + ['--c-include=gst/gl/x11/x11.h'], 'dependencies' : [video_dep, gst_dep, gst_base_dep] } - gir_dict = gir + {'includes': gir['includes'] + ['GstGL-1.0']} - gst_libraries += [[pkg_name, {'gir': gir_dict}]] + library_def += {'gir': [gir]} if not static_build - gir += {'includes': gir['includes'] + [gl_gir[0]]} gl_x11_gir = gnome.generate_gir(gstgl, kwargs: gir) - library_def += {'gir_targets': library_def.get('gir_targets', []) + [gl_x11_gir]} + library_def += {'gir_targets': [gl_x11_gir]} endif endif + gst_libraries += [[pkg_name, library_def]] gstglx11_dep = declare_dependency(dependencies : [gstgl_dep, x11_dep, xcb_dep], sources : gl_x11_gir) meson.override_dependency('gstreamer-gl-x11-1.0', gstglx11_dep) @@ -1213,6 +1213,7 @@ if build_gstgl if gl_wayland_headers.length() > 0 install_headers(gl_wayland_headers, subdir : 'gstreamer-1.0/gst/gl/wayland') + library_def = {'lib': gstgl} pkg_name = 'gstreamer-gl-wayland-1.0' pkgconfig.generate( libraries : [gstgl], @@ -1230,20 +1231,18 @@ if build_gstgl 'identifier_prefix' : 'Gst', 'symbol_prefix' : 'gst', 'export_packages' : 'gstreamer-gl-wayland-1.0', - 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'], + 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', gl_gir[0]], 'install' : true, 'extra_args' : gir_init_section + ['--c-include=gst/gl/wayland/wayland.h'], 'dependencies' : [video_dep, gst_dep, gst_base_dep] } - - gir_dict = gir + {'includes': gir['includes'] + ['GstGL-1.0']} - gst_libraries += [[pkg_name, {'gir': gir_dict}]] + library_def += {'gir': [gir]} if not static_build - gir += {'includes': gir['includes'] + [gl_gir[0]]} gl_wayland_gir = gnome.generate_gir(gstgl, kwargs: gir) - library_def += {'gir_targets': library_def.get('gir_targets', []) + [gl_wayland_gir]} + library_def += {'gir_targets': [gl_wayland_gir]} endif endif + gst_libraries += [[pkg_name, library_def]] gstglwayland_dep = declare_dependency(dependencies : [gstgl_dep], sources : gl_wayland_gir) meson.override_dependency(pkg_name, gstglwayland_dep) @@ -1251,6 +1250,7 @@ if build_gstgl if gl_egl_headers.length() > 0 install_headers(gl_egl_headers, subdir : 'gstreamer-1.0/gst/gl/egl') + library_def = {'lib': gstgl} pkg_name = 'gstreamer-gl-egl-1.0' pkgconfig.generate( libraries : [gstgl, egl_dep], @@ -1267,19 +1267,18 @@ if build_gstgl 'identifier_prefix' : 'Gst', 'symbol_prefix' : 'gst', 'export_packages' : pkg_name, - 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'], + 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', gl_gir[0]], 'install' : true, 'extra_args' : gir_init_section + ['--c-include=gst/gl/egl/egl.h'], 'dependencies' : [video_dep, gst_dep, gst_base_dep] } - gir_dict = gir + {'includes': gir['includes'] + ['GstGL-1.0']} - gst_libraries += [[pkg_name, {'gir': gir_dict}]] + library_def += {'gir': [gir]} if not static_build - gir += {'includes': gir['includes'] + [gl_gir[0]]} gl_egl_gir = gnome.generate_gir(gstgl, kwargs: gir) - library_def += {'gir_targets': library_def.get('gir_targets', []) + [gl_egl_gir]} + library_def += {'gir_targets': [gl_egl_gir]} endif endif + gst_libraries += [[pkg_name, library_def]] gstglegl_dep = declare_dependency(dependencies : [gstgl_dep], sources : gl_egl_gir) meson.override_dependency(pkg_name, gstglegl_dep) @@ -1287,6 +1286,7 @@ if build_gstgl if gl_viv_fb_headers.length() > 0 install_headers(gl_viv_fb_headers, subdir : 'gstreamer-1.0/gst/gl/viv-fb') + library_def = {'lib': gstgl} pkg_name = 'gstreamer-gl-viv-fb-1.0' pkgconfig.generate( libraries : [gstgl], @@ -1303,19 +1303,18 @@ if build_gstgl 'identifier_prefix' : 'Gst', 'symbol_prefix' : 'gst', 'export_packages' : pkg_name, - 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'], + 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0', gl_gir[0]], 'install' : true, 'extra_args' : gir_init_section + ['--c-include=gst/gl/viv-fb/gstglviv-fb.h'], 'dependencies' : [video_dep, gst_dep, gst_base_dep] } - gir_dict = gir + {'includes': gir['includes'] + ['GstGL-1.0']} - gst_libraries += [[pkg_name, {'gir': gir_dict}]] + library_def += {'gir': [gir]} if not static_build - gir += {'includes': gir['includes'] + [gl_gir[0]]} gl_viv_fb_gir = gnome.generate_gir(gstgl, kwargs: gir) - library_def += {'gir_targets': library_def.get('gir_targets', []) + [gl_viv_fb_gir]} + library_def += {'gir_targets': [gl_viv_fb_gir]} endif endif + gst_libraries += [[pkg_name, library_def]] gstglviv_fb_dep = declare_dependency(dependencies : [gstgl_dep], sources : gl_viv_fb_gir) meson.override_dependency(pkg_name, gstglviv_fb_dep)