Closed Bug 1918096 Opened 2 months ago Closed 2 months ago

Hook up an SCContentSharingPicker MVP integration

Categories

(Core :: WebRTC: Audio/Video, task)

Unspecified
macOS
task

Tracking

()

RESOLVED FIXED
132 Branch
Tracking Status
firefox-esr128 133+ affected
firefox130 --- wontfix
firefox131 --- wontfix
firefox132 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

(Blocks 2 open bugs)

Details

Attachments

(9 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

We already have Pipewire desktop capture using a system dialog. Let's hook up macOS >= 15 similarly, behind a pref, for now. This let's us integrate SCContentSharingPicker without much other patches (e.g. frontend), and provides an avenue for potential uplift into 131.

This case gets hit if the SCContentSharingPicker is cancelled by the user.

Attachment #9424200 - Attachment description: Bug 1918096 - Integrate SCContentSharingPicker for screens into ScreenCapturerSck. r?#webrtc-reviewers → Bug 1918096 - Integrate SCContentSharingPicker into ScreenCapturerSck. r?#webrtc-reviewers

If the resolution is smaller than the allocated surface, we crop.
If the resolution is larger than the allocated surface, we reconfigure with a
larger surface.

The allocated surface has the size we told it to have in the
SCStreamConfiguration, in pixels.

If the source is a screen, the size is pretty static. Changing display settings
could affect it.
If the source is a window, the size is initially the size of the window. The
user resizing the window affects the size.
If the source is multiple windows, the size initially seems to be that of the
display they're sitting on. Windows across multiple displays are not captured
into the same surface, as of macOS 14.

No need to update the last frame unless it has changed.

Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/86a5d2db126e Integrate SCContentSharingPicker into ScreenCapturerSck. r=webrtc-reviewers,padenot,dbaker https://hg.mozilla.org/integration/autoland/rev/c8c8702310d4 Generate libwebrtc moz.build files. r=webrtc-reviewers,ng,dbaker
Keywords: leave-open
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/eb9b355882a9 Wire up SCContentSharingPicker using Pipewire desktop capture UX. r=grulja,webrtc-reviewers,dbaker https://hg.mozilla.org/integration/autoland/rev/97e405de0635 Reject gUM/gDM request if video track ends before first frame. r=webrtc-reviewers,dbaker
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/aabf0bd94f28 In ScreenCapturerSck improve dictionary ergonomics. r=webrtc-reviewers,ng https://hg.mozilla.org/integration/autoland/rev/bc6215142fea In ScreenCapturerSck adapt to sources that change resolution. r=webrtc-reviewers,ng https://hg.mozilla.org/integration/autoland/rev/8d52f2fd5754 In ScreenCapturerSck skip some processing when possible. r=webrtc-reviewers,ng

We cannot guarantee that the thread it is used on is static, as both the
VideoCapture and DesktopCapture threads can come and go.

Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/cfcdd5339805 Make SckPickerHandle thread safe. r=padenot
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/07dd5fcced62 Enable SCContentSharingPicker by default (limited to macOS 15). r=webrtc-reviewers,dbaker
Keywords: leave-open
Blocks: 1918648
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
Regressions: 1918746
Regressions: 1918996

[Tracking Requested - why for this release]:
We would like to uplift this work (plus the fixes in the two regressions) once it's had more bake time.

Severity: N/A → S2

FWIW, if this is going to go to ESR128, it'll need a rebased patch stack to do so. I'm also not super thrilled about taking this large of a set of changes there, so more explanation as to why it's necessary would be appreciated.

(In reply to Ryan VanderMeulen [:RyanVM] from comment #19)

FWIW, if this is going to go to ESR128, it'll need a rebased patch stack to do so. I'm also not super thrilled about taking this large of a set of changes there, so more explanation as to why it's necessary would be appreciated.

This is mainly to avoid the new system alerts in macOS 15 that are mentioned in their release notes (see ScreenCaptureKit Deprecations). There's some code in here affecting the existing desktop capture framework, but note most of it is behind a pref and a macOS 15 runtime check. We also would like this to have more time to bake in release before uplifting.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: