collab: Make unsupported for MinGW toolchain (#23518)
Closes #23451 reverts #23117 for MinGW. collab can't be compiled for MinGW because webrtc itself doesn't support MinGW compilers Release Notes: - N/A
This commit is contained in:
@@ -8,16 +8,19 @@ pub enum Participant {
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct LocalParticipant {
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
pub(super) identity: ParticipantIdentity,
|
||||
pub(super) room: Room,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct RemoteParticipant {
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
pub(super) identity: ParticipantIdentity,
|
||||
pub(super) room: WeakRoom,
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl Participant {
|
||||
pub fn identity(&self) -> ParticipantIdentity {
|
||||
match self {
|
||||
@@ -27,6 +30,7 @@ impl Participant {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl LocalParticipant {
|
||||
pub async fn unpublish_track(&self, track: &TrackSid) -> Result<()> {
|
||||
self.room
|
||||
@@ -60,6 +64,7 @@ impl LocalParticipant {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl RemoteParticipant {
|
||||
pub fn track_publications(&self) -> HashMap<TrackSid, RemoteTrackPublication> {
|
||||
if let Some(room) = self.room.upgrade() {
|
||||
|
||||
@@ -8,17 +8,20 @@ pub enum TrackPublication {
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct LocalTrackPublication {
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
pub(crate) sid: TrackSid,
|
||||
pub(crate) room: WeakRoom,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct RemoteTrackPublication {
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
pub(crate) sid: TrackSid,
|
||||
pub(crate) room: WeakRoom,
|
||||
pub(crate) track: RemoteTrack,
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl TrackPublication {
|
||||
pub fn sid(&self) -> TrackSid {
|
||||
match self {
|
||||
@@ -35,6 +38,7 @@ impl TrackPublication {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl LocalTrackPublication {
|
||||
pub fn sid(&self) -> TrackSid {
|
||||
self.sid.clone()
|
||||
@@ -67,6 +71,7 @@ impl LocalTrackPublication {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl RemoteTrackPublication {
|
||||
pub fn sid(&self) -> TrackSid {
|
||||
self.sid.clone()
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
use super::*;
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
use webrtc::{audio_source::RtcAudioSource, video_source::RtcVideoSource};
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
pub use livekit::track::{TrackKind, TrackSource};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
@@ -23,12 +25,14 @@ pub struct LocalAudioTrack {}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct RemoteVideoTrack {
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
pub(super) server_track: Arc<TestServerVideoTrack>,
|
||||
pub(super) _room: WeakRoom,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct RemoteAudioTrack {
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
pub(super) server_track: Arc<TestServerAudioTrack>,
|
||||
pub(super) room: WeakRoom,
|
||||
}
|
||||
@@ -39,14 +43,17 @@ pub enum RtcTrack {
|
||||
}
|
||||
|
||||
pub struct RtcAudioTrack {
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
pub(super) server_track: Arc<TestServerAudioTrack>,
|
||||
pub(super) room: WeakRoom,
|
||||
}
|
||||
|
||||
pub struct RtcVideoTrack {
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
pub(super) _server_track: Arc<TestServerVideoTrack>,
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl RemoteTrack {
|
||||
pub fn sid(&self) -> TrackSid {
|
||||
match self {
|
||||
@@ -77,18 +84,21 @@ impl RemoteTrack {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl LocalVideoTrack {
|
||||
pub fn create_video_track(_name: &str, _source: RtcVideoSource) -> Self {
|
||||
Self {}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl LocalAudioTrack {
|
||||
pub fn create_audio_track(_name: &str, _source: RtcAudioSource) -> Self {
|
||||
Self {}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl RemoteAudioTrack {
|
||||
pub fn sid(&self) -> TrackSid {
|
||||
self.server_track.sid.clone()
|
||||
@@ -124,6 +134,7 @@ impl RemoteAudioTrack {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl RemoteVideoTrack {
|
||||
pub fn sid(&self) -> TrackSid {
|
||||
self.server_track.sid.clone()
|
||||
@@ -140,6 +151,7 @@ impl RemoteVideoTrack {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl RtcTrack {
|
||||
pub fn enabled(&self) -> bool {
|
||||
match self {
|
||||
@@ -156,6 +168,7 @@ impl RtcTrack {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(target_os = "windows", target_env = "gnu")))]
|
||||
impl RtcAudioTrack {
|
||||
pub fn set_enabled(&self, enabled: bool) {
|
||||
if let Some(room) = self.room.upgrade() {
|
||||
|
||||
Reference in New Issue
Block a user