Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 82c645da79b52c4a9063580d1bb1ad924087ac57
https://github.com/WebKit/WebKit/commit/82c645da79b52c4a9063580d1bb1ad924087ac57
Author: Przemyslaw Gorszkowski <[email protected]>
Date: 2026-06-04 (Thu, 04 Jun 2026)
Changed paths:
A
LayoutTests/fast/mediastream/captureStream/canvas-rvfc-metadata-expected.txt
A LayoutTests/fast/mediastream/captureStream/canvas-rvfc-metadata.html
M LayoutTests/platform/ios/TestExpectations
M LayoutTests/platform/mac/TestExpectations
M Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Log Message:
-----------
[GStreamer] mediaTime from requestVideoFrameCallback is wrong in case of
captureCanvas as source
https://bugs.webkit.org/show_bug.cgi?id=316190
Reviewed by Philippe Normand.
Canvas capture frames have their PTS stamped with the absolute GStreamer
system clock time. Because the default GstSegment has start=0, calling
gst_segment_to_stream_time on such a buffer returns the raw clock value
(system uptime in seconds), not a stream-relative position.
To fix that and set the correct value of mediaTime in VideoFrameMetadata
provided by requestVideoFrameCallback, this change detects canvas frames
via their VideoFrameContentHint and uses currentTime() instead.
A new layout test fast/mediastream/captureStream/canvas-rvfc-metadata.html
validates the metadata fields returned by requestVideoFrameCallback for a
canvas captureStream, including that mediaTime is stream-relative and not
an absolute clock value.
Test: fast/mediastream/captureStream/canvas-rvfc-metadata.html
* LayoutTests/fast/mediastream/captureStream/canvas-rvfc-metadata-expected.txt:
Added.
* LayoutTests/fast/mediastream/captureStream/canvas-rvfc-metadata.html: Added.
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::videoFrameMetadata):
Canonical link: https://commits.webkit.org/314533@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications