about-to-finish signal, error when setting uri

Rossana Guerra guerra.rossana at gmail.com
Thu Jan 5 14:50:39 PST 2012


The code is very simple, a playbin2, with an uri, and the next uri is set
in the about-to-finish signal.

void about_to_finish_cb (GstElement * element, gpointer * uri)
{
    gchar* uri2 = (gchar*)uri;
    g_object_set (G_OBJECT (element), "uri",uri2, NULL);
}

I tested it by hardcoding also: g_object_set (G_OBJECT (element),
"uri","file:///home/videos/video1.avi", NULL); It didn't work either.

Here is the code where I do the callback in the main, the whole code is
very straight forward, so I think the problem is how I call the
about-to-finish event.

char uri_next[] = "file:///home/videos/video11.avi";
g_signal_connect (play, "about-to-finish", G_CALLBACK
(about_to_finish_cb),uri_next);
gst_element_set_state (play, GST_STATE_PLAYING);

The error appears in the about_to_finish_cb function, when I try to set the
new uri: GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT
(object)' failed

I checked the mailing list but none of the examples suits mine.

Thank you.

Rossana
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20120105/ea88b25f/attachment.htm>


More information about the gstreamer-devel mailing list