Hello everyone, I am trying to solve the gapless issue programming the event triggered for that signal. I am handling video files (.avi)<br>The code is very straightforward andn simple, nonetheless it doesn't work.<br>
It plays the first and for the second one it throws the following message:<br><br>(playbin:4324): GLib-GObject-CRITICAL **: g_object_set: assertion `G_IS_OBJECT (object)' failed<br><br>Any suggestion? thansks<br><br>Rossana<br>
<br>Here is the code:<br><br><br>void about_to_finish_cb (GstElement * element, gpointer * uri)<br>{<br> // uri has the name of the next avi file<br><br> gchar* uri2 = (gchar*)uri;<br> g_object_set (G_OBJECT (element), "uri",uri2, NULL);<br>
g_object_set (G_OBJECT (element), "suburi","file:///home/rossana/video3.srt", NULL);<br> <br>}<br><br>gint main (gint argc, gchar *argv[])<br>{<br> GMainLoop *loop = 0;<br> GstElement *play = 0;<br>
GstBus *bus = 0; <br> <br><br> /* set up */<br> gst_init (&argc, &argv);<br><br> loop = g_main_loop_new (NULL, FALSE);<br> play = gst_element_factory_make ("playbin2", "play");<br>
<br> g_object_set (G_OBJECT (play), "uri","file:///home/rossana/video1.avi", NULL);<br><br> bus = gst_pipeline_get_bus (GST_PIPELINE (play));<br> gst_bus_add_watch (bus, bus_call, loop);<br> gst_object_unref (bus);<br>
<br> char uri_next[] = "file:///home/rossana/video3.avi";<br> g_signal_connect (play, "about-to-finish", G_CALLBACK (about_to_finish_cb),uri_next);<br> gst_element_set_state (play, GST_STATE_PLAYING);<br>
<br> /* now run */<br> g_main_loop_run (loop);<br><br> /* also clean up */<br> gst_element_set_state (play, GST_STATE_NULL);<br> gst_object_unref (GST_OBJECT (play));<br><br> return 0;<br>}<br><br><br>