Merge remote-tracking branch 'origin/main' into gpui2-no-send

This commit is contained in:
Nathan Sobo
2023-11-01 21:10:31 -06:00
133 changed files with 14910 additions and 7230 deletions
+6 -25
View File
@@ -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
View File
File diff suppressed because it is too large Load Diff