[wpt-sync] Sync PR 63006 - [blink] Enable Region Capture on cloned MediaStreamTracks
Categories
(Core :: Audio/Video: MediaStreamGraph, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox159 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 63006 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/63006
Details from upstream follow.
Johannes Kron <kron@chromium.org> wrote:
[blink] Enable Region Capture on cloned MediaStreamTracks
Enable dynamic sub-capture target tracking and per-track cropping on
cloned MediaStreamTrack instances:
- Update MediaStreamVideoSource::GetNextCaptureVersion() and
ApplySubCaptureTarget() to take SubCaptureTargetType and
MediaStreamVideoTrack* respectively.- Add OnTrackCloned()/OnTrackRemoved() hooks and protected Tracks()/
SetTrackSubCaptureTarget() helpers to MediaStreamVideoSource, so
subclasses can manage per-track targets without accessing
VideoTrackAdapter directly.- Track sub-capture targets for individual MediaStreamVideoTrack
instances in MediaStreamVideoCapturerSource.- Use the single-target GPU crop path when all active tracks share the
same crop target.- Switch to full-frame capture on GPU when tracks target different
regions or when uncropped tracks coexist, allowing VideoTrackAdapter
to crop per-track.- Stop delivering GPU-cropped frames to tracks that have no sub-capture
target. Now that the capturer alternates between the single-target
GPU crop path and full-frame capture, an untargeted track can observe
a frame that was physically cropped to another track's target, which
it must not be given. VideoTrackAdapter treats the presence of
metadata.region_capture_rect as the signal that such cropping
occurred.- Propagate crop targets to cloned tracks during track cloning.
- Allow cloned BrowserCaptureMediaStreamTrack instances to invoke
cropTo() independently while preserving rejection for Element Capture
(restrictTo) when clones exist, and reject cropTo() while a
restriction target is active.- Add unit tests verifying independent sub-capture on clones.
- Update Web Platform Tests and browser tests to verify independent
cropTo() on cloned tracks while ensuring restrictTo() continues to be
rejected when clones exist. The WPT subtests now stop their tracks so
that later getDisplayMedia() calls can start.Bug: 555826257
Change-Id: I7d4028360bac4cd110b011010819fa784164f4f2Reviewed-on: https://chromium-review.googlesource.com/8344692
WPT-Export-Revision: 08f34cee2a06977332d63b5e83bc94c6c3f733a4
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=98068
| Assignee | ||
Comment 2•1 month ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 3 subtests
Status Summary
Firefox
OK : 1
FAIL: 3
Chrome
OK : 1
PASS: 1
FAIL: 2
Safari
OK : 1
FAIL: 3
Links
Details
New Tests That Don't Pass
- /mediacapture-streams/BrowserCaptureMediaStreamTrack-cropTo.https.html [wpt.fyi]
- Tests that cropping MediaStreamTrack objects works as expected:
FAIL(Chrome:PASS, Safari:FAIL) - Tests that cropping cloned MediaStreamTrack objects works independently:
FAIL(Chrome:FAIL, Safari:FAIL) - Tests that cloning cropped tracks preserves target and allows independent cropTo:
FAIL(Chrome:FAIL, Safari:FAIL)
- Tests that cropping MediaStreamTrack objects works as expected:
Comment 4•1 month ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/f4e9253e3df7
https://hg.mozilla.org/mozilla-central/rev/4407e223b448
Description
•