Skip to content

feat(linux/pipewire): add pts passthrough whitelist, cleanups - #5791

Merged
ReenigneArcher merged 7 commits into
LizardByte:masterfrom
psyke83:pipewire_pts_whitelist
Sep 25, 2026
Merged

ReenigneArcher merged 7 commits into
LizardByte:masterfrom
psyke83:pipewire_pts_whitelist

Conversation

@psyke83

@psyke83 psyke83 commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

Allow passthrough of more accurate pts metadata for specific compositor versions that are known to generate valid timestamps.

  • Refactor/reuse KWin detection function into generic helper that also supports Mutter detection.
  • Guard against potentially stale Pipewire pts metadata from previous frames.
  • Ensure expensive DBus calls in init() are cached to avoid first-run stalls in fill_img_metadata() when determining pts source.
  • Refactor logic to determine if variable framerate should be negotiated into separate function.

Screenshot

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

See our AI usage policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@psyke83
psyke83 force-pushed the pipewire_pts_whitelist branch 2 times, most recently from fa7825f to 0b8f882 Compare September 24, 2026 23:53
@psyke83
psyke83 marked this pull request as ready for review September 25, 2026 00:24

@ReenigneArcher ReenigneArcher left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doxygen errors:

/home/docs/checkouts/readthedocs.org/user_builds/sunshinestream/checkouts/5791/src/platform/linux/pipewire.cpp:699: error: Member negotiate_variable_rate (variable) of class pipewire::pipewire_t is not documented.
/home/docs/checkouts/readthedocs.org/user_builds/sunshinestream/checkouts/5791/src/platform/linux/pipewire.cpp:698: error: Member prefer_pipewire_pts (variable) of class pipewire::pipewire_t is not documented.
/home/docs/checkouts/readthedocs.org/user_builds/sunshinestream/checkouts/5791/src/platform/linux/pipewire.cpp:434: error: parameters of member pipewire::pipewire_t::get_running_compositor_version are not documented
/home/docs/checkouts/readthedocs.org/user_builds/sunshinestream/checkouts/5791/src/platform/linux/pipewire.cpp:540: error: parameters of member pipewire::pipewire_t::use_pipewire_pts are not documented
/home/docs/checkouts/readthedocs.org/user_builds/sunshinestream/checkouts/5791/src/platform/linux/pipewire.cpp:571: error: parameters of member pipewire::pipewire_t::use_variable_rate are not documented
/home/docs/checkouts/readthedocs.org/user_builds/sunshinestream/checkouts/5791/src/platform/linux/pipewire.cpp:410: error: Member type (variable) of struct pipewire::pipewire_t::compositor_version_t is not documented.
/home/docs/checkouts/readthedocs.org/user_builds/sunshinestream/checkouts/5791/src/platform/linux/pipewire.cpp:411: error: Member version (variable) of struct pipewire::pipewire_t::compositor_version_t is not documented.

Allow passthrough of more accurate pts metadata for specific compositor
versions that are known to generate valid timestamps.

* Add GNOME Shell (Mutter) detection function.
* Reuse existing KWin detection for pts whitelist.
* Guard against stale Pipewire pts metadata.
* Initialize variables in init() once to avoid first-run stalls in
  fill_img_metadata() when determining pts source.
* Refactor logic to determine if variable framerate should be
  negotiated into separate function.
@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Bundle Report

Bundle size has no change ✅

@sonarqubecloud

Copy link
Copy Markdown

@ReenigneArcher ReenigneArcher added this to the pipewire milestone Sep 25, 2026
@codecov

codecov Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 82 lines in your changes missing coverage. Please review.
✅ Project coverage is 38.36%. Comparing base (55d6c0f) to head (1520bee).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/platform/linux/pipewire.cpp 0.00% 81 Missing ⚠️
src/platform/linux/kmsgrab.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5791      +/-   ##
==========================================
- Coverage   38.43%   38.36%   -0.07%     
==========================================
  Files         113      113              
  Lines       26056    26099      +43     
  Branches    11538    11558      +20     
==========================================
  Hits        10014    10014              
+ Misses      15170    13940    -1230     
- Partials      872     2145    +1273     
Flag Coverage Δ
Alpine-aarch64 23.00% <0.00%> (-0.07%) ⬇️
Alpine-x86_64 23.12% <0.00%> (-0.07%) ⬇️
Archlinux 21.77% <0.00%> (-0.07%) ⬇️
Homebrew-macos-15 37.74% <ø> (ø)
Homebrew-macos-26 38.07% <ø> (ø)
Homebrew-ubuntu-24.04 24.66% <0.00%> (-0.07%) ⬇️
Linux-AppImage-aarch64 25.84% <0.00%> (-0.08%) ⬇️
Linux-AppImage-x86_64 26.03% <0.00%> (-0.07%) ⬇️
PowerShell 100.00% <ø> (ø)
Web-UI 85.00% <ø> (ø)
Windows-AMD64 30.83% <ø> (ø)
Windows-ARM64 25.86% <ø> (+<0.01%) ⬆️
macOS-arm64 31.30% <ø> (ø)
macOS-x86_64 31.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/linux/kmsgrab.cpp 7.54% <0.00%> (-0.01%) ⬇️
src/platform/linux/pipewire.cpp 0.00% <0.00%> (ø)

... and 45 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55d6c0f...1520bee. Read the comment docs.

@github-actions

Copy link
Copy Markdown
Last Updated 2026-09-25 20:16:58 UTC
Source Run CI Run #5790
Commit 1520bee44dc5dc0d444c4b842623b42fd834f8bf

Screenshot Comparison

PR #5791 screenshots vs screenshots baseline.

Matrix: AppImage-aarch64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: AppImage-x86_64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-AMD64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: Windows-ARM64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-arm64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

Matrix: macOS-x86_64

Image Baseline PR
sunshine_tray_initial.png
sunshine_tray_menu.png
sunshine_tray_pairing_request.png
sunshine_tray_paused.png
sunshine_tray_stopped.png
sunshine_tray_streaming.png
sunshine_tray_tooltip.png

@ReenigneArcher
ReenigneArcher merged commit e1e6700 into LizardByte:master Sep 25, 2026
81 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants