Merge remote-tracking branch 'origin/main' into gpui2-no-send
This commit is contained in:
@@ -13,7 +13,7 @@ test-support = [
|
||||
"client2/test-support",
|
||||
"collections/test-support",
|
||||
"gpui2/test-support",
|
||||
"live_kit_client/test-support",
|
||||
"live_kit_client2/test-support",
|
||||
"project2/test-support",
|
||||
"util/test-support"
|
||||
]
|
||||
@@ -24,7 +24,7 @@ client2 = { path = "../client2" }
|
||||
collections = { path = "../collections" }
|
||||
gpui2 = { path = "../gpui2" }
|
||||
log.workspace = true
|
||||
live_kit_client = { path = "../live_kit_client" }
|
||||
live_kit_client2 = { path = "../live_kit_client2" }
|
||||
fs2 = { path = "../fs2" }
|
||||
language2 = { path = "../language2" }
|
||||
media = { path = "../media" }
|
||||
@@ -47,6 +47,6 @@ fs2 = { path = "../fs2", features = ["test-support"] }
|
||||
language2 = { path = "../language2", features = ["test-support"] }
|
||||
collections = { path = "../collections", features = ["test-support"] }
|
||||
gpui2 = { path = "../gpui2", features = ["test-support"] }
|
||||
live_kit_client = { path = "../live_kit_client", features = ["test-support"] }
|
||||
live_kit_client2 = { path = "../live_kit_client2", features = ["test-support"] }
|
||||
project2 = { path = "../project2", features = ["test-support"] }
|
||||
util = { path = "../util", features = ["test-support"] }
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use client2::ParticipantIndex;
|
||||
use client2::{proto, User};
|
||||
use collections::HashMap;
|
||||
use gpui2::WeakModel;
|
||||
pub use live_kit_client::Frame;
|
||||
pub use live_kit_client2::Frame;
|
||||
use live_kit_client2::{RemoteAudioTrack, RemoteVideoTrack};
|
||||
use project2::Project;
|
||||
use std::{fmt, sync::Arc};
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||
pub enum ParticipantLocation {
|
||||
@@ -45,27 +47,6 @@ pub struct RemoteParticipant {
|
||||
pub participant_index: ParticipantIndex,
|
||||
pub muted: bool,
|
||||
pub speaking: bool,
|
||||
// pub video_tracks: HashMap<live_kit_client::Sid, Arc<RemoteVideoTrack>>,
|
||||
// pub audio_tracks: HashMap<live_kit_client::Sid, Arc<RemoteAudioTrack>>,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct RemoteVideoTrack {
|
||||
pub(crate) live_kit_track: Arc<live_kit_client::RemoteVideoTrack>,
|
||||
}
|
||||
|
||||
unsafe impl Send for RemoteVideoTrack {}
|
||||
// todo!("remove this sync because it's not legit")
|
||||
unsafe impl Sync for RemoteVideoTrack {}
|
||||
|
||||
impl fmt::Debug for RemoteVideoTrack {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_struct("RemoteVideoTrack").finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl RemoteVideoTrack {
|
||||
pub fn frames(&self) -> async_broadcast::Receiver<Frame> {
|
||||
self.live_kit_track.frames()
|
||||
}
|
||||
pub video_tracks: HashMap<live_kit_client2::Sid, Arc<RemoteVideoTrack>>,
|
||||
pub audio_tracks: HashMap<live_kit_client2::Sid, Arc<RemoteAudioTrack>>,
|
||||
}
|
||||
|
||||
+449
-466
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user