Sunshine
Sunshine copied to clipboard
Populate host latency for kms/x11 grab
Description
This PR populates the frame_timestamp at the point that the KMS and X11 capture is done. This allows Moonlight to show the host latency in the statistics like it does for Windows.
Screenshot
Issues Fixed or Closed
n/a
Type of Change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Dependency update (updates to dependencies)
- [ ] Documentation update (changes to documentation)
- [ ] Repository update (changes to repository files, e.g.
.github/...
)
Checklist
- [X] My code follows the style guidelines of this project
- [X] I have performed a self-review of my own code
- [] I have commented my code, particularly in hard-to-understand areas
- [] I have added or updated the in code docstring/documentation-blocks for new or existing methods/components
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch must be updated before it can be merged. You must also Allow edits from maintainers.
- [X] I want maintainers to keep my branch updated
I am able to test the path through the display_vram_t class but not display_ram_t. I'm not sure how to force it to use display_ram_t
Software encoding should hit display_ram_t
Software encoding should hit display_ram_t
I had to make a correction but this is also tested and working now.
I was thinking of adding this for X11 as well to compare performance. But then I thought that this would not work if I set the timestamp just after the snapshot because from then on it's just the encoding. Maybe just before the capture operation would make more sense.
Added x11
Codecov Report
Attention: Patch coverage is 0%
with 7 lines
in your changes are missing coverage. Please review.
Project coverage is 6.09%. Comparing base (
e5ef037
) to head (5061db2
).
Additional details and impacted files
@@ Coverage Diff @@
## nightly #2273 +/- ##
==========================================
- Coverage 6.09% 6.09% -0.01%
==========================================
Files 86 86
Lines 18514 18518 +4
Branches 8404 8404
==========================================
Hits 1129 1129
- Misses 15556 16264 +708
+ Partials 1829 1125 -704
Flag | Coverage Δ | |
---|---|---|
Linux | 4.11% <0.00%> (-0.01%) |
:arrow_down: |
Windows | 1.57% <ø> (ø) |
|
macOS-12 | 8.11% <ø> (ø) |
|
macOS-13 | 7.44% <ø> (?) |
|
macOS-14 | 7.72% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files | Coverage Δ | |
---|---|---|
src/platform/linux/x11grab.cpp | 26.46% <0.00%> (-0.09%) |
:arrow_down: |
src/platform/linux/kmsgrab.cpp | 2.54% <0.00%> (-0.02%) |
:arrow_down: |