mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
- Save longdesc
Original commit message from CVS: - Save longdesc - Save caches
This commit is contained in:
parent
bf0c285d5f
commit
9178bdcfd1
1 changed files with 27 additions and 1 deletions
|
@ -743,11 +743,29 @@ static gboolean
|
|||
gst_xml_registry_parse_autoplug_factory (GMarkupParseContext *context, const gchar *tag, const gchar *text,
|
||||
gsize text_len, GstXMLRegistry *registry, GError **error)
|
||||
{
|
||||
//GstAutoplugFactory *factory = GST_AUTOPLUG_FACTORY (registry->current_feature);
|
||||
GstAutoplugFactory *factory = GST_AUTOPLUG_FACTORY (registry->current_feature);
|
||||
|
||||
if (!strcmp (tag, "name")) {
|
||||
registry->current_feature->name = g_strndup (text, text_len);
|
||||
}
|
||||
else if (!strcmp (tag, "longdesc")) {
|
||||
factory->longdesc = g_strndup (text, text_len);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_xml_registry_parse_cache_factory (GMarkupParseContext *context, const gchar *tag, const gchar *text,
|
||||
gsize text_len, GstXMLRegistry *registry, GError **error)
|
||||
{
|
||||
GstCacheFactory *factory = GST_CACHE_FACTORY (registry->current_feature);
|
||||
|
||||
if (!strcmp (tag, "name")) {
|
||||
registry->current_feature->name = g_strndup (text, text_len);
|
||||
}
|
||||
else if (!strcmp (tag, "longdesc")) {
|
||||
factory->longdesc = g_strndup (text, text_len);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -864,6 +882,11 @@ gst_xml_registry_start_element (GMarkupParseContext *context,
|
|||
}
|
||||
else if (GST_IS_AUTOPLUG_FACTORY (feature))
|
||||
xmlregistry->parser = gst_xml_registry_parse_autoplug_factory;
|
||||
else if (GST_IS_CACHE_FACTORY (feature))
|
||||
xmlregistry->parser = gst_xml_registry_parse_cache_factory;
|
||||
else {
|
||||
g_warning ("unkown feature type");
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1385,6 +1408,9 @@ gst_xml_registry_save_feature (GstXMLRegistry *xmlregistry, GstPluginFeature *fe
|
|||
else if (GST_IS_AUTOPLUG_FACTORY (feature)) {
|
||||
PUT_ESCAPED ("longdesc", GST_AUTOPLUG_FACTORY (feature)->longdesc);
|
||||
}
|
||||
else if (GST_IS_CACHE_FACTORY (feature)) {
|
||||
PUT_ESCAPED ("longdesc", GST_CACHE_FACTORY (feature)->longdesc);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue