Build media and live-kit in test-mode on non-MacOS (#6859)
Build media and live-kit in test-mode on non-MacOS (Related to https://github.com/zed-industries/zed/issues/5391 https://github.com/zed-industries/zed/issues/5395 https://github.com/zed-industries/zed/issues/5394) This makes it possible to build the media and live-kit crates on non-MacOS Release Notes: - N/A
This commit is contained in:
parent
e69e6f5586
commit
2c834c24a3
8 changed files with 68 additions and 6 deletions
|
@ -42,6 +42,12 @@ nanoid = { version ="0.4", optional = true}
|
|||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
core-foundation = "0.9.3"
|
||||
|
||||
[target.'cfg(not(target_os = "macos"))'.dependencies]
|
||||
async-trait = { workspace = true }
|
||||
collections = { path = "../collections", features = ["test-support"] }
|
||||
gpui = { path = "../gpui", features = ["test-support"] }
|
||||
live_kit_server = { path = "../live_kit_server" }
|
||||
|
||||
[dev-dependencies]
|
||||
collections = { path = "../collections", features = ["test-support"] }
|
||||
gpui = { path = "../gpui", features = ["test-support"] }
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
#[cfg(not(any(test, feature = "test-support")))]
|
||||
#[cfg(all(target_os = "macos", not(any(test, feature = "test-support"))))]
|
||||
pub mod prod;
|
||||
|
||||
#[cfg(not(any(test, feature = "test-support")))]
|
||||
#[cfg(all(target_os = "macos", not(any(test, feature = "test-support"))))]
|
||||
pub use prod::*;
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
#[cfg(any(test, feature = "test-support", not(target_os = "macos")))]
|
||||
pub mod test;
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
#[cfg(any(test, feature = "test-support", not(target_os = "macos")))]
|
||||
pub use test::*;
|
||||
|
||||
pub type Sid = String;
|
||||
|
|
|
@ -5,6 +5,7 @@ use collections::{BTreeMap, HashMap, HashSet};
|
|||
use futures::Stream;
|
||||
use gpui::BackgroundExecutor;
|
||||
use live_kit_server::{proto, token};
|
||||
#[cfg(target_os = "macos")]
|
||||
use media::core_video::CVImageBuffer;
|
||||
use parking_lot::Mutex;
|
||||
use postage::watch;
|
||||
|
@ -845,6 +846,7 @@ impl Frame {
|
|||
self.height
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
pub fn image(&self) -> CVImageBuffer {
|
||||
unimplemented!("you can't call this in test mode")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue