From 8efa9193a393330b19517ee7ed8272211b30b4e3 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 11 Jan 2008 16:18:10 +0000 Subject: [PATCH] gst-libs/gst/pbutils/install-plugins.*: Add GBoxed GType for GstInstallPluginsContext, this eases the wrapping for bi... Original commit message from CVS: * gst-libs/gst/pbutils/install-plugins.c: (gst_install_plugins_context_copy), (gst_install_plugins_context_get_type): * gst-libs/gst/pbutils/install-plugins.h: Add GBoxed GType for GstInstallPluginsContext, this eases the wrapping for bindings. --- ChangeLog | 9 +++++++++ gst-libs/gst/pbutils/install-plugins.c | 24 ++++++++++++++++++++++++ gst-libs/gst/pbutils/install-plugins.h | 7 ++++++- 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9368c680fb..18d97f433a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-01-11 Edward Hervey + + * gst-libs/gst/pbutils/install-plugins.c: + (gst_install_plugins_context_copy), + (gst_install_plugins_context_get_type): + * gst-libs/gst/pbutils/install-plugins.h: + Add GBoxed GType for GstInstallPluginsContext, this eases the wrapping + for bindings. + 2008-01-11 Michael Smith * ext/theora/theoradec.c: (gst_theora_dec_class_init), diff --git a/gst-libs/gst/pbutils/install-plugins.c b/gst-libs/gst/pbutils/install-plugins.c index a97eed8c17..da731840df 100644 --- a/gst-libs/gst/pbutils/install-plugins.c +++ b/gst-libs/gst/pbutils/install-plugins.c @@ -451,6 +451,30 @@ gst_install_plugins_context_free (GstInstallPluginsContext * ctx) g_free (ctx); } +static GstInstallPluginsContext * +gst_install_plugins_context_copy (GstInstallPluginsContext * ctx) +{ + GstInstallPluginsContext *ret; + + ret = gst_install_plugins_context_new (); + ret->xid = ctx->xid; + + return ret; +} + +GType +gst_install_plugins_context_get_type (void) +{ + static GType gst_ipc_type = 0; + + if (G_UNLIKELY (gst_ipc_type == 0)) { + gst_ipc_type = g_boxed_type_register_static ("GstInstallPluginsContext", + (GBoxedCopyFunc) gst_install_plugins_context_copy, + (GBoxedFreeFunc) gst_install_plugins_context_free); + } + return gst_ipc_type; +} + static const gchar * gst_install_plugins_get_helper (void) { diff --git a/gst-libs/gst/pbutils/install-plugins.h b/gst-libs/gst/pbutils/install-plugins.h index 5a04fdcb19..e57d8ac543 100644 --- a/gst-libs/gst/pbutils/install-plugins.h +++ b/gst-libs/gst/pbutils/install-plugins.h @@ -21,7 +21,7 @@ #ifndef __GST_PB_UTILS_INSTALL_PLUGINS_H__ #define __GST_PB_UTILS_INSTALL_PLUGINS_H__ -#include +#include G_BEGIN_DECLS @@ -96,6 +96,9 @@ typedef enum { * * Since: 0.10.12 */ + +#define GST_TYPE_INSTALL_PLUGINS_CONTEXT (gst_install_plugins_context_get_type()) + typedef struct _GstInstallPluginsContext GstInstallPluginsContext; GstInstallPluginsContext * gst_install_plugins_context_new (void); @@ -105,6 +108,8 @@ void gst_install_plugins_context_free (GstInstallPluginsContext * ctx); void gst_install_plugins_context_set_xid (GstInstallPluginsContext * ctx, guint xid); +GType gst_install_plugins_context_get_type (void); + /** * GstInstallPluginsResultFunc: * @result: whether the installation of the requested plugins succeeded or not