[gst-devel] gst_pipeline_new and GObject-y bits

David Schleef ds at schleef.org
Fri Apr 2 16:59:00 CEST 2004

On Fri, Apr 02, 2004 at 01:04:53PM +0200, Thomas Vander Stichele wrote:
> I got a bug report on nautilus-media where the property view makes
> nautilus segfault when there is no registry.  I checked our code and it
> seems we still do g_error on this.  This is a relic from the days where
> we didn't have error handling mechanisms, didn't worry about it, or
> thought it was ok for a library to segfault if the user didn't read the
> I'd like to fix stuff like this, and I've put some time into looking at
> how it could be done, and I'd like some feedback.
> Basically, the way an app triggers this is by creating a pipeline or a
> thread.  In the instance_init function, a scheduler gets set on the
> pipeline/thread, and if there is no default scheduler or it can't be
> created, we g_error.

Not being able to set a scheduler at this point is not an error, imo.
The error should occur when changing from NULL->READY.

There are good reasons for making sure that element creation does
not depend on the registry existing or being sane.  *Doing* something
with an element when there is no registry is a different story.

Sometime soon, one of us (perhaps myself) will get fed up with the
current state of the registry code, and actually make it work at the
level we expect for all the other gstreamer code.

> a) Should we work towards a situation where g_object_new
> (gst_..._get_type, ...) returns a valid object, or is it just not worth
> it ?
> b) In the gst_pipeline_new case, is it ok if I change it to return NULL
> if it failed somehow for now until we figure this out ?

Ugh, this is gross.


More information about the gstreamer-devel mailing list