about summary refs log tree commit diff stats
path: root/src/tools
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-08-07 15:11:31 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-08-07 15:11:31 +0200
commited7ee12e7ec6d965ceef6a47dca7b92e726218d5 (patch)
treeec83724ec1c758d9a841e4f5077e7d3c955326cf /src/tools
parent42d99d2b2a5579a64582b419e1f4080bdc7338b2 (diff)
downloadbox64-ed7ee12e7ec6d965ceef6a47dca7b92e726218d5.tar.gz
box64-ed7ee12e7ec6d965ceef6a47dca7b92e726218d5.zip
[GTK] Added wrapped GstVideoBufferPool
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/gtkclass.c102
1 files changed, 102 insertions, 0 deletions
diff --git a/src/tools/gtkclass.c b/src/tools/gtkclass.c
index 34d1803f..63e0cd56 100644
--- a/src/tools/gtkclass.c
+++ b/src/tools/gtkclass.c
@@ -4460,6 +4460,108 @@ static void bridgeGstAudioFilterInstance(my_GstAudioFilter_t* class)
 {
     bridgeGstBaseTransformInstance(&class->parent);
 }
+// ----- GstBufferPoolClass ------
+// wrapper x86 -> natives of callbacks
+WRAPPER(GstBufferPool, get_options, void*,(void* pool), "p", pool);
+WRAPPER(GstBufferPool, set_config, int ,(void* pool, void* config), "pp", pool, config);
+WRAPPER(GstBufferPool, start, int ,(void* pool), "p", pool);
+WRAPPER(GstBufferPool, stop, int ,(void* pool), "p", pool);
+WRAPPER(GstBufferPool, acquire_buffer, int ,(void* pool, void* buffer, void* params), "ppp", pool, buffer, params);
+WRAPPER(GstBufferPool, alloc_buffer, int ,(void* pool, void* buffer, void* params), "ppp", pool, buffer, params);
+WRAPPER(GstBufferPool, reset_buffer, void ,(void* pool, void* buffer), "pp", pool, buffer);
+WRAPPER(GstBufferPool, release_buffer, void ,(void* pool, void* buffer), "pp", pool, buffer);
+WRAPPER(GstBufferPool, free_buffer, void ,(void* pool, void* buffer), "pp", pool, buffer);
+WRAPPER(GstBufferPool, flush_start, void ,(void* pool), "p", pool);
+WRAPPER(GstBufferPool, flush_stop, void ,(void* pool), "p", pool);
+
+#define SUPERGO()               \
+    GO(get_options, pFp);       \
+    GO(set_config, iFpp);       \
+    GO(start, iFp);             \
+    GO(stop, iFp);              \
+    GO(acquire_buffer, iFppp);  \
+    GO(alloc_buffer, iFppp);    \
+    GO(reset_buffer, vFpp);     \
+    GO(release_buffer, vFpp);   \
+    GO(free_buffer, vFpp);      \
+    GO(flush_start, vFp);       \
+    GO(flush_stop, vFp);        \
+
+// wrap (so bridge all calls, just in case)
+static void wrapGstBufferPoolClass(my_GstBufferPoolClass_t* class)
+{
+    wrapGstObjectClass(&class->object_class);
+    #define GO(A, W) class->A = reverse_##A##_GstBufferPool (W, class->A)
+    SUPERGO()
+    #undef GO
+}
+// unwrap (and use callback if not a native call anymore)
+static void unwrapGstBufferPoolClass(my_GstBufferPoolClass_t* class)
+{
+    unwrapGstObjectClass(&class->object_class);
+    #define GO(A, W)   class->A = find_##A##_GstBufferPool (class->A)
+    SUPERGO()
+    #undef GO
+}
+// autobridge
+static void bridgeGstBufferPoolClass(my_GstBufferPoolClass_t* class)
+{
+    bridgeGstObjectClass(&class->object_class);
+    #define GO(A, W) autobridge_##A##_GstBufferPool (W, class->A)
+    SUPERGO()
+    #undef GO
+}
+#undef SUPERGO
+
+static void unwrapGstBufferPoolInstance(my_GstBufferPool_t* class)
+{
+    unwrapGstObjectInstance(&class->object);
+}
+// autobridge
+static void bridgeGstBufferPoolInstance(my_GstBufferPool_t* class)
+{
+    bridgeGstObjectInstance(&class->object);
+}
+// ----- GstVideoBufferPoolClass ------
+// wrapper x86 -> natives of callbacks
+
+#define SUPERGO()               \
+
+// wrap (so bridge all calls, just in case)
+static void wrapGstVideoBufferPoolClass(my_GstVideoBufferPoolClass_t* class)
+{
+    wrapGstBufferPoolClass(&class->parent);
+    #define GO(A, W) class->A = reverse_##A##_GstVideoBufferPool (W, class->A)
+    SUPERGO()
+    #undef GO
+}
+// unwrap (and use callback if not a native call anymore)
+static void unwrapGstVideoBufferPoolClass(my_GstVideoBufferPoolClass_t* class)
+{
+    unwrapGstBufferPoolClass(&class->parent);
+    #define GO(A, W)   class->A = find_##A##_GstVideoBufferPool (class->A)
+    SUPERGO()
+    #undef GO
+}
+// autobridge
+static void bridgeGstVideoBufferPoolClass(my_GstVideoBufferPoolClass_t* class)
+{
+    bridgeGstBufferPoolClass(&class->parent);
+    #define GO(A, W) autobridge_##A##_GstBufferPool (W, class->A)
+    SUPERGO()
+    #undef GO
+}
+#undef SUPERGO
+
+static void unwrapGstVideoBufferPoolInstance(my_GstVideoBufferPool_t* class)
+{
+    unwrapGstBufferPoolInstance(&class->bufferpool);
+}
+// autobridge
+static void bridgeGstVideoBufferPoolInstance(my_GstVideoBufferPool_t* class)
+{
+    bridgeGstBufferPoolInstance(&class->bufferpool);
+}
 // ----- GDBusProxyClass ------
 // wrapper x86 -> natives of callbacks
 WRAPPER(GDBusProxy, g_properties_changed, void, (void* proxy, void* changed_properties, const char* const* invalidated_properties), "ppp", proxy, changed_properties, invalidated_properties);