Original commit message from CVS:
better error handling, still needs improvement
/* get an instance of the default scheduler */
scheduler = gst_scheduler_factory_make (NULL, GST_ELEMENT (pipeline));
/* FIXME need better error handling */
- g_return_if_fail (scheduler != NULL);
+ if (scheduler == NULL)
+ {
+ g_error ("Critical error: could not get a scheduler - \
+ are you sure you have a registry ?");
+ }
gst_scheduler_setup (scheduler);
}
gst_scheduler_factory_make (const gchar *name, GstElement *parent)
{
GstSchedulerFactory *factory;
+ const gchar *default_name = gst_scheduler_factory_get_default_name ();
if (name)
factory = gst_scheduler_factory_find (name);
else
- factory = gst_scheduler_factory_find (gst_scheduler_factory_get_default_name ());
+ {
+ /* FIXME: do better error handling */
+ if (default_name == NULL)
+ g_error ("No default scheduler name - do you have a registry ?");
+ factory = gst_scheduler_factory_find (default_name);
+ }
if (factory == NULL)
return NULL;