[gst-devel] gst_pipeline_new and GObject-y bits
Thomas Vander Stichele
thomas at apestaart.org
Tue Apr 6 02:14:02 CEST 2004
On Sat, 2004-04-03 at 02:57, David Schleef wrote:
> 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
> > README.
> > 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.
ok - so I move the scheduler check to NULL->READY ?
> 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.
which level is that ? :)
> > 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.
Arguably. But I'd like some sort of solution that works somewhat ok so
that the user doesn't have nautilus crash.
Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
Even bums don't not got a car
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/
More information about the gstreamer-devel