Closed Bug 2089436 Opened 13 days ago Closed

[wpt-sync] Sync PR 64469 - WebKit export of https://bugs.webkit.org/show_bug.cgi?id=284099

Categories

(Core :: Audio/Video: MediaStreamGraph, task, P4)

task

Tracking

()

RESOLVED FIXED
162 Branch
Tracking Status
firefox162 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 64469 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/64469
Details from upstream follow.

Youenn Fablet <youenn@apple.com> wrote:

WebKit export of https://bugs.webkit.org/show_bug.cgi?id=284099

WebKit export from bug: MediaStreamTrackProcessor:<!---->:<!---->Source should not enqueue once it is closed

<pre>
MediaStreamTrackProcessor::Source should not enqueue once it is closed

Stopping a track will close the readable stream of its MediaStreamTrackProcessor.
When the track is VideoTrackGenerator and gets stopped, it will close synchronously the readable stream of the MediaStreamTrackProcessor observing the VideoTrackGenerator track.
But for video frames, we post a task to the worker thread (even though we are already in the worker thread).
We can thus enqueue video frames after stopping the readable stream.

To prevent this, we set m_isCancelled to true in MediaStreamTrackProcessor::Source::close.
As a small refactoring, we also move the m_isCancelled to MediaStreamTrackProcessor::tryEnqueueingVideoFrame to return earlier.
We add an ASSERT(m_isCancelled) in MediaStreamTrackProcessor::Source::enqueue.

This includes the lint fixes from <a href="https://commits.webkit.org/325383@main.">https://commits.webkit.org/325383@main.</a>

WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=284099">https://bugs.webkit.org/show_bug.cgi?id=284099</a>
WebKit-Bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=329678">https://bugs.webkit.org/show_bug.cgi?id=329678</a>
WebKit-Canonical-Link: <a href="https://commits.webkit.org/287409@main">https://commits.webkit.org/287409@main</a>
</pre>

Whiteboard: [wptsync downstream] → [wptsync downstream error]
Component: web-platform-tests → Audio/Video: MediaStreamGraph
Product: Testing → Core
Whiteboard: [wptsync downstream error] → [wptsync downstream]

CI Results

Ran 9 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 20 tests and 8 subtests

Status Summary

Firefox

OK : 1[GitHub] 19[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS : 5
FAIL : 1[GitHub] 89[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
ERROR: 1

Chrome

OK : 1
FAIL : 1

Safari

OK : 1
PASS : 1

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

  • /mediacapture-insertable-streams/MediaStreamTrackHandle-transfer-cross-agent-cluster.https.html [wpt.fyi]
    • MediaStreamTrackHandle can be transferred to a same-origin iframe: FAIL
    • MediaStreamTrackHandle cannot be transferred to a cross-site iframe: FAIL
  • /mediacapture-insertable-streams/MediaStreamTrackHandle-transfer-to-shared-and-service-workers.https.html [wpt.fyi]
    • MediaStreamTrackHandle cannot be transferred to a shared worker: FAIL
    • MediaStreamTrackHandle cannot be transferred to a service worker: FAIL
  • /mediacapture-insertable-streams/MediaStreamTrackProcessor-backpressure.worker.html [wpt.fyi]
    • Tests that backpressure forces MediaStreamTrackProcess to skip frames: FAIL
  • /mediacapture-insertable-streams/MediaStreamTrackProcessor-maxBufferSize.worker.html [wpt.fyi]
    • Tests that multiple read requests are eventually settled: FAIL
    • Tests that multiple write requests are buffered: FAIL
  • /mediacapture-insertable-streams/MediaStreamTrackProcessor-stop.worker.html [wpt.fyi]
    • Stopping a track just after writing: FAIL (Chrome: FAIL, Safari: PASS)
  • /mediacapture-insertable-streams/MediaStreamTrackProcessor-with-window-tracks.https.html [wpt.fyi]
    • Tests that the reader of a video MediaStreamTrackProcessor produces VideoFrame objects and is closed on track stop while running on a worker: FAIL
  • /mediacapture-insertable-streams/MediaStreamTrackProcessor.worker.html [wpt.fyi]
    • Tests that multiple read requests are eventually settled: FAIL
    • Tests that MediaStreamTrackProcess respects track.enabled: FAIL
  • /mediacapture-insertable-streams/VideoTrackGenerator-with-window-tracks.https.html [wpt.fyi]: ERROR
    • Tests that frames are actually rendered correctly in a stream used for a video element.: FAIL
    • Tests that frames are actually rendered correctly in a stream sent over a peer connection.: FAIL
    • Tests that frames are sent correctly with RTCRtpEncodingParameters.scaleResolutionDownBy.: FAIL
  • /mediacapture-insertable-streams/VideoTrackGenerator.worker.html [wpt.fyi]
    • Tests that VideoTrackGenerator forwards frames to sink: FAIL
    • Tests that creating a VideoTrackGenerator works as expected: FAIL
    • Tests that VideoFrames are destroyed on write: FAIL
    • Generator writer rejects on mismatched media input: FAIL
    • Generator writer rejects on non media input: FAIL
    • A writer rejects when generator's track is stopped: FAIL
    • A muted writer rejects when generator's track is stopped: FAIL
    • A writer rejects when generator's track and clones are stopped: FAIL
    • Tests that VideoTrackGenerator forwards frames only when unmuted: FAIL
  • /mediacapture-insertable-streams/idlharness.any.worker.html [wpt.fyi]
    • MediaStreamTrackHandle interface: existence and properties of interface object: FAIL
    • MediaStreamTrackHandle interface object length: FAIL
    • MediaStreamTrackHandle interface object name: FAIL
    • MediaStreamTrackHandle interface: existence and properties of interface prototype object: FAIL
    • MediaStreamTrackHandle interface: existence and properties of interface prototype object's "constructor" property: FAIL
    • MediaStreamTrackHandle interface: existence and properties of interface prototype object's @@unscopables property: FAIL
    • MediaStreamTrackProcessor interface: existence and properties of interface object: FAIL
    • MediaStreamTrackProcessor interface object length: FAIL
    • MediaStreamTrackProcessor interface object name: FAIL
    • MediaStreamTrackProcessor interface: existence and properties of interface prototype object: FAIL
    • MediaStreamTrackProcessor interface: existence and properties of interface prototype object's "constructor" property: FAIL
    • MediaStreamTrackProcessor interface: existence and properties of interface prototype object's @@unscopables property: FAIL
    • MediaStreamTrackProcessor interface: attribute readable: FAIL
    • MediaStreamTrackProcessor interface: attribute discardedFrames: FAIL
    • MediaStreamTrackProcessor interface: attribute totalFrames: FAIL
    • MediaStreamTrackProcessor must be primary interface of new MediaStreamTrackProcessor({ track: new VideoTrackGenerator() }): FAIL
    • Stringification of new MediaStreamTrackProcessor({ track: new VideoTrackGenerator() }): FAIL
    • MediaStreamTrackProcessor interface: new MediaStreamTrackProcessor({ track: new VideoTrackGenerator() }) must inherit property "readable" with the proper type: FAIL
    • MediaStreamTrackProcessor interface: new MediaStreamTrackProcessor({ track: new VideoTrackGenerator() }) must inherit property "discardedFrames" with the proper type: FAIL
    • MediaStreamTrackProcessor interface: new MediaStreamTrackProcessor({ track: new VideoTrackGenerator() }) must inherit property "totalFrames" with the proper type: FAIL
    • VideoTrackGenerator interface: existence and properties of interface object: FAIL
    • VideoTrackGenerator interface object length: FAIL
    • VideoTrackGenerator interface object name: FAIL
    • VideoTrackGenerator interface: existence and properties of interface prototype object: FAIL
    • VideoTrackGenerator interface: existence and properties of interface prototype object's "constructor" property: FAIL
    • VideoTrackGenerator interface: existence and properties of interface prototype object's @@unscopables property: FAIL
    • VideoTrackGenerator interface: attribute writable: FAIL
    • VideoTrackGenerator interface: attribute muted: FAIL
    • VideoTrackGenerator interface: attribute track: FAIL
    • VideoTrackGenerator must be primary interface of new VideoTrackGenerator(): FAIL
    • Stringification of new VideoTrackGenerator(): FAIL
    • VideoTrackGenerator interface: new VideoTrackGenerator() must inherit property "writable" with the proper type: FAIL
    • VideoTrackGenerator interface: new VideoTrackGenerator() must inherit property "muted" with the proper type: FAIL
    • VideoTrackGenerator interface: new VideoTrackGenerator() must inherit property "track" with the proper type: FAIL
  • /mediacapture-insertable-streams/legacy/MediaStreamTrackGenerator-audio.https.html [wpt.fyi]
    • Tests that creating a Audio MediaStreamTrackGenerator works as expected: FAIL
    • Creating Generator with an invalid kind throws: FAIL
    • Creating Generator with a missing kind throws: FAIL
    • Mismatched data and generator kind throws on write.: FAIL
    • Tests that audio actually flows to a connected audio element: FAIL
  • /mediacapture-insertable-streams/legacy/MediaStreamTrackGenerator-in-service-worker.https.html [wpt.fyi]
    • A service worker is able to initialize a MediaStreamTrackGenerator without crashing: FAIL
  • /mediacapture-insertable-streams/legacy/MediaStreamTrackGenerator-in-shared-worker.https.html [wpt.fyi]
    • A shared worker is able to initialize a MediaStreamTrackGenerator without crashing: FAIL
  • /mediacapture-insertable-streams/legacy/MediaStreamTrackGenerator-in-worker.https.html [wpt.fyi]
    • A worker is able to initialize a MediaStreamTrackGenerator without crashing: FAIL
    • A worker is able to enable a MediaStreamTrackGenerator without crashing: FAIL
    • A worker is able to disable a MediaStreamTrackGenerator without crashing: FAIL
  • /mediacapture-insertable-streams/legacy/MediaStreamTrackGenerator-pipes-data-in-worker.https.html [wpt.fyi]
    • A worker is able to pipe data through a MediaStreamTrackGenerator without crashing: FAIL
  • /mediacapture-insertable-streams/legacy/MediaStreamTrackGenerator-video.https.html [wpt.fyi]
    • Tests that MediaStreamTrackGenerator forwards frames to sink: FAIL
    • Tests that frames are actually rendered correctly in a stream used for a video element.: FAIL
    • Tests that frames are actually rendered correctly in a stream sent over a peer connection.: FAIL
    • Tests that frames are sent correctly with RTCRtpEncodingParameters.scaleResolutionDownBy.: FAIL
    • Tests that creating a Video MediaStreamTrackGenerator works as expected: FAIL
    • Tests that VideoFrames are destroyed on write.: FAIL
    • Mismatched frame and generator kind throws on write.: FAIL
  • /mediacapture-insertable-streams/legacy/MediaStreamTrackProcessor-backpressure.https.html [wpt.fyi]
    • Tests that backpressure forces MediaStreamTrackProcess to skip frames: FAIL
  • /mediacapture-insertable-streams/legacy/MediaStreamTrackProcessor-video.https.html [wpt.fyi]
    • Tests that the reader of a video MediaStreamTrackProcessor produces video frames and is closed on track stop: FAIL
    • Tests that the reader of a video MediaStreamTrackProcessor produces VideoFrame objects and is closed on track stop while running on a worker: FAIL
    • Tests that multiple read requests are eventually settled: FAIL
  • /mediacapture-insertable-streams/tentative/MediaStreamTrackProcessor-audio.https.html [wpt.fyi]
    • Tests that the reader of an audio MediaStreamTrackProcessor produces AudioData objects and is closed on track stop: FAIL
    • Tests that the reader of an audio MediaStreamTrackProcessor produces AudioData objects and is closed on track stop while running on a worker: FAIL
  • /mediacapture-insertable-streams/tentative/VideoTrackGenerator.https.html [wpt.fyi]
    • Tests that VideoTrackGenerator forwards frames to sink: FAIL
    • Tests that frames are actually rendered correctly in a stream used for a video element.: FAIL
    • Tests that frames are actually rendered correctly in a stream sent over a peer connection.: FAIL
    • Tests that frames are sent correctly with RTCRtpEncodingParameters.scaleResolutionDownBy.: FAIL
    • Tests that creating a VideoTrackGenerator works as expected: FAIL
    • Tests that VideoFrames are destroyed on write.: FAIL
    • Mismatched frame and generator kind throws on write.: FAIL
    • Tests that VideoTrackGenerator forwards frames only when unmuted: FAIL
Status: NEW → RESOLVED
Closed: 4 days ago
Resolution: --- → FIXED
Target Milestone: --- → 162 Branch
You need to log in before you can comment on or make changes to this bug.