Changeset 218703 in webkit


Ignore:
Timestamp:
Jun 22, 2017 9:43:52 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] Spreaker live shows won't play
https://bugs.webkit.org/show_bug.cgi?id=173306

Patch by Charlie Turner <cturner@igalia.com> on 2017-06-22
Reviewed by Xabier Rodriguez-Calvar.

This was due to removing the code that negotiated caps for Icecast
streams based on the response headers in r191947. The problem is that
the typefind element can sometimes squint hard enough and see an MP3
stream and attempt to play it, resulting in garbled audio playback. More
commonly typefind fails to recognize the Icecast stream and bails,
resulting in no playback at all.

r191947 also removed the emission of metadata into the pipeline. This
patch also leaves that out since we have no use for it within WebKit.

  • platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:

(StreamingClient::handleResponseReceived):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r218702 r218703  
     12017-06-22  Charlie Turner  <cturner@igalia.com>
     2
     3        [GTK] Spreaker live shows won't play
     4        https://bugs.webkit.org/show_bug.cgi?id=173306
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        This was due to removing the code that negotiated caps for Icecast
     9        streams based on the response headers in r191947. The problem is that
     10        the typefind element can sometimes squint hard enough and see an MP3
     11        stream and attempt to play it, resulting in garbled audio playback. More
     12        commonly typefind fails to recognize the Icecast stream and bails,
     13        resulting in no playback at all.
     14
     15        r191947 also removed the emission of metadata into the pipeline. This
     16        patch also leaves that out since we have no use for it within WebKit.
     17
     18        * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
     19        (StreamingClient::handleResponseReceived):
     20
    1212017-06-22  Matt Lewis  <jlewis3@apple.com>
    222
  • trunk/Source/WebCore/platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp

    r218471 r218703  
    957957        gst_app_src_set_size(priv->appsrc, -1);
    958958
    959     gst_app_src_set_caps(priv->appsrc, nullptr);
     959    // Signal to downstream if this is an Icecast stream.
     960    GRefPtr<GstCaps> caps;
     961    String metadataIntervalAsString = response.httpHeaderField(HTTPHeaderName::IcyMetaInt);
     962    if (!metadataIntervalAsString.isEmpty()) {
     963        bool isMetadataIntervalParsed;
     964        int metadataInterval = metadataIntervalAsString.toInt(&isMetadataIntervalParsed);
     965        if (isMetadataIntervalParsed && metadataInterval > 0)
     966            caps = adoptGRef(gst_caps_new_simple("application/x-icy", "metadata-interval", G_TYPE_INT, metadataInterval, nullptr));
     967    }
     968    gst_app_src_set_caps(priv->appsrc, caps.get());
    960969
    961970    // Emit a GST_EVENT_CUSTOM_DOWNSTREAM_STICKY event to let GStreamer know about the HTTP headers sent and received.
Note: See TracChangeset for help on using the changeset viewer.