[gst-devel] gst xml restoring

Andy Wingo wingo at pobox.com
Thu Jan 10 21:36:02 CET 2002

it seems i'm confused wrt gst's implementation of xml restoring. at some
point in time, the object needs to be created - say, an element. then
you need to parse any other namespace data, connect the pads, set the
properties, etc.

these are *two* tasks - for the first set of actions, you need an xml
document and a parent object. for the second you need the xml document
and the current object. the current api does not make a clear
distinction between these two. in fact, it confuses them completely: 

void (*restore_thyself) (GstObject *object, xmlNodePtr self);

in gstobject.h, and in gstelement.c,

GstElement* gst_element_restore_thyself (xmlNodePtr self, GstObject *parent)


void gst_object_restore_thyself (GstObject *object, xmlNodePtr parent);

this is a mess. i think these are two completely different apis - the
first one isn't so much a 'restore_thyself' as a 'make' operation. but
we all know gst's issues with create-verbs, 'create', 'make', 'new',

so i propose that the element creation operation be moved to another
function, maybe called gst_xml_make_element, and a new function be
created for gstelement.c that conforms to the prototype that was set out
in gstobject.h. i'll be working on this, but i wanted to post to catch
your comments, etc.



More information about the gstreamer-devel mailing list