Bug 173306 - [GStreamer] Spreaker live shows won't play
Summary: [GStreamer] Spreaker live shows won't play
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Charlie Turner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-13 01:19 PDT by Andres Gomez Garcia
Modified: 2017-06-22 09:43 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.69 KB, patch)
2017-06-20 12:06 PDT, Charlie Turner
no flags Details | Formatted Diff | Diff
Patch (2.80 KB, patch)
2017-06-22 07:42 PDT, Charlie Turner
no flags Details | Formatted Diff | Diff
Patch (2.67 KB, patch)
2017-06-22 09:00 PDT, Charlie Turner
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andres Gomez Garcia 2017-06-13 01:19:43 PDT
I'm using WebKitGtk+ with my own JHBuild setting:
https://github.com/tanty/jhbuild-epiphany/tree/master

WebKit 2.17.3.

The compilation was done with CMake args:

'-DPORT=GTK -DCMAKE_BUILD_TYPE=Release -DENABLE_MINIBROWSER=ON -DCMAKE_C_FLAGS_RELEASE="-O0 -g -DNDEBUG  -DG_DISABLE_CAST_CHECKS" -DCMAKE_CXX_FLAGS_RELEASE="-O0 -g -DNDEBUG -DG_DISABLE_CAST_CHECKS"'

Open MiniBrowser and go to, for example:
http://www.spreaker.com/user/radiocable

For this show, they are live at 08:30-09:30 C(S)ET. You can choose another show at another time, if preferred.

When clicking on the play button for the live show to play nothing is played and a banner is shown:

"This episode is not available, please try again in a few minutes."

This works well with, at least, Firefox.
Comment 1 Charlie Turner 2017-06-20 12:06:38 PDT
Created attachment 313420 [details]
Patch
Comment 2 Charlie Turner 2017-06-20 12:07:52 PDT
One further problem (or perhaps exposed problem) after this patch is that sometimes you will hear some garbled audio before the stream starts properly. This looks like something to do with a PAUSED->PLAYING transition happening too early, but it's a separate issue.
Comment 3 Xabier Rodríguez Calvar 2017-06-22 07:12:00 PDT
Comment on attachment 313420 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=313420&action=review

The problem of this structure is that there is going to be the case of (parsedIcyMetaInt && metadataInterval > 0) being false and you want to set the caps to nullptr there too. You need to rework this to avoid it.

> Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:956
> +    String icyMetaInt = response.httpHeaderField(HTTPHeaderName::IcyMetaInt);

icyMetaInt -> metadataIntervalAsString

> Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:958
> +        bool parsedIcyMetaInt;

isMetatadaIntervalParsed

> Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:959
> +        gint metadataInterval = icyMetaInt.toInt(&parsedIcyMetaInt);

Please use plain int.

> Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:962
> +            GRefPtr<GstCaps> caps = adoptGRef(
> +                gst_caps_new_simple("application/x-icy", "metadata-interval", G_TYPE_INT, metadataInterval, nullptr));

You can have this in just one line. No problem with long lines in WK.
Comment 4 Charlie Turner 2017-06-22 07:42:19 PDT
Created attachment 313619 [details]
Patch
Comment 5 Xabier Rodríguez Calvar 2017-06-22 08:12:15 PDT
Comment on attachment 313619 [details]
Patch

I can give you the r+ now but I am not totally convince of the structure. I would either:

bool areCapsSet = false;
...
if (!areCapsSet)
   gst_app_src_set_caps(priv->appsrc, nullptr);

or even

GRefPtr<GstCaps> caps;
...
gst_app_src_set_caps(priv->appsrc, caps.get());
Comment 6 Charlie Turner 2017-06-22 09:00:16 PDT
Created attachment 313633 [details]
Patch
Comment 7 WebKit Commit Bot 2017-06-22 09:43:55 PDT
Comment on attachment 313633 [details]
Patch

Clearing flags on attachment: 313633

Committed r218703: <http://trac.webkit.org/changeset/218703>
Comment 8 WebKit Commit Bot 2017-06-22 09:43:57 PDT
All reviewed patches have been landed.  Closing bug.