summaryrefslogtreecommitdiff
path: root/gst/gstpluginfeature.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2003-10-28 20:25:30 +0000
committerBenjamin Otte <otte@gnome.org>2003-10-28 20:25:30 +0000
commit3235f1d4c09e9298b843f87dfa2849bd1ea00db8 (patch)
tree4cc6ece1cb3bf0c4956bd595e86afa9f34514d67 /gst/gstpluginfeature.c
parent208c0e30898b429cbe676edca3ad526e1d58c256 (diff)
merge TYPEFIND branch. Major changes:
Original commit message from CVS: merge TYPEFIND branch. Major changes: - totally reworked type(find) system - bytestream is out of the core again - typefind element is now part of gstelements
Diffstat (limited to 'gst/gstpluginfeature.c')
-rw-r--r--gst/gstpluginfeature.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/gst/gstpluginfeature.c b/gst/gstpluginfeature.c
index abc0473020..494075cd26 100644
--- a/gst/gstpluginfeature.c
+++ b/gst/gstpluginfeature.c
@@ -27,6 +27,8 @@
#include "gstregistry.h"
#include "gstinfo.h"
+#include <string.h>
+
static void gst_plugin_feature_class_init (GstPluginFeatureClass *klass);
static void gst_plugin_feature_init (GstPluginFeature *feature);
@@ -136,7 +138,6 @@ gst_plugin_feature_type_name_filter (GstPluginFeature *feature,
return ((data->type == 0 || data->type == G_OBJECT_TYPE (feature)) &&
(data->name == NULL || !strcmp (data->name, GST_PLUGIN_FEATURE_NAME (feature))));
}
-
/**
* gst_plugin_feature_set_rank:
* @feature: feature to rank
@@ -153,4 +154,25 @@ gst_plugin_feature_set_rank (GstPluginFeature *feature, guint16 rank)
feature->rank = rank;
}
+/**
+ * gst_plugin_feature_set_rank:
+ * @feature: a feature
+ * @name: the name to set
+ *
+ * Sets the name of a plugin feature. The name uniquely identifies a feature
+ * within all features of the same type. Renaming a plugin feature is not
+ * allowed.
+ */
+void
+gst_plugin_feature_set_name (GstPluginFeature *feature, const gchar *name)
+{
+ g_return_if_fail (GST_IS_PLUGIN_FEATURE (feature));
+ g_return_if_fail (name != NULL);
+
+ if (feature->name) {
+ g_return_if_fail (strcmp (feature->name, name) == 0);
+ } else {
+ feature->name = g_strdup (name);
+ }
+}