GNOME Bugzilla – Bug 676665
Cannot do full round-trip with uri property when playbin2 is freshly created
Last modified: 2012-05-25 13:22:49 UTC
#include <gst/gst.h> int main(int argc, char *argv[]) { GstElement *e; char *u; gst_init (&argc, &argv); e = gst_element_factory_make ("playbin2", NULL); g_object_set (e, "uri", "http://www.google.de", NULL); g_object_get (e, "uri", &u, NULL); g_print ("=> U: %s\n", u); g_free (u); } Output: => U: (null)
The semantics are a bit unfortunate because of gapless playback. Getting the uri gets the currently playing uri. Setting the uri sets the next uri that will be played when the current uri finishes.
Might make sense to add a separate read-only "current-uri" property in 0.11 ?
(In reply to comment #2) > Might make sense to add a separate read-only "current-uri" property in 0.11 ? It could also be done in 0.10. It would make the uri property always return the next uri that would play and current-uri the one currently playing.
In the end I decided to only add this to 1.0: commit 29d24d46583b4e3c8a7c9d88ef5f8bfb4e01db8f Author: Wim Taymans <wim.taymans@collabora.co.uk> Date: Fri May 25 15:12:53 2012 +0200 playbin: add current-*uri properties Make the uri property getter return the next uri, like it was configured in the setter. Make a new current-uri and current-suburi property that reflects the currently playing uri and suburi. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=676665