2000-12-28 22:12:02 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
|
|
* 2000 Wim Taymans <wtay@chello.be>
|
|
|
|
*
|
|
|
|
* gstelementfactory.c: GstElementFactory object, support routines
|
2000-01-30 09:03:00 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2000-09-27 19:33:10 +00:00
|
|
|
//#define DEBUG_ENABLED
|
2000-12-28 22:12:02 +00:00
|
|
|
#include "gst_private.h"
|
2000-09-27 19:33:10 +00:00
|
|
|
|
2000-12-15 01:57:34 +00:00
|
|
|
#include "gstelement.h"
|
|
|
|
#include "gstplugin.h"
|
2000-01-30 09:03:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* global list of registered elementfactories */
|
|
|
|
GList* _gst_elementfactories;
|
|
|
|
|
2001-04-16 21:43:28 +00:00
|
|
|
void
|
|
|
|
_gst_elementfactory_initialize (void)
|
2000-12-12 19:29:43 +00:00
|
|
|
{
|
2000-01-30 09:03:00 +00:00
|
|
|
_gst_elementfactories = NULL;
|
|
|
|
}
|
|
|
|
|
2000-12-11 00:04:25 +00:00
|
|
|
/**
|
2000-12-28 21:42:23 +00:00
|
|
|
* gst_elementfactory_destroy:
|
|
|
|
* @elementfactory: factory to destroy
|
2000-12-11 00:04:25 +00:00
|
|
|
*
|
|
|
|
* Removes the elementfactory from the global list.
|
|
|
|
*/
|
2001-04-16 21:43:28 +00:00
|
|
|
void
|
|
|
|
gst_elementfactory_destroy (GstElementFactory *elementfactory)
|
2000-12-11 00:04:25 +00:00
|
|
|
{
|
2000-12-28 21:42:23 +00:00
|
|
|
g_return_if_fail (elementfactory != NULL);
|
2000-12-11 00:04:25 +00:00
|
|
|
|
2000-12-28 21:42:23 +00:00
|
|
|
_gst_elementfactories = g_list_remove (_gst_elementfactories, elementfactory);
|
2000-12-11 00:04:25 +00:00
|
|
|
|
2000-12-28 00:18:26 +00:00
|
|
|
// we don't free the struct bacause someone might have a handle to it..
|
2000-12-11 00:04:25 +00:00
|
|
|
}
|
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
/**
|
|
|
|
* gst_elementfactory_find:
|
|
|
|
* @name: name of factory to find
|
|
|
|
*
|
|
|
|
* Search for an elementfactory of the given name.
|
|
|
|
*
|
|
|
|
* Returns: #GstElementFactory if found, NULL otherwise
|
|
|
|
*/
|
2000-12-12 19:29:43 +00:00
|
|
|
GstElementFactory*
|
2001-04-16 21:43:28 +00:00
|
|
|
gst_elementfactory_find (const gchar *name)
|
2000-12-12 19:29:43 +00:00
|
|
|
{
|
2000-09-14 22:18:43 +00:00
|
|
|
GList *walk;
|
2000-01-30 09:03:00 +00:00
|
|
|
GstElementFactory *factory;
|
|
|
|
|
2000-12-23 03:17:52 +00:00
|
|
|
g_return_val_if_fail(name != NULL, NULL);
|
|
|
|
|
2000-09-14 22:18:43 +00:00
|
|
|
walk = _gst_elementfactories;
|
2000-01-30 09:03:00 +00:00
|
|
|
while (walk) {
|
|
|
|
factory = (GstElementFactory *)(walk->data);
|
|
|
|
if (!strcmp(name,factory->name))
|
|
|
|
return factory;
|
|
|
|
walk = g_list_next(walk);
|
|
|
|
}
|
|
|
|
|
2001-05-02 19:20:24 +00:00
|
|
|
// this should be an ERROR
|
|
|
|
GST_DEBUG (GST_CAT_ELEMENTFACTORY,"no such elementfactoryfactory \"%s\"\n", name);
|
2000-01-30 09:03:00 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gst_elementfactory_get_list:
|
|
|
|
*
|
|
|
|
* Get the global list of elementfactories.
|
|
|
|
*
|
2000-10-25 19:09:53 +00:00
|
|
|
* Returns: GList of type #GstElementFactory
|
2000-01-30 09:03:00 +00:00
|
|
|
*/
|
2000-12-12 19:29:43 +00:00
|
|
|
GList*
|
2001-04-16 21:43:28 +00:00
|
|
|
gst_elementfactory_get_list (void)
|
2000-12-12 19:29:43 +00:00
|
|
|
{
|
2000-01-30 09:03:00 +00:00
|
|
|
return _gst_elementfactories;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gst_elementfactory_new:
|
|
|
|
* @name: name of new elementfactory
|
|
|
|
* @type: GtkType of new element
|
|
|
|
* @details: #GstElementDetails structure with element details
|
|
|
|
*
|
|
|
|
* Create a new elementfactory capable of insantiating objects of the
|
|
|
|
* given type.
|
|
|
|
*
|
|
|
|
* Returns: new elementfactory
|
|
|
|
*/
|
2000-12-12 19:29:43 +00:00
|
|
|
GstElementFactory*
|
2001-01-06 02:35:17 +00:00
|
|
|
gst_elementfactory_new (const gchar *name, GtkType type,
|
2001-04-16 21:43:28 +00:00
|
|
|
GstElementDetails *details)
|
2000-12-12 19:29:43 +00:00
|
|
|
{
|
2001-04-16 21:43:28 +00:00
|
|
|
GstElementFactory *factory;
|
2000-12-19 13:41:55 +00:00
|
|
|
|
2000-12-23 03:17:52 +00:00
|
|
|
g_return_val_if_fail(name != NULL, NULL);
|
|
|
|
|
2001-04-16 21:43:28 +00:00
|
|
|
factory = g_new0(GstElementFactory, 1);
|
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
factory->name = g_strdup(name);
|
|
|
|
factory->type = type;
|
|
|
|
factory->details = details;
|
2000-12-13 19:29:35 +00:00
|
|
|
factory->padtemplates = NULL;
|
2001-01-03 20:44:28 +00:00
|
|
|
factory->numpadtemplates = 0;
|
2000-12-12 19:29:43 +00:00
|
|
|
|
2000-12-19 13:41:55 +00:00
|
|
|
_gst_elementfactories = g_list_prepend (_gst_elementfactories, factory);
|
|
|
|
|
2000-01-30 09:03:00 +00:00
|
|
|
return factory;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* gst_elementfactory_create:
|
|
|
|
* @factory: factory to instantiate
|
|
|
|
* @name: name of new element
|
|
|
|
*
|
|
|
|
* Create a new element of the type defined by the given elementfactory.
|
|
|
|
* It wll be given the name supplied, since all elements require a name as
|
|
|
|
* their first argument.
|
|
|
|
*
|
|
|
|
* Returns: new #GstElement
|
|
|
|
*/
|
2000-12-12 19:29:43 +00:00
|
|
|
GstElement *
|
|
|
|
gst_elementfactory_create (GstElementFactory *factory,
|
2001-04-16 21:43:28 +00:00
|
|
|
const gchar *name)
|
2000-12-12 19:29:43 +00:00
|
|
|
{
|
2000-01-30 09:03:00 +00:00
|
|
|
GstElement *element;
|
|
|
|
GstElementClass *oclass;
|
|
|
|
|
2000-03-13 22:13:11 +00:00
|
|
|
g_return_val_if_fail(factory != NULL, NULL);
|
2000-12-23 03:17:52 +00:00
|
|
|
g_return_val_if_fail(name != NULL, NULL);
|
2000-08-28 20:20:55 +00:00
|
|
|
|
2001-05-02 19:20:24 +00:00
|
|
|
GST_DEBUG (GST_CAT_ELEMENTFACTORY,"creating element from factory \"%s\" with name \"%s\"\n",
|
|
|
|
factory->name, name);
|
2000-08-28 20:20:55 +00:00
|
|
|
|
2000-12-11 00:04:25 +00:00
|
|
|
// it's not loaded, try to load the plugin
|
2000-09-24 22:45:48 +00:00
|
|
|
if (factory->type == 0) {
|
2000-09-27 19:33:10 +00:00
|
|
|
factory = gst_plugin_load_elementfactory(factory->name);
|
2000-09-24 22:45:48 +00:00
|
|
|
}
|
2000-09-27 19:33:10 +00:00
|
|
|
g_return_val_if_fail(factory != NULL, NULL);
|
2000-03-13 22:13:11 +00:00
|
|
|
g_return_val_if_fail(factory->type != 0, NULL);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
|
|
|
// create an instance of the element
|
|
|
|
element = GST_ELEMENT(gtk_type_new(factory->type));
|
|
|
|
g_assert(element != NULL);
|
|
|
|
|
|
|
|
// attempt to set the elemenfactory class pointer if necessary
|
|
|
|
oclass = GST_ELEMENT_CLASS(GTK_OBJECT(element)->klass);
|
2000-12-22 23:23:10 +00:00
|
|
|
if (oclass->elementfactory == NULL) {
|
2001-05-02 19:20:24 +00:00
|
|
|
GST_DEBUG (GST_CAT_ELEMENTFACTORY,"class %s\n", factory->name);
|
2000-01-30 09:03:00 +00:00
|
|
|
oclass->elementfactory = factory;
|
2000-12-22 23:23:10 +00:00
|
|
|
}
|
2000-01-30 09:03:00 +00:00
|
|
|
|
2001-01-29 00:06:02 +00:00
|
|
|
gst_object_set_name (GST_OBJECT (element),name);
|
2000-01-30 09:03:00 +00:00
|
|
|
|
|
|
|
return element;
|
|
|
|
}
|
|
|
|
|
2000-09-14 20:31:03 +00:00
|
|
|
/**
|
|
|
|
* gst_elementfactory_make:
|
|
|
|
* @factoryname: a named factory to instantiate
|
|
|
|
* @name: name of new element
|
|
|
|
*
|
|
|
|
* Create a new element of the type defined by the given elementfactory.
|
|
|
|
* It wll be given the name supplied, since all elements require a name as
|
|
|
|
* their first argument.
|
|
|
|
*
|
|
|
|
* Returns: new #GstElement
|
|
|
|
*/
|
2000-12-12 19:29:43 +00:00
|
|
|
GstElement*
|
2001-04-16 21:43:28 +00:00
|
|
|
gst_elementfactory_make (const gchar *factoryname, const gchar *name)
|
2000-12-12 19:29:43 +00:00
|
|
|
{
|
2000-01-30 09:03:00 +00:00
|
|
|
GstElementFactory *factory;
|
|
|
|
GstElement *element;
|
|
|
|
|
2000-12-23 03:17:52 +00:00
|
|
|
g_return_val_if_fail(factoryname != NULL, NULL);
|
|
|
|
g_return_val_if_fail(name != NULL, NULL);
|
|
|
|
|
2001-05-02 19:20:24 +00:00
|
|
|
// GST_DEBUG (GST_CAT_ELEMENTFACTORY,"gstelementfactory: make \"%s\" \"%s\"\n", factoryname, name);
|
2000-09-27 19:33:10 +00:00
|
|
|
|
2000-09-14 22:18:43 +00:00
|
|
|
//gst_plugin_load_elementfactory(factoryname);
|
2000-01-30 09:03:00 +00:00
|
|
|
factory = gst_elementfactory_find(factoryname);
|
|
|
|
if (factory == NULL) return NULL;
|
|
|
|
element = gst_elementfactory_create(factory,name);
|
|
|
|
return element;
|
|
|
|
}
|
2000-08-21 21:20:38 +00:00
|
|
|
|
2000-09-14 20:31:03 +00:00
|
|
|
/**
|
2000-12-13 19:29:35 +00:00
|
|
|
* gst_elementfactory_add_padtemplate :
|
2000-09-14 20:31:03 +00:00
|
|
|
* @elementfactory: factory to add the src id to
|
2001-01-19 22:15:21 +00:00
|
|
|
* @templ: the padtemplate to add
|
2000-09-14 20:31:03 +00:00
|
|
|
*
|
2001-01-19 22:15:21 +00:00
|
|
|
* Add the given padtemplate to this elementfactory.
|
2000-09-14 20:31:03 +00:00
|
|
|
*/
|
2001-01-19 22:15:21 +00:00
|
|
|
void
|
|
|
|
gst_elementfactory_add_padtemplate (GstElementFactory *factory,
|
|
|
|
GstPadTemplate *templ)
|
2000-12-11 00:04:25 +00:00
|
|
|
{
|
|
|
|
g_return_if_fail(factory != NULL);
|
2001-01-19 22:15:21 +00:00
|
|
|
g_return_if_fail(templ != NULL);
|
2000-12-11 00:04:25 +00:00
|
|
|
|
2001-01-19 22:15:21 +00:00
|
|
|
factory->padtemplates = g_list_append (factory->padtemplates, templ);
|
2001-01-03 20:44:28 +00:00
|
|
|
factory->numpadtemplates++;
|
2000-12-19 13:41:55 +00:00
|
|
|
}
|
2000-08-21 21:20:38 +00:00
|
|
|
|
2000-12-28 21:42:23 +00:00
|
|
|
/**
|
2001-04-16 21:43:28 +00:00
|
|
|
* gst_elementfactory_can_src_caps :
|
2000-12-28 21:42:23 +00:00
|
|
|
* @factory: factory to query
|
2001-04-16 21:43:28 +00:00
|
|
|
* @caps: the caps to check
|
2000-12-28 21:42:23 +00:00
|
|
|
*
|
2001-04-16 21:43:28 +00:00
|
|
|
* Checks if the factory can source the given capability.
|
2000-12-28 21:42:23 +00:00
|
|
|
*
|
2000-12-31 16:12:48 +00:00
|
|
|
* Returns: true if it can src the capabilities
|
2000-12-28 21:42:23 +00:00
|
|
|
*/
|
2000-12-19 13:41:55 +00:00
|
|
|
gboolean
|
2001-04-16 21:43:28 +00:00
|
|
|
gst_elementfactory_can_src_caps (GstElementFactory *factory,
|
|
|
|
GstCaps *caps)
|
2000-12-19 13:41:55 +00:00
|
|
|
{
|
|
|
|
GList *templates;
|
|
|
|
|
|
|
|
g_return_val_if_fail(factory != NULL, FALSE);
|
|
|
|
g_return_val_if_fail(caps != NULL, FALSE);
|
|
|
|
|
|
|
|
templates = factory->padtemplates;
|
|
|
|
|
|
|
|
while (templates) {
|
|
|
|
GstPadTemplate *template = (GstPadTemplate *)templates->data;
|
|
|
|
|
|
|
|
if (template->direction == GST_PAD_SRC) {
|
2001-04-16 21:43:28 +00:00
|
|
|
if (gst_caps_check_compatibility (GST_PADTEMPLATE_CAPS (template), caps))
|
2000-12-19 13:41:55 +00:00
|
|
|
return TRUE;
|
2000-12-12 19:29:43 +00:00
|
|
|
}
|
2000-12-19 13:41:55 +00:00
|
|
|
templates = g_list_next (templates);
|
2000-12-11 00:04:25 +00:00
|
|
|
}
|
2000-12-19 13:41:55 +00:00
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2000-12-28 21:42:23 +00:00
|
|
|
/**
|
2001-04-16 21:43:28 +00:00
|
|
|
* gst_elementfactory_can_sink_caps :
|
2000-12-28 21:42:23 +00:00
|
|
|
* @factory: factory to query
|
2001-04-16 21:43:28 +00:00
|
|
|
* @caps: the caps to check
|
2000-12-28 21:42:23 +00:00
|
|
|
*
|
2001-04-16 21:43:28 +00:00
|
|
|
* Checks if the factory can sink the given capability.
|
2000-12-28 21:42:23 +00:00
|
|
|
*
|
2000-12-31 16:12:48 +00:00
|
|
|
* Returns: true if it can sink the capabilities
|
2000-12-28 21:42:23 +00:00
|
|
|
*/
|
2000-12-19 13:41:55 +00:00
|
|
|
gboolean
|
2001-04-16 21:43:28 +00:00
|
|
|
gst_elementfactory_can_sink_caps (GstElementFactory *factory,
|
|
|
|
GstCaps *caps)
|
2000-12-19 13:41:55 +00:00
|
|
|
{
|
|
|
|
GList *templates;
|
|
|
|
|
|
|
|
g_return_val_if_fail(factory != NULL, FALSE);
|
|
|
|
g_return_val_if_fail(caps != NULL, FALSE);
|
|
|
|
|
|
|
|
templates = factory->padtemplates;
|
|
|
|
|
|
|
|
while (templates) {
|
|
|
|
GstPadTemplate *template = (GstPadTemplate *)templates->data;
|
|
|
|
|
|
|
|
if (template->direction == GST_PAD_SINK) {
|
2001-04-16 21:43:28 +00:00
|
|
|
if (gst_caps_check_compatibility (caps, GST_PADTEMPLATE_CAPS (template)))
|
2000-12-19 13:41:55 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
templates = g_list_next (templates);
|
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
2000-08-21 21:20:38 +00:00
|
|
|
}
|
|
|
|
|
2000-09-14 20:31:03 +00:00
|
|
|
/**
|
|
|
|
* gst_elementfactory_save_thyself:
|
|
|
|
* @factory: factory to save
|
2001-04-16 21:43:28 +00:00
|
|
|
* @parent: the parent xmlNodePtr
|
2000-09-14 20:31:03 +00:00
|
|
|
*
|
2001-01-06 22:05:15 +00:00
|
|
|
* Saves the factory into an XML tree.
|
2001-04-16 21:43:28 +00:00
|
|
|
*
|
2000-09-14 20:31:03 +00:00
|
|
|
* Returns: the new xmlNodePtr
|
|
|
|
*/
|
2001-04-16 21:43:28 +00:00
|
|
|
xmlNodePtr
|
|
|
|
gst_elementfactory_save_thyself (GstElementFactory *factory,
|
|
|
|
xmlNodePtr parent)
|
2000-12-12 19:29:43 +00:00
|
|
|
{
|
|
|
|
GList *pads;
|
2000-08-28 20:20:55 +00:00
|
|
|
|
2000-12-23 03:17:52 +00:00
|
|
|
g_return_val_if_fail(factory != NULL, NULL);
|
|
|
|
|
2000-08-28 20:20:55 +00:00
|
|
|
xmlNewChild(parent,NULL,"name",factory->name);
|
|
|
|
xmlNewChild(parent,NULL,"longname", factory->details->longname);
|
2000-12-11 00:04:25 +00:00
|
|
|
xmlNewChild(parent,NULL,"class", factory->details->klass);
|
2000-08-28 20:20:55 +00:00
|
|
|
xmlNewChild(parent,NULL,"description", factory->details->description);
|
|
|
|
xmlNewChild(parent,NULL,"version", factory->details->version);
|
|
|
|
xmlNewChild(parent,NULL,"author", factory->details->author);
|
|
|
|
xmlNewChild(parent,NULL,"copyright", factory->details->copyright);
|
|
|
|
|
2000-12-13 19:29:35 +00:00
|
|
|
pads = factory->padtemplates;
|
2000-12-12 19:29:43 +00:00
|
|
|
if (pads) {
|
|
|
|
while (pads) {
|
|
|
|
xmlNodePtr subtree;
|
2000-12-13 19:29:35 +00:00
|
|
|
GstPadTemplate *padtemplate = (GstPadTemplate *)pads->data;
|
2000-08-28 20:20:55 +00:00
|
|
|
|
2000-12-13 19:29:35 +00:00
|
|
|
subtree = xmlNewChild(parent, NULL, "padtemplate", NULL);
|
|
|
|
gst_padtemplate_save_thyself(padtemplate, subtree);
|
2000-08-28 20:20:55 +00:00
|
|
|
|
2000-12-12 19:29:43 +00:00
|
|
|
pads = g_list_next (pads);
|
2000-08-28 20:20:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return parent;
|
|
|
|
}
|
|
|
|
|
2000-09-14 20:31:03 +00:00
|
|
|
/**
|
|
|
|
* gst_elementfactory_load_thyself:
|
2001-04-16 21:43:28 +00:00
|
|
|
* @parent: the parent xmlNodePtr
|
2000-09-14 20:31:03 +00:00
|
|
|
*
|
2001-01-06 22:05:15 +00:00
|
|
|
* Creates a new factory from an xmlNodePtr.
|
2001-04-16 21:43:28 +00:00
|
|
|
*
|
2000-09-14 20:31:03 +00:00
|
|
|
* Returns: the new factory
|
|
|
|
*/
|
2000-12-11 00:04:25 +00:00
|
|
|
GstElementFactory *
|
2001-04-16 21:43:28 +00:00
|
|
|
gst_elementfactory_load_thyself (xmlNodePtr parent)
|
2000-12-11 00:04:25 +00:00
|
|
|
{
|
2000-08-28 20:20:55 +00:00
|
|
|
GstElementFactory *factory = g_new0(GstElementFactory, 1);
|
2001-01-18 11:16:53 +00:00
|
|
|
xmlNodePtr children = parent->xmlChildrenNode;
|
2000-08-28 20:20:55 +00:00
|
|
|
factory->details = g_new0(GstElementDetails, 1);
|
2000-12-13 19:29:35 +00:00
|
|
|
factory->padtemplates = NULL;
|
2000-08-28 20:20:55 +00:00
|
|
|
|
|
|
|
while (children) {
|
|
|
|
if (!strcmp(children->name, "name")) {
|
2001-01-07 07:45:54 +00:00
|
|
|
factory->name = xmlNodeGetContent(children);
|
2000-08-28 20:20:55 +00:00
|
|
|
}
|
|
|
|
if (!strcmp(children->name, "longname")) {
|
2001-01-07 07:45:54 +00:00
|
|
|
factory->details->longname = xmlNodeGetContent(children);
|
2000-08-28 20:20:55 +00:00
|
|
|
}
|
|
|
|
if (!strcmp(children->name, "class")) {
|
2001-01-07 07:45:54 +00:00
|
|
|
factory->details->klass = xmlNodeGetContent(children);
|
2000-08-28 20:20:55 +00:00
|
|
|
}
|
|
|
|
if (!strcmp(children->name, "description")) {
|
2001-01-07 07:45:54 +00:00
|
|
|
factory->details->description = xmlNodeGetContent(children);
|
2000-08-28 20:20:55 +00:00
|
|
|
}
|
|
|
|
if (!strcmp(children->name, "version")) {
|
2001-01-07 07:45:54 +00:00
|
|
|
factory->details->version = xmlNodeGetContent(children);
|
2000-08-28 20:20:55 +00:00
|
|
|
}
|
|
|
|
if (!strcmp(children->name, "author")) {
|
2001-01-07 07:45:54 +00:00
|
|
|
factory->details->author = xmlNodeGetContent(children);
|
2000-08-28 20:20:55 +00:00
|
|
|
}
|
|
|
|
if (!strcmp(children->name, "copyright")) {
|
2001-01-07 07:45:54 +00:00
|
|
|
factory->details->copyright = xmlNodeGetContent(children);
|
2000-08-28 20:20:55 +00:00
|
|
|
}
|
2000-12-13 19:29:35 +00:00
|
|
|
if (!strcmp(children->name, "padtemplate")) {
|
|
|
|
GstPadTemplate *template;
|
2001-04-16 21:43:28 +00:00
|
|
|
|
2000-12-13 19:29:35 +00:00
|
|
|
template = gst_padtemplate_load_thyself (children);
|
2000-12-12 19:29:43 +00:00
|
|
|
|
2000-12-13 19:29:35 +00:00
|
|
|
gst_elementfactory_add_padtemplate (factory, template);
|
2000-08-28 20:20:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
children = children->next;
|
|
|
|
}
|
|
|
|
|
2000-12-19 13:41:55 +00:00
|
|
|
_gst_elementfactories = g_list_prepend (_gst_elementfactories, factory);
|
|
|
|
|
2000-08-28 20:20:55 +00:00
|
|
|
return factory;
|
|
|
|
}
|
|
|
|
|