Changeset 267138 in webkit


Ignore:
Timestamp:
Sep 16, 2020 12:08:03 AM (4 years ago)
Author:
Philippe Normand
Message:

[GStreamer][1.18] Regressions
https://bugs.webkit.org/show_bug.cgi?id=216558

Reviewed by Xabier Rodriguez-Calvar.

The most significant change here is the added support for video rendering stats caching.
This was caught by
imported/w3c/web-platform-tests/media-source/mediasource-getvideoplaybackquality.html

  • platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:

(webKitGLVideoSinkGetProperty): Fix 1.18 version runtime check. 1.17 was the development version of 1.18.

  • platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:

(WebCore::GStreamerRegistryScanner::isAVC1CodecSupported const): Ditto.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::createVideoSink): Ditto.
(WebCore::MediaPlayerPrivateGStreamer::videoPlaybackQualityMetrics): Cache or reuse cached
statistics. Caching is required so that metrics queries performed after EOS still return
valid values.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r267137 r267138  
     12020-09-16  Philippe Normand  <pnormand@igalia.com>
     2
     3        [GStreamer][1.18] Regressions
     4        https://bugs.webkit.org/show_bug.cgi?id=216558
     5
     6        Reviewed by Xabier Rodriguez-Calvar.
     7
     8        The most significant change here is the added support for video rendering stats caching.
     9        This was caught by
     10        imported/w3c/web-platform-tests/media-source/mediasource-getvideoplaybackquality.html
     11
     12        * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp:
     13        (webKitGLVideoSinkGetProperty): Fix 1.18 version runtime check. 1.17 was the development version of 1.18.
     14        * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
     15        (WebCore::GStreamerRegistryScanner::isAVC1CodecSupported const): Ditto.
     16        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
     17        (WebCore::MediaPlayerPrivateGStreamer::createVideoSink): Ditto.
     18        (WebCore::MediaPlayerPrivateGStreamer::videoPlaybackQualityMetrics): Cache or reuse cached
     19        statistics. Caching is required so that metrics queries performed after EOS still return
     20        valid values.
     21        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
     22
    1232020-09-15  Said Abou-Hallawa  <sabouhallawa@apple.com>
    224
  • trunk/Source/WebCore/platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp

    r263217 r267138  
    188188    switch (propertyId) {
    189189    case PROP_STATS:
    190         if (webkitGstCheckVersion(1, 17, 0)) {
     190        if (webkitGstCheckVersion(1, 18, 0)) {
    191191            GUniqueOutPtr<GstStructure> stats;
    192192            g_object_get(sink->priv->appSink.get(), "stats", &stats.outPtr(), nullptr);
  • trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.cpp

    r264162 r267138  
    422422    }
    423423
    424     if (webkitGstCheckVersion(1, 17, 0)) {
     424    if (webkitGstCheckVersion(1, 18, 0)) {
    425425        GST_DEBUG("Checking video decoders for constrained caps");
    426426        return checkH264Caps(makeString("video/x-h264, level=(string)", level, ", profile=(string)", profile).utf8().data());
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp

    r265492 r267138  
    33893389
    33903390    GstElement* videoSink = nullptr;
    3391     if (!webkitGstCheckVersion(1, 17, 0)) {
     3391    if (!webkitGstCheckVersion(1, 18, 0)) {
    33923392        m_fpsSink = gst_element_factory_make("fpsdisplaysink", "sink");
    33933393        if (m_fpsSink) {
     
    34353435Optional<VideoPlaybackQualityMetrics> MediaPlayerPrivateGStreamer::videoPlaybackQualityMetrics()
    34363436{
    3437     if (!webkitGstCheckVersion(1, 17, 0) && !m_fpsSink)
     3437    if (!webkitGstCheckVersion(1, 18, 0) && !m_fpsSink)
    34383438        return WTF::nullopt;
    34393439
    34403440    uint64_t totalVideoFrames = 0;
    34413441    uint64_t droppedVideoFrames = 0;
    3442     if (webkitGstCheckVersion(1, 17, 0)) {
     3442    if (webkitGstCheckVersion(1, 18, 0)) {
    34433443        GUniqueOutPtr<GstStructure> stats;
    34443444        g_object_get(m_videoSink.get(), "stats", &stats.outPtr(), nullptr);
     
    34553455        droppedVideoFrames = droppedFrames;
    34563456    }
     3457
     3458    // Cache or reuse cached statistics. Caching is required so that metrics queries performed
     3459    // after EOS still return valid values.
     3460    if (totalVideoFrames)
     3461        m_totalVideoFrames = totalVideoFrames;
     3462    else if (m_totalVideoFrames)
     3463        totalVideoFrames = m_totalVideoFrames;
     3464    if (droppedVideoFrames)
     3465        m_droppedVideoFrames = droppedVideoFrames;
     3466    else if (m_droppedVideoFrames)
     3467        droppedVideoFrames = m_droppedVideoFrames;
    34573468
    34583469    uint32_t corruptedVideoFrames = 0;
  • trunk/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h

    r263556 r267138  
    534534
    535535    GRefPtr<GstElement> m_fpsSink { nullptr };
     536    uint64_t m_totalVideoFrames { 0 };
     537    uint64_t m_droppedVideoFrames { 0 };
    536538
    537539private:
Note: See TracChangeset for help on using the changeset viewer.