Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux-pipewire: Unify ScreenCast source as Screen Capture #10565

Merged
merged 1 commit into from May 9, 2024

Conversation

tytan652
Copy link
Collaborator

@tytan652 tytan652 commented Apr 18, 2024

Description

Allow to select both main type of ScreenCast (monitor, window) with only one source type rather than adding a source type per ScreenCast type.

This change is made as a new Screen Capture source type which obsoletes the use of the previous Screen Capture (monitor-only) and Window Capture.

NOTE: An obsolete OBS source type is only hidden from the add list, already existing sources will still work as expected.

Why a new id rather than modifying display capture ?

  • I can't check or predict all portals implementation, and if one them create a restore token based on the asked types rather than only selected sources. Not changing id might introduce unwanted breaks on now obsoleted type.

  • Coherence in the id

Screenshots

GNOME monitor-only screencast selector (shown by obsoleted screen capture):
Screenshot from 2024-04-21 01-48-09

GNOME window-only screencast selector (shown by obsoleted window capture):
Screenshot from 2024-04-21 01-48-24-obfuscated

GNOME monitor+window screencast selector (shown by new screen capture):

Screenshot from 2024-04-22 23-15-35

Motivation and Context

The way the ScreenCast portal was designed does not require a OBS source type per ScreenCast type, but the feature was introduced as 1:1 towards X11 implementations.

But unlike on X11, there is also other types like virtual type for virtual monitor that can be used by Desktop Environment (or one for applications once I finish my app to app portal).

And I think rather than adding a third OBS source type, it would better to unify them like macOS has one OBS source type for SCK.

How Has This Been Tested?

  • Added a Screen Capture with normal build
  • Open OBS build with this PR, the Screen Capture (v1) was still working
  • Adding a new Screen Capture allow to chose between the three ScreenCast type.

Types of changes

  • Tweak (non-breaking change to improve existing functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@tytan652 tytan652 added Enhancement Improvement to existing functionality Linux Affects Linux UI/UX Anything to do with changes or additions to UI/UX elements. Seeking Testers Build artifacts on CI labels Apr 18, 2024
@tytan652 tytan652 changed the title linux-pipewire: Enable any source type in Screen Capture linux-pipewire: Enable any ScreenCast type in Screen Capture Apr 18, 2024
@norihiro
Copy link
Contributor

A line below contains more than 72 characters.

Allow to select any type of ScreenCast (monitor, window, virtual) with only

@Warchamp7
Copy link
Member

Can someone get screenshots or video of the unified ScreenCaptureKit source workflow on macOS works? I'd like to try and keep the experience as similar as we reasonably can across operating systems.

@tytan652 tytan652 changed the title linux-pipewire: Enable any ScreenCast type in Screen Capture linux-pipewire: Unify ScreenCast source as Screen Capture v2 Apr 22, 2024
@tytan652
Copy link
Collaborator Author

Can someone get screenshots or video of the unified ScreenCaptureKit source workflow on macOS works? I'd like to try and keep the experience as similar as we reasonably can across operating systems.

https://obsproject.com/kb/display-capture-sources#macos-sck

macOS Screen Capture properties window

@tytan652 tytan652 force-pushed the unify-pw-screencast branch 3 times, most recently from f670b37 to 9167eaf Compare May 6, 2024 21:21
@tytan652
Copy link
Collaborator Author

tytan652 commented May 6, 2024

Window capture is now obsoleted which do not show in the add source menu.

@tytan652 tytan652 added this to the OBS Studio (Next Version) milestone May 8, 2024
@tytan652 tytan652 force-pushed the unify-pw-screencast branch 2 times, most recently from 2dfc04f to 5ee3612 Compare May 8, 2024 17:04
Allow to select both main type of ScreenCast (monitor, window)
with only one source type rather than adding a source type per
ScreenCast type.

This change is made as a new Screen Capture source type which
obsoletes the use of the previous Screen Capture (monitor-only)
and Window Capture.
@tytan652 tytan652 changed the title linux-pipewire: Unify ScreenCast source as Screen Capture v2 linux-pipewire: Unify ScreenCast source as Screen Capture May 8, 2024
@kkartaltepe
Copy link
Collaborator

Seems like it continues to work as expected on sway as well.

@GeorgesStavracas GeorgesStavracas merged commit dfef65c into obsproject:master May 9, 2024
14 checks passed
@tytan652 tytan652 deleted the unify-pw-screencast branch May 9, 2024 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality Linux Affects Linux Seeking Testers Build artifacts on CI UI/UX Anything to do with changes or additions to UI/UX elements.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants