Changeset 219688 in webkit


Ignore:
Timestamp:
Jul 20, 2017 8:59:39 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

[GTK] Layout Test http/tests/media/hls/hls-progress.html is failing
https://bugs.webkit.org/show_bug.cgi?id=141469

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

Source/WebCore:

A work-around for getting progress information in a timely manner from
live pipelines. We cannot rely on getting BUFFERING messages within
the stalled time window (3s), so we have to poll for progress
information somehow.

Makes the following pass reliably

http/tests/media/hls/hls-audio-tracks-has-audio.html passed unexpectedly
http/tests/media/hls/hls-audio-tracks.html passed unexpectedly
http/tests/media/hls/hls-progress.html passed unexpectedly

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::findHLSQueue):
(WebCore::isHLSProgressing):
(WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):

LayoutTests:

Fixes the removed tests.

  • platform/gtk/TestExpectations:
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r219687 r219688  
     12017-07-20  Charlie Turner  <cturner@igalia.com>
     2
     3        [GTK] Layout Test http/tests/media/hls/hls-progress.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=141469
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        Fixes the removed tests.
     9
     10        * platform/gtk/TestExpectations:
     11
    1122017-07-20  Michael Catanzaro  <mcatanzaro@igalia.com>
    213
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r219687 r219688  
    944944
    945945webkit.org/b/116259 http/tests/cache/willsendrequest-returns-null-for-memory-cache-load.html [ Failure ]
    946 webkit.org/b/141469 [ Release ] http/tests/media/hls/hls-progress.html [ Failure ]
    947946webkit.org/b/141423 svg/css/getComputedStyle-basic.xhtml [ Failure ]
    948947
     
    11061105webkit.org/b/154390 [ Release ] http/tests/media/hls/hls-audio-tracks-locale-selection.html [ Timeout Failure ]
    11071106webkit.org/b/154390 [ Release ] http/tests/media/hls/hls-video-resize.html [ Timeout Failure ]
    1108 webkit.org/b/154390 [ Release ] http/tests/media/hls/hls-audio-tracks.html [ Timeout Failure ]
    1109 webkit.org/b/154390 [ Release ] http/tests/media/hls/hls-audio-tracks-has-audio.html [ Timeout Failure ]
    11101107webkit.org/b/154390 http/tests/security/local-video-source-from-remote.html [ Timeout Pass ]
    11111108
  • trunk/Source/WebCore/ChangeLog

    r219685 r219688  
     12017-07-20  Charlie Turner  <cturner@igalia.com>
     2
     3        [GTK] Layout Test http/tests/media/hls/hls-progress.html is failing
     4        https://bugs.webkit.org/show_bug.cgi?id=141469
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        A work-around for getting progress information in a timely manner from
     9        live pipelines. We cannot rely on getting BUFFERING messages within
     10        the stalled time window (3s), so we have to poll for progress
     11        information somehow.
     12
     13        Makes the following pass reliably
     14         http/tests/media/hls/hls-audio-tracks-has-audio.html passed unexpectedly
     15         http/tests/media/hls/hls-audio-tracks.html passed unexpectedly
     16         http/tests/media/hls/hls-progress.html passed unexpectedly
     17
     18        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     19        (WebCore::findHLSQueue):
     20        (WebCore::isHLSProgressing):
     21        (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
     22
    1232017-07-20  Andreas Kling  <akling@apple.com>
    224
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r219288 r219688  
    11931193#endif
    11941194
     1195static int findHLSQueue(const GValue* item)
     1196{
     1197    GstElement* element = GST_ELEMENT(g_value_get_object(item));
     1198    if (g_str_has_prefix(GST_ELEMENT_NAME(element), "queue")) {
     1199        GstElement* parent = GST_ELEMENT(GST_ELEMENT_PARENT(element));
     1200        if (!GST_IS_OBJECT(parent))
     1201            return 1;
     1202
     1203        if (g_str_has_prefix(GST_ELEMENT_NAME(GST_ELEMENT_PARENT(parent)), "hlsdemux"))
     1204            return 0;
     1205    }
     1206
     1207    return 1;
     1208}
     1209
     1210static bool isHLSProgressing(GstElement* playbin, GstQuery* query)
     1211{
     1212    GValue item = { };
     1213    GstIterator* binIterator = gst_bin_iterate_recurse(GST_BIN(playbin));
     1214    bool foundHLSQueue = gst_iterator_find_custom(binIterator, reinterpret_cast<GCompareFunc>(findHLSQueue), &item, nullptr);
     1215    gst_iterator_free(binIterator);
     1216
     1217    if (!foundHLSQueue)
     1218        return false;
     1219
     1220    GstElement* queueElement = GST_ELEMENT(g_value_get_object(&item));
     1221    bool queryResult = gst_element_query(queueElement, query);
     1222    g_value_unset(&item);
     1223
     1224    return queryResult;
     1225}
     1226
    11951227void MediaPlayerPrivateGStreamer::fillTimerFired()
    11961228{
    11971229    GstQuery* query = gst_query_new_buffering(GST_FORMAT_PERCENT);
    11981230
    1199     if (!gst_element_query(m_pipeline.get(), query)) {
    1200         gst_query_unref(query);
    1201         return;
     1231    if (G_UNLIKELY(!gst_element_query(m_pipeline.get(), query))) {
     1232        // This query always fails for live pipelines. In the case of HLS, try and find
     1233        // the queue inside the HLS element to get a proxy measure of progress. Note
     1234        // that the percentage value is rather meaningless as used below.
     1235        // This is a hack, see https://bugs.webkit.org/show_bug.cgi?id=141469.
     1236        if (!isHLSProgressing(m_pipeline.get(), query)) {
     1237            gst_query_unref(query);
     1238            return;
     1239        }
    12021240    }
    12031241
Note: See TracChangeset for help on using the changeset viewer.