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 725383 - uridecodebin doesn't need to set the "iradio-mode" property in the source element any more
uridecodebin doesn't need to set the "iradio-mode" property in the source ele...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other All
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-28 09:44 UTC by Andres Gomez
Modified: 2014-10-02 07:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
uridecodebin: "iradio-mode" property is G_TYPE_BOOLEAN (1.20 KB, patch)
2014-02-28 09:50 UTC, Andres Gomez
none Details | Review
uridecodebin: Removed setting "iradio-mode" property in the source element (1.48 KB, patch)
2014-03-04 15:08 UTC, Andres Gomez
committed Details | Review

Description Andres Gomez 2014-02-28 09:44:07 UTC
When selecting a source for a stream uri, decodebin sets an existent
"iradio-mode" property in the source to TRUE. Unfortunately, we were
checking wheter the property was G_TYPE_STRING instead of
G_TYPE_BOOLEAN.
Comment 1 Andres Gomez 2014-02-28 09:50:30 UTC
Created attachment 270544 [details] [review]
uridecodebin: "iradio-mode" property is G_TYPE_BOOLEAN

When selecting a source for a stream uri, decodebin sets an existent
"iradio-mode" property in the source to TRUE. Unfortunately, we were
checking wheter the property was G_TYPE_STRING instead of
G_TYPE_BOOLEAN.
Comment 2 Andres Gomez 2014-02-28 09:52:27 UTC
uridecodebin is supposed to automatically set the "iradio-mode" property
when the uri is a "http://" stream and the source element supports this
property but it is actually not doing it.
Comment 3 Andres Gomez 2014-02-28 09:53:03 UTC
This problem is probably affecting several versions
Comment 4 Tim-Philipp Müller 2014-02-28 09:56:46 UTC
What is the actual problem though?

This could should probably just be removed, since we default to iradio-mode=true these days.
Comment 5 Andres Gomez 2014-02-28 10:03:24 UTC
(In reply to comment #4)
> What is the actual problem though?
> 
> This could should probably just be removed, since we default to
> iradio-mode=true these days.

mmm, this could be true in souphttpsrc (?), but not in a custom source that may be used with playbin/uridecodebin

This problem raised in the source element used in WebKit. Do you think we should default to "true" always there too or do you think we should keep the current behavior and change this in uridecodebin?
Comment 6 Tim-Philipp Müller 2014-02-28 10:22:29 UTC
It's only used in WebKit with GStreamer decodebin/playbin, right? If so, yes, I think it should default to true. In fact, you probably don't even need a property.

It should just send the request headers, and when the server doesn't understand them it will ignore them, otherwise you get back some icy headers in the response.

Originally we didn't have that property in souphttpsrc and just defaulted to true, but that was a problem for people who wanted to do souphttpsrc ! mpegaudioparse ! filesink, because they got glitches in the stream, so we added the property to allow them to switch it off.

In your case that's not a problem, so I'd just always send it and get rid of the property.
Comment 7 Tim-Philipp Müller 2014-03-02 23:48:43 UTC
Do you agree with this approach? Can I just remove this from uridecodebin?
Comment 8 Andres Gomez 2014-03-04 15:06:29 UTC
Yes, I think it is OK.

I've checked other source elements:
 * gst-plugins-bad: neonhttpsrc defaults to TRUE
 * gst-plugins-bad: wininetsrc defaults to FALSE

Hence, I think I will open a bug and upload a patch for wininetsrc.

In the meanwhile, I'm changing the description of this one and updating the patch.
Comment 9 Andres Gomez 2014-03-04 15:08:25 UTC
Created attachment 270908 [details] [review]
uridecodebin: Removed setting "iradio-mode" property in the source element

The "iradio-mode" property used to have a default FALSE value in HTTP
source elements but now it should default to TRUE or just do not exist
as a property so it is not really needed to set it any more in
uridecodebin.

Fixes
Comment 10 Sebastian Dröge (slomo) 2014-03-05 19:23:07 UTC
Review of attachment 270908 [details] [review]:

::: gst/playback/gsturidecodebin.c
@@ -1318,3 @@
-    pspec = g_object_class_find_property (source_class, "iradio-mode");
-
-    if (pspec && G_PARAM_SPEC_VALUE_TYPE (pspec) == G_TYPE_STRING) {

Huh? STRING?

Normally I would say that we can only do this change in 2.0 as it might break existing code... but considering that the code you remove with this patch could've never worked that should be fine.

Any objections?
Comment 11 Andres Gomez 2014-03-07 09:53:16 UTC
OK with us. We have already removed the property in the WebKit source:
http://trac.webkit.org/changeset/165106
Comment 12 Andres Gomez 2014-03-20 12:11:24 UTC
Any update on this? The patch has a negative "accepted" flag.
Comment 13 Sebastian Dröge (slomo) 2014-10-02 06:51:44 UTC
commit 09872442f88286198883fee5e60c377ef0832a46
Author: Andres Gomez <agomez@igalia.com>
Date:   Tue Mar 4 16:51:11 2014 +0200

    uridecodebin: Removed setting "iradio-mode" property in the source element
    
    The "iradio-mode" property used to have a default FALSE value in HTTP
    source elements but now it should default to TRUE or just do not exist
    as a property so it is not really needed to set it any more in
    uridecodebin.
    
    Apart from that this code could've never worked as uridecodebin looks for a
    string-typed iradio-mode property, but it's a boolean in all sources.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=725383
Comment 14 Andres Gomez 2014-10-02 07:59:08 UTC
Thanks for taking care of this!