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

feat(macos/capture): support for capture display other than main display #2449

Merged
merged 19 commits into from
Apr 22, 2024

Conversation

TimmyOVO
Copy link
Contributor

@TimmyOVO TimmyOVO commented Apr 19, 2024

Description

Now we can use output_name properly in video config to capture a specific display in macOS.

Screenshot

image

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • 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

  • My code follows the style guidelines of this project
  • 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.

  • I want maintainers to keep my branch updated

@CLAassistant
Copy link

CLAassistant commented Apr 19, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! I have a few suggestions below.

src_assets/common/assets/web/public/assets/locale/en.json Outdated Show resolved Hide resolved
src/platform/macos/display.mm Outdated Show resolved Hide resolved
src/platform/macos/display.mm Outdated Show resolved Hide resolved
cmake/dependencies/macos.cmake Outdated Show resolved Hide resolved
cmake/compile_definitions/macos.cmake Outdated Show resolved Hide resolved
@TimmyOVO
Copy link
Contributor Author

Now, the format for detecting displays in the startup logs is consistent between macOS and Linux. However, it appears that the id counting differs between the Linux and macOS, macOS doesn't count the display from zero, but this shouldn't cause any significant issues.

cmake/compile_definitions/macos.cmake Show resolved Hide resolved
docs/source/about/advanced_usage.rst Outdated Show resolved Hide resolved
src_assets/common/assets/web/config.html Outdated Show resolved Hide resolved
src_assets/common/assets/web/public/assets/locale/en.json Outdated Show resolved Hide resolved
src_assets/common/assets/web/config.html Show resolved Hide resolved
src_assets/common/assets/web/config.html Outdated Show resolved Hide resolved
docs/source/about/advanced_usage.rst Outdated Show resolved Hide resolved
Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

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

Looks great! I just noticed two minor spacing issues in the docs. Once that is resolved, I think this is ready to merge.

docs/source/about/advanced_usage.rst Outdated Show resolved Hide resolved
docs/source/about/advanced_usage.rst Outdated Show resolved Hide resolved
@TimmyOVO
Copy link
Contributor Author

@ReenigneArcher all done

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 16.12903% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 6.17%. Comparing base (067efc7) to head (a755c7e).

Additional details and impacted files
@@            Coverage Diff             @@
##           nightly   #2449      +/-   ##
==========================================
+ Coverage     6.16%   6.17%   +0.01%     
==========================================
  Files           86      86              
  Lines        17523   17542      +19     
  Branches      8169    8179      +10     
==========================================
+ Hits          1080    1083       +3     
+ Misses       15410   15362      -48     
- Partials      1033    1097      +64     
Flag Coverage Δ
Linux 4.26% <0.00%> (-0.13%) ⬇️
Windows 2.04% <ø> (ø)
macOS-12 8.60% <18.51%> (+0.03%) ⬆️
macOS-13 7.91% <17.85%> (+0.12%) ⬆️
macOS-14 8.24% <17.85%> (+0.13%) ⬆️

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

Files Coverage Δ
src/platform/linux/x11grab.cpp 26.03% <0.00%> (-2.86%) ⬇️
src/platform/macos/av_video.m 60.24% <62.50%> (+11.55%) ⬆️
src/platform/macos/display.mm 41.00% <0.00%> (-0.42%) ⬇️
src/platform/macos/input.cpp 2.39% <0.00%> (-0.17%) ⬇️

... and 16 files with indirect coverage changes

@ReenigneArcher ReenigneArcher merged commit 9288775 into LizardByte:nightly Apr 22, 2024
53 checks passed
qiin2333 pushed a commit to qiin2333/Sunshine-Foundation that referenced this pull request Apr 27, 2024
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.

3 participants