mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-22 21:23:02 +01:00
On an X11 session (DISPLAY set, WAYLAND_DISPLAY empty; never XWayland) Screen and Area are read from the X server: MIT-SHM GetImage each frame (plain GetImage without it), the pointer blended in from XFixes, 30 fps to x264 through ffmpeg. The screen is the RandR monitor under the pointer; `hex annotate start --area X,Y,W,H` records an area. i3 and other desktops without a ScreenCast backend now get video. A Window still needs the portal's picker and fails saying to record the screen or an area, never widening to the screen. When X11 capture can't start (no display, unusual depth, no ffmpeg/x264) the capture fails at once with why in the capsule instead of writing one with no picture. Checked in a headless Xvnc + i3 session on apollo with no ScreenCast portal: an 800x500 area recorded 154 frames over 5.1 s, the 1920x1080 screen 153, each with a keyframe and the cursor. Also fixes scrawl-capture's own tests, which no longer compiled (ScreenCaptureSession.failure). Reported and diagnosed by @nefthy.
96 lines
2.7 KiB
TOML
96 lines
2.7 KiB
TOML
[package]
|
|
name = "scrawl-capture"
|
|
version = "0.3.13"
|
|
edition = "2024"
|
|
license = "MIT"
|
|
publish = false
|
|
|
|
[features]
|
|
default = ["screen", "helper"]
|
|
screen = []
|
|
helper = []
|
|
input = []
|
|
mic = ["dep:cpal"]
|
|
phone = ["helper"]
|
|
hex-client = []
|
|
cli = []
|
|
|
|
[dependencies]
|
|
anyhow = "1.0.104"
|
|
cpal = { version = "0.18.2", optional = true }
|
|
dirs = "7.0.0"
|
|
flume = "0.12.0"
|
|
hound = "3.5.1"
|
|
libc = "0.2.189"
|
|
png = "0.18.1"
|
|
scrawl-router = { path = "../router" }
|
|
serde = { version = "1.0.229", features = ["derive"] }
|
|
serde_json = "1.0.151"
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
block2 = "0.6.2"
|
|
capture-core = { path = "../capture-core" }
|
|
core-foundation = "0.10.0"
|
|
core-graphics = "0.24.0"
|
|
core-graphics-types = "0.1.3"
|
|
core-text = "21.0.0"
|
|
objc2 = "0.6.4"
|
|
objc2-app-kit = { version = "0.3.2", features = ["NSPasteboard", "NSPasteboardItem"] }
|
|
objc2-core-foundation = "0.3.2"
|
|
objc2-foundation = { version = "0.3.2", features = ["NSArray", "NSData", "NSString"] }
|
|
screencapturekit = { version = "=11.0.0", features = ["macos_15_0"] }
|
|
|
|
# The screen-cast portal over D-Bus; PipeWire and VA-API are loaded at run time.
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
x11rb = { version = "0.14.0", features = ["shm", "xfixes", "randr"] }
|
|
futures-util = { version = "0.3", default-features = false }
|
|
tokio = { version = "1", features = ["rt", "time"] }
|
|
zbus = { version = "6.1.0", default-features = false, features = ["tokio", "proxy"] }
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
ab_glyph = "0.2.32"
|
|
windows = { version = "0.61.3", features = [
|
|
"Wdk_System_SystemServices",
|
|
"Win32_System_SystemInformation",
|
|
"Win32_System_LibraryLoader",
|
|
"Foundation",
|
|
"Graphics_Capture",
|
|
"Graphics_DirectX",
|
|
"Graphics_DirectX_Direct3D11",
|
|
"Win32_Foundation",
|
|
"Win32_Graphics_Direct3D",
|
|
"Win32_Graphics_Direct3D11",
|
|
"Win32_Graphics_Dwm",
|
|
"Win32_Graphics_Dxgi",
|
|
"Win32_Graphics_Dxgi_Common",
|
|
"Win32_Graphics_Gdi",
|
|
"Win32_Media_MediaFoundation",
|
|
"Win32_NetworkManagement_IpHelper",
|
|
"Win32_Networking_WinSock",
|
|
"Win32_Security",
|
|
"Win32_Security_Cryptography",
|
|
"Win32_Storage_FileSystem",
|
|
"Win32_Storage_Xps",
|
|
"Win32_System_Com",
|
|
"Win32_System_Console",
|
|
"Win32_System_Com_StructuredStorage",
|
|
"Win32_System_DataExchange",
|
|
"Win32_System_Diagnostics_Debug",
|
|
"Win32_System_Kernel",
|
|
"Win32_System_Memory",
|
|
"Win32_System_Ole",
|
|
"Win32_System_Performance",
|
|
"Win32_System_ProcessStatus",
|
|
"Win32_System_Registry",
|
|
"Win32_System_Threading",
|
|
"Win32_System_Variant",
|
|
"Win32_System_WinRT",
|
|
"Win32_System_WinRT_Direct3D11",
|
|
"Win32_System_WinRT_Graphics_Capture",
|
|
"Win32_UI_Accessibility",
|
|
"Win32_UI_HiDpi",
|
|
"Win32_UI_Input_KeyboardAndMouse",
|
|
"Win32_UI_Shell",
|
|
"Win32_UI_Shell_Common",
|
|
"Win32_UI_WindowsAndMessaging",
|
|
] }
|