Skip to content

Commit 05341aa

Browse files
committed
cidre-ify macos
1 parent b914379 commit 05341aa

File tree

12 files changed

+522
-555
lines changed

12 files changed

+522
-555
lines changed

Cargo.lock

Lines changed: 180 additions & 244 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "scap"
33
description = "Modern, high-performance screen capture library for Rust. Cross-platform."
44
version = "0.0.8"
55
edition = "2021"
6-
rust-version = "1.71"
6+
rust-version = "1.85"
77
license = "MIT"
88
authors = [
99
"Siddharth <[email protected]>",
@@ -17,6 +17,8 @@ categories = ["graphics", "multimedia", "multimedia::video"]
1717

1818
[dependencies]
1919
sysinfo = "0.30.0"
20+
thiserror = "2.0.12"
21+
tokio = { version = "1.46.0", features = ["macros"] }
2022

2123
[target.'cfg(target_os = "windows")'.dependencies]
2224
windows-capture = "1.4.2"
@@ -30,17 +32,14 @@ windows = { version = "0.58", features = [
3032
cpal = "0.15.3"
3133

3234
[target.'cfg(target_os = "macos")'.dependencies]
33-
tao-core-video-sys = "0.2.0"
3435
core-graphics-helmer-fork = "0.24.0"
35-
screencapturekit = "0.3.2"
3636
cocoa = "0.25.0"
3737
objc = "0.2.7"
38-
core-foundation = "0.10.0"
39-
core-graphics = "0.24.0"
40-
core-media-rs = "0.3.4"
41-
core-media = "0.5.1"
38+
cidre = "0.9.2"
4239

4340
[target.'cfg(target_os = "linux")'.dependencies]
4441
pipewire = "0.8.0"
4542
dbus = "0.9.7"
4643
rand = "0.8.5"
44+
45+
[dev-dependencies]

src/capturer/engine/mac/apple_sys.rs

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/capturer/engine/mac/ext.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
use cidre::cg;
2+
use core_graphics_helmer_fork::display::{CGDisplay, CGDisplayMode};
3+
4+
pub trait DirectDisplayIdExt {
5+
fn display_mode(&self) -> Option<CGDisplayMode>;
6+
}
7+
8+
impl DirectDisplayIdExt for cg::DirectDisplayId {
9+
#[inline]
10+
fn display_mode(&self) -> Option<CGDisplayMode> {
11+
CGDisplay::new(self.0).display_mode()
12+
}
13+
}

0 commit comments

Comments
 (0)