[farsight2/master] Add variable args version of fs_plugin_create
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:19:40 PST 2008
---
docs/libs/farsight-libs-sections.txt | 1 +
gst-libs/gst/farsight/fs-plugin.c | 31 +++++++++++++++++++++++++++++++
gst-libs/gst/farsight/fs-plugin.h | 4 ++++
3 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/docs/libs/farsight-libs-sections.txt b/docs/libs/farsight-libs-sections.txt
index c9dd980..50f1b52 100644
--- a/docs/libs/farsight-libs-sections.txt
+++ b/docs/libs/farsight-libs-sections.txt
@@ -189,6 +189,7 @@ fs_stream_transmitter_get_type
<FILE>fs-plugin</FILE>
<TITLE>FsPlugin</TITLE>
fs_plugin_create_valist
+fs_plugin_create
FS_INIT_PLUGIN
<SUBSECTION Standard>
FsPlugin
diff --git a/gst-libs/gst/farsight/fs-plugin.c b/gst-libs/gst/farsight/fs-plugin.c
index fd92149..ebe580c 100644
--- a/gst-libs/gst/farsight/fs-plugin.c
+++ b/gst-libs/gst/farsight/fs-plugin.c
@@ -341,3 +341,34 @@ fs_plugin_create_valist (const gchar *name, const gchar *type_suffix,
return object;
}
+
+
+/**
+ * fs_plugin_create:
+ * @name: The name of the plugin to load
+ * @type_suffix: The type of plugin to load (normally "transmitter")
+ * @error: location of a #GError, or NULL if no error occured
+ * @first_property_name: The name of the first property to be set on the
+ * object
+ * @...: The NULL-terminated list of properties to set on the transmitter
+ *
+ * Loads the appropriate plugin if necessary and creates a GObject of
+ * the requested type
+ *
+ * Returns: The object created (or NULL if there is an error)
+ **/
+
+GObject *
+fs_plugin_create (const gchar *name, const gchar *type_suffix,
+ GError **error, const gchar *first_property_name, ...)
+{
+ va_list var_args;
+ GObject *obj;
+
+ va_start (var_args, first_property_name);
+ obj = fs_plugin_create_valist (name, type_suffix, error, first_property_name,
+ var_args);
+ va_end (var_args);
+
+ return obj;
+}
diff --git a/gst-libs/gst/farsight/fs-plugin.h b/gst-libs/gst/farsight/fs-plugin.h
index 73f1b47..6f6e1eb 100644
--- a/gst-libs/gst/farsight/fs-plugin.h
+++ b/gst-libs/gst/farsight/fs-plugin.h
@@ -89,6 +89,10 @@ GObject *fs_plugin_create_valist (const gchar *name,
const gchar *first_property_name,
va_list var_args);
+GObject *fs_plugin_create (const gchar *name,
+ const gchar *type_suffix,
+ GError **error,
+ const gchar *first_property_name, ...);
/**
* FS_INIT_PLUGIN:
--
1.5.6.5
More information about the farsight-commits
mailing list