diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11.h b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11.h index decbfe712b..fe851708fb 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11.h @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11memory.cpp b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11memory.cpp index 684d452c07..13a84d2ae2 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11memory.cpp +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11memory.cpp @@ -33,6 +33,68 @@ GST_DEBUG_CATEGORY_STATIC (gst_d3d11_allocator_debug); static GstAllocator *_d3d11_memory_allocator; +GType +gst_d3d11_allocation_flags_get_type (void) +{ + static gsize type = 0; + static const GFlagsValue values[] = { + {GST_D3D11_ALLOCATION_FLAG_DEFAULT, "GST_D3D11_ALLOCATION_FLAG_DEFAULT", + "default"}, + {GST_D3D11_ALLOCATION_FLAG_TEXTURE_ARRAY, + "GST_D3D11_ALLOCATION_FLAG_TEXTURE_ARRAY", "texture-array"}, + {0, nullptr, nullptr} + }; + + if (g_once_init_enter (&type)) { + GType tmp = g_flags_register_static ("GstD3D11AllocationFlags", values); + g_once_init_leave (&type, tmp); + } + + return (GType) type; +} + +GType +gst_d3d11_memory_transfer_get_type (void) +{ + static gsize type = 0; + static const GFlagsValue values[] = { + {GST_D3D11_MEMORY_TRANSFER_NEED_DOWNLOAD, + "GST_D3D11_MEMORY_TRANSFER_NEED_DOWNLOAD", "need-download"}, + {GST_D3D11_MEMORY_TRANSFER_NEED_UPLOAD, + "GST_D3D11_MEMORY_TRANSFER_NEED_UPLOAD", "need-upload"}, + {0, nullptr, nullptr} + }; + + if (g_once_init_enter (&type)) { + GType tmp = g_flags_register_static ("GstD3D11MemoryTransfer", values); + g_once_init_leave (&type, tmp); + } + + return (GType) type; +} + +GType +gst_d3d11_memory_native_type_get_type (void) +{ + static gsize type = 0; + static const GEnumValue values[] = { + {GST_D3D11_MEMORY_NATIVE_TYPE_INVALID, + "GST_D3D11_MEMORY_NATIVE_TYPE_INVALID", "invalid"}, + {GST_D3D11_MEMORY_NATIVE_TYPE_BUFFER, "GST_D3D11_MEMORY_NATIVE_TYPE_BUFFER", + "buffer"}, + {GST_D3D11_MEMORY_NATIVE_TYPE_TEXTURE_2D, + "GST_D3D11_MEMORY_NATIVE_TYPE_TEXTURE_2D", "texture-2d"}, + {0, nullptr, nullptr} + }; + + if (g_once_init_enter (&type)) { + GType tmp = g_enum_register_static ("GstD3D11MemoryNativeType", values); + g_once_init_leave (&type, tmp); + } + + return (GType) type; +} + /* GstD3D11AllocationParams */ static void gst_d3d11_allocation_params_init (GType type); G_DEFINE_BOXED_TYPE_WITH_CODE (GstD3D11AllocationParams, diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11memory.h b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11memory.h index dca39a537e..2e0ce6f64a 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11memory.h +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/gstd3d11memory.h @@ -91,6 +91,10 @@ typedef enum GST_D3D11_ALLOCATION_FLAG_TEXTURE_ARRAY = (1 << 0), } GstD3D11AllocationFlags; +GST_D3D11_API +GType gst_d3d11_allocation_flags_get_type (void); +#define GST_TYPE_D3D11_ALLOCATION_FLAGS (gst_d3d11_allocation_flags_get_type()) + /** * GstD3D11MemoryTransfer: * @GST_D3D11_MEMORY_TRANSFER_NEED_DOWNLOAD: the texture needs downloading @@ -106,6 +110,10 @@ typedef enum GST_D3D11_MEMORY_TRANSFER_NEED_UPLOAD = (GST_MEMORY_FLAG_LAST << 1) } GstD3D11MemoryTransfer; +GST_D3D11_API +GType gst_d3d11_memory_transfer_get_type (void); +#define GST_TYPE_D3D11_MEMORY_TRANSFER (gst_d3d11_memory_transfer_get_type()) + /** * GstD3D11MemoryNativeType: * @GST_D3D11_MEMORY_NATIVE_TYPE_INVALID: not a valid object type @@ -121,6 +129,10 @@ typedef enum GST_D3D11_MEMORY_NATIVE_TYPE_TEXTURE_2D, } GstD3D11MemoryNativeType; +GST_D3D11_API +GType gst_d3d11_memory_native_type_get_type (void); +#define GST_TYPE_D3D11_MEMORY_NATIVE_TYPE (gst_d3d11_memory_native_type_get_type()) + struct _GstD3D11AllocationParams { /* Texture description per plane */ diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build index 97abce2194..abb3c833ad 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build +++ b/subprojects/gst-plugins-bad/gst-libs/gst/d3d11/meson.build @@ -180,24 +180,9 @@ configure_file( configuration: d3d11_conf, ) -d3d11_enums = gnome.mkenums_simple('gstd3d11-enumtypes', - sources : d3d11_enum_types_headers, - body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif', - header_prefix : '#include ', - decorator: 'GST_D3D11_API', - identifier_prefix: 'GstD3D11', - symbol_prefix: 'gst_d3d11', - install_header: true, - install_dir : join_paths(get_option('includedir'), 'gstreamer-1.0/gst/d3d11')) - -gstd3d11_c = d3d11_enums[0] -gstd3d11_h = d3d11_enums[1] - -gen_sources = [gstd3d11_h] - pkg_name = 'gstreamer-d3d11-' + api_version gstd3d11 = library('gstd3d11-' + api_version, - d3d11_sources + d3d11_enums, + d3d11_sources, c_args : gst_plugins_bad_args + extra_c_args + extra_comm_args, cpp_args : gst_plugins_bad_args + extra_comm_args, include_directories : [configinc, libsinc],