Feature: OSX Supported Screen Capture Source + Encoding Builder #11
Open
ash30 wants to merge 1 commit into
Open
Feature: OSX Supported Screen Capture Source + Encoding Builder #11ash30 wants to merge 1 commit into
ash30 wants to merge 1 commit into
Conversation
This was referenced Jul 31, 2025
ghost
reviewed
Sep 6, 2025
ghost
left a comment
There was a problem hiding this comment.
I don't know how to make a pull request on your fork, so this is the best I can do for suggesting something. lol
| pub enum CaptureMethod { | ||
| AVFoundation, | ||
| DXGI, | ||
| } |
| return CaptureMethod::DXGI; | ||
| #[cfg(target_os = "macos")] | ||
| return CaptureMethod::AVFoundation; | ||
| panic!("unsupported platform") |
There was a problem hiding this comment.
Then I added
#[cfg(target_os = "linux")]
return CaptureMethod::NoCaptureMethod;
| CaptureMethod::AVFoundation => _stream(AFScreenCapturer::new(&config)?, &config), | ||
| #[cfg(target_os = "windows")] | ||
| CaptureMethod::DXGI => _stream(DisplayDuplicator::new()?, &config), | ||
| _ => Err(anyhow!("unsupported on this platform"))?, |
There was a problem hiding this comment.
Then finally I just added
CaptureMethod::NoCaptureMethod => panic!("unsupported capture_method for platform"),
for it to stop if for some reason, a use is trying to record their screen on linux.
Adding all those parts let me watch streams again on linux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is as small as I can make it, so I'll try and break it down
1. CLI options to choose the source of screen capture source, device and frame rate.
2. Add AVFoundation based screen capture 'source'
3. Add Encoder Builder
for_sourcemethod sets options based on captured frame ( dimensions, formats etc )4. Small Change to the
Sourcetraithw_supportallow source to dictate encoder builder logic around hw frames