[webkit-changes] [WebKit/WebKit] fa7d13: [GStreamer][WebRTC] Rewrite stats timestamps

Philippe Normand noreply at github.com
Mon Sep 16 01:14:53 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fa7d13583e7fecaeef8209f47ca396e7e026e71d
      https://github.com/WebKit/WebKit/commit/fa7d13583e7fecaeef8209f47ca396e7e026e71d
  Author: Philippe Normand <philn at igalia.com>
  Date:   2024-09-16 (Mon, 16 Sep 2024)

  Changed paths:
    A LayoutTests/webrtc/stats-timestamp-increases-expected.txt
    A LayoutTests/webrtc/stats-timestamp-increases.html
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerStatsCollector.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp
    M Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.h

  Log Message:
  -----------
  [GStreamer][WebRTC] Rewrite stats timestamps
https://bugs.webkit.org/show_bug.cgi?id=279508

Reviewed by Xabier Rodriguez-Calvar.

The stats provided by webrtcbin are timestamped using the system monotonic time, which is not
exactly following the spec which stipulates that we should use Performance.timeOrigin +
Performance.now(). By applying the monotonic offset to the epoch we can use
Performance::reduceTimeResolution() and get a bit closer to spec compliance.

Covered by a new test, inspired from
imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-getStats.https.html that checks the
timestamp remain close to window.performance.timeOrigin + window.performance.now().

* LayoutTests/webrtc/stats-timestamp-increases-expected.txt: Added.
* LayoutTests/webrtc/stats-timestamp-increases.html: Added.
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp:
(WebCore::GStreamerMediaEndpoint::preprocessStats):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerStatsCollector.cpp:
(WebCore::RTCStatsReport::Stats::Stats):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp:
(WebCore::StatsTimestampConverter::singleton):
(WebCore::StatsTimestampConverter::convertFromMonotonicTime const):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.h:

Canonical link: https://commits.webkit.org/283693@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list