[gst-devel] gst_pipeline_new and GObject-y bits

Colin Walters walters at verbum.org
Tue Apr 6 16:21:05 CEST 2004


On Tue, 2004-04-06 at 11:11, Thomas Vander Stichele wrote:

> Right.  So all this just means that _init is not the place to check,
> right ?

FWIW, I added this code to Rhythmbox at one point:

	RBPlayer *mp;
	GstElement *dummy;

	dummy = gst_element_factory_make ("fakesink", "fakesink");
	if (!dummy
	    || !gst_scheduler_factory_make (NULL, GST_ELEMENT (dummy))) {
		g_set_error (error, RB_PLAYER_ERROR,
			     RB_PLAYER_ERROR_GENERAL,
			     "%s",
			     _("Couldn't initialize scheduler.  Did you run gst-register?"));
		return NULL;
	}

It worked when I tested it a while ago, although I'm not sure about now
because I still occasionally see bug reports from people failing to run
gst-register.

gst_init is probably not the place to check because it might be run
before gtk_init or whatever - so there's no friendly way to pop up a
dialog for the user.

I'm not sure it's really easily possible to solve this at the GStreamer
level.  Hm, actually maybe you could change gst_init to also take a
GError parameter that the app could do whatever it wanted with...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20040406/ffaedf3a/attachment.pgp>


More information about the gstreamer-devel mailing list