Skip to content

Commit e08059a

Browse files
committed
Move Frame type to linglide-core for cross-platform support
This allows linglide-encoder to be used without linglide-capture, enabling Windows builds that use their own capture implementation (e.g., DXGI in WinGlide).
1 parent 2119a64 commit e08059a

6 files changed

Lines changed: 7 additions & 6 deletions

File tree

Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/linglide-capture/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
//! - X11 MIT-SHM extension (for X11 sessions)
55
//! - PipeWire via GStreamer (for Wayland sessions)
66
7-
pub mod frame;
87
pub mod pipewire_capture;
98
pub mod virtual_display;
109
pub mod x11_capture;
1110

12-
pub use frame::Frame;
11+
// Re-export Frame from linglide-core for backwards compatibility
12+
pub use linglide_core::Frame;
1313
pub use pipewire_capture::PipeWireCapture;
1414
pub use virtual_display::VirtualDisplay;
1515
pub use x11_capture::X11Capture;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
//! Frame representation for captured screen data
2+
//!
3+
//! This module provides the common Frame type used by both capture and encoder crates.
24
35
use std::sync::Arc;
46

crates/linglide-core/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
55
pub mod config;
66
pub mod error;
7+
pub mod frame;
78
pub mod protocol;
89

910
pub use config::{Config, DisplayPosition};
1011
pub use error::{Error, Result};
12+
pub use frame::Frame;
1113
pub use protocol::InputEvent;

crates/linglide-encoder/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ description = "H.264 video encoding for LinGlide"
88

99
[dependencies]
1010
linglide-core.workspace = true
11-
linglide-capture = { path = "../linglide-capture" }
1211
x264.workspace = true
1312
tokio.workspace = true
1413
tracing.workspace = true

crates/linglide-encoder/src/pipeline.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
//! Async encoding pipeline
22
33
use crate::{Fmp4Muxer, H264Encoder};
4-
use linglide_capture::Frame;
5-
use linglide_core::Result;
4+
use linglide_core::{Frame, Result};
65
use tokio::sync::{broadcast, mpsc};
76
use tracing::{debug, info, warn};
87

0 commit comments

Comments
 (0)