After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676665 - Cannot do full round-trip with uri property when playbin2 is freshly created
Cannot do full round-trip with uri property when playbin2 is freshly created
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
0.10.x
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-05-23 17:03 UTC by Jens Georg
Modified: 2012-05-25 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jens Georg 2012-05-23 17:03:44 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)
Comment 1 Wim Taymans 2012-05-24 13:11:31 UTC
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.
Comment 2 Olivier Crête 2012-05-24 19:22:22 UTC
Might make sense to add a separate read-only "current-uri" property in 0.11 ?
Comment 3 Wim Taymans 2012-05-25 07:44:29 UTC
(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.
Comment 4 Wim Taymans 2012-05-25 13:22:49 UTC
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