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

PipeWire buffer transform #7762

Merged
merged 1 commit into from
Feb 25, 2023

Conversation

columbarius
Copy link
Contributor

@columbarius columbarius commented Nov 11, 2022

Description

Import PipeWire buffers respecting previously applied transformations.

Motivation and Context

The wlroots Portal implementation won't transform buffers and as such a screencast is displayed wrongly if the output is rotated. This MR aims to prototype PipeWire buffer transformation informations to read the screencontent correctly from the rotated buffer.

How Has This Been Tested?

No test available yet.

Types of changes

  • New feature (non-breaking change which adds 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.

@Fenrirthviti
Copy link
Member

I understand that this is a draft, but please make sure that you fully fill out the template. If the template isn't ready to be filled out, than the PR isn't ready for submission, even as a draft.

@WizardCM WizardCM added Linux Affects Linux New Feature New feature or plugin labels Nov 12, 2022
@columbarius columbarius force-pushed the pw-buffer-transform branch 2 times, most recently from 3a417d2 to 74159e9 Compare November 13, 2022 00:04
@columbarius columbarius force-pushed the pw-buffer-transform branch 2 times, most recently from 165179d to 8a0d433 Compare December 9, 2022 21:22
@columbarius columbarius marked this pull request as ready for review December 9, 2022 21:39
@columbarius columbarius changed the title Draft: Pw buffer transform PipeWire buffer transform Dec 9, 2022
@columbarius
Copy link
Contributor Author

I guess I should again squash the guard commit?

@columbarius
Copy link
Contributor Author

May this receive the 'Seeking testers' label, please? This should allow wlroots users to stream their screen correctly when the screen is rotated.

@Fenrirthviti Fenrirthviti added the Seeking Testers Build artifacts on CI label Dec 25, 2022
@columbarius columbarius force-pushed the pw-buffer-transform branch 7 times, most recently from d5e904b to d1b1f2e Compare December 28, 2022 08:53
@columbarius
Copy link
Contributor Author

Can confirm the flatpak build works with xdpw master and sway.
Ready for review.

CC: @GeorgesStavracas @kkartaltepe

@columbarius columbarius force-pushed the pw-buffer-transform branch 3 times, most recently from 9f87b36 to f96c926 Compare December 28, 2022 23:47
plugins/linux-pipewire/pipewire.c Outdated Show resolved Hide resolved
plugins/linux-pipewire/pipewire.c Outdated Show resolved Hide resolved
@columbarius
Copy link
Contributor Author

Build a flatpak version of this MR without bumping the PipeWire version and it works as expected without doing any rotation.

@columbarius
Copy link
Contributor Author

rebased and conflicts resolved.

PipeWire allows since 0.3.62 [1] to attach metadata to a buffer
describing a transformation of the buffercontent. Clients should then
undo that transformation to import it correctly.

We can enable this feature using macro guards and runtime server version
checks on supported systems.

[1] https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/1423
@GeorgesStavracas GeorgesStavracas merged commit 8abc352 into obsproject:master Feb 25, 2023
@columbarius
Copy link
Contributor Author

Thanks for merging!

@columbarius columbarius deleted the pw-buffer-transform branch February 25, 2023 21:30
@RytoEX RytoEX added this to the OBS Studio 29.1 milestone Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Linux Affects Linux New Feature New feature or plugin Seeking Testers Build artifacts on CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants