-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Introduce scap-* crates #877
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
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughIntroduces two new screen capture crates (scap-direct3d for Windows, scap-screencapturekit for macOS) and a cross-platform FFmpeg bridge (scap-ffmpeg) with examples. Centralizes futures via workspace. Adjusts Windows dependencies to workspace/targets. Makes Biome lint non-blocking. Minor manifest tweaks and whitespace edits. Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant Display (Win)
participant Capturer (D3D)
participant Callback
participant FFmpeg
App->>Display (Win): primary()
App->>Capturer (D3D): new(item, settings).start(cb)
Capturer (D3D)->>Capturer (D3D): init D3D11 + frame pool
loop until stopped
Capturer (D3D)->>Callback: on_frame(Frame)
Callback->>FFmpeg: Frame.as_ffmpeg()
FFmpeg-->>Callback: Video frame
end
App->>Capturer (D3D): stop()
sequenceDiagram
participant App
participant Targets (macOS)
participant StreamCfgBuilder
participant Capturer (SCKit)
participant Callback
participant FFmpeg
App->>Targets (macOS): Display::primary()
App->>StreamCfgBuilder: with_fps/size/cursor.build()
App->>Capturer (SCKit): builder(target,cfg).with_callbacks().build()
App->>Capturer (SCKit): start()
loop until stop
Capturer (SCKit)->>Callback: did_output(Frame::Screen)
Callback->>FFmpeg: VideoFrame.as_ffmpeg()
FFmpeg-->>Callback: Video frame
end
App->>Capturer (SCKit): stop()
Estimated code review effort🎯 5 (Critical) | ⏱️ ~90 minutes Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (28)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Adds a few framework-specific crates for rebuilding Scap on top of:
scap-screencapturekitfor macOSscap-direct3dfor Windows (D3D11 and probably older versions i need to investigate)scap-ffmpegfor maximum efficiency conversions from native buffers toffmpeg::frame::VideoAll these crates focus on providing as much native access as possible with minimal data copying.
Much of the windows code has been adapted from https://github.com/NiiightmareXD/windows-capture
Summary by CodeRabbit
New Features
Chores
Documentation
Style