From 1362ef3f45a63e1c00a945c4dbfd65b845a5936f Mon Sep 17 00:00:00 2001 From: rogurotus Date: Tue, 10 Oct 2023 13:48:51 +0300 Subject: [PATCH 01/14] temp --- .../SurfaceTextureRenderer.kt | 2 + .../controller/MediaStreamTrackController.kt | 15 + .../proxy/MediaStreamTrackProxy.kt | 68 + .../proxy/VideoTrackProxy.kt | 2 +- crates/libwebrtc-sys/src/cpp/bridge.cc | 3 + crates/libwebrtc-sys/src/cpp/video_sink.cc | 7 +- crates/libwebrtc-sys/src/lib.rs | 1 + crates/native/src/api.rs | 38 + crates/native/src/bridge_generated.rs | 55 +- crates/native/src/pc.rs | 1 + crates/native/src/user_media.rs | 132 +- crates/native/src/video_sink.rs | 13 + example/lib/src/get_user_media.dart | 11 +- example/lib/src/loopback.dart | 37 +- lib/src/api/bridge.g.dart | 96 +- lib/src/api/bridge.g.freezed.dart | 1284 ++++++++--------- .../platform/native/media_stream_track.dart | 23 + lib/src/platform/track.dart | 3 + 18 files changed, 1110 insertions(+), 681 deletions(-) diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/SurfaceTextureRenderer.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/SurfaceTextureRenderer.kt index 2eedd9c975..8173cb48f6 100755 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/SurfaceTextureRenderer.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/SurfaceTextureRenderer.kt @@ -1,6 +1,7 @@ package com.instrumentisto.medea_flutter_webrtc import android.graphics.SurfaceTexture +import android.util.Log import java.util.concurrent.CountDownLatch import org.webrtc.* import org.webrtc.RendererCommon.GlDrawer @@ -93,6 +94,7 @@ class SurfaceTextureRenderer(name: String) : EglRenderer(name) { frameRotation = frame.rotation } } + Log.d("AAAAAAAAAA", "42") super.onFrame(frame) } diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/controller/MediaStreamTrackController.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/controller/MediaStreamTrackController.kt index ae4d866ed4..380044f9e7 100644 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/controller/MediaStreamTrackController.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/controller/MediaStreamTrackController.kt @@ -1,11 +1,16 @@ package com.instrumentisto.medea_flutter_webrtc.controller +import com.instrumentisto.medea_flutter_webrtc.model.MediaType import com.instrumentisto.medea_flutter_webrtc.proxy.MediaStreamTrackProxy import com.instrumentisto.medea_flutter_webrtc.utils.AnyThreadSink +import com.instrumentisto.medea_flutter_webrtc.utils.resultUnhandledException import io.flutter.plugin.common.BinaryMessenger import io.flutter.plugin.common.EventChannel import io.flutter.plugin.common.MethodCall import io.flutter.plugin.common.MethodChannel +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch /** * Controller of [MediaStreamTrackProxy] functional. @@ -55,6 +60,16 @@ class MediaStreamTrackController( "state" -> { result.success(track.state.value) } + "width" -> { + GlobalScope.launch(Dispatchers.Main) { + result.success(track.width()) + } + } + "height" -> { + GlobalScope.launch(Dispatchers.Main) { + result.success(track.height()) + } + } "stop" -> { track.stop() result.success(null) diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt index 60e12e3969..5f8b88f80a 100644 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt @@ -5,7 +5,11 @@ import com.instrumentisto.medea_flutter_webrtc.TrackRepository import com.instrumentisto.medea_flutter_webrtc.model.FacingMode import com.instrumentisto.medea_flutter_webrtc.model.MediaStreamTrackState import com.instrumentisto.medea_flutter_webrtc.model.MediaType +import kotlinx.coroutines.CompletableDeferred import org.webrtc.MediaStreamTrack +import org.webrtc.VideoFrame +import org.webrtc.VideoSink +import org.webrtc.VideoTrack /** * Wrapper around a [MediaStreamTrack]. @@ -37,6 +41,12 @@ class MediaStreamTrackProxy( /** Indicator whether the underlying [MediaStreamTrack] had been disposed. */ private var disposed: Boolean = false + var widthInit = CompletableDeferred() + var heightInit = CompletableDeferred() + + var width: Int = 0 + var height: Int = 0 + /** [MediaType] of the underlying [MediaStreamTrack]. */ val kind: MediaType = when (obj.kind()) { @@ -63,6 +73,64 @@ class MediaStreamTrackProxy( init { TrackRepository.addTrack(this) + + if (kind == MediaType.VIDEO) { + if (deviceId == "remote") { + Log.d(deviceId, " " + track.id() + " " + width.toString() + " " + height.toString()) + widthInit.complete(Unit) + heightInit.complete(Unit) + } + + val track = obj as VideoTrack + val sink = object : VideoSink { + override fun onFrame(p0: VideoFrame) { +// Log.d(deviceId, " " + p0?.rotatedWidth + " " + p0?.rotatedHeight) + widthInit.complete(Unit) + heightInit.complete(Unit) + + + width = p0.rotatedWidth + height = p0.rotatedHeight + + if (deviceId == "remote") { + Log.d(deviceId, " " + width.toString() + " " + height.toString()) + } + } + } + Log.d(deviceId, " ADDDDDDDDD " + track.id() + " " + (sink == null).toString() ) + track.addSink(sink) + } + + } + + suspend fun width() : Int? { + if (kind == MediaType.AUDIO) { + return null + } + + val track = obj as VideoTrack + val sink = object : VideoSink { + override fun onFrame(p0: VideoFrame) { + if (deviceId == "remote") { + Log.d(deviceId, "WWWWWWWWW ") + } + } + } + Log.d(deviceId, "ACCCCCCCCCCCC " + track.id() + " " + (sink == null).toString() ) + + track.addSink(sink) + + + widthInit.await() + return width + } + + suspend fun height() : Int? { + if (kind == MediaType.AUDIO) { + return null + } + heightInit.await() + return height } /** Sets the [disposed] property to `true`. */ diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/VideoTrackProxy.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/VideoTrackProxy.kt index dc3adccfc1..0f41c17fcd 100644 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/VideoTrackProxy.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/VideoTrackProxy.kt @@ -43,6 +43,6 @@ class VideoTrackProxy(private val track: MediaStreamTrackProxy) { * Adds every [SurfaceTextureRenderer] from the [sinks] to the updater underlying [WVideoTrack]. */ private fun renewSinks() { - sinks.forEach { getVideoTrack().addSink(it) } +// sinks.forEach { getVideoTrack().addSink(it) } } } diff --git a/crates/libwebrtc-sys/src/cpp/bridge.cc b/crates/libwebrtc-sys/src/cpp/bridge.cc index 067a3fe1da..4d7a00bfa6 100644 --- a/crates/libwebrtc-sys/src/cpp/bridge.cc +++ b/crates/libwebrtc-sys/src/cpp/bridge.cc @@ -23,6 +23,8 @@ #include "pc/proxy.h" #include "test_audio_device_module.cc" +#include + namespace bridge { // Creates a new `TrackEventObserver`. @@ -450,6 +452,7 @@ TrackState audio_track_state(const AudioTrackInterface& track) { // Used to connect the given `track` to the underlying video engine. void add_or_update_video_sink(const VideoTrackInterface& track, VideoSinkInterface& sink) { + std::cout << "ADD SINk " << std::endl; track->AddOrUpdateSink(&sink, rtc::VideoSinkWants()); } diff --git a/crates/libwebrtc-sys/src/cpp/video_sink.cc b/crates/libwebrtc-sys/src/cpp/video_sink.cc index 6c1e63c210..62bbf5e1ba 100644 --- a/crates/libwebrtc-sys/src/cpp/video_sink.cc +++ b/crates/libwebrtc-sys/src/cpp/video_sink.cc @@ -1,15 +1,20 @@ #include "libwebrtc-sys/include/video_sink.h" #include "libwebrtc-sys/src/bridge.rs.h" +#include namespace video_sink { // Creates a new `ForwardingVideoSink` backed by the provided // `DynOnFrameCallback`. ForwardingVideoSink::ForwardingVideoSink( - rust::Box cb_) : cb_(std::move(cb_)) {} + rust::Box cb_) : cb_(std::move(cb_)) { + std::cout << "|||||||||| WTF WTF " << std::endl; + + } // Propagates the received `VideoFrame` to the Rust side. void ForwardingVideoSink::OnFrame(const webrtc::VideoFrame& video_frame) { + std::cout << " WTF WTF " << std::endl; bridge::on_frame(*cb_.value(), std::make_unique(video_frame)); } diff --git a/crates/libwebrtc-sys/src/lib.rs b/crates/libwebrtc-sys/src/lib.rs index 34887af661..4446e44ab1 100644 --- a/crates/libwebrtc-sys/src/lib.rs +++ b/crates/libwebrtc-sys/src/lib.rs @@ -1840,6 +1840,7 @@ impl VideoTrackInterface { /// Used to connect this [`VideoTrackInterface`] to the underlying video /// engine. pub fn add_or_update_sink(&self, sink: &mut VideoSinkInterface) { + println!("ADD"); webrtc::add_or_update_video_sink(&self.inner, sink.0.pin_mut()); } diff --git a/crates/native/src/api.rs b/crates/native/src/api.rs index 191a16a88a..640fd6b922 100644 --- a/crates/native/src/api.rs +++ b/crates/native/src/api.rs @@ -2184,6 +2184,44 @@ pub fn track_state( WEBRTC.lock().unwrap().track_state(track_id, kind) } +// todo +pub fn track_hieght( + track_id: String, + kind: MediaType, +) -> anyhow::Result> { + if kind == MediaType::Audio { + return Ok(None); + } + + println!("HMM1"); + let res = WEBRTC + .lock() + .unwrap() + .track_hieght(track_id) + .map(|v| Some(v)); + println!("HMM2"); + res +} + +// todo +pub fn track_width( + track_id: String, + kind: MediaType, +) -> anyhow::Result> { + if kind == MediaType::Audio { + return Ok(None); + } + + println!("wMM1"); + let res = WEBRTC + .lock() + .unwrap() + .track_width(track_id) + .map(|v| Some(v)); + println!("wMM2"); + res +} + /// Changes the [enabled][1] property of the [`MediaStreamTrack`] by its ID and /// [`MediaType`]. /// diff --git a/crates/native/src/bridge_generated.rs b/crates/native/src/bridge_generated.rs index 89d7dcd241..188eeaa393 100644 --- a/crates/native/src/bridge_generated.rs +++ b/crates/native/src/bridge_generated.rs @@ -1,4 +1,3 @@ -#![cfg_attr(rustfmt, rustfmt_skip)] #![allow( non_camel_case_types, unused, @@ -619,6 +618,42 @@ fn wire_track_state_impl( }, ) } +fn wire_track_hieght_impl( + port_: MessagePort, + track_id: impl Wire2Api + UnwindSafe, + kind: impl Wire2Api + UnwindSafe, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option>( + WrapInfo { + debug_name: "track_hieght", + port: Some(port_), + mode: FfiCallMode::Normal, + }, + move || { + let api_track_id = track_id.wire2api(); + let api_kind = kind.wire2api(); + move |task_callback| track_hieght(api_track_id, api_kind) + }, + ) +} +fn wire_track_width_impl( + port_: MessagePort, + track_id: impl Wire2Api + UnwindSafe, + kind: impl Wire2Api + UnwindSafe, +) { + FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option>( + WrapInfo { + debug_name: "track_width", + port: Some(port_), + mode: FfiCallMode::Normal, + }, + move || { + let api_track_id = track_id.wire2api(); + let api_kind = kind.wire2api(); + move |task_callback| track_width(api_track_id, api_kind) + }, + ) +} fn wire_set_track_enabled_impl( port_: MessagePort, track_id: impl Wire2Api + UnwindSafe, @@ -1925,6 +1960,24 @@ mod io { wire_track_state_impl(port_, track_id, kind) } + #[no_mangle] + pub extern "C" fn wire_track_hieght( + port_: i64, + track_id: *mut wire_uint_8_list, + kind: i32, + ) { + wire_track_hieght_impl(port_, track_id, kind) + } + + #[no_mangle] + pub extern "C" fn wire_track_width( + port_: i64, + track_id: *mut wire_uint_8_list, + kind: i32, + ) { + wire_track_width_impl(port_, track_id, kind) + } + #[no_mangle] pub extern "C" fn wire_set_track_enabled( port_: i64, diff --git a/crates/native/src/pc.rs b/crates/native/src/pc.rs index 74f88812c4..376f54c96d 100644 --- a/crates/native/src/pc.rs +++ b/crates/native/src/pc.rs @@ -999,6 +999,7 @@ impl sys::PeerConnectionEventsHandler for PeerConnectionObserver { } fn on_track(&mut self, transceiver: sys::RtpTransceiverInterface) { + println!("ONT"); let track_id = transceiver.receiver().track().id(); let track_id = VideoTrackId::from(track_id); if self.video_tracks.contains_key(&track_id) { diff --git a/crates/native/src/user_media.rs b/crates/native/src/user_media.rs index b9f1dabb35..6d1f1ad889 100644 --- a/crates/native/src/user_media.rs +++ b/crates/native/src/user_media.rs @@ -1,15 +1,17 @@ use std::{ collections::{HashMap, HashSet}, hash::Hash, - sync::{Arc, Weak}, + sync::{Arc, Weak, RwLock}, }; use anyhow::{anyhow, bail, Context}; use derive_more::{AsRef, Display, From, Into}; use libwebrtc_sys as sys; -use sys::TrackEventObserver; +use sys::{OnFrameCallback, TrackEventObserver}; use xxhash::xxh3::xxh3_64; +use once_cell::sync::OnceCell; + use crate::{ api, devices, next_id, pc::RtpTransceiver, stream_sink::StreamSink, PeerConnection, VideoSink, VideoSinkId, Webrtc, @@ -104,12 +106,12 @@ impl Webrtc { track.remove_video_sink(sink); } } - if let MediaTrackSource::Local(src) = track.source { + if let MediaTrackSource::Local(src) = &track.source { if Arc::strong_count(&src) == 2 { self.video_sources.remove(&src.device_id); }; } - track.senders + track.senders.clone() } else { return; } @@ -341,6 +343,36 @@ impl Webrtc { }) } + // todo + pub fn track_width(&self, id: String) -> anyhow::Result { + Ok({ + let id = VideoTrackId::from(id); + + *self + .video_tracks + .get(&id) + .ok_or_else(|| { + anyhow!("Cannot find video track with ID `{id}`") + })? + .width.wait().read().unwrap() + }) + } + + // todo + pub fn track_hieght(&self, id: String) -> anyhow::Result { + Ok({ + let id = VideoTrackId::from(id); + *self + .video_tracks + .get(&id) + .ok_or_else(|| { + anyhow!("Cannot find video track with ID `{id}`") + })? + .height + .wait().read().unwrap() + }) + } + /// Changes the [enabled][1] property of the media track by its ID. /// /// [1]: https://w3.org/TR/mediacapture-streams#track-enabled @@ -915,6 +947,12 @@ pub struct VideoTrack { /// Peers and transceivers sending this [`VideoTrack`]. pub senders: HashMap, HashSet>>, + + sink: Option, + + width: Arc>>, + + height: Arc>>, } impl VideoTrack { @@ -924,14 +962,48 @@ impl VideoTrack { src: Arc, ) -> anyhow::Result { let id = VideoTrackId(next_id().to_string()); - Ok(Self { + + struct Temp { + width: Arc>>, + height: Arc>>, + } + impl OnFrameCallback for Temp { + fn on_frame(&mut self, frame: cxx::UniquePtr) { + if self.width.get().is_none() { + self.width.set(RwLock::from(frame.width())).unwrap(); + self.height.set(RwLock::from(frame.height())).unwrap(); + } + } + } + + let width = Arc::new(OnceCell::new()); + let height = Arc::new(OnceCell::new()); + + let mut sink = VideoSink::new( + next_id() as i64, + sys::VideoSinkInterface::create_forwarding(Box::new(Temp { + width: Arc::clone(&width), + height: Arc::clone(&height), + })), + id.clone(), + ); + + let mut res = Self { id: id.clone(), inner: pc.create_video_track(id.into(), &src.inner)?, source: MediaTrackSource::Local(src), kind: api::MediaType::Video, sinks: Vec::new(), senders: HashMap::new(), - }) + width, + height, + sink: None, + }; + + res.add_video_sink(&mut sink); + res.sink = Some(sink); + + Ok(res) } /// Wraps the track of the `transceiver.receiver.track()` into a @@ -942,7 +1014,35 @@ impl VideoTrack { ) -> Self { let receiver = transceiver.receiver(); let track = receiver.track(); - Self { + + + struct Temp { + width: Arc>>, + height: Arc>>, + } + impl OnFrameCallback for Temp { + fn on_frame(&mut self, frame: cxx::UniquePtr) { + *self.width.get().unwrap().write().unwrap() = frame.width(); + *self.height.get().unwrap().write().unwrap() = frame.height(); + } + } + + let width = Arc::new(OnceCell::new()); + width.set(RwLock::from(0)).unwrap(); + let height = Arc::new(OnceCell::new()); + height.set(RwLock::from(0)).unwrap(); + + + let mut sink = VideoSink::new( + next_id() as i64, + sys::VideoSinkInterface::create_forwarding(Box::new(Temp { + width: Arc::clone(&width), + height: Arc::clone(&height), + })), + VideoTrackId(track.id().clone()), + ); + + let mut res = Self { id: VideoTrackId(track.id()), inner: track.try_into().unwrap(), // Safe to unwrap since transceiver is guaranteed to be negotiated @@ -954,7 +1054,15 @@ impl VideoTrack { kind: api::MediaType::Video, sinks: Vec::new(), senders: HashMap::new(), - } + width: width, + height: height, + sink: None, + }; + + res.add_video_sink(&mut sink); + res.sink = Some(sink); + + res } /// Adds the provided [`VideoSink`] to this [`VideoTrack`]. @@ -987,6 +1095,14 @@ impl VideoTrack { } } +impl Drop for VideoTrack { + fn drop(&mut self) { + println!("GHMDD"); + let sink = self.sink.take().unwrap(); + self.remove_video_sink(sink); + } +} + impl From<&VideoTrack> for api::MediaStreamTrack { fn from(track: &VideoTrack) -> Self { Self { diff --git a/crates/native/src/video_sink.rs b/crates/native/src/video_sink.rs index c50f26e23f..5c956c11e1 100644 --- a/crates/native/src/video_sink.rs +++ b/crates/native/src/video_sink.rs @@ -65,6 +65,19 @@ pub struct VideoSink { } impl VideoSink { + // todo + pub fn new( + id: i64, + sink: sys::VideoSinkInterface, + track_id: VideoTrackId, + ) -> Self { + Self { + id: Id(id), + inner: sink, + track_id, + } + } + /// Returns an [`Id`] of this [`VideoSink`]. #[must_use] pub fn id(&self) -> Id { diff --git a/example/lib/src/get_user_media.dart b/example/lib/src/get_user_media.dart index 1eff2f0c03..4b35d0b27a 100644 --- a/example/lib/src/get_user_media.dart +++ b/example/lib/src/get_user_media.dart @@ -51,17 +51,24 @@ class _GetUserMediaSampleState extends State { caps.audio.mandatory!.deviceId = audioInputDevice; caps.video.mandatory = DeviceVideoConstraints(); + caps.video.optional = DeviceVideoConstraints(); caps.video.mandatory!.deviceId = videoInputDevice; caps.video.mandatory!.width = 1920; caps.video.mandatory!.height = 1080; + // caps.video.optional!.width = 200; + // caps.video.optional!.height = 200; caps.video.mandatory!.fps = 30; try { var stream = await getUserMedia(caps); _mediaDevicesList = await enumerateDevices(); _tracks = stream; - await _localRenderer.setSrcObject( - _tracks!.firstWhere((track) => track.kind() == MediaKind.video)); + for (var i in _tracks!) { + print("W - ${await i.width()} H - ${await i.height()}"); + } + await _localRenderer.setSrcObject(_tracks!.firstWhere((track) { + return track.kind() == MediaKind.video; + })); } catch (e) { print(e.toString()); } diff --git a/example/lib/src/loopback.dart b/example/lib/src/loopback.dart index 89b204b279..0aedbdb32e 100644 --- a/example/lib/src/loopback.dart +++ b/example/lib/src/loopback.dart @@ -16,6 +16,7 @@ class Loopback extends StatefulWidget { class _LoopbackState extends State { List? _mediaDevicesList; List? _tracks; + List _Rtracks = List.empty(growable: true); PeerConnection? _pc1; PeerConnection? _pc2; @@ -70,8 +71,13 @@ class _LoopbackState extends State { try { _mediaDevicesList = await enumerateDevices(); _tracks = await getUserMedia(caps); - await _localRenderer.setSrcObject( - _tracks!.firstWhere((track) => track.kind() == MediaKind.video)); + + for (var i in _tracks!) { + print("LOCAL W - ${await i.width()} H - ${await i.height()}\n\n\n\n\n"); + } + + // await _localRenderer.setSrcObject( + // _tracks!.firstWhere((track) => track.kind() == MediaKind.video)); var server = IceServer(['stun:stun.l.google.com:19302']); _pc1 = await PeerConnection.create(IceTransportType.all, [server]); @@ -85,8 +91,13 @@ class _LoopbackState extends State { }); _pc2?.onTrack((track, trans) async { + print('CCCCCCCCCCCCCCccc ${track.id()}'); + _Rtracks.add(track); if (track.kind() == MediaKind.video) { await _remoteRenderer.setSrcObject(track); + print("object"); + print( + "\n\n\n\n REMOTE W - ${await track.width()} H - ${await track.height()} \n\n\n\n"); } }); @@ -96,9 +107,12 @@ class _LoopbackState extends State { var atrans = await _pc1?.addTransceiver( MediaKind.audio, RtpTransceiverInit(TransceiverDirection.sendOnly)); + print("object2"); + var offer = await _pc1?.createOffer(); await _pc1?.setLocalDescription(offer!); await _pc2?.setRemoteDescription(offer!); + print("object3"); var answer = await _pc2?.createAnswer(); await _pc2?.setLocalDescription(answer!); @@ -114,11 +128,20 @@ class _LoopbackState extends State { await _pc1?.addIceCandidate(candidate); }); + print("object4"); + await vtrans?.sender.replaceTrack( _tracks!.firstWhere((track) => track.kind() == MediaKind.video)); + print("object5"); await atrans?.sender.replaceTrack( _tracks!.firstWhere((track) => track.kind() == MediaKind.audio)); + + await Future.delayed(Duration(milliseconds: 100)); + for (var track in _Rtracks) { + print( + "\n\n\n OPA REMOTE W - ${await track.width()} H - ${await track.height()}\n\n\n"); + } } catch (e) { print(e.toString()); } @@ -142,6 +165,16 @@ class _LoopbackState extends State { await track.dispose(); } + _tracks!.clear(); + + for (var track in _Rtracks) { + print("REMOTE W - ${await track.width()} H - ${await track.height()}"); + await track.stop(); + await track.dispose(); + } + + _Rtracks.clear(); + await _pc1?.close(); await _pc2?.close(); diff --git a/lib/src/api/bridge.g.dart b/lib/src/api/bridge.g.dart index 3f505b4b20..3585742c13 100644 --- a/lib/src/api/bridge.g.dart +++ b/lib/src/api/bridge.g.dart @@ -2,14 +2,14 @@ // Generated by `flutter_rust_bridge`@ 1.81.0. // ignore_for_file: non_constant_identifier_names, unused_element, duplicate_ignore, directives_ordering, curly_braces_in_flow_control_structures, unnecessary_lambdas, slash_for_doc_comments, prefer_const_literals_to_create_immutables, implicit_dynamic_list_literal, duplicate_import, unused_import, unnecessary_import, prefer_single_quotes, prefer_const_constructors, use_super_parameters, always_use_package_imports, annotate_overrides, invalid_use_of_protected_member, constant_identifier_names, invalid_use_of_internal_member, prefer_is_empty, unnecessary_const -import 'dart:async'; import 'dart:convert'; -import 'dart:ffi' as ffi; - -import 'package:flutter_rust_bridge/flutter_rust_bridge.dart'; -import 'package:freezed_annotation/freezed_annotation.dart' hide protected; +import 'dart:async'; import 'package:meta/meta.dart'; +import 'package:flutter_rust_bridge/flutter_rust_bridge.dart'; import 'package:uuid/uuid.dart'; +import 'package:freezed_annotation/freezed_annotation.dart' hide protected; + +import 'dart:ffi' as ffi; part 'bridge.g.freezed.dart'; @@ -265,6 +265,16 @@ abstract class MedeaFlutterWebrtcNative { FlutterRustBridgeTaskConstMeta get kTrackStateConstMeta; + Future trackHieght( + {required String trackId, required MediaType kind, dynamic hint}); + + FlutterRustBridgeTaskConstMeta get kTrackHieghtConstMeta; + + Future trackWidth( + {required String trackId, required MediaType kind, dynamic hint}); + + FlutterRustBridgeTaskConstMeta get kTrackWidthConstMeta; + /// Changes the [enabled][1] property of the [`MediaStreamTrack`] by its ID and /// [`MediaType`]. /// @@ -2519,6 +2529,44 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { argNames: ["trackId", "kind"], ); + Future trackHieght( + {required String trackId, required MediaType kind, dynamic hint}) { + var arg0 = _platform.api2wire_String(trackId); + var arg1 = api2wire_media_type(kind); + return _platform.executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => _platform.inner.wire_track_hieght(port_, arg0, arg1), + parseSuccessData: _wire2api_opt_box_autoadd_i32, + constMeta: kTrackHieghtConstMeta, + argValues: [trackId, kind], + hint: hint, + )); + } + + FlutterRustBridgeTaskConstMeta get kTrackHieghtConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "track_hieght", + argNames: ["trackId", "kind"], + ); + + Future trackWidth( + {required String trackId, required MediaType kind, dynamic hint}) { + var arg0 = _platform.api2wire_String(trackId); + var arg1 = api2wire_media_type(kind); + return _platform.executeNormal(FlutterRustBridgeTask( + callFfi: (port_) => _platform.inner.wire_track_width(port_, arg0, arg1), + parseSuccessData: _wire2api_opt_box_autoadd_i32, + constMeta: kTrackWidthConstMeta, + argValues: [trackId, kind], + hint: hint, + )); + } + + FlutterRustBridgeTaskConstMeta get kTrackWidthConstMeta => + const FlutterRustBridgeTaskConstMeta( + debugName: "track_width", + argNames: ["trackId", "kind"], + ); + Future setTrackEnabled( {required String trackId, required MediaType kind, @@ -4283,6 +4331,44 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { late final _wire_track_state = _wire_track_statePtr .asFunction, int)>(); + void wire_track_hieght( + int port_, + ffi.Pointer track_id, + int kind, + ) { + return _wire_track_hieght( + port_, + track_id, + kind, + ); + } + + late final _wire_track_hieghtPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Int32)>>('wire_track_hieght'); + late final _wire_track_hieght = _wire_track_hieghtPtr + .asFunction, int)>(); + + void wire_track_width( + int port_, + ffi.Pointer track_id, + int kind, + ) { + return _wire_track_width( + port_, + track_id, + kind, + ); + } + + late final _wire_track_widthPtr = _lookup< + ffi.NativeFunction< + ffi.Void Function(ffi.Int64, ffi.Pointer, + ffi.Int32)>>('wire_track_width'); + late final _wire_track_width = _wire_track_widthPtr + .asFunction, int)>(); + void wire_set_track_enabled( int port_, ffi.Pointer track_id, diff --git a/lib/src/api/bridge.g.freezed.dart b/lib/src/api/bridge.g.freezed.dart index 294effbff5..ee0d5b9147 100644 --- a/lib/src/api/bridge.g.freezed.dart +++ b/lib/src/api/bridge.g.freezed.dart @@ -95,22 +95,22 @@ class _$GetMediaErrorCopyWithImpl<$Res, $Val extends GetMediaError> } /// @nodoc -abstract class _$$GetMediaError_AudioImplCopyWith<$Res> +abstract class _$$GetMediaError_AudioCopyWith<$Res> implements $GetMediaErrorCopyWith<$Res> { - factory _$$GetMediaError_AudioImplCopyWith(_$GetMediaError_AudioImpl value, - $Res Function(_$GetMediaError_AudioImpl) then) = - __$$GetMediaError_AudioImplCopyWithImpl<$Res>; + factory _$$GetMediaError_AudioCopyWith(_$GetMediaError_Audio value, + $Res Function(_$GetMediaError_Audio) then) = + __$$GetMediaError_AudioCopyWithImpl<$Res>; @override @useResult $Res call({String field0}); } /// @nodoc -class __$$GetMediaError_AudioImplCopyWithImpl<$Res> - extends _$GetMediaErrorCopyWithImpl<$Res, _$GetMediaError_AudioImpl> - implements _$$GetMediaError_AudioImplCopyWith<$Res> { - __$$GetMediaError_AudioImplCopyWithImpl(_$GetMediaError_AudioImpl _value, - $Res Function(_$GetMediaError_AudioImpl) _then) +class __$$GetMediaError_AudioCopyWithImpl<$Res> + extends _$GetMediaErrorCopyWithImpl<$Res, _$GetMediaError_Audio> + implements _$$GetMediaError_AudioCopyWith<$Res> { + __$$GetMediaError_AudioCopyWithImpl( + _$GetMediaError_Audio _value, $Res Function(_$GetMediaError_Audio) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -118,7 +118,7 @@ class __$$GetMediaError_AudioImplCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$GetMediaError_AudioImpl( + return _then(_$GetMediaError_Audio( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -129,8 +129,8 @@ class __$$GetMediaError_AudioImplCopyWithImpl<$Res> /// @nodoc -class _$GetMediaError_AudioImpl implements GetMediaError_Audio { - const _$GetMediaError_AudioImpl(this.field0); +class _$GetMediaError_Audio implements GetMediaError_Audio { + const _$GetMediaError_Audio(this.field0); @override final String field0; @@ -144,7 +144,7 @@ class _$GetMediaError_AudioImpl implements GetMediaError_Audio { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GetMediaError_AudioImpl && + other is _$GetMediaError_Audio && (identical(other.field0, field0) || other.field0 == field0)); } @@ -154,8 +154,8 @@ class _$GetMediaError_AudioImpl implements GetMediaError_Audio { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GetMediaError_AudioImplCopyWith<_$GetMediaError_AudioImpl> get copyWith => - __$$GetMediaError_AudioImplCopyWithImpl<_$GetMediaError_AudioImpl>( + _$$GetMediaError_AudioCopyWith<_$GetMediaError_Audio> get copyWith => + __$$GetMediaError_AudioCopyWithImpl<_$GetMediaError_Audio>( this, _$identity); @override @@ -223,33 +223,33 @@ class _$GetMediaError_AudioImpl implements GetMediaError_Audio { abstract class GetMediaError_Audio implements GetMediaError { const factory GetMediaError_Audio(final String field0) = - _$GetMediaError_AudioImpl; + _$GetMediaError_Audio; @override String get field0; @override @JsonKey(ignore: true) - _$$GetMediaError_AudioImplCopyWith<_$GetMediaError_AudioImpl> get copyWith => + _$$GetMediaError_AudioCopyWith<_$GetMediaError_Audio> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$GetMediaError_VideoImplCopyWith<$Res> +abstract class _$$GetMediaError_VideoCopyWith<$Res> implements $GetMediaErrorCopyWith<$Res> { - factory _$$GetMediaError_VideoImplCopyWith(_$GetMediaError_VideoImpl value, - $Res Function(_$GetMediaError_VideoImpl) then) = - __$$GetMediaError_VideoImplCopyWithImpl<$Res>; + factory _$$GetMediaError_VideoCopyWith(_$GetMediaError_Video value, + $Res Function(_$GetMediaError_Video) then) = + __$$GetMediaError_VideoCopyWithImpl<$Res>; @override @useResult $Res call({String field0}); } /// @nodoc -class __$$GetMediaError_VideoImplCopyWithImpl<$Res> - extends _$GetMediaErrorCopyWithImpl<$Res, _$GetMediaError_VideoImpl> - implements _$$GetMediaError_VideoImplCopyWith<$Res> { - __$$GetMediaError_VideoImplCopyWithImpl(_$GetMediaError_VideoImpl _value, - $Res Function(_$GetMediaError_VideoImpl) _then) +class __$$GetMediaError_VideoCopyWithImpl<$Res> + extends _$GetMediaErrorCopyWithImpl<$Res, _$GetMediaError_Video> + implements _$$GetMediaError_VideoCopyWith<$Res> { + __$$GetMediaError_VideoCopyWithImpl( + _$GetMediaError_Video _value, $Res Function(_$GetMediaError_Video) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -257,7 +257,7 @@ class __$$GetMediaError_VideoImplCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$GetMediaError_VideoImpl( + return _then(_$GetMediaError_Video( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -268,8 +268,8 @@ class __$$GetMediaError_VideoImplCopyWithImpl<$Res> /// @nodoc -class _$GetMediaError_VideoImpl implements GetMediaError_Video { - const _$GetMediaError_VideoImpl(this.field0); +class _$GetMediaError_Video implements GetMediaError_Video { + const _$GetMediaError_Video(this.field0); @override final String field0; @@ -283,7 +283,7 @@ class _$GetMediaError_VideoImpl implements GetMediaError_Video { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GetMediaError_VideoImpl && + other is _$GetMediaError_Video && (identical(other.field0, field0) || other.field0 == field0)); } @@ -293,8 +293,8 @@ class _$GetMediaError_VideoImpl implements GetMediaError_Video { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GetMediaError_VideoImplCopyWith<_$GetMediaError_VideoImpl> get copyWith => - __$$GetMediaError_VideoImplCopyWithImpl<_$GetMediaError_VideoImpl>( + _$$GetMediaError_VideoCopyWith<_$GetMediaError_Video> get copyWith => + __$$GetMediaError_VideoCopyWithImpl<_$GetMediaError_Video>( this, _$identity); @override @@ -362,13 +362,13 @@ class _$GetMediaError_VideoImpl implements GetMediaError_Video { abstract class GetMediaError_Video implements GetMediaError { const factory GetMediaError_Video(final String field0) = - _$GetMediaError_VideoImpl; + _$GetMediaError_Video; @override String get field0; @override @JsonKey(ignore: true) - _$$GetMediaError_VideoImplCopyWith<_$GetMediaError_VideoImpl> get copyWith => + _$$GetMediaError_VideoCopyWith<_$GetMediaError_Video> get copyWith => throw _privateConstructorUsedError; } @@ -434,20 +434,20 @@ class _$GetMediaResultCopyWithImpl<$Res, $Val extends GetMediaResult> } /// @nodoc -abstract class _$$GetMediaResult_OkImplCopyWith<$Res> { - factory _$$GetMediaResult_OkImplCopyWith(_$GetMediaResult_OkImpl value, - $Res Function(_$GetMediaResult_OkImpl) then) = - __$$GetMediaResult_OkImplCopyWithImpl<$Res>; +abstract class _$$GetMediaResult_OkCopyWith<$Res> { + factory _$$GetMediaResult_OkCopyWith( + _$GetMediaResult_Ok value, $Res Function(_$GetMediaResult_Ok) then) = + __$$GetMediaResult_OkCopyWithImpl<$Res>; @useResult $Res call({List field0}); } /// @nodoc -class __$$GetMediaResult_OkImplCopyWithImpl<$Res> - extends _$GetMediaResultCopyWithImpl<$Res, _$GetMediaResult_OkImpl> - implements _$$GetMediaResult_OkImplCopyWith<$Res> { - __$$GetMediaResult_OkImplCopyWithImpl(_$GetMediaResult_OkImpl _value, - $Res Function(_$GetMediaResult_OkImpl) _then) +class __$$GetMediaResult_OkCopyWithImpl<$Res> + extends _$GetMediaResultCopyWithImpl<$Res, _$GetMediaResult_Ok> + implements _$$GetMediaResult_OkCopyWith<$Res> { + __$$GetMediaResult_OkCopyWithImpl( + _$GetMediaResult_Ok _value, $Res Function(_$GetMediaResult_Ok) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -455,7 +455,7 @@ class __$$GetMediaResult_OkImplCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$GetMediaResult_OkImpl( + return _then(_$GetMediaResult_Ok( null == field0 ? _value._field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -466,8 +466,8 @@ class __$$GetMediaResult_OkImplCopyWithImpl<$Res> /// @nodoc -class _$GetMediaResult_OkImpl implements GetMediaResult_Ok { - const _$GetMediaResult_OkImpl(final List field0) +class _$GetMediaResult_Ok implements GetMediaResult_Ok { + const _$GetMediaResult_Ok(final List field0) : _field0 = field0; final List _field0; @@ -487,7 +487,7 @@ class _$GetMediaResult_OkImpl implements GetMediaResult_Ok { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GetMediaResult_OkImpl && + other is _$GetMediaResult_Ok && const DeepCollectionEquality().equals(other._field0, _field0)); } @@ -498,9 +498,8 @@ class _$GetMediaResult_OkImpl implements GetMediaResult_Ok { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GetMediaResult_OkImplCopyWith<_$GetMediaResult_OkImpl> get copyWith => - __$$GetMediaResult_OkImplCopyWithImpl<_$GetMediaResult_OkImpl>( - this, _$identity); + _$$GetMediaResult_OkCopyWith<_$GetMediaResult_Ok> get copyWith => + __$$GetMediaResult_OkCopyWithImpl<_$GetMediaResult_Ok>(this, _$identity); @override @optionalTypeArgs @@ -567,20 +566,20 @@ class _$GetMediaResult_OkImpl implements GetMediaResult_Ok { abstract class GetMediaResult_Ok implements GetMediaResult { const factory GetMediaResult_Ok(final List field0) = - _$GetMediaResult_OkImpl; + _$GetMediaResult_Ok; @override List get field0; @JsonKey(ignore: true) - _$$GetMediaResult_OkImplCopyWith<_$GetMediaResult_OkImpl> get copyWith => + _$$GetMediaResult_OkCopyWith<_$GetMediaResult_Ok> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$GetMediaResult_ErrImplCopyWith<$Res> { - factory _$$GetMediaResult_ErrImplCopyWith(_$GetMediaResult_ErrImpl value, - $Res Function(_$GetMediaResult_ErrImpl) then) = - __$$GetMediaResult_ErrImplCopyWithImpl<$Res>; +abstract class _$$GetMediaResult_ErrCopyWith<$Res> { + factory _$$GetMediaResult_ErrCopyWith(_$GetMediaResult_Err value, + $Res Function(_$GetMediaResult_Err) then) = + __$$GetMediaResult_ErrCopyWithImpl<$Res>; @useResult $Res call({GetMediaError field0}); @@ -588,11 +587,11 @@ abstract class _$$GetMediaResult_ErrImplCopyWith<$Res> { } /// @nodoc -class __$$GetMediaResult_ErrImplCopyWithImpl<$Res> - extends _$GetMediaResultCopyWithImpl<$Res, _$GetMediaResult_ErrImpl> - implements _$$GetMediaResult_ErrImplCopyWith<$Res> { - __$$GetMediaResult_ErrImplCopyWithImpl(_$GetMediaResult_ErrImpl _value, - $Res Function(_$GetMediaResult_ErrImpl) _then) +class __$$GetMediaResult_ErrCopyWithImpl<$Res> + extends _$GetMediaResultCopyWithImpl<$Res, _$GetMediaResult_Err> + implements _$$GetMediaResult_ErrCopyWith<$Res> { + __$$GetMediaResult_ErrCopyWithImpl( + _$GetMediaResult_Err _value, $Res Function(_$GetMediaResult_Err) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -600,7 +599,7 @@ class __$$GetMediaResult_ErrImplCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$GetMediaResult_ErrImpl( + return _then(_$GetMediaResult_Err( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -619,8 +618,8 @@ class __$$GetMediaResult_ErrImplCopyWithImpl<$Res> /// @nodoc -class _$GetMediaResult_ErrImpl implements GetMediaResult_Err { - const _$GetMediaResult_ErrImpl(this.field0); +class _$GetMediaResult_Err implements GetMediaResult_Err { + const _$GetMediaResult_Err(this.field0); @override final GetMediaError field0; @@ -634,7 +633,7 @@ class _$GetMediaResult_ErrImpl implements GetMediaResult_Err { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GetMediaResult_ErrImpl && + other is _$GetMediaResult_Err && (identical(other.field0, field0) || other.field0 == field0)); } @@ -644,8 +643,8 @@ class _$GetMediaResult_ErrImpl implements GetMediaResult_Err { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GetMediaResult_ErrImplCopyWith<_$GetMediaResult_ErrImpl> get copyWith => - __$$GetMediaResult_ErrImplCopyWithImpl<_$GetMediaResult_ErrImpl>( + _$$GetMediaResult_ErrCopyWith<_$GetMediaResult_Err> get copyWith => + __$$GetMediaResult_ErrCopyWithImpl<_$GetMediaResult_Err>( this, _$identity); @override @@ -713,12 +712,12 @@ class _$GetMediaResult_ErrImpl implements GetMediaResult_Err { abstract class GetMediaResult_Err implements GetMediaResult { const factory GetMediaResult_Err(final GetMediaError field0) = - _$GetMediaResult_ErrImpl; + _$GetMediaResult_Err; @override GetMediaError get field0; @JsonKey(ignore: true) - _$$GetMediaResult_ErrImplCopyWith<_$GetMediaResult_ErrImpl> get copyWith => + _$$GetMediaResult_ErrCopyWith<_$GetMediaResult_Err> get copyWith => throw _privateConstructorUsedError; } @@ -857,23 +856,23 @@ class _$PeerConnectionEventCopyWithImpl<$Res, $Val extends PeerConnectionEvent> } /// @nodoc -abstract class _$$PeerConnectionEvent_PeerCreatedImplCopyWith<$Res> { - factory _$$PeerConnectionEvent_PeerCreatedImplCopyWith( - _$PeerConnectionEvent_PeerCreatedImpl value, - $Res Function(_$PeerConnectionEvent_PeerCreatedImpl) then) = - __$$PeerConnectionEvent_PeerCreatedImplCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_PeerCreatedCopyWith<$Res> { + factory _$$PeerConnectionEvent_PeerCreatedCopyWith( + _$PeerConnectionEvent_PeerCreated value, + $Res Function(_$PeerConnectionEvent_PeerCreated) then) = + __$$PeerConnectionEvent_PeerCreatedCopyWithImpl<$Res>; @useResult $Res call({ArcPeerConnection peer}); } /// @nodoc -class __$$PeerConnectionEvent_PeerCreatedImplCopyWithImpl<$Res> +class __$$PeerConnectionEvent_PeerCreatedCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_PeerCreatedImpl> - implements _$$PeerConnectionEvent_PeerCreatedImplCopyWith<$Res> { - __$$PeerConnectionEvent_PeerCreatedImplCopyWithImpl( - _$PeerConnectionEvent_PeerCreatedImpl _value, - $Res Function(_$PeerConnectionEvent_PeerCreatedImpl) _then) + _$PeerConnectionEvent_PeerCreated> + implements _$$PeerConnectionEvent_PeerCreatedCopyWith<$Res> { + __$$PeerConnectionEvent_PeerCreatedCopyWithImpl( + _$PeerConnectionEvent_PeerCreated _value, + $Res Function(_$PeerConnectionEvent_PeerCreated) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -881,7 +880,7 @@ class __$$PeerConnectionEvent_PeerCreatedImplCopyWithImpl<$Res> $Res call({ Object? peer = null, }) { - return _then(_$PeerConnectionEvent_PeerCreatedImpl( + return _then(_$PeerConnectionEvent_PeerCreated( peer: null == peer ? _value.peer : peer // ignore: cast_nullable_to_non_nullable @@ -892,9 +891,9 @@ class __$$PeerConnectionEvent_PeerCreatedImplCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_PeerCreatedImpl +class _$PeerConnectionEvent_PeerCreated implements PeerConnectionEvent_PeerCreated { - const _$PeerConnectionEvent_PeerCreatedImpl({required this.peer}); + const _$PeerConnectionEvent_PeerCreated({required this.peer}); /// Rust side [`PeerConnection`]. @override @@ -909,7 +908,7 @@ class _$PeerConnectionEvent_PeerCreatedImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_PeerCreatedImpl && + other is _$PeerConnectionEvent_PeerCreated && (identical(other.peer, peer) || other.peer == peer)); } @@ -919,10 +918,9 @@ class _$PeerConnectionEvent_PeerCreatedImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_PeerCreatedImplCopyWith< - _$PeerConnectionEvent_PeerCreatedImpl> - get copyWith => __$$PeerConnectionEvent_PeerCreatedImplCopyWithImpl< - _$PeerConnectionEvent_PeerCreatedImpl>(this, _$identity); + _$$PeerConnectionEvent_PeerCreatedCopyWith<_$PeerConnectionEvent_PeerCreated> + get copyWith => __$$PeerConnectionEvent_PeerCreatedCopyWithImpl< + _$PeerConnectionEvent_PeerCreated>(this, _$identity); @override @optionalTypeArgs @@ -1064,34 +1062,33 @@ class _$PeerConnectionEvent_PeerCreatedImpl abstract class PeerConnectionEvent_PeerCreated implements PeerConnectionEvent { const factory PeerConnectionEvent_PeerCreated( {required final ArcPeerConnection peer}) = - _$PeerConnectionEvent_PeerCreatedImpl; + _$PeerConnectionEvent_PeerCreated; /// Rust side [`PeerConnection`]. ArcPeerConnection get peer; @JsonKey(ignore: true) - _$$PeerConnectionEvent_PeerCreatedImplCopyWith< - _$PeerConnectionEvent_PeerCreatedImpl> + _$$PeerConnectionEvent_PeerCreatedCopyWith<_$PeerConnectionEvent_PeerCreated> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_IceCandidateImplCopyWith<$Res> { - factory _$$PeerConnectionEvent_IceCandidateImplCopyWith( - _$PeerConnectionEvent_IceCandidateImpl value, - $Res Function(_$PeerConnectionEvent_IceCandidateImpl) then) = - __$$PeerConnectionEvent_IceCandidateImplCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_IceCandidateCopyWith<$Res> { + factory _$$PeerConnectionEvent_IceCandidateCopyWith( + _$PeerConnectionEvent_IceCandidate value, + $Res Function(_$PeerConnectionEvent_IceCandidate) then) = + __$$PeerConnectionEvent_IceCandidateCopyWithImpl<$Res>; @useResult $Res call({String sdpMid, int sdpMlineIndex, String candidate}); } /// @nodoc -class __$$PeerConnectionEvent_IceCandidateImplCopyWithImpl<$Res> +class __$$PeerConnectionEvent_IceCandidateCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_IceCandidateImpl> - implements _$$PeerConnectionEvent_IceCandidateImplCopyWith<$Res> { - __$$PeerConnectionEvent_IceCandidateImplCopyWithImpl( - _$PeerConnectionEvent_IceCandidateImpl _value, - $Res Function(_$PeerConnectionEvent_IceCandidateImpl) _then) + _$PeerConnectionEvent_IceCandidate> + implements _$$PeerConnectionEvent_IceCandidateCopyWith<$Res> { + __$$PeerConnectionEvent_IceCandidateCopyWithImpl( + _$PeerConnectionEvent_IceCandidate _value, + $Res Function(_$PeerConnectionEvent_IceCandidate) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1101,7 +1098,7 @@ class __$$PeerConnectionEvent_IceCandidateImplCopyWithImpl<$Res> Object? sdpMlineIndex = null, Object? candidate = null, }) { - return _then(_$PeerConnectionEvent_IceCandidateImpl( + return _then(_$PeerConnectionEvent_IceCandidate( sdpMid: null == sdpMid ? _value.sdpMid : sdpMid // ignore: cast_nullable_to_non_nullable @@ -1120,9 +1117,9 @@ class __$$PeerConnectionEvent_IceCandidateImplCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_IceCandidateImpl +class _$PeerConnectionEvent_IceCandidate implements PeerConnectionEvent_IceCandidate { - const _$PeerConnectionEvent_IceCandidateImpl( + const _$PeerConnectionEvent_IceCandidate( {required this.sdpMid, required this.sdpMlineIndex, required this.candidate}); @@ -1163,7 +1160,7 @@ class _$PeerConnectionEvent_IceCandidateImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_IceCandidateImpl && + other is _$PeerConnectionEvent_IceCandidate && (identical(other.sdpMid, sdpMid) || other.sdpMid == sdpMid) && (identical(other.sdpMlineIndex, sdpMlineIndex) || other.sdpMlineIndex == sdpMlineIndex) && @@ -1178,10 +1175,10 @@ class _$PeerConnectionEvent_IceCandidateImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_IceCandidateImplCopyWith< - _$PeerConnectionEvent_IceCandidateImpl> - get copyWith => __$$PeerConnectionEvent_IceCandidateImplCopyWithImpl< - _$PeerConnectionEvent_IceCandidateImpl>(this, _$identity); + _$$PeerConnectionEvent_IceCandidateCopyWith< + _$PeerConnectionEvent_IceCandidate> + get copyWith => __$$PeerConnectionEvent_IceCandidateCopyWithImpl< + _$PeerConnectionEvent_IceCandidate>(this, _$identity); @override @optionalTypeArgs @@ -1322,10 +1319,9 @@ class _$PeerConnectionEvent_IceCandidateImpl abstract class PeerConnectionEvent_IceCandidate implements PeerConnectionEvent { const factory PeerConnectionEvent_IceCandidate( - {required final String sdpMid, - required final int sdpMlineIndex, - required final String candidate}) = - _$PeerConnectionEvent_IceCandidateImpl; + {required final String sdpMid, + required final int sdpMlineIndex, + required final String candidate}) = _$PeerConnectionEvent_IceCandidate; /// Media stream "identification-tag" defined in [RFC 5888] for the /// media component the discovered [RTCIceCandidate][1] is associated @@ -1351,32 +1347,29 @@ abstract class PeerConnectionEvent_IceCandidate implements PeerConnectionEvent { /// [RFC 5245]: https://tools.ietf.org/html/rfc5245 String get candidate; @JsonKey(ignore: true) - _$$PeerConnectionEvent_IceCandidateImplCopyWith< - _$PeerConnectionEvent_IceCandidateImpl> + _$$PeerConnectionEvent_IceCandidateCopyWith< + _$PeerConnectionEvent_IceCandidate> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWith< - $Res> { - factory _$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWith( - _$PeerConnectionEvent_IceGatheringStateChangeImpl value, - $Res Function(_$PeerConnectionEvent_IceGatheringStateChangeImpl) - then) = - __$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_IceGatheringStateChangeCopyWith<$Res> { + factory _$$PeerConnectionEvent_IceGatheringStateChangeCopyWith( + _$PeerConnectionEvent_IceGatheringStateChange value, + $Res Function(_$PeerConnectionEvent_IceGatheringStateChange) then) = + __$$PeerConnectionEvent_IceGatheringStateChangeCopyWithImpl<$Res>; @useResult $Res call({IceGatheringState field0}); } /// @nodoc -class __$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWithImpl<$Res> +class __$$PeerConnectionEvent_IceGatheringStateChangeCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_IceGatheringStateChangeImpl> - implements - _$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWith<$Res> { - __$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWithImpl( - _$PeerConnectionEvent_IceGatheringStateChangeImpl _value, - $Res Function(_$PeerConnectionEvent_IceGatheringStateChangeImpl) _then) + _$PeerConnectionEvent_IceGatheringStateChange> + implements _$$PeerConnectionEvent_IceGatheringStateChangeCopyWith<$Res> { + __$$PeerConnectionEvent_IceGatheringStateChangeCopyWithImpl( + _$PeerConnectionEvent_IceGatheringStateChange _value, + $Res Function(_$PeerConnectionEvent_IceGatheringStateChange) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1384,7 +1377,7 @@ class __$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$PeerConnectionEvent_IceGatheringStateChangeImpl( + return _then(_$PeerConnectionEvent_IceGatheringStateChange( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -1395,9 +1388,9 @@ class __$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_IceGatheringStateChangeImpl +class _$PeerConnectionEvent_IceGatheringStateChange implements PeerConnectionEvent_IceGatheringStateChange { - const _$PeerConnectionEvent_IceGatheringStateChangeImpl(this.field0); + const _$PeerConnectionEvent_IceGatheringStateChange(this.field0); @override final IceGatheringState field0; @@ -1411,7 +1404,7 @@ class _$PeerConnectionEvent_IceGatheringStateChangeImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_IceGatheringStateChangeImpl && + other is _$PeerConnectionEvent_IceGatheringStateChange && (identical(other.field0, field0) || other.field0 == field0)); } @@ -1421,12 +1414,11 @@ class _$PeerConnectionEvent_IceGatheringStateChangeImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWith< - _$PeerConnectionEvent_IceGatheringStateChangeImpl> + _$$PeerConnectionEvent_IceGatheringStateChangeCopyWith< + _$PeerConnectionEvent_IceGatheringStateChange> get copyWith => - __$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWithImpl< - _$PeerConnectionEvent_IceGatheringStateChangeImpl>( - this, _$identity); + __$$PeerConnectionEvent_IceGatheringStateChangeCopyWithImpl< + _$PeerConnectionEvent_IceGatheringStateChange>(this, _$identity); @override @optionalTypeArgs @@ -1569,34 +1561,34 @@ abstract class PeerConnectionEvent_IceGatheringStateChange implements PeerConnectionEvent { const factory PeerConnectionEvent_IceGatheringStateChange( final IceGatheringState field0) = - _$PeerConnectionEvent_IceGatheringStateChangeImpl; + _$PeerConnectionEvent_IceGatheringStateChange; IceGatheringState get field0; @JsonKey(ignore: true) - _$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWith< - _$PeerConnectionEvent_IceGatheringStateChangeImpl> + _$$PeerConnectionEvent_IceGatheringStateChangeCopyWith< + _$PeerConnectionEvent_IceGatheringStateChange> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_IceCandidateErrorImplCopyWith<$Res> { - factory _$$PeerConnectionEvent_IceCandidateErrorImplCopyWith( - _$PeerConnectionEvent_IceCandidateErrorImpl value, - $Res Function(_$PeerConnectionEvent_IceCandidateErrorImpl) then) = - __$$PeerConnectionEvent_IceCandidateErrorImplCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_IceCandidateErrorCopyWith<$Res> { + factory _$$PeerConnectionEvent_IceCandidateErrorCopyWith( + _$PeerConnectionEvent_IceCandidateError value, + $Res Function(_$PeerConnectionEvent_IceCandidateError) then) = + __$$PeerConnectionEvent_IceCandidateErrorCopyWithImpl<$Res>; @useResult $Res call( {String address, int port, String url, int errorCode, String errorText}); } /// @nodoc -class __$$PeerConnectionEvent_IceCandidateErrorImplCopyWithImpl<$Res> +class __$$PeerConnectionEvent_IceCandidateErrorCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_IceCandidateErrorImpl> - implements _$$PeerConnectionEvent_IceCandidateErrorImplCopyWith<$Res> { - __$$PeerConnectionEvent_IceCandidateErrorImplCopyWithImpl( - _$PeerConnectionEvent_IceCandidateErrorImpl _value, - $Res Function(_$PeerConnectionEvent_IceCandidateErrorImpl) _then) + _$PeerConnectionEvent_IceCandidateError> + implements _$$PeerConnectionEvent_IceCandidateErrorCopyWith<$Res> { + __$$PeerConnectionEvent_IceCandidateErrorCopyWithImpl( + _$PeerConnectionEvent_IceCandidateError _value, + $Res Function(_$PeerConnectionEvent_IceCandidateError) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1608,7 +1600,7 @@ class __$$PeerConnectionEvent_IceCandidateErrorImplCopyWithImpl<$Res> Object? errorCode = null, Object? errorText = null, }) { - return _then(_$PeerConnectionEvent_IceCandidateErrorImpl( + return _then(_$PeerConnectionEvent_IceCandidateError( address: null == address ? _value.address : address // ignore: cast_nullable_to_non_nullable @@ -1635,9 +1627,9 @@ class __$$PeerConnectionEvent_IceCandidateErrorImplCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_IceCandidateErrorImpl +class _$PeerConnectionEvent_IceCandidateError implements PeerConnectionEvent_IceCandidateError { - const _$PeerConnectionEvent_IceCandidateErrorImpl( + const _$PeerConnectionEvent_IceCandidateError( {required this.address, required this.port, required this.url, @@ -1686,7 +1678,7 @@ class _$PeerConnectionEvent_IceCandidateErrorImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_IceCandidateErrorImpl && + other is _$PeerConnectionEvent_IceCandidateError && (identical(other.address, address) || other.address == address) && (identical(other.port, port) || other.port == port) && (identical(other.url, url) || other.url == url) && @@ -1703,10 +1695,10 @@ class _$PeerConnectionEvent_IceCandidateErrorImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_IceCandidateErrorImplCopyWith< - _$PeerConnectionEvent_IceCandidateErrorImpl> - get copyWith => __$$PeerConnectionEvent_IceCandidateErrorImplCopyWithImpl< - _$PeerConnectionEvent_IceCandidateErrorImpl>(this, _$identity); + _$$PeerConnectionEvent_IceCandidateErrorCopyWith< + _$PeerConnectionEvent_IceCandidateError> + get copyWith => __$$PeerConnectionEvent_IceCandidateErrorCopyWithImpl< + _$PeerConnectionEvent_IceCandidateError>(this, _$identity); @override @optionalTypeArgs @@ -1853,7 +1845,7 @@ abstract class PeerConnectionEvent_IceCandidateError required final String url, required final int errorCode, required final String errorText}) = - _$PeerConnectionEvent_IceCandidateErrorImpl; + _$PeerConnectionEvent_IceCandidateError; /// Local IP address used to communicate with the STUN or TURN server. String get address; @@ -1883,35 +1875,35 @@ abstract class PeerConnectionEvent_IceCandidateError /// [1]: https://tinyurl.com/stun-parameters-6 String get errorText; @JsonKey(ignore: true) - _$$PeerConnectionEvent_IceCandidateErrorImplCopyWith< - _$PeerConnectionEvent_IceCandidateErrorImpl> + _$$PeerConnectionEvent_IceCandidateErrorCopyWith< + _$PeerConnectionEvent_IceCandidateError> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_NegotiationNeededImplCopyWith<$Res> { - factory _$$PeerConnectionEvent_NegotiationNeededImplCopyWith( - _$PeerConnectionEvent_NegotiationNeededImpl value, - $Res Function(_$PeerConnectionEvent_NegotiationNeededImpl) then) = - __$$PeerConnectionEvent_NegotiationNeededImplCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_NegotiationNeededCopyWith<$Res> { + factory _$$PeerConnectionEvent_NegotiationNeededCopyWith( + _$PeerConnectionEvent_NegotiationNeeded value, + $Res Function(_$PeerConnectionEvent_NegotiationNeeded) then) = + __$$PeerConnectionEvent_NegotiationNeededCopyWithImpl<$Res>; } /// @nodoc -class __$$PeerConnectionEvent_NegotiationNeededImplCopyWithImpl<$Res> +class __$$PeerConnectionEvent_NegotiationNeededCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_NegotiationNeededImpl> - implements _$$PeerConnectionEvent_NegotiationNeededImplCopyWith<$Res> { - __$$PeerConnectionEvent_NegotiationNeededImplCopyWithImpl( - _$PeerConnectionEvent_NegotiationNeededImpl _value, - $Res Function(_$PeerConnectionEvent_NegotiationNeededImpl) _then) + _$PeerConnectionEvent_NegotiationNeeded> + implements _$$PeerConnectionEvent_NegotiationNeededCopyWith<$Res> { + __$$PeerConnectionEvent_NegotiationNeededCopyWithImpl( + _$PeerConnectionEvent_NegotiationNeeded _value, + $Res Function(_$PeerConnectionEvent_NegotiationNeeded) _then) : super(_value, _then); } /// @nodoc -class _$PeerConnectionEvent_NegotiationNeededImpl +class _$PeerConnectionEvent_NegotiationNeeded implements PeerConnectionEvent_NegotiationNeeded { - const _$PeerConnectionEvent_NegotiationNeededImpl(); + const _$PeerConnectionEvent_NegotiationNeeded(); @override String toString() { @@ -1922,7 +1914,7 @@ class _$PeerConnectionEvent_NegotiationNeededImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_NegotiationNeededImpl); + other is _$PeerConnectionEvent_NegotiationNeeded); } @override @@ -2068,27 +2060,27 @@ class _$PeerConnectionEvent_NegotiationNeededImpl abstract class PeerConnectionEvent_NegotiationNeeded implements PeerConnectionEvent { const factory PeerConnectionEvent_NegotiationNeeded() = - _$PeerConnectionEvent_NegotiationNeededImpl; + _$PeerConnectionEvent_NegotiationNeeded; } /// @nodoc -abstract class _$$PeerConnectionEvent_SignallingChangeImplCopyWith<$Res> { - factory _$$PeerConnectionEvent_SignallingChangeImplCopyWith( - _$PeerConnectionEvent_SignallingChangeImpl value, - $Res Function(_$PeerConnectionEvent_SignallingChangeImpl) then) = - __$$PeerConnectionEvent_SignallingChangeImplCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_SignallingChangeCopyWith<$Res> { + factory _$$PeerConnectionEvent_SignallingChangeCopyWith( + _$PeerConnectionEvent_SignallingChange value, + $Res Function(_$PeerConnectionEvent_SignallingChange) then) = + __$$PeerConnectionEvent_SignallingChangeCopyWithImpl<$Res>; @useResult $Res call({SignalingState field0}); } /// @nodoc -class __$$PeerConnectionEvent_SignallingChangeImplCopyWithImpl<$Res> +class __$$PeerConnectionEvent_SignallingChangeCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_SignallingChangeImpl> - implements _$$PeerConnectionEvent_SignallingChangeImplCopyWith<$Res> { - __$$PeerConnectionEvent_SignallingChangeImplCopyWithImpl( - _$PeerConnectionEvent_SignallingChangeImpl _value, - $Res Function(_$PeerConnectionEvent_SignallingChangeImpl) _then) + _$PeerConnectionEvent_SignallingChange> + implements _$$PeerConnectionEvent_SignallingChangeCopyWith<$Res> { + __$$PeerConnectionEvent_SignallingChangeCopyWithImpl( + _$PeerConnectionEvent_SignallingChange _value, + $Res Function(_$PeerConnectionEvent_SignallingChange) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -2096,7 +2088,7 @@ class __$$PeerConnectionEvent_SignallingChangeImplCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$PeerConnectionEvent_SignallingChangeImpl( + return _then(_$PeerConnectionEvent_SignallingChange( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -2107,9 +2099,9 @@ class __$$PeerConnectionEvent_SignallingChangeImplCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_SignallingChangeImpl +class _$PeerConnectionEvent_SignallingChange implements PeerConnectionEvent_SignallingChange { - const _$PeerConnectionEvent_SignallingChangeImpl(this.field0); + const _$PeerConnectionEvent_SignallingChange(this.field0); @override final SignalingState field0; @@ -2123,7 +2115,7 @@ class _$PeerConnectionEvent_SignallingChangeImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_SignallingChangeImpl && + other is _$PeerConnectionEvent_SignallingChange && (identical(other.field0, field0) || other.field0 == field0)); } @@ -2133,10 +2125,10 @@ class _$PeerConnectionEvent_SignallingChangeImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_SignallingChangeImplCopyWith< - _$PeerConnectionEvent_SignallingChangeImpl> - get copyWith => __$$PeerConnectionEvent_SignallingChangeImplCopyWithImpl< - _$PeerConnectionEvent_SignallingChangeImpl>(this, _$identity); + _$$PeerConnectionEvent_SignallingChangeCopyWith< + _$PeerConnectionEvent_SignallingChange> + get copyWith => __$$PeerConnectionEvent_SignallingChangeCopyWithImpl< + _$PeerConnectionEvent_SignallingChange>(this, _$identity); @override @optionalTypeArgs @@ -2278,36 +2270,33 @@ class _$PeerConnectionEvent_SignallingChangeImpl abstract class PeerConnectionEvent_SignallingChange implements PeerConnectionEvent { const factory PeerConnectionEvent_SignallingChange( - final SignalingState field0) = _$PeerConnectionEvent_SignallingChangeImpl; + final SignalingState field0) = _$PeerConnectionEvent_SignallingChange; SignalingState get field0; @JsonKey(ignore: true) - _$$PeerConnectionEvent_SignallingChangeImplCopyWith< - _$PeerConnectionEvent_SignallingChangeImpl> + _$$PeerConnectionEvent_SignallingChangeCopyWith< + _$PeerConnectionEvent_SignallingChange> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWith< - $Res> { - factory _$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWith( - _$PeerConnectionEvent_IceConnectionStateChangeImpl value, - $Res Function(_$PeerConnectionEvent_IceConnectionStateChangeImpl) - then) = - __$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_IceConnectionStateChangeCopyWith<$Res> { + factory _$$PeerConnectionEvent_IceConnectionStateChangeCopyWith( + _$PeerConnectionEvent_IceConnectionStateChange value, + $Res Function(_$PeerConnectionEvent_IceConnectionStateChange) then) = + __$$PeerConnectionEvent_IceConnectionStateChangeCopyWithImpl<$Res>; @useResult $Res call({IceConnectionState field0}); } /// @nodoc -class __$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWithImpl<$Res> +class __$$PeerConnectionEvent_IceConnectionStateChangeCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_IceConnectionStateChangeImpl> - implements - _$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWith<$Res> { - __$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWithImpl( - _$PeerConnectionEvent_IceConnectionStateChangeImpl _value, - $Res Function(_$PeerConnectionEvent_IceConnectionStateChangeImpl) _then) + _$PeerConnectionEvent_IceConnectionStateChange> + implements _$$PeerConnectionEvent_IceConnectionStateChangeCopyWith<$Res> { + __$$PeerConnectionEvent_IceConnectionStateChangeCopyWithImpl( + _$PeerConnectionEvent_IceConnectionStateChange _value, + $Res Function(_$PeerConnectionEvent_IceConnectionStateChange) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -2315,7 +2304,7 @@ class __$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$PeerConnectionEvent_IceConnectionStateChangeImpl( + return _then(_$PeerConnectionEvent_IceConnectionStateChange( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -2326,9 +2315,9 @@ class __$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_IceConnectionStateChangeImpl +class _$PeerConnectionEvent_IceConnectionStateChange implements PeerConnectionEvent_IceConnectionStateChange { - const _$PeerConnectionEvent_IceConnectionStateChangeImpl(this.field0); + const _$PeerConnectionEvent_IceConnectionStateChange(this.field0); @override final IceConnectionState field0; @@ -2342,7 +2331,7 @@ class _$PeerConnectionEvent_IceConnectionStateChangeImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_IceConnectionStateChangeImpl && + other is _$PeerConnectionEvent_IceConnectionStateChange && (identical(other.field0, field0) || other.field0 == field0)); } @@ -2352,12 +2341,11 @@ class _$PeerConnectionEvent_IceConnectionStateChangeImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWith< - _$PeerConnectionEvent_IceConnectionStateChangeImpl> + _$$PeerConnectionEvent_IceConnectionStateChangeCopyWith< + _$PeerConnectionEvent_IceConnectionStateChange> get copyWith => - __$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWithImpl< - _$PeerConnectionEvent_IceConnectionStateChangeImpl>( - this, _$identity); + __$$PeerConnectionEvent_IceConnectionStateChangeCopyWithImpl< + _$PeerConnectionEvent_IceConnectionStateChange>(this, _$identity); @override @optionalTypeArgs @@ -2500,33 +2488,33 @@ abstract class PeerConnectionEvent_IceConnectionStateChange implements PeerConnectionEvent { const factory PeerConnectionEvent_IceConnectionStateChange( final IceConnectionState field0) = - _$PeerConnectionEvent_IceConnectionStateChangeImpl; + _$PeerConnectionEvent_IceConnectionStateChange; IceConnectionState get field0; @JsonKey(ignore: true) - _$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWith< - _$PeerConnectionEvent_IceConnectionStateChangeImpl> + _$$PeerConnectionEvent_IceConnectionStateChangeCopyWith< + _$PeerConnectionEvent_IceConnectionStateChange> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_ConnectionStateChangeImplCopyWith<$Res> { - factory _$$PeerConnectionEvent_ConnectionStateChangeImplCopyWith( - _$PeerConnectionEvent_ConnectionStateChangeImpl value, - $Res Function(_$PeerConnectionEvent_ConnectionStateChangeImpl) then) = - __$$PeerConnectionEvent_ConnectionStateChangeImplCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_ConnectionStateChangeCopyWith<$Res> { + factory _$$PeerConnectionEvent_ConnectionStateChangeCopyWith( + _$PeerConnectionEvent_ConnectionStateChange value, + $Res Function(_$PeerConnectionEvent_ConnectionStateChange) then) = + __$$PeerConnectionEvent_ConnectionStateChangeCopyWithImpl<$Res>; @useResult $Res call({PeerConnectionState field0}); } /// @nodoc -class __$$PeerConnectionEvent_ConnectionStateChangeImplCopyWithImpl<$Res> +class __$$PeerConnectionEvent_ConnectionStateChangeCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_ConnectionStateChangeImpl> - implements _$$PeerConnectionEvent_ConnectionStateChangeImplCopyWith<$Res> { - __$$PeerConnectionEvent_ConnectionStateChangeImplCopyWithImpl( - _$PeerConnectionEvent_ConnectionStateChangeImpl _value, - $Res Function(_$PeerConnectionEvent_ConnectionStateChangeImpl) _then) + _$PeerConnectionEvent_ConnectionStateChange> + implements _$$PeerConnectionEvent_ConnectionStateChangeCopyWith<$Res> { + __$$PeerConnectionEvent_ConnectionStateChangeCopyWithImpl( + _$PeerConnectionEvent_ConnectionStateChange _value, + $Res Function(_$PeerConnectionEvent_ConnectionStateChange) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -2534,7 +2522,7 @@ class __$$PeerConnectionEvent_ConnectionStateChangeImplCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$PeerConnectionEvent_ConnectionStateChangeImpl( + return _then(_$PeerConnectionEvent_ConnectionStateChange( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -2545,9 +2533,9 @@ class __$$PeerConnectionEvent_ConnectionStateChangeImplCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_ConnectionStateChangeImpl +class _$PeerConnectionEvent_ConnectionStateChange implements PeerConnectionEvent_ConnectionStateChange { - const _$PeerConnectionEvent_ConnectionStateChangeImpl(this.field0); + const _$PeerConnectionEvent_ConnectionStateChange(this.field0); @override final PeerConnectionState field0; @@ -2561,7 +2549,7 @@ class _$PeerConnectionEvent_ConnectionStateChangeImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_ConnectionStateChangeImpl && + other is _$PeerConnectionEvent_ConnectionStateChange && (identical(other.field0, field0) || other.field0 == field0)); } @@ -2571,12 +2559,10 @@ class _$PeerConnectionEvent_ConnectionStateChangeImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_ConnectionStateChangeImplCopyWith< - _$PeerConnectionEvent_ConnectionStateChangeImpl> - get copyWith => - __$$PeerConnectionEvent_ConnectionStateChangeImplCopyWithImpl< - _$PeerConnectionEvent_ConnectionStateChangeImpl>( - this, _$identity); + _$$PeerConnectionEvent_ConnectionStateChangeCopyWith< + _$PeerConnectionEvent_ConnectionStateChange> + get copyWith => __$$PeerConnectionEvent_ConnectionStateChangeCopyWithImpl< + _$PeerConnectionEvent_ConnectionStateChange>(this, _$identity); @override @optionalTypeArgs @@ -2719,33 +2705,31 @@ abstract class PeerConnectionEvent_ConnectionStateChange implements PeerConnectionEvent { const factory PeerConnectionEvent_ConnectionStateChange( final PeerConnectionState field0) = - _$PeerConnectionEvent_ConnectionStateChangeImpl; + _$PeerConnectionEvent_ConnectionStateChange; PeerConnectionState get field0; @JsonKey(ignore: true) - _$$PeerConnectionEvent_ConnectionStateChangeImplCopyWith< - _$PeerConnectionEvent_ConnectionStateChangeImpl> + _$$PeerConnectionEvent_ConnectionStateChangeCopyWith< + _$PeerConnectionEvent_ConnectionStateChange> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_TrackImplCopyWith<$Res> { - factory _$$PeerConnectionEvent_TrackImplCopyWith( - _$PeerConnectionEvent_TrackImpl value, - $Res Function(_$PeerConnectionEvent_TrackImpl) then) = - __$$PeerConnectionEvent_TrackImplCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_TrackCopyWith<$Res> { + factory _$$PeerConnectionEvent_TrackCopyWith( + _$PeerConnectionEvent_Track value, + $Res Function(_$PeerConnectionEvent_Track) then) = + __$$PeerConnectionEvent_TrackCopyWithImpl<$Res>; @useResult $Res call({RtcTrackEvent field0}); } /// @nodoc -class __$$PeerConnectionEvent_TrackImplCopyWithImpl<$Res> - extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_TrackImpl> - implements _$$PeerConnectionEvent_TrackImplCopyWith<$Res> { - __$$PeerConnectionEvent_TrackImplCopyWithImpl( - _$PeerConnectionEvent_TrackImpl _value, - $Res Function(_$PeerConnectionEvent_TrackImpl) _then) +class __$$PeerConnectionEvent_TrackCopyWithImpl<$Res> + extends _$PeerConnectionEventCopyWithImpl<$Res, _$PeerConnectionEvent_Track> + implements _$$PeerConnectionEvent_TrackCopyWith<$Res> { + __$$PeerConnectionEvent_TrackCopyWithImpl(_$PeerConnectionEvent_Track _value, + $Res Function(_$PeerConnectionEvent_Track) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -2753,7 +2737,7 @@ class __$$PeerConnectionEvent_TrackImplCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$PeerConnectionEvent_TrackImpl( + return _then(_$PeerConnectionEvent_Track( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -2764,8 +2748,8 @@ class __$$PeerConnectionEvent_TrackImplCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_TrackImpl implements PeerConnectionEvent_Track { - const _$PeerConnectionEvent_TrackImpl(this.field0); +class _$PeerConnectionEvent_Track implements PeerConnectionEvent_Track { + const _$PeerConnectionEvent_Track(this.field0); @override final RtcTrackEvent field0; @@ -2779,7 +2763,7 @@ class _$PeerConnectionEvent_TrackImpl implements PeerConnectionEvent_Track { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_TrackImpl && + other is _$PeerConnectionEvent_Track && (identical(other.field0, field0) || other.field0 == field0)); } @@ -2789,9 +2773,9 @@ class _$PeerConnectionEvent_TrackImpl implements PeerConnectionEvent_Track { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_TrackImplCopyWith<_$PeerConnectionEvent_TrackImpl> - get copyWith => __$$PeerConnectionEvent_TrackImplCopyWithImpl< - _$PeerConnectionEvent_TrackImpl>(this, _$identity); + _$$PeerConnectionEvent_TrackCopyWith<_$PeerConnectionEvent_Track> + get copyWith => __$$PeerConnectionEvent_TrackCopyWithImpl< + _$PeerConnectionEvent_Track>(this, _$identity); @override @optionalTypeArgs @@ -2932,11 +2916,11 @@ class _$PeerConnectionEvent_TrackImpl implements PeerConnectionEvent_Track { abstract class PeerConnectionEvent_Track implements PeerConnectionEvent { const factory PeerConnectionEvent_Track(final RtcTrackEvent field0) = - _$PeerConnectionEvent_TrackImpl; + _$PeerConnectionEvent_Track; RtcTrackEvent get field0; @JsonKey(ignore: true) - _$$PeerConnectionEvent_TrackImplCopyWith<_$PeerConnectionEvent_TrackImpl> + _$$PeerConnectionEvent_TrackCopyWith<_$PeerConnectionEvent_Track> get copyWith => throw _privateConstructorUsedError; } @@ -3022,25 +3006,25 @@ class _$RtcIceCandidateStatsCopyWithImpl<$Res, } /// @nodoc -abstract class _$$RtcIceCandidateStats_LocalImplCopyWith<$Res> +abstract class _$$RtcIceCandidateStats_LocalCopyWith<$Res> implements $RtcIceCandidateStatsCopyWith<$Res> { - factory _$$RtcIceCandidateStats_LocalImplCopyWith( - _$RtcIceCandidateStats_LocalImpl value, - $Res Function(_$RtcIceCandidateStats_LocalImpl) then) = - __$$RtcIceCandidateStats_LocalImplCopyWithImpl<$Res>; + factory _$$RtcIceCandidateStats_LocalCopyWith( + _$RtcIceCandidateStats_Local value, + $Res Function(_$RtcIceCandidateStats_Local) then) = + __$$RtcIceCandidateStats_LocalCopyWithImpl<$Res>; @override @useResult $Res call({IceCandidateStats field0}); } /// @nodoc -class __$$RtcIceCandidateStats_LocalImplCopyWithImpl<$Res> +class __$$RtcIceCandidateStats_LocalCopyWithImpl<$Res> extends _$RtcIceCandidateStatsCopyWithImpl<$Res, - _$RtcIceCandidateStats_LocalImpl> - implements _$$RtcIceCandidateStats_LocalImplCopyWith<$Res> { - __$$RtcIceCandidateStats_LocalImplCopyWithImpl( - _$RtcIceCandidateStats_LocalImpl _value, - $Res Function(_$RtcIceCandidateStats_LocalImpl) _then) + _$RtcIceCandidateStats_Local> + implements _$$RtcIceCandidateStats_LocalCopyWith<$Res> { + __$$RtcIceCandidateStats_LocalCopyWithImpl( + _$RtcIceCandidateStats_Local _value, + $Res Function(_$RtcIceCandidateStats_Local) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -3048,7 +3032,7 @@ class __$$RtcIceCandidateStats_LocalImplCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$RtcIceCandidateStats_LocalImpl( + return _then(_$RtcIceCandidateStats_Local( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -3059,8 +3043,8 @@ class __$$RtcIceCandidateStats_LocalImplCopyWithImpl<$Res> /// @nodoc -class _$RtcIceCandidateStats_LocalImpl implements RtcIceCandidateStats_Local { - const _$RtcIceCandidateStats_LocalImpl(this.field0); +class _$RtcIceCandidateStats_Local implements RtcIceCandidateStats_Local { + const _$RtcIceCandidateStats_Local(this.field0); @override final IceCandidateStats field0; @@ -3074,7 +3058,7 @@ class _$RtcIceCandidateStats_LocalImpl implements RtcIceCandidateStats_Local { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcIceCandidateStats_LocalImpl && + other is _$RtcIceCandidateStats_Local && (identical(other.field0, field0) || other.field0 == field0)); } @@ -3084,9 +3068,9 @@ class _$RtcIceCandidateStats_LocalImpl implements RtcIceCandidateStats_Local { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcIceCandidateStats_LocalImplCopyWith<_$RtcIceCandidateStats_LocalImpl> - get copyWith => __$$RtcIceCandidateStats_LocalImplCopyWithImpl< - _$RtcIceCandidateStats_LocalImpl>(this, _$identity); + _$$RtcIceCandidateStats_LocalCopyWith<_$RtcIceCandidateStats_Local> + get copyWith => __$$RtcIceCandidateStats_LocalCopyWithImpl< + _$RtcIceCandidateStats_Local>(this, _$identity); @override @optionalTypeArgs @@ -3153,36 +3137,36 @@ class _$RtcIceCandidateStats_LocalImpl implements RtcIceCandidateStats_Local { abstract class RtcIceCandidateStats_Local implements RtcIceCandidateStats { const factory RtcIceCandidateStats_Local(final IceCandidateStats field0) = - _$RtcIceCandidateStats_LocalImpl; + _$RtcIceCandidateStats_Local; @override IceCandidateStats get field0; @override @JsonKey(ignore: true) - _$$RtcIceCandidateStats_LocalImplCopyWith<_$RtcIceCandidateStats_LocalImpl> + _$$RtcIceCandidateStats_LocalCopyWith<_$RtcIceCandidateStats_Local> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcIceCandidateStats_RemoteImplCopyWith<$Res> +abstract class _$$RtcIceCandidateStats_RemoteCopyWith<$Res> implements $RtcIceCandidateStatsCopyWith<$Res> { - factory _$$RtcIceCandidateStats_RemoteImplCopyWith( - _$RtcIceCandidateStats_RemoteImpl value, - $Res Function(_$RtcIceCandidateStats_RemoteImpl) then) = - __$$RtcIceCandidateStats_RemoteImplCopyWithImpl<$Res>; + factory _$$RtcIceCandidateStats_RemoteCopyWith( + _$RtcIceCandidateStats_Remote value, + $Res Function(_$RtcIceCandidateStats_Remote) then) = + __$$RtcIceCandidateStats_RemoteCopyWithImpl<$Res>; @override @useResult $Res call({IceCandidateStats field0}); } /// @nodoc -class __$$RtcIceCandidateStats_RemoteImplCopyWithImpl<$Res> +class __$$RtcIceCandidateStats_RemoteCopyWithImpl<$Res> extends _$RtcIceCandidateStatsCopyWithImpl<$Res, - _$RtcIceCandidateStats_RemoteImpl> - implements _$$RtcIceCandidateStats_RemoteImplCopyWith<$Res> { - __$$RtcIceCandidateStats_RemoteImplCopyWithImpl( - _$RtcIceCandidateStats_RemoteImpl _value, - $Res Function(_$RtcIceCandidateStats_RemoteImpl) _then) + _$RtcIceCandidateStats_Remote> + implements _$$RtcIceCandidateStats_RemoteCopyWith<$Res> { + __$$RtcIceCandidateStats_RemoteCopyWithImpl( + _$RtcIceCandidateStats_Remote _value, + $Res Function(_$RtcIceCandidateStats_Remote) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -3190,7 +3174,7 @@ class __$$RtcIceCandidateStats_RemoteImplCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$RtcIceCandidateStats_RemoteImpl( + return _then(_$RtcIceCandidateStats_Remote( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -3201,8 +3185,8 @@ class __$$RtcIceCandidateStats_RemoteImplCopyWithImpl<$Res> /// @nodoc -class _$RtcIceCandidateStats_RemoteImpl implements RtcIceCandidateStats_Remote { - const _$RtcIceCandidateStats_RemoteImpl(this.field0); +class _$RtcIceCandidateStats_Remote implements RtcIceCandidateStats_Remote { + const _$RtcIceCandidateStats_Remote(this.field0); @override final IceCandidateStats field0; @@ -3216,7 +3200,7 @@ class _$RtcIceCandidateStats_RemoteImpl implements RtcIceCandidateStats_Remote { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcIceCandidateStats_RemoteImpl && + other is _$RtcIceCandidateStats_Remote && (identical(other.field0, field0) || other.field0 == field0)); } @@ -3226,9 +3210,9 @@ class _$RtcIceCandidateStats_RemoteImpl implements RtcIceCandidateStats_Remote { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcIceCandidateStats_RemoteImplCopyWith<_$RtcIceCandidateStats_RemoteImpl> - get copyWith => __$$RtcIceCandidateStats_RemoteImplCopyWithImpl< - _$RtcIceCandidateStats_RemoteImpl>(this, _$identity); + _$$RtcIceCandidateStats_RemoteCopyWith<_$RtcIceCandidateStats_Remote> + get copyWith => __$$RtcIceCandidateStats_RemoteCopyWithImpl< + _$RtcIceCandidateStats_Remote>(this, _$identity); @override @optionalTypeArgs @@ -3295,13 +3279,13 @@ class _$RtcIceCandidateStats_RemoteImpl implements RtcIceCandidateStats_Remote { abstract class RtcIceCandidateStats_Remote implements RtcIceCandidateStats { const factory RtcIceCandidateStats_Remote(final IceCandidateStats field0) = - _$RtcIceCandidateStats_RemoteImpl; + _$RtcIceCandidateStats_Remote; @override IceCandidateStats get field0; @override @JsonKey(ignore: true) - _$$RtcIceCandidateStats_RemoteImplCopyWith<_$RtcIceCandidateStats_RemoteImpl> + _$$RtcIceCandidateStats_RemoteCopyWith<_$RtcIceCandidateStats_Remote> get copyWith => throw _privateConstructorUsedError; } @@ -3429,11 +3413,11 @@ class _$RtcInboundRtpStreamMediaTypeCopyWithImpl<$Res, } /// @nodoc -abstract class _$$RtcInboundRtpStreamMediaType_AudioImplCopyWith<$Res> { - factory _$$RtcInboundRtpStreamMediaType_AudioImplCopyWith( - _$RtcInboundRtpStreamMediaType_AudioImpl value, - $Res Function(_$RtcInboundRtpStreamMediaType_AudioImpl) then) = - __$$RtcInboundRtpStreamMediaType_AudioImplCopyWithImpl<$Res>; +abstract class _$$RtcInboundRtpStreamMediaType_AudioCopyWith<$Res> { + factory _$$RtcInboundRtpStreamMediaType_AudioCopyWith( + _$RtcInboundRtpStreamMediaType_Audio value, + $Res Function(_$RtcInboundRtpStreamMediaType_Audio) then) = + __$$RtcInboundRtpStreamMediaType_AudioCopyWithImpl<$Res>; @useResult $Res call( {bool? voiceActivityFlag, @@ -3446,13 +3430,13 @@ abstract class _$$RtcInboundRtpStreamMediaType_AudioImplCopyWith<$Res> { } /// @nodoc -class __$$RtcInboundRtpStreamMediaType_AudioImplCopyWithImpl<$Res> +class __$$RtcInboundRtpStreamMediaType_AudioCopyWithImpl<$Res> extends _$RtcInboundRtpStreamMediaTypeCopyWithImpl<$Res, - _$RtcInboundRtpStreamMediaType_AudioImpl> - implements _$$RtcInboundRtpStreamMediaType_AudioImplCopyWith<$Res> { - __$$RtcInboundRtpStreamMediaType_AudioImplCopyWithImpl( - _$RtcInboundRtpStreamMediaType_AudioImpl _value, - $Res Function(_$RtcInboundRtpStreamMediaType_AudioImpl) _then) + _$RtcInboundRtpStreamMediaType_Audio> + implements _$$RtcInboundRtpStreamMediaType_AudioCopyWith<$Res> { + __$$RtcInboundRtpStreamMediaType_AudioCopyWithImpl( + _$RtcInboundRtpStreamMediaType_Audio _value, + $Res Function(_$RtcInboundRtpStreamMediaType_Audio) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -3466,7 +3450,7 @@ class __$$RtcInboundRtpStreamMediaType_AudioImplCopyWithImpl<$Res> Object? totalAudioEnergy = freezed, Object? totalSamplesDuration = freezed, }) { - return _then(_$RtcInboundRtpStreamMediaType_AudioImpl( + return _then(_$RtcInboundRtpStreamMediaType_Audio( voiceActivityFlag: freezed == voiceActivityFlag ? _value.voiceActivityFlag : voiceActivityFlag // ignore: cast_nullable_to_non_nullable @@ -3501,9 +3485,9 @@ class __$$RtcInboundRtpStreamMediaType_AudioImplCopyWithImpl<$Res> /// @nodoc -class _$RtcInboundRtpStreamMediaType_AudioImpl +class _$RtcInboundRtpStreamMediaType_Audio implements RtcInboundRtpStreamMediaType_Audio { - const _$RtcInboundRtpStreamMediaType_AudioImpl( + const _$RtcInboundRtpStreamMediaType_Audio( {this.voiceActivityFlag, this.totalSamplesReceived, this.concealedSamples, @@ -3578,7 +3562,7 @@ class _$RtcInboundRtpStreamMediaType_AudioImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcInboundRtpStreamMediaType_AudioImpl && + other is _$RtcInboundRtpStreamMediaType_Audio && (identical(other.voiceActivityFlag, voiceActivityFlag) || other.voiceActivityFlag == voiceActivityFlag) && (identical(other.totalSamplesReceived, totalSamplesReceived) || @@ -3609,10 +3593,10 @@ class _$RtcInboundRtpStreamMediaType_AudioImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcInboundRtpStreamMediaType_AudioImplCopyWith< - _$RtcInboundRtpStreamMediaType_AudioImpl> - get copyWith => __$$RtcInboundRtpStreamMediaType_AudioImplCopyWithImpl< - _$RtcInboundRtpStreamMediaType_AudioImpl>(this, _$identity); + _$$RtcInboundRtpStreamMediaType_AudioCopyWith< + _$RtcInboundRtpStreamMediaType_Audio> + get copyWith => __$$RtcInboundRtpStreamMediaType_AudioCopyWithImpl< + _$RtcInboundRtpStreamMediaType_Audio>(this, _$identity); @override @optionalTypeArgs @@ -3768,7 +3752,7 @@ abstract class RtcInboundRtpStreamMediaType_Audio final double? audioLevel, final double? totalAudioEnergy, final double? totalSamplesDuration}) = - _$RtcInboundRtpStreamMediaType_AudioImpl; + _$RtcInboundRtpStreamMediaType_Audio; /// Indicator whether the last RTP packet whose frame was delivered to /// the [RTCRtpReceiver]'s [MediaStreamTrack][1] for playout contained @@ -3820,17 +3804,17 @@ abstract class RtcInboundRtpStreamMediaType_Audio /// [1]: https://w3.org/TR/webrtc-stats#dom-rtcaudiosourcestats double? get totalSamplesDuration; @JsonKey(ignore: true) - _$$RtcInboundRtpStreamMediaType_AudioImplCopyWith< - _$RtcInboundRtpStreamMediaType_AudioImpl> + _$$RtcInboundRtpStreamMediaType_AudioCopyWith< + _$RtcInboundRtpStreamMediaType_Audio> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcInboundRtpStreamMediaType_VideoImplCopyWith<$Res> { - factory _$$RtcInboundRtpStreamMediaType_VideoImplCopyWith( - _$RtcInboundRtpStreamMediaType_VideoImpl value, - $Res Function(_$RtcInboundRtpStreamMediaType_VideoImpl) then) = - __$$RtcInboundRtpStreamMediaType_VideoImplCopyWithImpl<$Res>; +abstract class _$$RtcInboundRtpStreamMediaType_VideoCopyWith<$Res> { + factory _$$RtcInboundRtpStreamMediaType_VideoCopyWith( + _$RtcInboundRtpStreamMediaType_Video value, + $Res Function(_$RtcInboundRtpStreamMediaType_Video) then) = + __$$RtcInboundRtpStreamMediaType_VideoCopyWithImpl<$Res>; @useResult $Res call( {int? framesDecoded, @@ -3847,13 +3831,13 @@ abstract class _$$RtcInboundRtpStreamMediaType_VideoImplCopyWith<$Res> { } /// @nodoc -class __$$RtcInboundRtpStreamMediaType_VideoImplCopyWithImpl<$Res> +class __$$RtcInboundRtpStreamMediaType_VideoCopyWithImpl<$Res> extends _$RtcInboundRtpStreamMediaTypeCopyWithImpl<$Res, - _$RtcInboundRtpStreamMediaType_VideoImpl> - implements _$$RtcInboundRtpStreamMediaType_VideoImplCopyWith<$Res> { - __$$RtcInboundRtpStreamMediaType_VideoImplCopyWithImpl( - _$RtcInboundRtpStreamMediaType_VideoImpl _value, - $Res Function(_$RtcInboundRtpStreamMediaType_VideoImpl) _then) + _$RtcInboundRtpStreamMediaType_Video> + implements _$$RtcInboundRtpStreamMediaType_VideoCopyWith<$Res> { + __$$RtcInboundRtpStreamMediaType_VideoCopyWithImpl( + _$RtcInboundRtpStreamMediaType_Video _value, + $Res Function(_$RtcInboundRtpStreamMediaType_Video) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -3871,7 +3855,7 @@ class __$$RtcInboundRtpStreamMediaType_VideoImplCopyWithImpl<$Res> Object? concealmentEvents = freezed, Object? framesReceived = freezed, }) { - return _then(_$RtcInboundRtpStreamMediaType_VideoImpl( + return _then(_$RtcInboundRtpStreamMediaType_Video( framesDecoded: freezed == framesDecoded ? _value.framesDecoded : framesDecoded // ignore: cast_nullable_to_non_nullable @@ -3922,9 +3906,9 @@ class __$$RtcInboundRtpStreamMediaType_VideoImplCopyWithImpl<$Res> /// @nodoc -class _$RtcInboundRtpStreamMediaType_VideoImpl +class _$RtcInboundRtpStreamMediaType_Video implements RtcInboundRtpStreamMediaType_Video { - const _$RtcInboundRtpStreamMediaType_VideoImpl( + const _$RtcInboundRtpStreamMediaType_Video( {this.framesDecoded, this.keyFramesDecoded, this.frameWidth, @@ -4019,7 +4003,7 @@ class _$RtcInboundRtpStreamMediaType_VideoImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcInboundRtpStreamMediaType_VideoImpl && + other is _$RtcInboundRtpStreamMediaType_Video && (identical(other.framesDecoded, framesDecoded) || other.framesDecoded == framesDecoded) && (identical(other.keyFramesDecoded, keyFramesDecoded) || @@ -4062,10 +4046,10 @@ class _$RtcInboundRtpStreamMediaType_VideoImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcInboundRtpStreamMediaType_VideoImplCopyWith< - _$RtcInboundRtpStreamMediaType_VideoImpl> - get copyWith => __$$RtcInboundRtpStreamMediaType_VideoImplCopyWithImpl< - _$RtcInboundRtpStreamMediaType_VideoImpl>(this, _$identity); + _$$RtcInboundRtpStreamMediaType_VideoCopyWith< + _$RtcInboundRtpStreamMediaType_Video> + get copyWith => __$$RtcInboundRtpStreamMediaType_VideoCopyWithImpl< + _$RtcInboundRtpStreamMediaType_Video>(this, _$identity); @override @optionalTypeArgs @@ -4236,7 +4220,7 @@ abstract class RtcInboundRtpStreamMediaType_Video final int? pliCount, final int? sliCount, final int? concealmentEvents, - final int? framesReceived}) = _$RtcInboundRtpStreamMediaType_VideoImpl; + final int? framesReceived}) = _$RtcInboundRtpStreamMediaType_Video; /// Total number of frames correctly decoded for this RTP stream, i.e. /// frames that would be displayed if no frames are dropped. @@ -4300,8 +4284,8 @@ abstract class RtcInboundRtpStreamMediaType_Video /// This metric is incremented when the complete frame is received. int? get framesReceived; @JsonKey(ignore: true) - _$$RtcInboundRtpStreamMediaType_VideoImplCopyWith< - _$RtcInboundRtpStreamMediaType_VideoImpl> + _$$RtcInboundRtpStreamMediaType_VideoCopyWith< + _$RtcInboundRtpStreamMediaType_Video> get copyWith => throw _privateConstructorUsedError; } @@ -4401,28 +4385,26 @@ class _$RtcMediaSourceStatsMediaTypeCopyWithImpl<$Res, } /// @nodoc -abstract class _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWith< +abstract class _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWith< $Res> { - factory _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWith( - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl value, - $Res Function(_$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl) + factory _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWith( + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats value, + $Res Function(_$RtcMediaSourceStatsMediaType_RtcVideoSourceStats) then) = - __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWithImpl< - $Res>; + __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWithImpl<$Res>; @useResult $Res call({int? width, int? height, int? frames, double? framesPerSecond}); } /// @nodoc -class __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWithImpl<$Res> +class __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWithImpl<$Res> extends _$RtcMediaSourceStatsMediaTypeCopyWithImpl<$Res, - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl> + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats> implements - _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWith<$Res> { - __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWithImpl( - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl _value, - $Res Function(_$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl) - _then) + _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWith<$Res> { + __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWithImpl( + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats _value, + $Res Function(_$RtcMediaSourceStatsMediaType_RtcVideoSourceStats) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -4433,7 +4415,7 @@ class __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWithImpl<$Res> Object? frames = freezed, Object? framesPerSecond = freezed, }) { - return _then(_$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl( + return _then(_$RtcMediaSourceStatsMediaType_RtcVideoSourceStats( width: freezed == width ? _value.width : width // ignore: cast_nullable_to_non_nullable @@ -4456,9 +4438,9 @@ class __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWithImpl<$Res> /// @nodoc -class _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl +class _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats implements RtcMediaSourceStatsMediaType_RtcVideoSourceStats { - const _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl( + const _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats( {this.width, this.height, this.frames, this.framesPerSecond}); /// Width (in pixels) of the last frame originating from the source. @@ -4490,7 +4472,7 @@ class _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl && + other is _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats && (identical(other.width, width) || other.width == width) && (identical(other.height, height) || other.height == height) && (identical(other.frames, frames) || other.frames == frames) && @@ -4505,11 +4487,11 @@ class _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWith< - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl> + _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWith< + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats> get copyWith => - __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWithImpl< - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl>( + __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWithImpl< + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats>( this, _$identity); @override @@ -4614,7 +4596,7 @@ abstract class RtcMediaSourceStatsMediaType_RtcVideoSourceStats final int? height, final int? frames, final double? framesPerSecond}) = - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl; + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats; /// Width (in pixels) of the last frame originating from the source. /// Before a frame has been produced this attribute is missing. @@ -4632,20 +4614,19 @@ abstract class RtcMediaSourceStatsMediaType_RtcVideoSourceStats /// attribute is missing. double? get framesPerSecond; @JsonKey(ignore: true) - _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWith< - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl> + _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWith< + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWith< +abstract class _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWith< $Res> { - factory _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWith( - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl value, - $Res Function(_$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl) + factory _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWith( + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats value, + $Res Function(_$RtcMediaSourceStatsMediaType_RtcAudioSourceStats) then) = - __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWithImpl< - $Res>; + __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWithImpl<$Res>; @useResult $Res call( {double? audioLevel, @@ -4656,15 +4637,14 @@ abstract class _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWith< } /// @nodoc -class __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWithImpl<$Res> +class __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWithImpl<$Res> extends _$RtcMediaSourceStatsMediaTypeCopyWithImpl<$Res, - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl> + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats> implements - _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWith<$Res> { - __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWithImpl( - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl _value, - $Res Function(_$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl) - _then) + _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWith<$Res> { + __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWithImpl( + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats _value, + $Res Function(_$RtcMediaSourceStatsMediaType_RtcAudioSourceStats) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -4676,7 +4656,7 @@ class __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWithImpl<$Res> Object? echoReturnLoss = freezed, Object? echoReturnLossEnhancement = freezed, }) { - return _then(_$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl( + return _then(_$RtcMediaSourceStatsMediaType_RtcAudioSourceStats( audioLevel: freezed == audioLevel ? _value.audioLevel : audioLevel // ignore: cast_nullable_to_non_nullable @@ -4703,9 +4683,9 @@ class __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWithImpl<$Res> /// @nodoc -class _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl +class _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats implements RtcMediaSourceStatsMediaType_RtcAudioSourceStats { - const _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl( + const _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats( {this.audioLevel, this.totalAudioEnergy, this.totalSamplesDuration, @@ -4747,7 +4727,7 @@ class _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl && + other is _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats && (identical(other.audioLevel, audioLevel) || other.audioLevel == audioLevel) && (identical(other.totalAudioEnergy, totalAudioEnergy) || @@ -4768,11 +4748,11 @@ class _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWith< - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl> + _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWith< + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats> get copyWith => - __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWithImpl< - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl>( + __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWithImpl< + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats>( this, _$identity); @override @@ -4881,7 +4861,7 @@ abstract class RtcMediaSourceStatsMediaType_RtcAudioSourceStats final double? totalSamplesDuration, final double? echoReturnLoss, final double? echoReturnLossEnhancement}) = - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl; + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats; /// Audio level of the media source. double? get audioLevel; @@ -4904,8 +4884,8 @@ abstract class RtcMediaSourceStatsMediaType_RtcAudioSourceStats /// [1]: https://w3.org/TR/mediacapture-streams#mediastreamtrack double? get echoReturnLossEnhancement; @JsonKey(ignore: true) - _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWith< - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl> + _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWith< + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats> get copyWith => throw _privateConstructorUsedError; } @@ -4982,23 +4962,23 @@ class _$RtcOutboundRtpStreamStatsMediaTypeCopyWithImpl<$Res, } /// @nodoc -abstract class _$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWith<$Res> { - factory _$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWith( - _$RtcOutboundRtpStreamStatsMediaType_AudioImpl value, - $Res Function(_$RtcOutboundRtpStreamStatsMediaType_AudioImpl) then) = - __$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWithImpl<$Res>; +abstract class _$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWith<$Res> { + factory _$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWith( + _$RtcOutboundRtpStreamStatsMediaType_Audio value, + $Res Function(_$RtcOutboundRtpStreamStatsMediaType_Audio) then) = + __$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWithImpl<$Res>; @useResult $Res call({int? totalSamplesSent, bool? voiceActivityFlag}); } /// @nodoc -class __$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWithImpl<$Res> +class __$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWithImpl<$Res> extends _$RtcOutboundRtpStreamStatsMediaTypeCopyWithImpl<$Res, - _$RtcOutboundRtpStreamStatsMediaType_AudioImpl> - implements _$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWith<$Res> { - __$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWithImpl( - _$RtcOutboundRtpStreamStatsMediaType_AudioImpl _value, - $Res Function(_$RtcOutboundRtpStreamStatsMediaType_AudioImpl) _then) + _$RtcOutboundRtpStreamStatsMediaType_Audio> + implements _$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWith<$Res> { + __$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWithImpl( + _$RtcOutboundRtpStreamStatsMediaType_Audio _value, + $Res Function(_$RtcOutboundRtpStreamStatsMediaType_Audio) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -5007,7 +4987,7 @@ class __$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWithImpl<$Res> Object? totalSamplesSent = freezed, Object? voiceActivityFlag = freezed, }) { - return _then(_$RtcOutboundRtpStreamStatsMediaType_AudioImpl( + return _then(_$RtcOutboundRtpStreamStatsMediaType_Audio( totalSamplesSent: freezed == totalSamplesSent ? _value.totalSamplesSent : totalSamplesSent // ignore: cast_nullable_to_non_nullable @@ -5022,9 +5002,9 @@ class __$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWithImpl<$Res> /// @nodoc -class _$RtcOutboundRtpStreamStatsMediaType_AudioImpl +class _$RtcOutboundRtpStreamStatsMediaType_Audio implements RtcOutboundRtpStreamStatsMediaType_Audio { - const _$RtcOutboundRtpStreamStatsMediaType_AudioImpl( + const _$RtcOutboundRtpStreamStatsMediaType_Audio( {this.totalSamplesSent, this.voiceActivityFlag}); /// Total number of samples that have been sent over the RTP stream. @@ -5045,7 +5025,7 @@ class _$RtcOutboundRtpStreamStatsMediaType_AudioImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcOutboundRtpStreamStatsMediaType_AudioImpl && + other is _$RtcOutboundRtpStreamStatsMediaType_Audio && (identical(other.totalSamplesSent, totalSamplesSent) || other.totalSamplesSent == totalSamplesSent) && (identical(other.voiceActivityFlag, voiceActivityFlag) || @@ -5059,11 +5039,10 @@ class _$RtcOutboundRtpStreamStatsMediaType_AudioImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWith< - _$RtcOutboundRtpStreamStatsMediaType_AudioImpl> - get copyWith => - __$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWithImpl< - _$RtcOutboundRtpStreamStatsMediaType_AudioImpl>(this, _$identity); + _$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWith< + _$RtcOutboundRtpStreamStatsMediaType_Audio> + get copyWith => __$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWithImpl< + _$RtcOutboundRtpStreamStatsMediaType_Audio>(this, _$identity); @override @optionalTypeArgs @@ -5141,7 +5120,7 @@ abstract class RtcOutboundRtpStreamStatsMediaType_Audio implements RtcOutboundRtpStreamStatsMediaType { const factory RtcOutboundRtpStreamStatsMediaType_Audio( {final int? totalSamplesSent, final bool? voiceActivityFlag}) = - _$RtcOutboundRtpStreamStatsMediaType_AudioImpl; + _$RtcOutboundRtpStreamStatsMediaType_Audio; /// Total number of samples that have been sent over the RTP stream. int? get totalSamplesSent; @@ -5150,29 +5129,29 @@ abstract class RtcOutboundRtpStreamStatsMediaType_Audio /// based on the presence of the V bit in the extension header. bool? get voiceActivityFlag; @JsonKey(ignore: true) - _$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWith< - _$RtcOutboundRtpStreamStatsMediaType_AudioImpl> + _$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWith< + _$RtcOutboundRtpStreamStatsMediaType_Audio> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWith<$Res> { - factory _$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWith( - _$RtcOutboundRtpStreamStatsMediaType_VideoImpl value, - $Res Function(_$RtcOutboundRtpStreamStatsMediaType_VideoImpl) then) = - __$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWithImpl<$Res>; +abstract class _$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWith<$Res> { + factory _$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWith( + _$RtcOutboundRtpStreamStatsMediaType_Video value, + $Res Function(_$RtcOutboundRtpStreamStatsMediaType_Video) then) = + __$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWithImpl<$Res>; @useResult $Res call({int? frameWidth, int? frameHeight, double? framesPerSecond}); } /// @nodoc -class __$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWithImpl<$Res> +class __$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWithImpl<$Res> extends _$RtcOutboundRtpStreamStatsMediaTypeCopyWithImpl<$Res, - _$RtcOutboundRtpStreamStatsMediaType_VideoImpl> - implements _$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWith<$Res> { - __$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWithImpl( - _$RtcOutboundRtpStreamStatsMediaType_VideoImpl _value, - $Res Function(_$RtcOutboundRtpStreamStatsMediaType_VideoImpl) _then) + _$RtcOutboundRtpStreamStatsMediaType_Video> + implements _$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWith<$Res> { + __$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWithImpl( + _$RtcOutboundRtpStreamStatsMediaType_Video _value, + $Res Function(_$RtcOutboundRtpStreamStatsMediaType_Video) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -5182,7 +5161,7 @@ class __$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWithImpl<$Res> Object? frameHeight = freezed, Object? framesPerSecond = freezed, }) { - return _then(_$RtcOutboundRtpStreamStatsMediaType_VideoImpl( + return _then(_$RtcOutboundRtpStreamStatsMediaType_Video( frameWidth: freezed == frameWidth ? _value.frameWidth : frameWidth // ignore: cast_nullable_to_non_nullable @@ -5201,9 +5180,9 @@ class __$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWithImpl<$Res> /// @nodoc -class _$RtcOutboundRtpStreamStatsMediaType_VideoImpl +class _$RtcOutboundRtpStreamStatsMediaType_Video implements RtcOutboundRtpStreamStatsMediaType_Video { - const _$RtcOutboundRtpStreamStatsMediaType_VideoImpl( + const _$RtcOutboundRtpStreamStatsMediaType_Video( {this.frameWidth, this.frameHeight, this.framesPerSecond}); /// Width of the last encoded frame. @@ -5246,7 +5225,7 @@ class _$RtcOutboundRtpStreamStatsMediaType_VideoImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcOutboundRtpStreamStatsMediaType_VideoImpl && + other is _$RtcOutboundRtpStreamStatsMediaType_Video && (identical(other.frameWidth, frameWidth) || other.frameWidth == frameWidth) && (identical(other.frameHeight, frameHeight) || @@ -5262,11 +5241,10 @@ class _$RtcOutboundRtpStreamStatsMediaType_VideoImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWith< - _$RtcOutboundRtpStreamStatsMediaType_VideoImpl> - get copyWith => - __$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWithImpl< - _$RtcOutboundRtpStreamStatsMediaType_VideoImpl>(this, _$identity); + _$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWith< + _$RtcOutboundRtpStreamStatsMediaType_Video> + get copyWith => __$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWithImpl< + _$RtcOutboundRtpStreamStatsMediaType_Video>(this, _$identity); @override @optionalTypeArgs @@ -5346,7 +5324,7 @@ abstract class RtcOutboundRtpStreamStatsMediaType_Video {final int? frameWidth, final int? frameHeight, final double? framesPerSecond}) = - _$RtcOutboundRtpStreamStatsMediaType_VideoImpl; + _$RtcOutboundRtpStreamStatsMediaType_Video; /// Width of the last encoded frame. /// @@ -5376,8 +5354,8 @@ abstract class RtcOutboundRtpStreamStatsMediaType_Video /// [1]: https://tinyurl.com/rrmkrfk double? get framesPerSecond; @JsonKey(ignore: true) - _$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWith< - _$RtcOutboundRtpStreamStatsMediaType_VideoImpl> + _$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWith< + _$RtcOutboundRtpStreamStatsMediaType_Video> get copyWith => throw _privateConstructorUsedError; } @@ -5615,11 +5593,11 @@ class _$RtcStatsTypeCopyWithImpl<$Res, $Val extends RtcStatsType> } /// @nodoc -abstract class _$$RtcStatsType_RtcMediaSourceStatsImplCopyWith<$Res> { - factory _$$RtcStatsType_RtcMediaSourceStatsImplCopyWith( - _$RtcStatsType_RtcMediaSourceStatsImpl value, - $Res Function(_$RtcStatsType_RtcMediaSourceStatsImpl) then) = - __$$RtcStatsType_RtcMediaSourceStatsImplCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcMediaSourceStatsCopyWith<$Res> { + factory _$$RtcStatsType_RtcMediaSourceStatsCopyWith( + _$RtcStatsType_RtcMediaSourceStats value, + $Res Function(_$RtcStatsType_RtcMediaSourceStats) then) = + __$$RtcStatsType_RtcMediaSourceStatsCopyWithImpl<$Res>; @useResult $Res call({String? trackIdentifier, RtcMediaSourceStatsMediaType kind}); @@ -5627,13 +5605,12 @@ abstract class _$$RtcStatsType_RtcMediaSourceStatsImplCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcMediaSourceStatsImplCopyWithImpl<$Res> - extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcMediaSourceStatsImpl> - implements _$$RtcStatsType_RtcMediaSourceStatsImplCopyWith<$Res> { - __$$RtcStatsType_RtcMediaSourceStatsImplCopyWithImpl( - _$RtcStatsType_RtcMediaSourceStatsImpl _value, - $Res Function(_$RtcStatsType_RtcMediaSourceStatsImpl) _then) +class __$$RtcStatsType_RtcMediaSourceStatsCopyWithImpl<$Res> + extends _$RtcStatsTypeCopyWithImpl<$Res, _$RtcStatsType_RtcMediaSourceStats> + implements _$$RtcStatsType_RtcMediaSourceStatsCopyWith<$Res> { + __$$RtcStatsType_RtcMediaSourceStatsCopyWithImpl( + _$RtcStatsType_RtcMediaSourceStats _value, + $Res Function(_$RtcStatsType_RtcMediaSourceStats) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -5642,7 +5619,7 @@ class __$$RtcStatsType_RtcMediaSourceStatsImplCopyWithImpl<$Res> Object? trackIdentifier = freezed, Object? kind = null, }) { - return _then(_$RtcStatsType_RtcMediaSourceStatsImpl( + return _then(_$RtcStatsType_RtcMediaSourceStats( trackIdentifier: freezed == trackIdentifier ? _value.trackIdentifier : trackIdentifier // ignore: cast_nullable_to_non_nullable @@ -5665,9 +5642,9 @@ class __$$RtcStatsType_RtcMediaSourceStatsImplCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcMediaSourceStatsImpl +class _$RtcStatsType_RtcMediaSourceStats implements RtcStatsType_RtcMediaSourceStats { - const _$RtcStatsType_RtcMediaSourceStatsImpl( + const _$RtcStatsType_RtcMediaSourceStats( {this.trackIdentifier, required this.kind}); /// Value of the [MediaStreamTrack][1]'s ID attribute. @@ -5689,7 +5666,7 @@ class _$RtcStatsType_RtcMediaSourceStatsImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcMediaSourceStatsImpl && + other is _$RtcStatsType_RtcMediaSourceStats && (identical(other.trackIdentifier, trackIdentifier) || other.trackIdentifier == trackIdentifier) && (identical(other.kind, kind) || other.kind == kind)); @@ -5701,10 +5678,10 @@ class _$RtcStatsType_RtcMediaSourceStatsImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcMediaSourceStatsImplCopyWith< - _$RtcStatsType_RtcMediaSourceStatsImpl> - get copyWith => __$$RtcStatsType_RtcMediaSourceStatsImplCopyWithImpl< - _$RtcStatsType_RtcMediaSourceStatsImpl>(this, _$identity); + _$$RtcStatsType_RtcMediaSourceStatsCopyWith< + _$RtcStatsType_RtcMediaSourceStats> + get copyWith => __$$RtcStatsType_RtcMediaSourceStatsCopyWithImpl< + _$RtcStatsType_RtcMediaSourceStats>(this, _$identity); @override @optionalTypeArgs @@ -5946,7 +5923,7 @@ abstract class RtcStatsType_RtcMediaSourceStats implements RtcStatsType { const factory RtcStatsType_RtcMediaSourceStats( {final String? trackIdentifier, required final RtcMediaSourceStatsMediaType kind}) = - _$RtcStatsType_RtcMediaSourceStatsImpl; + _$RtcStatsType_RtcMediaSourceStats; /// Value of the [MediaStreamTrack][1]'s ID attribute. /// @@ -5956,17 +5933,17 @@ abstract class RtcStatsType_RtcMediaSourceStats implements RtcStatsType { /// Fields which should be in these [`RtcStats`] based on their `kind`. RtcMediaSourceStatsMediaType get kind; @JsonKey(ignore: true) - _$$RtcStatsType_RtcMediaSourceStatsImplCopyWith< - _$RtcStatsType_RtcMediaSourceStatsImpl> + _$$RtcStatsType_RtcMediaSourceStatsCopyWith< + _$RtcStatsType_RtcMediaSourceStats> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcIceCandidateStatsImplCopyWith<$Res> { - factory _$$RtcStatsType_RtcIceCandidateStatsImplCopyWith( - _$RtcStatsType_RtcIceCandidateStatsImpl value, - $Res Function(_$RtcStatsType_RtcIceCandidateStatsImpl) then) = - __$$RtcStatsType_RtcIceCandidateStatsImplCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcIceCandidateStatsCopyWith<$Res> { + factory _$$RtcStatsType_RtcIceCandidateStatsCopyWith( + _$RtcStatsType_RtcIceCandidateStats value, + $Res Function(_$RtcStatsType_RtcIceCandidateStats) then) = + __$$RtcStatsType_RtcIceCandidateStatsCopyWithImpl<$Res>; @useResult $Res call({RtcIceCandidateStats field0}); @@ -5974,13 +5951,13 @@ abstract class _$$RtcStatsType_RtcIceCandidateStatsImplCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcIceCandidateStatsImplCopyWithImpl<$Res> +class __$$RtcStatsType_RtcIceCandidateStatsCopyWithImpl<$Res> extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcIceCandidateStatsImpl> - implements _$$RtcStatsType_RtcIceCandidateStatsImplCopyWith<$Res> { - __$$RtcStatsType_RtcIceCandidateStatsImplCopyWithImpl( - _$RtcStatsType_RtcIceCandidateStatsImpl _value, - $Res Function(_$RtcStatsType_RtcIceCandidateStatsImpl) _then) + _$RtcStatsType_RtcIceCandidateStats> + implements _$$RtcStatsType_RtcIceCandidateStatsCopyWith<$Res> { + __$$RtcStatsType_RtcIceCandidateStatsCopyWithImpl( + _$RtcStatsType_RtcIceCandidateStats _value, + $Res Function(_$RtcStatsType_RtcIceCandidateStats) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -5988,7 +5965,7 @@ class __$$RtcStatsType_RtcIceCandidateStatsImplCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$RtcStatsType_RtcIceCandidateStatsImpl( + return _then(_$RtcStatsType_RtcIceCandidateStats( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -6007,9 +5984,9 @@ class __$$RtcStatsType_RtcIceCandidateStatsImplCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcIceCandidateStatsImpl +class _$RtcStatsType_RtcIceCandidateStats implements RtcStatsType_RtcIceCandidateStats { - const _$RtcStatsType_RtcIceCandidateStatsImpl(this.field0); + const _$RtcStatsType_RtcIceCandidateStats(this.field0); @override final RtcIceCandidateStats field0; @@ -6023,7 +6000,7 @@ class _$RtcStatsType_RtcIceCandidateStatsImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcIceCandidateStatsImpl && + other is _$RtcStatsType_RtcIceCandidateStats && (identical(other.field0, field0) || other.field0 == field0)); } @@ -6033,10 +6010,10 @@ class _$RtcStatsType_RtcIceCandidateStatsImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcIceCandidateStatsImplCopyWith< - _$RtcStatsType_RtcIceCandidateStatsImpl> - get copyWith => __$$RtcStatsType_RtcIceCandidateStatsImplCopyWithImpl< - _$RtcStatsType_RtcIceCandidateStatsImpl>(this, _$identity); + _$$RtcStatsType_RtcIceCandidateStatsCopyWith< + _$RtcStatsType_RtcIceCandidateStats> + get copyWith => __$$RtcStatsType_RtcIceCandidateStatsCopyWithImpl< + _$RtcStatsType_RtcIceCandidateStats>(this, _$identity); @override @optionalTypeArgs @@ -6276,22 +6253,21 @@ class _$RtcStatsType_RtcIceCandidateStatsImpl abstract class RtcStatsType_RtcIceCandidateStats implements RtcStatsType { const factory RtcStatsType_RtcIceCandidateStats( - final RtcIceCandidateStats field0) = - _$RtcStatsType_RtcIceCandidateStatsImpl; + final RtcIceCandidateStats field0) = _$RtcStatsType_RtcIceCandidateStats; RtcIceCandidateStats get field0; @JsonKey(ignore: true) - _$$RtcStatsType_RtcIceCandidateStatsImplCopyWith< - _$RtcStatsType_RtcIceCandidateStatsImpl> + _$$RtcStatsType_RtcIceCandidateStatsCopyWith< + _$RtcStatsType_RtcIceCandidateStats> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWith<$Res> { - factory _$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWith( - _$RtcStatsType_RtcOutboundRtpStreamStatsImpl value, - $Res Function(_$RtcStatsType_RtcOutboundRtpStreamStatsImpl) then) = - __$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWith<$Res> { + factory _$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWith( + _$RtcStatsType_RtcOutboundRtpStreamStats value, + $Res Function(_$RtcStatsType_RtcOutboundRtpStreamStats) then) = + __$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWithImpl<$Res>; @useResult $Res call( {String? trackId, @@ -6304,13 +6280,13 @@ abstract class _$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWithImpl<$Res> +class __$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWithImpl<$Res> extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcOutboundRtpStreamStatsImpl> - implements _$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWith<$Res> { - __$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWithImpl( - _$RtcStatsType_RtcOutboundRtpStreamStatsImpl _value, - $Res Function(_$RtcStatsType_RtcOutboundRtpStreamStatsImpl) _then) + _$RtcStatsType_RtcOutboundRtpStreamStats> + implements _$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWith<$Res> { + __$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWithImpl( + _$RtcStatsType_RtcOutboundRtpStreamStats _value, + $Res Function(_$RtcStatsType_RtcOutboundRtpStreamStats) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -6322,7 +6298,7 @@ class __$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWithImpl<$Res> Object? packetsSent = freezed, Object? mediaSourceId = freezed, }) { - return _then(_$RtcStatsType_RtcOutboundRtpStreamStatsImpl( + return _then(_$RtcStatsType_RtcOutboundRtpStreamStats( trackId: freezed == trackId ? _value.trackId : trackId // ignore: cast_nullable_to_non_nullable @@ -6358,9 +6334,9 @@ class __$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcOutboundRtpStreamStatsImpl +class _$RtcStatsType_RtcOutboundRtpStreamStats implements RtcStatsType_RtcOutboundRtpStreamStats { - const _$RtcStatsType_RtcOutboundRtpStreamStatsImpl( + const _$RtcStatsType_RtcOutboundRtpStreamStats( {this.trackId, required this.mediaType, this.bytesSent, @@ -6403,7 +6379,7 @@ class _$RtcStatsType_RtcOutboundRtpStreamStatsImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcOutboundRtpStreamStatsImpl && + other is _$RtcStatsType_RtcOutboundRtpStreamStats && (identical(other.trackId, trackId) || other.trackId == trackId) && (identical(other.mediaType, mediaType) || other.mediaType == mediaType) && @@ -6422,11 +6398,10 @@ class _$RtcStatsType_RtcOutboundRtpStreamStatsImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWith< - _$RtcStatsType_RtcOutboundRtpStreamStatsImpl> - get copyWith => - __$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWithImpl< - _$RtcStatsType_RtcOutboundRtpStreamStatsImpl>(this, _$identity); + _$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWith< + _$RtcStatsType_RtcOutboundRtpStreamStats> + get copyWith => __$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWithImpl< + _$RtcStatsType_RtcOutboundRtpStreamStats>(this, _$identity); @override @optionalTypeArgs @@ -6669,12 +6644,11 @@ class _$RtcStatsType_RtcOutboundRtpStreamStatsImpl abstract class RtcStatsType_RtcOutboundRtpStreamStats implements RtcStatsType { const factory RtcStatsType_RtcOutboundRtpStreamStats( - {final String? trackId, - required final RtcOutboundRtpStreamStatsMediaType mediaType, - final int? bytesSent, - final int? packetsSent, - final String? mediaSourceId}) = - _$RtcStatsType_RtcOutboundRtpStreamStatsImpl; + {final String? trackId, + required final RtcOutboundRtpStreamStatsMediaType mediaType, + final int? bytesSent, + final int? packetsSent, + final String? mediaSourceId}) = _$RtcStatsType_RtcOutboundRtpStreamStats; /// ID of the stats object representing the current track attachment to /// the sender of the stream. @@ -6698,17 +6672,17 @@ abstract class RtcStatsType_RtcOutboundRtpStreamStats implements RtcStatsType { /// the sender of the stream. String? get mediaSourceId; @JsonKey(ignore: true) - _$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWith< - _$RtcStatsType_RtcOutboundRtpStreamStatsImpl> + _$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWith< + _$RtcStatsType_RtcOutboundRtpStreamStats> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWith<$Res> { - factory _$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWith( - _$RtcStatsType_RtcInboundRtpStreamStatsImpl value, - $Res Function(_$RtcStatsType_RtcInboundRtpStreamStatsImpl) then) = - __$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcInboundRtpStreamStatsCopyWith<$Res> { + factory _$$RtcStatsType_RtcInboundRtpStreamStatsCopyWith( + _$RtcStatsType_RtcInboundRtpStreamStats value, + $Res Function(_$RtcStatsType_RtcInboundRtpStreamStats) then) = + __$$RtcStatsType_RtcInboundRtpStreamStatsCopyWithImpl<$Res>; @useResult $Res call( {String? remoteId, @@ -6724,13 +6698,13 @@ abstract class _$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWithImpl<$Res> +class __$$RtcStatsType_RtcInboundRtpStreamStatsCopyWithImpl<$Res> extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcInboundRtpStreamStatsImpl> - implements _$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWith<$Res> { - __$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWithImpl( - _$RtcStatsType_RtcInboundRtpStreamStatsImpl _value, - $Res Function(_$RtcStatsType_RtcInboundRtpStreamStatsImpl) _then) + _$RtcStatsType_RtcInboundRtpStreamStats> + implements _$$RtcStatsType_RtcInboundRtpStreamStatsCopyWith<$Res> { + __$$RtcStatsType_RtcInboundRtpStreamStatsCopyWithImpl( + _$RtcStatsType_RtcInboundRtpStreamStats _value, + $Res Function(_$RtcStatsType_RtcInboundRtpStreamStats) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -6745,7 +6719,7 @@ class __$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWithImpl<$Res> Object? jitterBufferEmittedCount = freezed, Object? mediaType = freezed, }) { - return _then(_$RtcStatsType_RtcInboundRtpStreamStatsImpl( + return _then(_$RtcStatsType_RtcInboundRtpStreamStats( remoteId: freezed == remoteId ? _value.remoteId : remoteId // ignore: cast_nullable_to_non_nullable @@ -6797,9 +6771,9 @@ class __$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcInboundRtpStreamStatsImpl +class _$RtcStatsType_RtcInboundRtpStreamStats implements RtcStatsType_RtcInboundRtpStreamStats { - const _$RtcStatsType_RtcInboundRtpStreamStatsImpl( + const _$RtcStatsType_RtcInboundRtpStreamStats( {this.remoteId, this.bytesReceived, this.packetsReceived, @@ -6877,7 +6851,7 @@ class _$RtcStatsType_RtcInboundRtpStreamStatsImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcInboundRtpStreamStatsImpl && + other is _$RtcStatsType_RtcInboundRtpStreamStats && (identical(other.remoteId, remoteId) || other.remoteId == remoteId) && (identical(other.bytesReceived, bytesReceived) || @@ -6911,10 +6885,10 @@ class _$RtcStatsType_RtcInboundRtpStreamStatsImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWith< - _$RtcStatsType_RtcInboundRtpStreamStatsImpl> - get copyWith => __$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWithImpl< - _$RtcStatsType_RtcInboundRtpStreamStatsImpl>(this, _$identity); + _$$RtcStatsType_RtcInboundRtpStreamStatsCopyWith< + _$RtcStatsType_RtcInboundRtpStreamStats> + get copyWith => __$$RtcStatsType_RtcInboundRtpStreamStatsCopyWithImpl< + _$RtcStatsType_RtcInboundRtpStreamStats>(this, _$identity); @override @optionalTypeArgs @@ -7186,7 +7160,7 @@ abstract class RtcStatsType_RtcInboundRtpStreamStats implements RtcStatsType { final double? totalDecodeTime, final int? jitterBufferEmittedCount, final RtcInboundRtpStreamMediaType? mediaType}) = - _$RtcStatsType_RtcInboundRtpStreamStatsImpl; + _$RtcStatsType_RtcInboundRtpStreamStats; /// ID of the stats object representing the receiving track. String? get remoteId; @@ -7239,17 +7213,17 @@ abstract class RtcStatsType_RtcInboundRtpStreamStats implements RtcStatsType { /// `media_type`. RtcInboundRtpStreamMediaType? get mediaType; @JsonKey(ignore: true) - _$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWith< - _$RtcStatsType_RtcInboundRtpStreamStatsImpl> + _$$RtcStatsType_RtcInboundRtpStreamStatsCopyWith< + _$RtcStatsType_RtcInboundRtpStreamStats> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWith<$Res> { - factory _$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWith( - _$RtcStatsType_RtcIceCandidatePairStatsImpl value, - $Res Function(_$RtcStatsType_RtcIceCandidatePairStatsImpl) then) = - __$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcIceCandidatePairStatsCopyWith<$Res> { + factory _$$RtcStatsType_RtcIceCandidatePairStatsCopyWith( + _$RtcStatsType_RtcIceCandidatePairStats value, + $Res Function(_$RtcStatsType_RtcIceCandidatePairStats) then) = + __$$RtcStatsType_RtcIceCandidatePairStatsCopyWithImpl<$Res>; @useResult $Res call( {RtcStatsIceCandidatePairState state, @@ -7262,13 +7236,13 @@ abstract class _$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWithImpl<$Res> +class __$$RtcStatsType_RtcIceCandidatePairStatsCopyWithImpl<$Res> extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcIceCandidatePairStatsImpl> - implements _$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWith<$Res> { - __$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWithImpl( - _$RtcStatsType_RtcIceCandidatePairStatsImpl _value, - $Res Function(_$RtcStatsType_RtcIceCandidatePairStatsImpl) _then) + _$RtcStatsType_RtcIceCandidatePairStats> + implements _$$RtcStatsType_RtcIceCandidatePairStatsCopyWith<$Res> { + __$$RtcStatsType_RtcIceCandidatePairStatsCopyWithImpl( + _$RtcStatsType_RtcIceCandidatePairStats _value, + $Res Function(_$RtcStatsType_RtcIceCandidatePairStats) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -7282,7 +7256,7 @@ class __$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWithImpl<$Res> Object? currentRoundTripTime = freezed, Object? availableOutgoingBitrate = freezed, }) { - return _then(_$RtcStatsType_RtcIceCandidatePairStatsImpl( + return _then(_$RtcStatsType_RtcIceCandidatePairStats( state: null == state ? _value.state : state // ignore: cast_nullable_to_non_nullable @@ -7317,9 +7291,9 @@ class __$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcIceCandidatePairStatsImpl +class _$RtcStatsType_RtcIceCandidatePairStats implements RtcStatsType_RtcIceCandidatePairStats { - const _$RtcStatsType_RtcIceCandidatePairStatsImpl( + const _$RtcStatsType_RtcIceCandidatePairStats( {required this.state, this.nominated, this.bytesSent, @@ -7404,7 +7378,7 @@ class _$RtcStatsType_RtcIceCandidatePairStatsImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcIceCandidatePairStatsImpl && + other is _$RtcStatsType_RtcIceCandidatePairStats && (identical(other.state, state) || other.state == state) && (identical(other.nominated, nominated) || other.nominated == nominated) && @@ -7435,10 +7409,10 @@ class _$RtcStatsType_RtcIceCandidatePairStatsImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWith< - _$RtcStatsType_RtcIceCandidatePairStatsImpl> - get copyWith => __$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWithImpl< - _$RtcStatsType_RtcIceCandidatePairStatsImpl>(this, _$identity); + _$$RtcStatsType_RtcIceCandidatePairStatsCopyWith< + _$RtcStatsType_RtcIceCandidatePairStats> + get copyWith => __$$RtcStatsType_RtcIceCandidatePairStatsCopyWithImpl< + _$RtcStatsType_RtcIceCandidatePairStats>(this, _$identity); @override @optionalTypeArgs @@ -7700,7 +7674,7 @@ abstract class RtcStatsType_RtcIceCandidatePairStats implements RtcStatsType { final double? totalRoundTripTime, final double? currentRoundTripTime, final double? availableOutgoingBitrate}) = - _$RtcStatsType_RtcIceCandidatePairStatsImpl; + _$RtcStatsType_RtcIceCandidatePairStats; /// State of the checklist for the local and remote candidates in a /// pair. @@ -7762,17 +7736,17 @@ abstract class RtcStatsType_RtcIceCandidatePairStats implements RtcStatsType { /// [1]: https://tinyurl.com/rfc72eh double? get availableOutgoingBitrate; @JsonKey(ignore: true) - _$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWith< - _$RtcStatsType_RtcIceCandidatePairStatsImpl> + _$$RtcStatsType_RtcIceCandidatePairStatsCopyWith< + _$RtcStatsType_RtcIceCandidatePairStats> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcTransportStatsImplCopyWith<$Res> { - factory _$$RtcStatsType_RtcTransportStatsImplCopyWith( - _$RtcStatsType_RtcTransportStatsImpl value, - $Res Function(_$RtcStatsType_RtcTransportStatsImpl) then) = - __$$RtcStatsType_RtcTransportStatsImplCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcTransportStatsCopyWith<$Res> { + factory _$$RtcStatsType_RtcTransportStatsCopyWith( + _$RtcStatsType_RtcTransportStats value, + $Res Function(_$RtcStatsType_RtcTransportStats) then) = + __$$RtcStatsType_RtcTransportStatsCopyWithImpl<$Res>; @useResult $Res call( {int? packetsSent, @@ -7783,13 +7757,12 @@ abstract class _$$RtcStatsType_RtcTransportStatsImplCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcTransportStatsImplCopyWithImpl<$Res> - extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcTransportStatsImpl> - implements _$$RtcStatsType_RtcTransportStatsImplCopyWith<$Res> { - __$$RtcStatsType_RtcTransportStatsImplCopyWithImpl( - _$RtcStatsType_RtcTransportStatsImpl _value, - $Res Function(_$RtcStatsType_RtcTransportStatsImpl) _then) +class __$$RtcStatsType_RtcTransportStatsCopyWithImpl<$Res> + extends _$RtcStatsTypeCopyWithImpl<$Res, _$RtcStatsType_RtcTransportStats> + implements _$$RtcStatsType_RtcTransportStatsCopyWith<$Res> { + __$$RtcStatsType_RtcTransportStatsCopyWithImpl( + _$RtcStatsType_RtcTransportStats _value, + $Res Function(_$RtcStatsType_RtcTransportStats) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -7801,7 +7774,7 @@ class __$$RtcStatsType_RtcTransportStatsImplCopyWithImpl<$Res> Object? bytesReceived = freezed, Object? iceRole = freezed, }) { - return _then(_$RtcStatsType_RtcTransportStatsImpl( + return _then(_$RtcStatsType_RtcTransportStats( packetsSent: freezed == packetsSent ? _value.packetsSent : packetsSent // ignore: cast_nullable_to_non_nullable @@ -7828,9 +7801,9 @@ class __$$RtcStatsType_RtcTransportStatsImplCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcTransportStatsImpl +class _$RtcStatsType_RtcTransportStats implements RtcStatsType_RtcTransportStats { - const _$RtcStatsType_RtcTransportStatsImpl( + const _$RtcStatsType_RtcTransportStats( {this.packetsSent, this.packetsReceived, this.bytesSent, @@ -7877,7 +7850,7 @@ class _$RtcStatsType_RtcTransportStatsImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcTransportStatsImpl && + other is _$RtcStatsType_RtcTransportStats && (identical(other.packetsSent, packetsSent) || other.packetsSent == packetsSent) && (identical(other.packetsReceived, packetsReceived) || @@ -7896,10 +7869,9 @@ class _$RtcStatsType_RtcTransportStatsImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcTransportStatsImplCopyWith< - _$RtcStatsType_RtcTransportStatsImpl> - get copyWith => __$$RtcStatsType_RtcTransportStatsImplCopyWithImpl< - _$RtcStatsType_RtcTransportStatsImpl>(this, _$identity); + _$$RtcStatsType_RtcTransportStatsCopyWith<_$RtcStatsType_RtcTransportStats> + get copyWith => __$$RtcStatsType_RtcTransportStatsCopyWithImpl< + _$RtcStatsType_RtcTransportStats>(this, _$identity); @override @optionalTypeArgs @@ -8146,7 +8118,7 @@ abstract class RtcStatsType_RtcTransportStats implements RtcStatsType { final int? packetsReceived, final int? bytesSent, final int? bytesReceived, - final IceRole? iceRole}) = _$RtcStatsType_RtcTransportStatsImpl; + final IceRole? iceRole}) = _$RtcStatsType_RtcTransportStats; /// Total number of packets sent over this transport. int? get packetsSent; @@ -8174,19 +8146,16 @@ abstract class RtcStatsType_RtcTransportStats implements RtcStatsType { /// [3]: https://w3.org/TR/webrtc#dom-rtcdtlstransport-icetransport IceRole? get iceRole; @JsonKey(ignore: true) - _$$RtcStatsType_RtcTransportStatsImplCopyWith< - _$RtcStatsType_RtcTransportStatsImpl> + _$$RtcStatsType_RtcTransportStatsCopyWith<_$RtcStatsType_RtcTransportStats> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWith< - $Res> { - factory _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWith( - _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl value, - $Res Function(_$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl) - then) = - __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWith<$Res> { + factory _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWith( + _$RtcStatsType_RtcRemoteInboundRtpStreamStats value, + $Res Function(_$RtcStatsType_RtcRemoteInboundRtpStreamStats) then) = + __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWithImpl<$Res>; @useResult $Res call( {String? localId, @@ -8198,14 +8167,13 @@ abstract class _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWith< } /// @nodoc -class __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWithImpl<$Res> +class __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWithImpl<$Res> extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl> - implements - _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWith<$Res> { - __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWithImpl( - _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl _value, - $Res Function(_$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl) _then) + _$RtcStatsType_RtcRemoteInboundRtpStreamStats> + implements _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWith<$Res> { + __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWithImpl( + _$RtcStatsType_RtcRemoteInboundRtpStreamStats _value, + $Res Function(_$RtcStatsType_RtcRemoteInboundRtpStreamStats) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -8218,7 +8186,7 @@ class __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWithImpl<$Res> Object? reportsReceived = freezed, Object? roundTripTimeMeasurements = freezed, }) { - return _then(_$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl( + return _then(_$RtcStatsType_RtcRemoteInboundRtpStreamStats( localId: freezed == localId ? _value.localId : localId // ignore: cast_nullable_to_non_nullable @@ -8249,9 +8217,9 @@ class __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl +class _$RtcStatsType_RtcRemoteInboundRtpStreamStats implements RtcStatsType_RtcRemoteInboundRtpStreamStats { - const _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl( + const _$RtcStatsType_RtcRemoteInboundRtpStreamStats( {this.localId, this.jitter, this.roundTripTime, @@ -8318,7 +8286,7 @@ class _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl && + other is _$RtcStatsType_RtcRemoteInboundRtpStreamStats && (identical(other.localId, localId) || other.localId == localId) && (identical(other.jitter, jitter) || other.jitter == jitter) && (identical(other.roundTripTime, roundTripTime) || @@ -8339,12 +8307,11 @@ class _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWith< - _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl> + _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWith< + _$RtcStatsType_RtcRemoteInboundRtpStreamStats> get copyWith => - __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWithImpl< - _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl>( - this, _$identity); + __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWithImpl< + _$RtcStatsType_RtcRemoteInboundRtpStreamStats>(this, _$identity); @override @optionalTypeArgs @@ -8594,7 +8561,7 @@ abstract class RtcStatsType_RtcRemoteInboundRtpStreamStats final double? fractionLost, final int? reportsReceived, final int? roundTripTimeMeasurements}) = - _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl; + _$RtcStatsType_RtcRemoteInboundRtpStreamStats; /// [localId] is used for looking up the local /// [RTCOutboundRtpStreamStats][1] object for the same [SSRC]. @@ -8640,32 +8607,29 @@ abstract class RtcStatsType_RtcRemoteInboundRtpStreamStats /// [SSRC]: https://w3.org/TR/webrtc-stats#dfn-ssrc int? get roundTripTimeMeasurements; @JsonKey(ignore: true) - _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWith< - _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl> + _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWith< + _$RtcStatsType_RtcRemoteInboundRtpStreamStats> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWith< - $Res> { - factory _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWith( - _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl value, - $Res Function(_$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl) - then) = - __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWith<$Res> { + factory _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWith( + _$RtcStatsType_RtcRemoteOutboundRtpStreamStats value, + $Res Function(_$RtcStatsType_RtcRemoteOutboundRtpStreamStats) then) = + __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWithImpl<$Res>; @useResult $Res call({String? localId, double? remoteTimestamp, int? reportsSent}); } /// @nodoc -class __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWithImpl<$Res> +class __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWithImpl<$Res> extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl> - implements - _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWith<$Res> { - __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWithImpl( - _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl _value, - $Res Function(_$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl) _then) + _$RtcStatsType_RtcRemoteOutboundRtpStreamStats> + implements _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWith<$Res> { + __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWithImpl( + _$RtcStatsType_RtcRemoteOutboundRtpStreamStats _value, + $Res Function(_$RtcStatsType_RtcRemoteOutboundRtpStreamStats) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -8675,7 +8639,7 @@ class __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWithImpl<$Res> Object? remoteTimestamp = freezed, Object? reportsSent = freezed, }) { - return _then(_$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl( + return _then(_$RtcStatsType_RtcRemoteOutboundRtpStreamStats( localId: freezed == localId ? _value.localId : localId // ignore: cast_nullable_to_non_nullable @@ -8694,9 +8658,9 @@ class __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl +class _$RtcStatsType_RtcRemoteOutboundRtpStreamStats implements RtcStatsType_RtcRemoteOutboundRtpStreamStats { - const _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl( + const _$RtcStatsType_RtcRemoteOutboundRtpStreamStats( {this.localId, this.remoteTimestamp, this.reportsSent}); /// [localId] is used for looking up the local @@ -8737,7 +8701,7 @@ class _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl && + other is _$RtcStatsType_RtcRemoteOutboundRtpStreamStats && (identical(other.localId, localId) || other.localId == localId) && (identical(other.remoteTimestamp, remoteTimestamp) || other.remoteTimestamp == remoteTimestamp) && @@ -8752,12 +8716,11 @@ class _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWith< - _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl> + _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWith< + _$RtcStatsType_RtcRemoteOutboundRtpStreamStats> get copyWith => - __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWithImpl< - _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl>( - this, _$identity); + __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWithImpl< + _$RtcStatsType_RtcRemoteOutboundRtpStreamStats>(this, _$identity); @override @optionalTypeArgs @@ -9001,10 +8964,9 @@ class _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl abstract class RtcStatsType_RtcRemoteOutboundRtpStreamStats implements RtcStatsType { const factory RtcStatsType_RtcRemoteOutboundRtpStreamStats( - {final String? localId, - final double? remoteTimestamp, - final int? reportsSent}) = - _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl; + {final String? localId, + final double? remoteTimestamp, + final int? reportsSent}) = _$RtcStatsType_RtcRemoteOutboundRtpStreamStats; /// [localId] is used for looking up the local /// [RTCInboundRtpStreamStats][1] object for the same [SSRC]. @@ -9032,33 +8994,33 @@ abstract class RtcStatsType_RtcRemoteOutboundRtpStreamStats /// [SSRC]: https://w3.org/TR/webrtc-stats#dfn-ssrc int? get reportsSent; @JsonKey(ignore: true) - _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWith< - _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl> + _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWith< + _$RtcStatsType_RtcRemoteOutboundRtpStreamStats> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_UnimplementedImplCopyWith<$Res> { - factory _$$RtcStatsType_UnimplementedImplCopyWith( - _$RtcStatsType_UnimplementedImpl value, - $Res Function(_$RtcStatsType_UnimplementedImpl) then) = - __$$RtcStatsType_UnimplementedImplCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_UnimplementedCopyWith<$Res> { + factory _$$RtcStatsType_UnimplementedCopyWith( + _$RtcStatsType_Unimplemented value, + $Res Function(_$RtcStatsType_Unimplemented) then) = + __$$RtcStatsType_UnimplementedCopyWithImpl<$Res>; } /// @nodoc -class __$$RtcStatsType_UnimplementedImplCopyWithImpl<$Res> - extends _$RtcStatsTypeCopyWithImpl<$Res, _$RtcStatsType_UnimplementedImpl> - implements _$$RtcStatsType_UnimplementedImplCopyWith<$Res> { - __$$RtcStatsType_UnimplementedImplCopyWithImpl( - _$RtcStatsType_UnimplementedImpl _value, - $Res Function(_$RtcStatsType_UnimplementedImpl) _then) +class __$$RtcStatsType_UnimplementedCopyWithImpl<$Res> + extends _$RtcStatsTypeCopyWithImpl<$Res, _$RtcStatsType_Unimplemented> + implements _$$RtcStatsType_UnimplementedCopyWith<$Res> { + __$$RtcStatsType_UnimplementedCopyWithImpl( + _$RtcStatsType_Unimplemented _value, + $Res Function(_$RtcStatsType_Unimplemented) _then) : super(_value, _then); } /// @nodoc -class _$RtcStatsType_UnimplementedImpl implements RtcStatsType_Unimplemented { - const _$RtcStatsType_UnimplementedImpl(); +class _$RtcStatsType_Unimplemented implements RtcStatsType_Unimplemented { + const _$RtcStatsType_Unimplemented(); @override String toString() { @@ -9069,7 +9031,7 @@ class _$RtcStatsType_UnimplementedImpl implements RtcStatsType_Unimplemented { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_UnimplementedImpl); + other is _$RtcStatsType_Unimplemented); } @override @@ -9312,5 +9274,5 @@ class _$RtcStatsType_UnimplementedImpl implements RtcStatsType_Unimplemented { } abstract class RtcStatsType_Unimplemented implements RtcStatsType { - const factory RtcStatsType_Unimplemented() = _$RtcStatsType_UnimplementedImpl; + const factory RtcStatsType_Unimplemented() = _$RtcStatsType_Unimplemented; } diff --git a/lib/src/platform/native/media_stream_track.dart b/lib/src/platform/native/media_stream_track.dart index 50a14c2b42..3957f6b4dc 100644 --- a/lib/src/platform/native/media_stream_track.dart +++ b/lib/src/platform/native/media_stream_track.dart @@ -158,6 +158,16 @@ class _NativeMediaStreamTrackChannel extends NativeMediaStreamTrack { FacingMode? facingMode() { return _facingMode; } + + @override + Future height() async { + return await _chan.invokeMethod('height'); + } + + @override + Future width() async { + return await _chan.invokeMethod('width'); + } } /// FFI-based implementation of a [NativeMediaStreamTrack]. @@ -233,4 +243,17 @@ class _NativeMediaStreamTrackFFI extends NativeMediaStreamTrack { FacingMode? facingMode() { return null; } + + @override + Future height() async { + return await api! + .trackHieght(trackId: _id, kind: ffi.MediaType.values[_kind.index]); + } + + @override + Future width() async { + print("BOOM"); + return await api! + .trackWidth(trackId: _id, kind: ffi.MediaType.values[_kind.index]); + } } diff --git a/lib/src/platform/track.dart b/lib/src/platform/track.dart index 183b9f1e9a..c13b100455 100644 --- a/lib/src/platform/track.dart +++ b/lib/src/platform/track.dart @@ -57,4 +57,7 @@ abstract class MediaStreamTrack { /// Returns [FacingMode] of this [MediaStreamTrack]. FacingMode? facingMode(); + + Future width(); + Future height(); } From 1c367400d8d953cd050af54f659374b2e949b33b Mon Sep 17 00:00:00 2001 From: rogurotus Date: Wed, 11 Oct 2023 12:52:41 +0300 Subject: [PATCH 02/14] fix android --- .../SurfaceTextureRenderer.kt | 1 - .../proxy/MediaStreamTrackProxy.kt | 53 ++++++++----------- 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/SurfaceTextureRenderer.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/SurfaceTextureRenderer.kt index 8173cb48f6..20a38c49e5 100755 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/SurfaceTextureRenderer.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/SurfaceTextureRenderer.kt @@ -94,7 +94,6 @@ class SurfaceTextureRenderer(name: String) : EglRenderer(name) { frameRotation = frame.rotation } } - Log.d("AAAAAAAAAA", "42") super.onFrame(frame) } diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt index 5f8b88f80a..b163b7c053 100644 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt @@ -41,10 +41,19 @@ class MediaStreamTrackProxy( /** Indicator whether the underlying [MediaStreamTrack] had been disposed. */ private var disposed: Boolean = false - var widthInit = CompletableDeferred() - var heightInit = CompletableDeferred() + /** [VideoSink] to track height and width changes. */ + private lateinit var sink: VideoSink + /** Provides asynchronous wait for [width] initialization. */ + private val widthInit = CompletableDeferred() + + /** Provides asynchronous wait for [height] initialization. */ + private val heightInit = CompletableDeferred() + + /** Video width */ var width: Int = 0 + + /** Video height */ var height: Int = 0 /** [MediaType] of the underlying [MediaStreamTrack]. */ @@ -76,55 +85,37 @@ class MediaStreamTrackProxy( if (kind == MediaType.VIDEO) { if (deviceId == "remote") { - Log.d(deviceId, " " + track.id() + " " + width.toString() + " " + height.toString()) widthInit.complete(Unit) heightInit.complete(Unit) } - val track = obj as VideoTrack - val sink = object : VideoSink { - override fun onFrame(p0: VideoFrame) { -// Log.d(deviceId, " " + p0?.rotatedWidth + " " + p0?.rotatedHeight) - widthInit.complete(Unit) - heightInit.complete(Unit) - + sink = VideoSink { p0 -> + width = p0.rotatedWidth + widthInit.complete(Unit) - width = p0.rotatedWidth - height = p0.rotatedHeight + height = p0.rotatedHeight + heightInit.complete(Unit) + } + (obj as VideoTrack).addSink(sink) - if (deviceId == "remote") { - Log.d(deviceId, " " + width.toString() + " " + height.toString()) - } - } + addOnSyncListener { + (obj as VideoTrack).addSink(sink) } - Log.d(deviceId, " ADDDDDDDDD " + track.id() + " " + (sink == null).toString() ) - track.addSink(sink) } } + /** Returns the video [width] of the track. */ suspend fun width() : Int? { if (kind == MediaType.AUDIO) { return null } - val track = obj as VideoTrack - val sink = object : VideoSink { - override fun onFrame(p0: VideoFrame) { - if (deviceId == "remote") { - Log.d(deviceId, "WWWWWWWWW ") - } - } - } - Log.d(deviceId, "ACCCCCCCCCCCC " + track.id() + " " + (sink == null).toString() ) - - track.addSink(sink) - - widthInit.await() return width } + /** Returns the video [height] of the track. */ suspend fun height() : Int? { if (kind == MediaType.AUDIO) { return null From af40b122c20873eb93f2863172ed863c21b113d0 Mon Sep 17 00:00:00 2001 From: rogurotus Date: Wed, 11 Oct 2023 13:56:38 +0300 Subject: [PATCH 03/14] add doc --- .../SurfaceTextureRenderer.kt | 1 - .../controller/MediaStreamTrackController.kt | 10 +- .../proxy/MediaStreamTrackProxy.kt | 10 +- .../proxy/VideoTrackProxy.kt | 2 +- crates/libwebrtc-sys/src/cpp/video_sink.cc | 6 +- crates/native/src/api.rs | 26 +- crates/native/src/bridge_generated.rs | 48 +- crates/native/src/lib.rs | 3 +- crates/native/src/pc.rs | 11 +- crates/native/src/user_media.rs | 119 +- crates/native/src/video_sink.rs | 3 +- example/lib/src/loopback.dart | 36 +- lib/src/api/bridge.g.dart | 146 +- lib/src/api/bridge.g.freezed.dart | 1284 +++++++++-------- .../platform/native/media_stream_track.dart | 3 +- lib/src/platform/track.dart | 3 + lib/src/platform/web/media_stream_track.dart | 12 + 17 files changed, 861 insertions(+), 862 deletions(-) diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/SurfaceTextureRenderer.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/SurfaceTextureRenderer.kt index 4561a3fdf5..013d58becd 100755 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/SurfaceTextureRenderer.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/SurfaceTextureRenderer.kt @@ -1,7 +1,6 @@ package com.instrumentisto.medea_flutter_webrtc import android.graphics.SurfaceTexture -import android.util.Log import java.util.concurrent.CountDownLatch import org.webrtc.* import org.webrtc.RendererCommon.GlDrawer diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/controller/MediaStreamTrackController.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/controller/MediaStreamTrackController.kt index 380044f9e7..b365f186bd 100644 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/controller/MediaStreamTrackController.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/controller/MediaStreamTrackController.kt @@ -1,9 +1,7 @@ package com.instrumentisto.medea_flutter_webrtc.controller -import com.instrumentisto.medea_flutter_webrtc.model.MediaType import com.instrumentisto.medea_flutter_webrtc.proxy.MediaStreamTrackProxy import com.instrumentisto.medea_flutter_webrtc.utils.AnyThreadSink -import com.instrumentisto.medea_flutter_webrtc.utils.resultUnhandledException import io.flutter.plugin.common.BinaryMessenger import io.flutter.plugin.common.EventChannel import io.flutter.plugin.common.MethodCall @@ -61,14 +59,10 @@ class MediaStreamTrackController( result.success(track.state.value) } "width" -> { - GlobalScope.launch(Dispatchers.Main) { - result.success(track.width()) - } + GlobalScope.launch(Dispatchers.Main) { result.success(track.width()) } } "height" -> { - GlobalScope.launch(Dispatchers.Main) { - result.success(track.height()) - } + GlobalScope.launch(Dispatchers.Main) { result.success(track.height()) } } "stop" -> { track.stop() diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt index b163b7c053..0b44d3f6c0 100644 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt @@ -7,7 +7,6 @@ import com.instrumentisto.medea_flutter_webrtc.model.MediaStreamTrackState import com.instrumentisto.medea_flutter_webrtc.model.MediaType import kotlinx.coroutines.CompletableDeferred import org.webrtc.MediaStreamTrack -import org.webrtc.VideoFrame import org.webrtc.VideoSink import org.webrtc.VideoTrack @@ -98,15 +97,12 @@ class MediaStreamTrackProxy( } (obj as VideoTrack).addSink(sink) - addOnSyncListener { - (obj as VideoTrack).addSink(sink) - } + addOnSyncListener { (obj as VideoTrack).addSink(sink) } } - } /** Returns the video [width] of the track. */ - suspend fun width() : Int? { + suspend fun width(): Int? { if (kind == MediaType.AUDIO) { return null } @@ -116,7 +112,7 @@ class MediaStreamTrackProxy( } /** Returns the video [height] of the track. */ - suspend fun height() : Int? { + suspend fun height(): Int? { if (kind == MediaType.AUDIO) { return null } diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/VideoTrackProxy.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/VideoTrackProxy.kt index 0f41c17fcd..5fb1780d92 100644 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/VideoTrackProxy.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/VideoTrackProxy.kt @@ -43,6 +43,6 @@ class VideoTrackProxy(private val track: MediaStreamTrackProxy) { * Adds every [SurfaceTextureRenderer] from the [sinks] to the updater underlying [WVideoTrack]. */ private fun renewSinks() { -// sinks.forEach { getVideoTrack().addSink(it) } + // sinks.forEach { getVideoTrack().addSink(it) } } } diff --git a/crates/libwebrtc-sys/src/cpp/video_sink.cc b/crates/libwebrtc-sys/src/cpp/video_sink.cc index 62bbf5e1ba..64d7ef0da8 100644 --- a/crates/libwebrtc-sys/src/cpp/video_sink.cc +++ b/crates/libwebrtc-sys/src/cpp/video_sink.cc @@ -7,14 +7,10 @@ namespace video_sink { // Creates a new `ForwardingVideoSink` backed by the provided // `DynOnFrameCallback`. ForwardingVideoSink::ForwardingVideoSink( - rust::Box cb_) : cb_(std::move(cb_)) { - std::cout << "|||||||||| WTF WTF " << std::endl; - - } + rust::Box cb_) : cb_(std::move(cb_)) {} // Propagates the received `VideoFrame` to the Rust side. void ForwardingVideoSink::OnFrame(const webrtc::VideoFrame& video_frame) { - std::cout << " WTF WTF " << std::endl; bridge::on_frame(*cb_.value(), std::make_unique(video_frame)); } diff --git a/crates/native/src/api.rs b/crates/native/src/api.rs index 640fd6b922..e564381b94 100644 --- a/crates/native/src/api.rs +++ b/crates/native/src/api.rs @@ -17,7 +17,7 @@ use crate::{ // Re-exporting since it is used in the generated code. pub use crate::{ - PeerConnection, RtpEncodingParameters, RtpTransceiver, RtpTransceiverInit, + PeerConnection, RtpEncodingParams, RtpTransceiver, RtpTransceiverInit, }; lazy_static::lazy_static! { @@ -1939,7 +1939,7 @@ pub fn set_transceiver_init_direction( #[allow(clippy::needless_pass_by_value)] pub fn add_transceiver_init_send_encoding( init: RustOpaque>, - encoding: RustOpaque>, + encoding: RustOpaque>, ) { init.add_encoding(&encoding); } @@ -1953,8 +1953,8 @@ pub fn create_encoding_parameters( max_framerate: Option, scale_resolution_down_by: Option, scalability_mode: Option, -) -> RustOpaque> { - let encoding = RtpEncodingParameters::new(); +) -> RustOpaque> { + let encoding = RtpEncodingParams::new(); encoding.set_rid(rid); encoding.set_active(active); @@ -2185,7 +2185,7 @@ pub fn track_state( } // todo -pub fn track_hieght( +pub fn track_height( track_id: String, kind: MediaType, ) -> anyhow::Result> { @@ -2193,13 +2193,7 @@ pub fn track_hieght( return Ok(None); } - println!("HMM1"); - let res = WEBRTC - .lock() - .unwrap() - .track_hieght(track_id) - .map(|v| Some(v)); - println!("HMM2"); + let res = WEBRTC.lock().unwrap().track_height(track_id).map(Some); res } @@ -2212,13 +2206,7 @@ pub fn track_width( return Ok(None); } - println!("wMM1"); - let res = WEBRTC - .lock() - .unwrap() - .track_width(track_id) - .map(|v| Some(v)); - println!("wMM2"); + let res = WEBRTC.lock().unwrap().track_width(track_id).map(Some); res } diff --git a/crates/native/src/bridge_generated.rs b/crates/native/src/bridge_generated.rs index 3ae2c4607e..76cf1b5d3b 100644 --- a/crates/native/src/bridge_generated.rs +++ b/crates/native/src/bridge_generated.rs @@ -13,10 +13,8 @@ use crate::api::*; use core::panic::UnwindSafe; -use flutter_rust_bridge::rust2dart::IntoIntoDart; -use flutter_rust_bridge::*; -use std::ffi::c_void; -use std::sync::Arc; +use flutter_rust_bridge::{rust2dart::IntoIntoDart, *}; +use std::{ffi::c_void, sync::Arc}; // Section: imports @@ -177,7 +175,7 @@ fn wire_set_transceiver_init_direction_impl( fn wire_add_transceiver_init_send_encoding_impl( port_: MessagePort, init: impl Wire2Api>> + UnwindSafe, - encoding: impl Wire2Api>> + UnwindSafe, + encoding: impl Wire2Api>> + UnwindSafe, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>( WrapInfo { @@ -204,7 +202,7 @@ fn wire_create_encoding_parameters_impl( scalability_mode: impl Wire2Api> + UnwindSafe, ) { FLUTTER_RUST_BRIDGE_HANDLER - .wrap::<_, _, _, RustOpaque>>( + .wrap::<_, _, _, RustOpaque>>( WrapInfo { debug_name: "create_encoding_parameters", port: Some(port_), @@ -620,21 +618,21 @@ fn wire_track_state_impl( }, ) } -fn wire_track_hieght_impl( +fn wire_track_height_impl( port_: MessagePort, track_id: impl Wire2Api + UnwindSafe, kind: impl Wire2Api + UnwindSafe, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option>( WrapInfo { - debug_name: "track_hieght", + debug_name: "track_height", port: Some(port_), mode: FfiCallMode::Normal, }, move || { let api_track_id = track_id.wire2api(); let api_kind = kind.wire2api(); - move |task_callback| track_hieght(api_track_id, api_kind) + move |task_callback| track_height(api_track_id, api_kind) }, ) } @@ -1659,7 +1657,8 @@ impl rust2dart::IntoIntoDart for TrackState { // Section: executor support::lazy_static! { - pub static ref FLUTTER_RUST_BRIDGE_HANDLER: support::DefaultHandler = Default::default(); + pub static ref FLUTTER_RUST_BRIDGE_HANDLER: support::DefaultHandler = + Default::default(); } #[cfg(not(target_family = "wasm"))] @@ -1747,7 +1746,7 @@ mod io { pub extern "C" fn wire_add_transceiver_init_send_encoding( port_: i64, init: wire_ArcRtpTransceiverInit, - encoding: wire_ArcRtpEncodingParameters, + encoding: wire_ArcRtpEncodingParams, ) { wire_add_transceiver_init_send_encoding_impl(port_, init, encoding) } @@ -1963,12 +1962,12 @@ mod io { } #[no_mangle] - pub extern "C" fn wire_track_hieght( + pub extern "C" fn wire_track_height( port_: i64, track_id: *mut wire_uint_8_list, kind: i32, ) { - wire_track_hieght_impl(port_, track_id, kind) + wire_track_height_impl(port_, track_id, kind) } #[no_mangle] @@ -2036,9 +2035,8 @@ mod io { } #[no_mangle] - pub extern "C" fn new_ArcRtpEncodingParameters( - ) -> wire_ArcRtpEncodingParameters { - wire_ArcRtpEncodingParameters::new_with_null_ptr() + pub extern "C" fn new_ArcRtpEncodingParams() -> wire_ArcRtpEncodingParams { + wire_ArcRtpEncodingParams::new_with_null_ptr() } #[no_mangle] @@ -2143,18 +2141,18 @@ mod io { } #[no_mangle] - pub extern "C" fn drop_opaque_ArcRtpEncodingParameters(ptr: *const c_void) { + pub extern "C" fn drop_opaque_ArcRtpEncodingParams(ptr: *const c_void) { unsafe { - Arc::>::decrement_strong_count(ptr as _); + Arc::>::decrement_strong_count(ptr as _); } } #[no_mangle] - pub extern "C" fn share_opaque_ArcRtpEncodingParameters( + pub extern "C" fn share_opaque_ArcRtpEncodingParams( ptr: *const c_void, ) -> *const c_void { unsafe { - Arc::>::increment_strong_count(ptr as _); + Arc::>::increment_strong_count(ptr as _); ptr } } @@ -2200,10 +2198,10 @@ mod io { unsafe { support::opaque_from_dart(self.ptr as _) } } } - impl Wire2Api>> - for wire_ArcRtpEncodingParameters + impl Wire2Api>> + for wire_ArcRtpEncodingParams { - fn wire2api(self) -> RustOpaque> { + fn wire2api(self) -> RustOpaque> { unsafe { support::opaque_from_dart(self.ptr as _) } } } @@ -2343,7 +2341,7 @@ mod io { #[repr(C)] #[derive(Clone)] - pub struct wire_ArcRtpEncodingParameters { + pub struct wire_ArcRtpEncodingParams { ptr: *const core::ffi::c_void, } @@ -2438,7 +2436,7 @@ mod io { } } } - impl NewWithNullPtr for wire_ArcRtpEncodingParameters { + impl NewWithNullPtr for wire_ArcRtpEncodingParams { fn new_with_null_ptr() -> Self { Self { ptr: core::ptr::null(), diff --git a/crates/native/src/lib.rs b/crates/native/src/lib.rs index ea56c92e34..efc6c63933 100644 --- a/crates/native/src/lib.rs +++ b/crates/native/src/lib.rs @@ -35,8 +35,7 @@ use crate::video_sink::Id as VideoSinkId; #[doc(inline)] pub use crate::{ pc::{ - PeerConnection, RtpEncodingParameters, RtpTransceiver, - RtpTransceiverInit, + PeerConnection, RtpEncodingParams, RtpTransceiver, RtpTransceiverInit, }, user_media::{ AudioDeviceId, AudioDeviceModule, AudioTrack, AudioTrackId, diff --git a/crates/native/src/pc.rs b/crates/native/src/pc.rs index 376f54c96d..2623a16ad9 100644 --- a/crates/native/src/pc.rs +++ b/crates/native/src/pc.rs @@ -592,10 +592,7 @@ impl RtpTransceiverInit { /// /// If the mutex guarding the [`sys::RtpTransceiverInit`] or the /// [`sys::RtpEncodingParameters`] is poisoned. - pub fn add_encoding( - &self, - encoding: &RustOpaque>, - ) { + pub fn add_encoding(&self, encoding: &RustOpaque>) { self.0 .lock() .unwrap() @@ -610,9 +607,9 @@ impl Default for RtpTransceiverInit { } /// Wrapper around a [`sys::RtpEncodingParameters`]. -pub struct RtpEncodingParameters(Arc>); +pub struct RtpEncodingParams(Arc>); -impl RtpEncodingParameters { +impl RtpEncodingParams { /// Creates a new [`RtpEncodingParameters`]. #[must_use] pub fn new() -> Self { @@ -681,7 +678,7 @@ impl RtpEncodingParameters { } } -impl Default for RtpEncodingParameters { +impl Default for RtpEncodingParams { fn default() -> Self { Self::new() } diff --git a/crates/native/src/user_media.rs b/crates/native/src/user_media.rs index 6d1f1ad889..5ff2050004 100644 --- a/crates/native/src/user_media.rs +++ b/crates/native/src/user_media.rs @@ -1,7 +1,7 @@ use std::{ collections::{HashMap, HashSet}, hash::Hash, - sync::{Arc, Weak, RwLock}, + sync::{Arc, RwLock, Weak}, }; use anyhow::{anyhow, bail, Context}; @@ -107,7 +107,7 @@ impl Webrtc { } } if let MediaTrackSource::Local(src) = &track.source { - if Arc::strong_count(&src) == 2 { + if Arc::strong_count(src) == 2 { self.video_sources.remove(&src.device_id); }; } @@ -343,23 +343,34 @@ impl Webrtc { }) } - // todo + /// Returns the [width][0] property of the media track by its ID and + /// media type. + /// Blocks until width is initialized. + /// + /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-width pub fn track_width(&self, id: String) -> anyhow::Result { Ok({ let id = VideoTrackId::from(id); - *self - .video_tracks - .get(&id) - .ok_or_else(|| { - anyhow!("Cannot find video track with ID `{id}`") - })? - .width.wait().read().unwrap() + *self + .video_tracks + .get(&id) + .ok_or_else(|| { + anyhow!("Cannot find video track with ID `{id}`") + })? + .width + .wait() + .read() + .unwrap() }) } - // todo - pub fn track_hieght(&self, id: String) -> anyhow::Result { + /// Returns the [height][0] property of the media track by its ID and + /// media type. + /// Blocks until width is initialized. + /// + /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height + pub fn track_height(&self, id: String) -> anyhow::Result { Ok({ let id = VideoTrackId::from(id); *self @@ -369,7 +380,9 @@ impl Webrtc { anyhow!("Cannot find video track with ID `{id}`") })? .height - .wait().read().unwrap() + .wait() + .read() + .unwrap() }) } @@ -948,13 +961,36 @@ pub struct VideoTrack { /// Peers and transceivers sending this [`VideoTrack`]. pub senders: HashMap, HashSet>>, + /// Tracks changes in video `height` and `width`. sink: Option, + /// Video width. + width: Arc>>, + + /// Video height. + height: Arc>>, +} + +/// Tracks changes in video `height` and `width`. +struct VideoFormatSink { + /// Video width. width: Arc>>, + /// Video height. height: Arc>>, } +impl OnFrameCallback for VideoFormatSink { + fn on_frame(&mut self, frame: cxx::UniquePtr) { + if self.width.get().is_none() { + self.width.set(RwLock::from(frame.width())).unwrap(); + self.height.set(RwLock::from(frame.height())).unwrap(); + } + *self.width.get().unwrap().write().unwrap() = frame.width(); + *self.height.get().unwrap().write().unwrap() = frame.height(); + } +} + impl VideoTrack { /// Creates a new [`VideoTrack`]. fn create_local( @@ -963,28 +999,16 @@ impl VideoTrack { ) -> anyhow::Result { let id = VideoTrackId(next_id().to_string()); - struct Temp { - width: Arc>>, - height: Arc>>, - } - impl OnFrameCallback for Temp { - fn on_frame(&mut self, frame: cxx::UniquePtr) { - if self.width.get().is_none() { - self.width.set(RwLock::from(frame.width())).unwrap(); - self.height.set(RwLock::from(frame.height())).unwrap(); - } - } - } - let width = Arc::new(OnceCell::new()); let height = Arc::new(OnceCell::new()); - let mut sink = VideoSink::new( - next_id() as i64, - sys::VideoSinkInterface::create_forwarding(Box::new(Temp { - width: Arc::clone(&width), - height: Arc::clone(&height), - })), + i64::try_from(next_id()).unwrap(), + sys::VideoSinkInterface::create_forwarding(Box::new( + VideoFormatSink { + width: Arc::clone(&width), + height: Arc::clone(&height), + }, + )), id.clone(), ); @@ -1015,30 +1039,18 @@ impl VideoTrack { let receiver = transceiver.receiver(); let track = receiver.track(); - - struct Temp { - width: Arc>>, - height: Arc>>, - } - impl OnFrameCallback for Temp { - fn on_frame(&mut self, frame: cxx::UniquePtr) { - *self.width.get().unwrap().write().unwrap() = frame.width(); - *self.height.get().unwrap().write().unwrap() = frame.height(); - } - } - let width = Arc::new(OnceCell::new()); width.set(RwLock::from(0)).unwrap(); let height = Arc::new(OnceCell::new()); height.set(RwLock::from(0)).unwrap(); - - let mut sink = VideoSink::new( - next_id() as i64, - sys::VideoSinkInterface::create_forwarding(Box::new(Temp { - width: Arc::clone(&width), - height: Arc::clone(&height), - })), + i64::try_from(next_id()).unwrap(), + sys::VideoSinkInterface::create_forwarding(Box::new( + VideoFormatSink { + width: Arc::clone(&width), + height: Arc::clone(&height), + }, + )), VideoTrackId(track.id().clone()), ); @@ -1054,8 +1066,8 @@ impl VideoTrack { kind: api::MediaType::Video, sinks: Vec::new(), senders: HashMap::new(), - width: width, - height: height, + width, + height, sink: None, }; @@ -1097,7 +1109,6 @@ impl VideoTrack { impl Drop for VideoTrack { fn drop(&mut self) { - println!("GHMDD"); let sink = self.sink.take().unwrap(); self.remove_video_sink(sink); } diff --git a/crates/native/src/video_sink.rs b/crates/native/src/video_sink.rs index 5c956c11e1..1c69fb892e 100644 --- a/crates/native/src/video_sink.rs +++ b/crates/native/src/video_sink.rs @@ -65,7 +65,8 @@ pub struct VideoSink { } impl VideoSink { - // todo + /// Creates a new [`VideoSink`]. + #[must_use] pub fn new( id: i64, sink: sys::VideoSinkInterface, diff --git a/example/lib/src/loopback.dart b/example/lib/src/loopback.dart index fd299e809c..b0d2c3df76 100644 --- a/example/lib/src/loopback.dart +++ b/example/lib/src/loopback.dart @@ -16,7 +16,6 @@ class Loopback extends StatefulWidget { class _LoopbackState extends State { List? _mediaDevicesList; List? _tracks; - List _Rtracks = List.empty(growable: true); PeerConnection? _pc1; PeerConnection? _pc2; @@ -72,12 +71,8 @@ class _LoopbackState extends State { _mediaDevicesList = await enumerateDevices(); _tracks = await getUserMedia(caps); - for (var i in _tracks!) { - print("LOCAL W - ${await i.width()} H - ${await i.height()}\n\n\n\n\n"); - } - - // await _localRenderer.setSrcObject( - // _tracks!.firstWhere((track) => track.kind() == MediaKind.video)); + await _localRenderer.setSrcObject( + _tracks!.firstWhere((track) => track.kind() == MediaKind.video)); var server = IceServer(['stun:stun.l.google.com:19302']); _pc1 = await PeerConnection.create(IceTransportType.all, [server]); @@ -91,13 +86,8 @@ class _LoopbackState extends State { }); _pc2?.onTrack((track, trans) async { - print('CCCCCCCCCCCCCCccc ${track.id()}'); - _Rtracks.add(track); if (track.kind() == MediaKind.video) { await _remoteRenderer.setSrcObject(track); - print("object"); - print( - "\n\n\n\n REMOTE W - ${await track.width()} H - ${await track.height()} \n\n\n\n"); } }); @@ -107,12 +97,9 @@ class _LoopbackState extends State { var atrans = await _pc1?.addTransceiver( MediaKind.audio, RtpTransceiverInit(TransceiverDirection.sendOnly)); - print("object2"); - var offer = await _pc1?.createOffer(); await _pc1?.setLocalDescription(offer!); await _pc2?.setRemoteDescription(offer!); - print("object3"); var answer = await _pc2?.createAnswer(); await _pc2?.setLocalDescription(answer!); @@ -128,20 +115,11 @@ class _LoopbackState extends State { await _pc1?.addIceCandidate(candidate); }); - print("object4"); - await vtrans?.sender.replaceTrack( _tracks!.firstWhere((track) => track.kind() == MediaKind.video)); - print("object5"); await atrans?.sender.replaceTrack( _tracks!.firstWhere((track) => track.kind() == MediaKind.audio)); - - await Future.delayed(Duration(milliseconds: 100)); - for (var track in _Rtracks) { - print( - "\n\n\n OPA REMOTE W - ${await track.width()} H - ${await track.height()}\n\n\n"); - } } catch (e) { print(e.toString()); } @@ -165,16 +143,6 @@ class _LoopbackState extends State { await track.dispose(); } - _tracks!.clear(); - - for (var track in _Rtracks) { - print("REMOTE W - ${await track.width()} H - ${await track.height()}"); - await track.stop(); - await track.dispose(); - } - - _Rtracks.clear(); - await _pc1?.close(); await _pc2?.close(); diff --git a/lib/src/api/bridge.g.dart b/lib/src/api/bridge.g.dart index 3585742c13..6c3600ea24 100644 --- a/lib/src/api/bridge.g.dart +++ b/lib/src/api/bridge.g.dart @@ -2,14 +2,14 @@ // Generated by `flutter_rust_bridge`@ 1.81.0. // ignore_for_file: non_constant_identifier_names, unused_element, duplicate_ignore, directives_ordering, curly_braces_in_flow_control_structures, unnecessary_lambdas, slash_for_doc_comments, prefer_const_literals_to_create_immutables, implicit_dynamic_list_literal, duplicate_import, unused_import, unnecessary_import, prefer_single_quotes, prefer_const_constructors, use_super_parameters, always_use_package_imports, annotate_overrides, invalid_use_of_protected_member, constant_identifier_names, invalid_use_of_internal_member, prefer_is_empty, unnecessary_const -import 'dart:convert'; import 'dart:async'; -import 'package:meta/meta.dart'; +import 'dart:convert'; +import 'dart:ffi' as ffi; + import 'package:flutter_rust_bridge/flutter_rust_bridge.dart'; -import 'package:uuid/uuid.dart'; import 'package:freezed_annotation/freezed_annotation.dart' hide protected; - -import 'dart:ffi' as ffi; +import 'package:meta/meta.dart'; +import 'package:uuid/uuid.dart'; part 'bridge.g.freezed.dart'; @@ -81,13 +81,13 @@ abstract class MedeaFlutterWebrtcNative { /// Adds the provided [`RtpEncodingParameters`] to the [`RtpTransceiverInit`]. Future addTransceiverInitSendEncoding( {required ArcRtpTransceiverInit init, - required ArcRtpEncodingParameters encoding, + required ArcRtpEncodingParams encoding, dynamic hint}); FlutterRustBridgeTaskConstMeta get kAddTransceiverInitSendEncodingConstMeta; /// Creates new [`RtpEncodingParameters`] with the provided settings. - Future createEncodingParameters( + Future createEncodingParameters( {required String rid, required bool active, int? maxBitrate, @@ -265,10 +265,10 @@ abstract class MedeaFlutterWebrtcNative { FlutterRustBridgeTaskConstMeta get kTrackStateConstMeta; - Future trackHieght( + Future trackHeight( {required String trackId, required MediaType kind, dynamic hint}); - FlutterRustBridgeTaskConstMeta get kTrackHieghtConstMeta; + FlutterRustBridgeTaskConstMeta get kTrackHeightConstMeta; Future trackWidth( {required String trackId, required MediaType kind, dynamic hint}); @@ -329,9 +329,9 @@ abstract class MedeaFlutterWebrtcNative { ShareFnType get shareOpaqueArcPeerConnection; OpaqueTypeFinalizer get ArcPeerConnectionFinalizer; - DropFnType get dropOpaqueArcRtpEncodingParameters; - ShareFnType get shareOpaqueArcRtpEncodingParameters; - OpaqueTypeFinalizer get ArcRtpEncodingParametersFinalizer; + DropFnType get dropOpaqueArcRtpEncodingParams; + ShareFnType get shareOpaqueArcRtpEncodingParams; + OpaqueTypeFinalizer get ArcRtpEncodingParamsFinalizer; DropFnType get dropOpaqueArcRtpTransceiver; ShareFnType get shareOpaqueArcRtpTransceiver; @@ -358,19 +358,19 @@ class ArcPeerConnection extends FrbOpaque { } @sealed -class ArcRtpEncodingParameters extends FrbOpaque { +class ArcRtpEncodingParams extends FrbOpaque { final MedeaFlutterWebrtcNative bridge; - ArcRtpEncodingParameters.fromRaw(int ptr, int size, this.bridge) + ArcRtpEncodingParams.fromRaw(int ptr, int size, this.bridge) : super.unsafe(ptr, size); @override - DropFnType get dropFn => bridge.dropOpaqueArcRtpEncodingParameters; + DropFnType get dropFn => bridge.dropOpaqueArcRtpEncodingParams; @override - ShareFnType get shareFn => bridge.shareOpaqueArcRtpEncodingParameters; + ShareFnType get shareFn => bridge.shareOpaqueArcRtpEncodingParams; @override OpaqueTypeFinalizer get staticFinalizer => - bridge.ArcRtpEncodingParametersFinalizer; + bridge.ArcRtpEncodingParamsFinalizer; } @sealed @@ -2024,10 +2024,10 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { Future addTransceiverInitSendEncoding( {required ArcRtpTransceiverInit init, - required ArcRtpEncodingParameters encoding, + required ArcRtpEncodingParams encoding, dynamic hint}) { var arg0 = _platform.api2wire_ArcRtpTransceiverInit(init); - var arg1 = _platform.api2wire_ArcRtpEncodingParameters(encoding); + var arg1 = _platform.api2wire_ArcRtpEncodingParams(encoding); return _platform.executeNormal(FlutterRustBridgeTask( callFfi: (port_) => _platform.inner .wire_add_transceiver_init_send_encoding(port_, arg0, arg1), @@ -2044,7 +2044,7 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { argNames: ["init", "encoding"], ); - Future createEncodingParameters( + Future createEncodingParameters( {required String rid, required bool active, int? maxBitrate, @@ -2061,7 +2061,7 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { return _platform.executeNormal(FlutterRustBridgeTask( callFfi: (port_) => _platform.inner.wire_create_encoding_parameters( port_, arg0, arg1, arg2, arg3, arg4, arg5), - parseSuccessData: _wire2api_ArcRtpEncodingParameters, + parseSuccessData: _wire2api_ArcRtpEncodingParams, constMeta: kCreateEncodingParametersConstMeta, argValues: [ rid, @@ -2529,22 +2529,22 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { argNames: ["trackId", "kind"], ); - Future trackHieght( + Future trackHeight( {required String trackId, required MediaType kind, dynamic hint}) { var arg0 = _platform.api2wire_String(trackId); var arg1 = api2wire_media_type(kind); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_track_hieght(port_, arg0, arg1), + callFfi: (port_) => _platform.inner.wire_track_height(port_, arg0, arg1), parseSuccessData: _wire2api_opt_box_autoadd_i32, - constMeta: kTrackHieghtConstMeta, + constMeta: kTrackHeightConstMeta, argValues: [trackId, kind], hint: hint, )); } - FlutterRustBridgeTaskConstMeta get kTrackHieghtConstMeta => + FlutterRustBridgeTaskConstMeta get kTrackHeightConstMeta => const FlutterRustBridgeTaskConstMeta( - debugName: "track_hieght", + debugName: "track_height", argNames: ["trackId", "kind"], ); @@ -2694,12 +2694,12 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { OpaqueTypeFinalizer get ArcPeerConnectionFinalizer => _platform.ArcPeerConnectionFinalizer; - DropFnType get dropOpaqueArcRtpEncodingParameters => - _platform.inner.drop_opaque_ArcRtpEncodingParameters; - ShareFnType get shareOpaqueArcRtpEncodingParameters => - _platform.inner.share_opaque_ArcRtpEncodingParameters; - OpaqueTypeFinalizer get ArcRtpEncodingParametersFinalizer => - _platform.ArcRtpEncodingParametersFinalizer; + DropFnType get dropOpaqueArcRtpEncodingParams => + _platform.inner.drop_opaque_ArcRtpEncodingParams; + ShareFnType get shareOpaqueArcRtpEncodingParams => + _platform.inner.share_opaque_ArcRtpEncodingParams; + OpaqueTypeFinalizer get ArcRtpEncodingParamsFinalizer => + _platform.ArcRtpEncodingParamsFinalizer; DropFnType get dropOpaqueArcRtpTransceiver => _platform.inner.drop_opaque_ArcRtpTransceiver; @@ -2724,8 +2724,8 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { return ArcPeerConnection.fromRaw(raw[0], raw[1], this); } - ArcRtpEncodingParameters _wire2api_ArcRtpEncodingParameters(dynamic raw) { - return ArcRtpEncodingParameters.fromRaw(raw[0], raw[1], this); + ArcRtpEncodingParams _wire2api_ArcRtpEncodingParams(dynamic raw) { + return ArcRtpEncodingParams.fromRaw(raw[0], raw[1], this); } ArcRtpTransceiver _wire2api_ArcRtpTransceiver(dynamic raw) { @@ -3355,10 +3355,10 @@ class MedeaFlutterWebrtcNativePlatform } @protected - wire_ArcRtpEncodingParameters api2wire_ArcRtpEncodingParameters( - ArcRtpEncodingParameters raw) { - final ptr = inner.new_ArcRtpEncodingParameters(); - _api_fill_to_wire_ArcRtpEncodingParameters(raw, ptr); + wire_ArcRtpEncodingParams api2wire_ArcRtpEncodingParams( + ArcRtpEncodingParams raw) { + final ptr = inner.new_ArcRtpEncodingParams(); + _api_fill_to_wire_ArcRtpEncodingParams(raw, ptr); return ptr; } @@ -3498,10 +3498,10 @@ class MedeaFlutterWebrtcNativePlatform OpaqueTypeFinalizer(inner._drop_opaque_ArcPeerConnectionPtr); OpaqueTypeFinalizer get ArcPeerConnectionFinalizer => _ArcPeerConnectionFinalizer; - late final OpaqueTypeFinalizer _ArcRtpEncodingParametersFinalizer = - OpaqueTypeFinalizer(inner._drop_opaque_ArcRtpEncodingParametersPtr); - OpaqueTypeFinalizer get ArcRtpEncodingParametersFinalizer => - _ArcRtpEncodingParametersFinalizer; + late final OpaqueTypeFinalizer _ArcRtpEncodingParamsFinalizer = + OpaqueTypeFinalizer(inner._drop_opaque_ArcRtpEncodingParamsPtr); + OpaqueTypeFinalizer get ArcRtpEncodingParamsFinalizer => + _ArcRtpEncodingParamsFinalizer; late final OpaqueTypeFinalizer _ArcRtpTransceiverFinalizer = OpaqueTypeFinalizer(inner._drop_opaque_ArcRtpTransceiverPtr); OpaqueTypeFinalizer get ArcRtpTransceiverFinalizer => @@ -3517,8 +3517,8 @@ class MedeaFlutterWebrtcNativePlatform wireObj.ptr = apiObj.shareOrMove(); } - void _api_fill_to_wire_ArcRtpEncodingParameters( - ArcRtpEncodingParameters apiObj, wire_ArcRtpEncodingParameters wireObj) { + void _api_fill_to_wire_ArcRtpEncodingParams( + ArcRtpEncodingParams apiObj, wire_ArcRtpEncodingParams wireObj) { wireObj.ptr = apiObj.shareOrMove(); } @@ -3854,7 +3854,7 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { void wire_add_transceiver_init_send_encoding( int port_, wire_ArcRtpTransceiverInit init, - wire_ArcRtpEncodingParameters encoding, + wire_ArcRtpEncodingParams encoding, ) { return _wire_add_transceiver_init_send_encoding( port_, @@ -3866,12 +3866,12 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { late final _wire_add_transceiver_init_send_encodingPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Int64, wire_ArcRtpTransceiverInit, - wire_ArcRtpEncodingParameters)>>( + wire_ArcRtpEncodingParams)>>( 'wire_add_transceiver_init_send_encoding'); late final _wire_add_transceiver_init_send_encoding = _wire_add_transceiver_init_send_encodingPtr.asFunction< - void Function(int, wire_ArcRtpTransceiverInit, - wire_ArcRtpEncodingParameters)>(); + void Function( + int, wire_ArcRtpTransceiverInit, wire_ArcRtpEncodingParams)>(); void wire_create_encoding_parameters( int port_, @@ -4331,23 +4331,23 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { late final _wire_track_state = _wire_track_statePtr .asFunction, int)>(); - void wire_track_hieght( + void wire_track_height( int port_, ffi.Pointer track_id, int kind, ) { - return _wire_track_hieght( + return _wire_track_height( port_, track_id, kind, ); } - late final _wire_track_hieghtPtr = _lookup< + late final _wire_track_heightPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Int32)>>('wire_track_hieght'); - late final _wire_track_hieght = _wire_track_hieghtPtr + ffi.Int32)>>('wire_track_height'); + late final _wire_track_height = _wire_track_heightPtr .asFunction, int)>(); void wire_track_width( @@ -4489,15 +4489,15 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { late final _new_ArcPeerConnection = _new_ArcPeerConnectionPtr.asFunction(); - wire_ArcRtpEncodingParameters new_ArcRtpEncodingParameters() { - return _new_ArcRtpEncodingParameters(); + wire_ArcRtpEncodingParams new_ArcRtpEncodingParams() { + return _new_ArcRtpEncodingParams(); } - late final _new_ArcRtpEncodingParametersPtr = - _lookup>( - 'new_ArcRtpEncodingParameters'); - late final _new_ArcRtpEncodingParameters = _new_ArcRtpEncodingParametersPtr - .asFunction(); + late final _new_ArcRtpEncodingParamsPtr = + _lookup>( + 'new_ArcRtpEncodingParams'); + late final _new_ArcRtpEncodingParams = _new_ArcRtpEncodingParamsPtr + .asFunction(); wire_ArcRtpTransceiver new_ArcRtpTransceiver() { return _new_ArcRtpTransceiver(); @@ -4667,35 +4667,35 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { _share_opaque_ArcPeerConnectionPtr .asFunction Function(ffi.Pointer)>(); - void drop_opaque_ArcRtpEncodingParameters( + void drop_opaque_ArcRtpEncodingParams( ffi.Pointer ptr, ) { - return _drop_opaque_ArcRtpEncodingParameters( + return _drop_opaque_ArcRtpEncodingParams( ptr, ); } - late final _drop_opaque_ArcRtpEncodingParametersPtr = + late final _drop_opaque_ArcRtpEncodingParamsPtr = _lookup)>>( - 'drop_opaque_ArcRtpEncodingParameters'); - late final _drop_opaque_ArcRtpEncodingParameters = - _drop_opaque_ArcRtpEncodingParametersPtr + 'drop_opaque_ArcRtpEncodingParams'); + late final _drop_opaque_ArcRtpEncodingParams = + _drop_opaque_ArcRtpEncodingParamsPtr .asFunction)>(); - ffi.Pointer share_opaque_ArcRtpEncodingParameters( + ffi.Pointer share_opaque_ArcRtpEncodingParams( ffi.Pointer ptr, ) { - return _share_opaque_ArcRtpEncodingParameters( + return _share_opaque_ArcRtpEncodingParams( ptr, ); } - late final _share_opaque_ArcRtpEncodingParametersPtr = _lookup< + late final _share_opaque_ArcRtpEncodingParamsPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer)>>('share_opaque_ArcRtpEncodingParameters'); - late final _share_opaque_ArcRtpEncodingParameters = - _share_opaque_ArcRtpEncodingParametersPtr + ffi.Pointer)>>('share_opaque_ArcRtpEncodingParams'); + late final _share_opaque_ArcRtpEncodingParams = + _share_opaque_ArcRtpEncodingParamsPtr .asFunction Function(ffi.Pointer)>(); void drop_opaque_ArcRtpTransceiver( @@ -4823,7 +4823,7 @@ final class wire_ArcRtpTransceiverInit extends ffi.Struct { external ffi.Pointer ptr; } -final class wire_ArcRtpEncodingParameters extends ffi.Struct { +final class wire_ArcRtpEncodingParams extends ffi.Struct { external ffi.Pointer ptr; } diff --git a/lib/src/api/bridge.g.freezed.dart b/lib/src/api/bridge.g.freezed.dart index ee0d5b9147..294effbff5 100644 --- a/lib/src/api/bridge.g.freezed.dart +++ b/lib/src/api/bridge.g.freezed.dart @@ -95,22 +95,22 @@ class _$GetMediaErrorCopyWithImpl<$Res, $Val extends GetMediaError> } /// @nodoc -abstract class _$$GetMediaError_AudioCopyWith<$Res> +abstract class _$$GetMediaError_AudioImplCopyWith<$Res> implements $GetMediaErrorCopyWith<$Res> { - factory _$$GetMediaError_AudioCopyWith(_$GetMediaError_Audio value, - $Res Function(_$GetMediaError_Audio) then) = - __$$GetMediaError_AudioCopyWithImpl<$Res>; + factory _$$GetMediaError_AudioImplCopyWith(_$GetMediaError_AudioImpl value, + $Res Function(_$GetMediaError_AudioImpl) then) = + __$$GetMediaError_AudioImplCopyWithImpl<$Res>; @override @useResult $Res call({String field0}); } /// @nodoc -class __$$GetMediaError_AudioCopyWithImpl<$Res> - extends _$GetMediaErrorCopyWithImpl<$Res, _$GetMediaError_Audio> - implements _$$GetMediaError_AudioCopyWith<$Res> { - __$$GetMediaError_AudioCopyWithImpl( - _$GetMediaError_Audio _value, $Res Function(_$GetMediaError_Audio) _then) +class __$$GetMediaError_AudioImplCopyWithImpl<$Res> + extends _$GetMediaErrorCopyWithImpl<$Res, _$GetMediaError_AudioImpl> + implements _$$GetMediaError_AudioImplCopyWith<$Res> { + __$$GetMediaError_AudioImplCopyWithImpl(_$GetMediaError_AudioImpl _value, + $Res Function(_$GetMediaError_AudioImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -118,7 +118,7 @@ class __$$GetMediaError_AudioCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$GetMediaError_Audio( + return _then(_$GetMediaError_AudioImpl( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -129,8 +129,8 @@ class __$$GetMediaError_AudioCopyWithImpl<$Res> /// @nodoc -class _$GetMediaError_Audio implements GetMediaError_Audio { - const _$GetMediaError_Audio(this.field0); +class _$GetMediaError_AudioImpl implements GetMediaError_Audio { + const _$GetMediaError_AudioImpl(this.field0); @override final String field0; @@ -144,7 +144,7 @@ class _$GetMediaError_Audio implements GetMediaError_Audio { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GetMediaError_Audio && + other is _$GetMediaError_AudioImpl && (identical(other.field0, field0) || other.field0 == field0)); } @@ -154,8 +154,8 @@ class _$GetMediaError_Audio implements GetMediaError_Audio { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GetMediaError_AudioCopyWith<_$GetMediaError_Audio> get copyWith => - __$$GetMediaError_AudioCopyWithImpl<_$GetMediaError_Audio>( + _$$GetMediaError_AudioImplCopyWith<_$GetMediaError_AudioImpl> get copyWith => + __$$GetMediaError_AudioImplCopyWithImpl<_$GetMediaError_AudioImpl>( this, _$identity); @override @@ -223,33 +223,33 @@ class _$GetMediaError_Audio implements GetMediaError_Audio { abstract class GetMediaError_Audio implements GetMediaError { const factory GetMediaError_Audio(final String field0) = - _$GetMediaError_Audio; + _$GetMediaError_AudioImpl; @override String get field0; @override @JsonKey(ignore: true) - _$$GetMediaError_AudioCopyWith<_$GetMediaError_Audio> get copyWith => + _$$GetMediaError_AudioImplCopyWith<_$GetMediaError_AudioImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$GetMediaError_VideoCopyWith<$Res> +abstract class _$$GetMediaError_VideoImplCopyWith<$Res> implements $GetMediaErrorCopyWith<$Res> { - factory _$$GetMediaError_VideoCopyWith(_$GetMediaError_Video value, - $Res Function(_$GetMediaError_Video) then) = - __$$GetMediaError_VideoCopyWithImpl<$Res>; + factory _$$GetMediaError_VideoImplCopyWith(_$GetMediaError_VideoImpl value, + $Res Function(_$GetMediaError_VideoImpl) then) = + __$$GetMediaError_VideoImplCopyWithImpl<$Res>; @override @useResult $Res call({String field0}); } /// @nodoc -class __$$GetMediaError_VideoCopyWithImpl<$Res> - extends _$GetMediaErrorCopyWithImpl<$Res, _$GetMediaError_Video> - implements _$$GetMediaError_VideoCopyWith<$Res> { - __$$GetMediaError_VideoCopyWithImpl( - _$GetMediaError_Video _value, $Res Function(_$GetMediaError_Video) _then) +class __$$GetMediaError_VideoImplCopyWithImpl<$Res> + extends _$GetMediaErrorCopyWithImpl<$Res, _$GetMediaError_VideoImpl> + implements _$$GetMediaError_VideoImplCopyWith<$Res> { + __$$GetMediaError_VideoImplCopyWithImpl(_$GetMediaError_VideoImpl _value, + $Res Function(_$GetMediaError_VideoImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -257,7 +257,7 @@ class __$$GetMediaError_VideoCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$GetMediaError_Video( + return _then(_$GetMediaError_VideoImpl( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -268,8 +268,8 @@ class __$$GetMediaError_VideoCopyWithImpl<$Res> /// @nodoc -class _$GetMediaError_Video implements GetMediaError_Video { - const _$GetMediaError_Video(this.field0); +class _$GetMediaError_VideoImpl implements GetMediaError_Video { + const _$GetMediaError_VideoImpl(this.field0); @override final String field0; @@ -283,7 +283,7 @@ class _$GetMediaError_Video implements GetMediaError_Video { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GetMediaError_Video && + other is _$GetMediaError_VideoImpl && (identical(other.field0, field0) || other.field0 == field0)); } @@ -293,8 +293,8 @@ class _$GetMediaError_Video implements GetMediaError_Video { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GetMediaError_VideoCopyWith<_$GetMediaError_Video> get copyWith => - __$$GetMediaError_VideoCopyWithImpl<_$GetMediaError_Video>( + _$$GetMediaError_VideoImplCopyWith<_$GetMediaError_VideoImpl> get copyWith => + __$$GetMediaError_VideoImplCopyWithImpl<_$GetMediaError_VideoImpl>( this, _$identity); @override @@ -362,13 +362,13 @@ class _$GetMediaError_Video implements GetMediaError_Video { abstract class GetMediaError_Video implements GetMediaError { const factory GetMediaError_Video(final String field0) = - _$GetMediaError_Video; + _$GetMediaError_VideoImpl; @override String get field0; @override @JsonKey(ignore: true) - _$$GetMediaError_VideoCopyWith<_$GetMediaError_Video> get copyWith => + _$$GetMediaError_VideoImplCopyWith<_$GetMediaError_VideoImpl> get copyWith => throw _privateConstructorUsedError; } @@ -434,20 +434,20 @@ class _$GetMediaResultCopyWithImpl<$Res, $Val extends GetMediaResult> } /// @nodoc -abstract class _$$GetMediaResult_OkCopyWith<$Res> { - factory _$$GetMediaResult_OkCopyWith( - _$GetMediaResult_Ok value, $Res Function(_$GetMediaResult_Ok) then) = - __$$GetMediaResult_OkCopyWithImpl<$Res>; +abstract class _$$GetMediaResult_OkImplCopyWith<$Res> { + factory _$$GetMediaResult_OkImplCopyWith(_$GetMediaResult_OkImpl value, + $Res Function(_$GetMediaResult_OkImpl) then) = + __$$GetMediaResult_OkImplCopyWithImpl<$Res>; @useResult $Res call({List field0}); } /// @nodoc -class __$$GetMediaResult_OkCopyWithImpl<$Res> - extends _$GetMediaResultCopyWithImpl<$Res, _$GetMediaResult_Ok> - implements _$$GetMediaResult_OkCopyWith<$Res> { - __$$GetMediaResult_OkCopyWithImpl( - _$GetMediaResult_Ok _value, $Res Function(_$GetMediaResult_Ok) _then) +class __$$GetMediaResult_OkImplCopyWithImpl<$Res> + extends _$GetMediaResultCopyWithImpl<$Res, _$GetMediaResult_OkImpl> + implements _$$GetMediaResult_OkImplCopyWith<$Res> { + __$$GetMediaResult_OkImplCopyWithImpl(_$GetMediaResult_OkImpl _value, + $Res Function(_$GetMediaResult_OkImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -455,7 +455,7 @@ class __$$GetMediaResult_OkCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$GetMediaResult_Ok( + return _then(_$GetMediaResult_OkImpl( null == field0 ? _value._field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -466,8 +466,8 @@ class __$$GetMediaResult_OkCopyWithImpl<$Res> /// @nodoc -class _$GetMediaResult_Ok implements GetMediaResult_Ok { - const _$GetMediaResult_Ok(final List field0) +class _$GetMediaResult_OkImpl implements GetMediaResult_Ok { + const _$GetMediaResult_OkImpl(final List field0) : _field0 = field0; final List _field0; @@ -487,7 +487,7 @@ class _$GetMediaResult_Ok implements GetMediaResult_Ok { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GetMediaResult_Ok && + other is _$GetMediaResult_OkImpl && const DeepCollectionEquality().equals(other._field0, _field0)); } @@ -498,8 +498,9 @@ class _$GetMediaResult_Ok implements GetMediaResult_Ok { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GetMediaResult_OkCopyWith<_$GetMediaResult_Ok> get copyWith => - __$$GetMediaResult_OkCopyWithImpl<_$GetMediaResult_Ok>(this, _$identity); + _$$GetMediaResult_OkImplCopyWith<_$GetMediaResult_OkImpl> get copyWith => + __$$GetMediaResult_OkImplCopyWithImpl<_$GetMediaResult_OkImpl>( + this, _$identity); @override @optionalTypeArgs @@ -566,20 +567,20 @@ class _$GetMediaResult_Ok implements GetMediaResult_Ok { abstract class GetMediaResult_Ok implements GetMediaResult { const factory GetMediaResult_Ok(final List field0) = - _$GetMediaResult_Ok; + _$GetMediaResult_OkImpl; @override List get field0; @JsonKey(ignore: true) - _$$GetMediaResult_OkCopyWith<_$GetMediaResult_Ok> get copyWith => + _$$GetMediaResult_OkImplCopyWith<_$GetMediaResult_OkImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$GetMediaResult_ErrCopyWith<$Res> { - factory _$$GetMediaResult_ErrCopyWith(_$GetMediaResult_Err value, - $Res Function(_$GetMediaResult_Err) then) = - __$$GetMediaResult_ErrCopyWithImpl<$Res>; +abstract class _$$GetMediaResult_ErrImplCopyWith<$Res> { + factory _$$GetMediaResult_ErrImplCopyWith(_$GetMediaResult_ErrImpl value, + $Res Function(_$GetMediaResult_ErrImpl) then) = + __$$GetMediaResult_ErrImplCopyWithImpl<$Res>; @useResult $Res call({GetMediaError field0}); @@ -587,11 +588,11 @@ abstract class _$$GetMediaResult_ErrCopyWith<$Res> { } /// @nodoc -class __$$GetMediaResult_ErrCopyWithImpl<$Res> - extends _$GetMediaResultCopyWithImpl<$Res, _$GetMediaResult_Err> - implements _$$GetMediaResult_ErrCopyWith<$Res> { - __$$GetMediaResult_ErrCopyWithImpl( - _$GetMediaResult_Err _value, $Res Function(_$GetMediaResult_Err) _then) +class __$$GetMediaResult_ErrImplCopyWithImpl<$Res> + extends _$GetMediaResultCopyWithImpl<$Res, _$GetMediaResult_ErrImpl> + implements _$$GetMediaResult_ErrImplCopyWith<$Res> { + __$$GetMediaResult_ErrImplCopyWithImpl(_$GetMediaResult_ErrImpl _value, + $Res Function(_$GetMediaResult_ErrImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -599,7 +600,7 @@ class __$$GetMediaResult_ErrCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$GetMediaResult_Err( + return _then(_$GetMediaResult_ErrImpl( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -618,8 +619,8 @@ class __$$GetMediaResult_ErrCopyWithImpl<$Res> /// @nodoc -class _$GetMediaResult_Err implements GetMediaResult_Err { - const _$GetMediaResult_Err(this.field0); +class _$GetMediaResult_ErrImpl implements GetMediaResult_Err { + const _$GetMediaResult_ErrImpl(this.field0); @override final GetMediaError field0; @@ -633,7 +634,7 @@ class _$GetMediaResult_Err implements GetMediaResult_Err { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$GetMediaResult_Err && + other is _$GetMediaResult_ErrImpl && (identical(other.field0, field0) || other.field0 == field0)); } @@ -643,8 +644,8 @@ class _$GetMediaResult_Err implements GetMediaResult_Err { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$GetMediaResult_ErrCopyWith<_$GetMediaResult_Err> get copyWith => - __$$GetMediaResult_ErrCopyWithImpl<_$GetMediaResult_Err>( + _$$GetMediaResult_ErrImplCopyWith<_$GetMediaResult_ErrImpl> get copyWith => + __$$GetMediaResult_ErrImplCopyWithImpl<_$GetMediaResult_ErrImpl>( this, _$identity); @override @@ -712,12 +713,12 @@ class _$GetMediaResult_Err implements GetMediaResult_Err { abstract class GetMediaResult_Err implements GetMediaResult { const factory GetMediaResult_Err(final GetMediaError field0) = - _$GetMediaResult_Err; + _$GetMediaResult_ErrImpl; @override GetMediaError get field0; @JsonKey(ignore: true) - _$$GetMediaResult_ErrCopyWith<_$GetMediaResult_Err> get copyWith => + _$$GetMediaResult_ErrImplCopyWith<_$GetMediaResult_ErrImpl> get copyWith => throw _privateConstructorUsedError; } @@ -856,23 +857,23 @@ class _$PeerConnectionEventCopyWithImpl<$Res, $Val extends PeerConnectionEvent> } /// @nodoc -abstract class _$$PeerConnectionEvent_PeerCreatedCopyWith<$Res> { - factory _$$PeerConnectionEvent_PeerCreatedCopyWith( - _$PeerConnectionEvent_PeerCreated value, - $Res Function(_$PeerConnectionEvent_PeerCreated) then) = - __$$PeerConnectionEvent_PeerCreatedCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_PeerCreatedImplCopyWith<$Res> { + factory _$$PeerConnectionEvent_PeerCreatedImplCopyWith( + _$PeerConnectionEvent_PeerCreatedImpl value, + $Res Function(_$PeerConnectionEvent_PeerCreatedImpl) then) = + __$$PeerConnectionEvent_PeerCreatedImplCopyWithImpl<$Res>; @useResult $Res call({ArcPeerConnection peer}); } /// @nodoc -class __$$PeerConnectionEvent_PeerCreatedCopyWithImpl<$Res> +class __$$PeerConnectionEvent_PeerCreatedImplCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_PeerCreated> - implements _$$PeerConnectionEvent_PeerCreatedCopyWith<$Res> { - __$$PeerConnectionEvent_PeerCreatedCopyWithImpl( - _$PeerConnectionEvent_PeerCreated _value, - $Res Function(_$PeerConnectionEvent_PeerCreated) _then) + _$PeerConnectionEvent_PeerCreatedImpl> + implements _$$PeerConnectionEvent_PeerCreatedImplCopyWith<$Res> { + __$$PeerConnectionEvent_PeerCreatedImplCopyWithImpl( + _$PeerConnectionEvent_PeerCreatedImpl _value, + $Res Function(_$PeerConnectionEvent_PeerCreatedImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -880,7 +881,7 @@ class __$$PeerConnectionEvent_PeerCreatedCopyWithImpl<$Res> $Res call({ Object? peer = null, }) { - return _then(_$PeerConnectionEvent_PeerCreated( + return _then(_$PeerConnectionEvent_PeerCreatedImpl( peer: null == peer ? _value.peer : peer // ignore: cast_nullable_to_non_nullable @@ -891,9 +892,9 @@ class __$$PeerConnectionEvent_PeerCreatedCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_PeerCreated +class _$PeerConnectionEvent_PeerCreatedImpl implements PeerConnectionEvent_PeerCreated { - const _$PeerConnectionEvent_PeerCreated({required this.peer}); + const _$PeerConnectionEvent_PeerCreatedImpl({required this.peer}); /// Rust side [`PeerConnection`]. @override @@ -908,7 +909,7 @@ class _$PeerConnectionEvent_PeerCreated bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_PeerCreated && + other is _$PeerConnectionEvent_PeerCreatedImpl && (identical(other.peer, peer) || other.peer == peer)); } @@ -918,9 +919,10 @@ class _$PeerConnectionEvent_PeerCreated @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_PeerCreatedCopyWith<_$PeerConnectionEvent_PeerCreated> - get copyWith => __$$PeerConnectionEvent_PeerCreatedCopyWithImpl< - _$PeerConnectionEvent_PeerCreated>(this, _$identity); + _$$PeerConnectionEvent_PeerCreatedImplCopyWith< + _$PeerConnectionEvent_PeerCreatedImpl> + get copyWith => __$$PeerConnectionEvent_PeerCreatedImplCopyWithImpl< + _$PeerConnectionEvent_PeerCreatedImpl>(this, _$identity); @override @optionalTypeArgs @@ -1062,33 +1064,34 @@ class _$PeerConnectionEvent_PeerCreated abstract class PeerConnectionEvent_PeerCreated implements PeerConnectionEvent { const factory PeerConnectionEvent_PeerCreated( {required final ArcPeerConnection peer}) = - _$PeerConnectionEvent_PeerCreated; + _$PeerConnectionEvent_PeerCreatedImpl; /// Rust side [`PeerConnection`]. ArcPeerConnection get peer; @JsonKey(ignore: true) - _$$PeerConnectionEvent_PeerCreatedCopyWith<_$PeerConnectionEvent_PeerCreated> + _$$PeerConnectionEvent_PeerCreatedImplCopyWith< + _$PeerConnectionEvent_PeerCreatedImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_IceCandidateCopyWith<$Res> { - factory _$$PeerConnectionEvent_IceCandidateCopyWith( - _$PeerConnectionEvent_IceCandidate value, - $Res Function(_$PeerConnectionEvent_IceCandidate) then) = - __$$PeerConnectionEvent_IceCandidateCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_IceCandidateImplCopyWith<$Res> { + factory _$$PeerConnectionEvent_IceCandidateImplCopyWith( + _$PeerConnectionEvent_IceCandidateImpl value, + $Res Function(_$PeerConnectionEvent_IceCandidateImpl) then) = + __$$PeerConnectionEvent_IceCandidateImplCopyWithImpl<$Res>; @useResult $Res call({String sdpMid, int sdpMlineIndex, String candidate}); } /// @nodoc -class __$$PeerConnectionEvent_IceCandidateCopyWithImpl<$Res> +class __$$PeerConnectionEvent_IceCandidateImplCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_IceCandidate> - implements _$$PeerConnectionEvent_IceCandidateCopyWith<$Res> { - __$$PeerConnectionEvent_IceCandidateCopyWithImpl( - _$PeerConnectionEvent_IceCandidate _value, - $Res Function(_$PeerConnectionEvent_IceCandidate) _then) + _$PeerConnectionEvent_IceCandidateImpl> + implements _$$PeerConnectionEvent_IceCandidateImplCopyWith<$Res> { + __$$PeerConnectionEvent_IceCandidateImplCopyWithImpl( + _$PeerConnectionEvent_IceCandidateImpl _value, + $Res Function(_$PeerConnectionEvent_IceCandidateImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1098,7 +1101,7 @@ class __$$PeerConnectionEvent_IceCandidateCopyWithImpl<$Res> Object? sdpMlineIndex = null, Object? candidate = null, }) { - return _then(_$PeerConnectionEvent_IceCandidate( + return _then(_$PeerConnectionEvent_IceCandidateImpl( sdpMid: null == sdpMid ? _value.sdpMid : sdpMid // ignore: cast_nullable_to_non_nullable @@ -1117,9 +1120,9 @@ class __$$PeerConnectionEvent_IceCandidateCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_IceCandidate +class _$PeerConnectionEvent_IceCandidateImpl implements PeerConnectionEvent_IceCandidate { - const _$PeerConnectionEvent_IceCandidate( + const _$PeerConnectionEvent_IceCandidateImpl( {required this.sdpMid, required this.sdpMlineIndex, required this.candidate}); @@ -1160,7 +1163,7 @@ class _$PeerConnectionEvent_IceCandidate bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_IceCandidate && + other is _$PeerConnectionEvent_IceCandidateImpl && (identical(other.sdpMid, sdpMid) || other.sdpMid == sdpMid) && (identical(other.sdpMlineIndex, sdpMlineIndex) || other.sdpMlineIndex == sdpMlineIndex) && @@ -1175,10 +1178,10 @@ class _$PeerConnectionEvent_IceCandidate @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_IceCandidateCopyWith< - _$PeerConnectionEvent_IceCandidate> - get copyWith => __$$PeerConnectionEvent_IceCandidateCopyWithImpl< - _$PeerConnectionEvent_IceCandidate>(this, _$identity); + _$$PeerConnectionEvent_IceCandidateImplCopyWith< + _$PeerConnectionEvent_IceCandidateImpl> + get copyWith => __$$PeerConnectionEvent_IceCandidateImplCopyWithImpl< + _$PeerConnectionEvent_IceCandidateImpl>(this, _$identity); @override @optionalTypeArgs @@ -1319,9 +1322,10 @@ class _$PeerConnectionEvent_IceCandidate abstract class PeerConnectionEvent_IceCandidate implements PeerConnectionEvent { const factory PeerConnectionEvent_IceCandidate( - {required final String sdpMid, - required final int sdpMlineIndex, - required final String candidate}) = _$PeerConnectionEvent_IceCandidate; + {required final String sdpMid, + required final int sdpMlineIndex, + required final String candidate}) = + _$PeerConnectionEvent_IceCandidateImpl; /// Media stream "identification-tag" defined in [RFC 5888] for the /// media component the discovered [RTCIceCandidate][1] is associated @@ -1347,29 +1351,32 @@ abstract class PeerConnectionEvent_IceCandidate implements PeerConnectionEvent { /// [RFC 5245]: https://tools.ietf.org/html/rfc5245 String get candidate; @JsonKey(ignore: true) - _$$PeerConnectionEvent_IceCandidateCopyWith< - _$PeerConnectionEvent_IceCandidate> + _$$PeerConnectionEvent_IceCandidateImplCopyWith< + _$PeerConnectionEvent_IceCandidateImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_IceGatheringStateChangeCopyWith<$Res> { - factory _$$PeerConnectionEvent_IceGatheringStateChangeCopyWith( - _$PeerConnectionEvent_IceGatheringStateChange value, - $Res Function(_$PeerConnectionEvent_IceGatheringStateChange) then) = - __$$PeerConnectionEvent_IceGatheringStateChangeCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWith< + $Res> { + factory _$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWith( + _$PeerConnectionEvent_IceGatheringStateChangeImpl value, + $Res Function(_$PeerConnectionEvent_IceGatheringStateChangeImpl) + then) = + __$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWithImpl<$Res>; @useResult $Res call({IceGatheringState field0}); } /// @nodoc -class __$$PeerConnectionEvent_IceGatheringStateChangeCopyWithImpl<$Res> +class __$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_IceGatheringStateChange> - implements _$$PeerConnectionEvent_IceGatheringStateChangeCopyWith<$Res> { - __$$PeerConnectionEvent_IceGatheringStateChangeCopyWithImpl( - _$PeerConnectionEvent_IceGatheringStateChange _value, - $Res Function(_$PeerConnectionEvent_IceGatheringStateChange) _then) + _$PeerConnectionEvent_IceGatheringStateChangeImpl> + implements + _$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWith<$Res> { + __$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWithImpl( + _$PeerConnectionEvent_IceGatheringStateChangeImpl _value, + $Res Function(_$PeerConnectionEvent_IceGatheringStateChangeImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1377,7 +1384,7 @@ class __$$PeerConnectionEvent_IceGatheringStateChangeCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$PeerConnectionEvent_IceGatheringStateChange( + return _then(_$PeerConnectionEvent_IceGatheringStateChangeImpl( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -1388,9 +1395,9 @@ class __$$PeerConnectionEvent_IceGatheringStateChangeCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_IceGatheringStateChange +class _$PeerConnectionEvent_IceGatheringStateChangeImpl implements PeerConnectionEvent_IceGatheringStateChange { - const _$PeerConnectionEvent_IceGatheringStateChange(this.field0); + const _$PeerConnectionEvent_IceGatheringStateChangeImpl(this.field0); @override final IceGatheringState field0; @@ -1404,7 +1411,7 @@ class _$PeerConnectionEvent_IceGatheringStateChange bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_IceGatheringStateChange && + other is _$PeerConnectionEvent_IceGatheringStateChangeImpl && (identical(other.field0, field0) || other.field0 == field0)); } @@ -1414,11 +1421,12 @@ class _$PeerConnectionEvent_IceGatheringStateChange @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_IceGatheringStateChangeCopyWith< - _$PeerConnectionEvent_IceGatheringStateChange> + _$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWith< + _$PeerConnectionEvent_IceGatheringStateChangeImpl> get copyWith => - __$$PeerConnectionEvent_IceGatheringStateChangeCopyWithImpl< - _$PeerConnectionEvent_IceGatheringStateChange>(this, _$identity); + __$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWithImpl< + _$PeerConnectionEvent_IceGatheringStateChangeImpl>( + this, _$identity); @override @optionalTypeArgs @@ -1561,34 +1569,34 @@ abstract class PeerConnectionEvent_IceGatheringStateChange implements PeerConnectionEvent { const factory PeerConnectionEvent_IceGatheringStateChange( final IceGatheringState field0) = - _$PeerConnectionEvent_IceGatheringStateChange; + _$PeerConnectionEvent_IceGatheringStateChangeImpl; IceGatheringState get field0; @JsonKey(ignore: true) - _$$PeerConnectionEvent_IceGatheringStateChangeCopyWith< - _$PeerConnectionEvent_IceGatheringStateChange> + _$$PeerConnectionEvent_IceGatheringStateChangeImplCopyWith< + _$PeerConnectionEvent_IceGatheringStateChangeImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_IceCandidateErrorCopyWith<$Res> { - factory _$$PeerConnectionEvent_IceCandidateErrorCopyWith( - _$PeerConnectionEvent_IceCandidateError value, - $Res Function(_$PeerConnectionEvent_IceCandidateError) then) = - __$$PeerConnectionEvent_IceCandidateErrorCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_IceCandidateErrorImplCopyWith<$Res> { + factory _$$PeerConnectionEvent_IceCandidateErrorImplCopyWith( + _$PeerConnectionEvent_IceCandidateErrorImpl value, + $Res Function(_$PeerConnectionEvent_IceCandidateErrorImpl) then) = + __$$PeerConnectionEvent_IceCandidateErrorImplCopyWithImpl<$Res>; @useResult $Res call( {String address, int port, String url, int errorCode, String errorText}); } /// @nodoc -class __$$PeerConnectionEvent_IceCandidateErrorCopyWithImpl<$Res> +class __$$PeerConnectionEvent_IceCandidateErrorImplCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_IceCandidateError> - implements _$$PeerConnectionEvent_IceCandidateErrorCopyWith<$Res> { - __$$PeerConnectionEvent_IceCandidateErrorCopyWithImpl( - _$PeerConnectionEvent_IceCandidateError _value, - $Res Function(_$PeerConnectionEvent_IceCandidateError) _then) + _$PeerConnectionEvent_IceCandidateErrorImpl> + implements _$$PeerConnectionEvent_IceCandidateErrorImplCopyWith<$Res> { + __$$PeerConnectionEvent_IceCandidateErrorImplCopyWithImpl( + _$PeerConnectionEvent_IceCandidateErrorImpl _value, + $Res Function(_$PeerConnectionEvent_IceCandidateErrorImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -1600,7 +1608,7 @@ class __$$PeerConnectionEvent_IceCandidateErrorCopyWithImpl<$Res> Object? errorCode = null, Object? errorText = null, }) { - return _then(_$PeerConnectionEvent_IceCandidateError( + return _then(_$PeerConnectionEvent_IceCandidateErrorImpl( address: null == address ? _value.address : address // ignore: cast_nullable_to_non_nullable @@ -1627,9 +1635,9 @@ class __$$PeerConnectionEvent_IceCandidateErrorCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_IceCandidateError +class _$PeerConnectionEvent_IceCandidateErrorImpl implements PeerConnectionEvent_IceCandidateError { - const _$PeerConnectionEvent_IceCandidateError( + const _$PeerConnectionEvent_IceCandidateErrorImpl( {required this.address, required this.port, required this.url, @@ -1678,7 +1686,7 @@ class _$PeerConnectionEvent_IceCandidateError bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_IceCandidateError && + other is _$PeerConnectionEvent_IceCandidateErrorImpl && (identical(other.address, address) || other.address == address) && (identical(other.port, port) || other.port == port) && (identical(other.url, url) || other.url == url) && @@ -1695,10 +1703,10 @@ class _$PeerConnectionEvent_IceCandidateError @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_IceCandidateErrorCopyWith< - _$PeerConnectionEvent_IceCandidateError> - get copyWith => __$$PeerConnectionEvent_IceCandidateErrorCopyWithImpl< - _$PeerConnectionEvent_IceCandidateError>(this, _$identity); + _$$PeerConnectionEvent_IceCandidateErrorImplCopyWith< + _$PeerConnectionEvent_IceCandidateErrorImpl> + get copyWith => __$$PeerConnectionEvent_IceCandidateErrorImplCopyWithImpl< + _$PeerConnectionEvent_IceCandidateErrorImpl>(this, _$identity); @override @optionalTypeArgs @@ -1845,7 +1853,7 @@ abstract class PeerConnectionEvent_IceCandidateError required final String url, required final int errorCode, required final String errorText}) = - _$PeerConnectionEvent_IceCandidateError; + _$PeerConnectionEvent_IceCandidateErrorImpl; /// Local IP address used to communicate with the STUN or TURN server. String get address; @@ -1875,35 +1883,35 @@ abstract class PeerConnectionEvent_IceCandidateError /// [1]: https://tinyurl.com/stun-parameters-6 String get errorText; @JsonKey(ignore: true) - _$$PeerConnectionEvent_IceCandidateErrorCopyWith< - _$PeerConnectionEvent_IceCandidateError> + _$$PeerConnectionEvent_IceCandidateErrorImplCopyWith< + _$PeerConnectionEvent_IceCandidateErrorImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_NegotiationNeededCopyWith<$Res> { - factory _$$PeerConnectionEvent_NegotiationNeededCopyWith( - _$PeerConnectionEvent_NegotiationNeeded value, - $Res Function(_$PeerConnectionEvent_NegotiationNeeded) then) = - __$$PeerConnectionEvent_NegotiationNeededCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_NegotiationNeededImplCopyWith<$Res> { + factory _$$PeerConnectionEvent_NegotiationNeededImplCopyWith( + _$PeerConnectionEvent_NegotiationNeededImpl value, + $Res Function(_$PeerConnectionEvent_NegotiationNeededImpl) then) = + __$$PeerConnectionEvent_NegotiationNeededImplCopyWithImpl<$Res>; } /// @nodoc -class __$$PeerConnectionEvent_NegotiationNeededCopyWithImpl<$Res> +class __$$PeerConnectionEvent_NegotiationNeededImplCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_NegotiationNeeded> - implements _$$PeerConnectionEvent_NegotiationNeededCopyWith<$Res> { - __$$PeerConnectionEvent_NegotiationNeededCopyWithImpl( - _$PeerConnectionEvent_NegotiationNeeded _value, - $Res Function(_$PeerConnectionEvent_NegotiationNeeded) _then) + _$PeerConnectionEvent_NegotiationNeededImpl> + implements _$$PeerConnectionEvent_NegotiationNeededImplCopyWith<$Res> { + __$$PeerConnectionEvent_NegotiationNeededImplCopyWithImpl( + _$PeerConnectionEvent_NegotiationNeededImpl _value, + $Res Function(_$PeerConnectionEvent_NegotiationNeededImpl) _then) : super(_value, _then); } /// @nodoc -class _$PeerConnectionEvent_NegotiationNeeded +class _$PeerConnectionEvent_NegotiationNeededImpl implements PeerConnectionEvent_NegotiationNeeded { - const _$PeerConnectionEvent_NegotiationNeeded(); + const _$PeerConnectionEvent_NegotiationNeededImpl(); @override String toString() { @@ -1914,7 +1922,7 @@ class _$PeerConnectionEvent_NegotiationNeeded bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_NegotiationNeeded); + other is _$PeerConnectionEvent_NegotiationNeededImpl); } @override @@ -2060,27 +2068,27 @@ class _$PeerConnectionEvent_NegotiationNeeded abstract class PeerConnectionEvent_NegotiationNeeded implements PeerConnectionEvent { const factory PeerConnectionEvent_NegotiationNeeded() = - _$PeerConnectionEvent_NegotiationNeeded; + _$PeerConnectionEvent_NegotiationNeededImpl; } /// @nodoc -abstract class _$$PeerConnectionEvent_SignallingChangeCopyWith<$Res> { - factory _$$PeerConnectionEvent_SignallingChangeCopyWith( - _$PeerConnectionEvent_SignallingChange value, - $Res Function(_$PeerConnectionEvent_SignallingChange) then) = - __$$PeerConnectionEvent_SignallingChangeCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_SignallingChangeImplCopyWith<$Res> { + factory _$$PeerConnectionEvent_SignallingChangeImplCopyWith( + _$PeerConnectionEvent_SignallingChangeImpl value, + $Res Function(_$PeerConnectionEvent_SignallingChangeImpl) then) = + __$$PeerConnectionEvent_SignallingChangeImplCopyWithImpl<$Res>; @useResult $Res call({SignalingState field0}); } /// @nodoc -class __$$PeerConnectionEvent_SignallingChangeCopyWithImpl<$Res> +class __$$PeerConnectionEvent_SignallingChangeImplCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_SignallingChange> - implements _$$PeerConnectionEvent_SignallingChangeCopyWith<$Res> { - __$$PeerConnectionEvent_SignallingChangeCopyWithImpl( - _$PeerConnectionEvent_SignallingChange _value, - $Res Function(_$PeerConnectionEvent_SignallingChange) _then) + _$PeerConnectionEvent_SignallingChangeImpl> + implements _$$PeerConnectionEvent_SignallingChangeImplCopyWith<$Res> { + __$$PeerConnectionEvent_SignallingChangeImplCopyWithImpl( + _$PeerConnectionEvent_SignallingChangeImpl _value, + $Res Function(_$PeerConnectionEvent_SignallingChangeImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -2088,7 +2096,7 @@ class __$$PeerConnectionEvent_SignallingChangeCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$PeerConnectionEvent_SignallingChange( + return _then(_$PeerConnectionEvent_SignallingChangeImpl( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -2099,9 +2107,9 @@ class __$$PeerConnectionEvent_SignallingChangeCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_SignallingChange +class _$PeerConnectionEvent_SignallingChangeImpl implements PeerConnectionEvent_SignallingChange { - const _$PeerConnectionEvent_SignallingChange(this.field0); + const _$PeerConnectionEvent_SignallingChangeImpl(this.field0); @override final SignalingState field0; @@ -2115,7 +2123,7 @@ class _$PeerConnectionEvent_SignallingChange bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_SignallingChange && + other is _$PeerConnectionEvent_SignallingChangeImpl && (identical(other.field0, field0) || other.field0 == field0)); } @@ -2125,10 +2133,10 @@ class _$PeerConnectionEvent_SignallingChange @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_SignallingChangeCopyWith< - _$PeerConnectionEvent_SignallingChange> - get copyWith => __$$PeerConnectionEvent_SignallingChangeCopyWithImpl< - _$PeerConnectionEvent_SignallingChange>(this, _$identity); + _$$PeerConnectionEvent_SignallingChangeImplCopyWith< + _$PeerConnectionEvent_SignallingChangeImpl> + get copyWith => __$$PeerConnectionEvent_SignallingChangeImplCopyWithImpl< + _$PeerConnectionEvent_SignallingChangeImpl>(this, _$identity); @override @optionalTypeArgs @@ -2270,33 +2278,36 @@ class _$PeerConnectionEvent_SignallingChange abstract class PeerConnectionEvent_SignallingChange implements PeerConnectionEvent { const factory PeerConnectionEvent_SignallingChange( - final SignalingState field0) = _$PeerConnectionEvent_SignallingChange; + final SignalingState field0) = _$PeerConnectionEvent_SignallingChangeImpl; SignalingState get field0; @JsonKey(ignore: true) - _$$PeerConnectionEvent_SignallingChangeCopyWith< - _$PeerConnectionEvent_SignallingChange> + _$$PeerConnectionEvent_SignallingChangeImplCopyWith< + _$PeerConnectionEvent_SignallingChangeImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_IceConnectionStateChangeCopyWith<$Res> { - factory _$$PeerConnectionEvent_IceConnectionStateChangeCopyWith( - _$PeerConnectionEvent_IceConnectionStateChange value, - $Res Function(_$PeerConnectionEvent_IceConnectionStateChange) then) = - __$$PeerConnectionEvent_IceConnectionStateChangeCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWith< + $Res> { + factory _$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWith( + _$PeerConnectionEvent_IceConnectionStateChangeImpl value, + $Res Function(_$PeerConnectionEvent_IceConnectionStateChangeImpl) + then) = + __$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWithImpl<$Res>; @useResult $Res call({IceConnectionState field0}); } /// @nodoc -class __$$PeerConnectionEvent_IceConnectionStateChangeCopyWithImpl<$Res> +class __$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_IceConnectionStateChange> - implements _$$PeerConnectionEvent_IceConnectionStateChangeCopyWith<$Res> { - __$$PeerConnectionEvent_IceConnectionStateChangeCopyWithImpl( - _$PeerConnectionEvent_IceConnectionStateChange _value, - $Res Function(_$PeerConnectionEvent_IceConnectionStateChange) _then) + _$PeerConnectionEvent_IceConnectionStateChangeImpl> + implements + _$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWith<$Res> { + __$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWithImpl( + _$PeerConnectionEvent_IceConnectionStateChangeImpl _value, + $Res Function(_$PeerConnectionEvent_IceConnectionStateChangeImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -2304,7 +2315,7 @@ class __$$PeerConnectionEvent_IceConnectionStateChangeCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$PeerConnectionEvent_IceConnectionStateChange( + return _then(_$PeerConnectionEvent_IceConnectionStateChangeImpl( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -2315,9 +2326,9 @@ class __$$PeerConnectionEvent_IceConnectionStateChangeCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_IceConnectionStateChange +class _$PeerConnectionEvent_IceConnectionStateChangeImpl implements PeerConnectionEvent_IceConnectionStateChange { - const _$PeerConnectionEvent_IceConnectionStateChange(this.field0); + const _$PeerConnectionEvent_IceConnectionStateChangeImpl(this.field0); @override final IceConnectionState field0; @@ -2331,7 +2342,7 @@ class _$PeerConnectionEvent_IceConnectionStateChange bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_IceConnectionStateChange && + other is _$PeerConnectionEvent_IceConnectionStateChangeImpl && (identical(other.field0, field0) || other.field0 == field0)); } @@ -2341,11 +2352,12 @@ class _$PeerConnectionEvent_IceConnectionStateChange @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_IceConnectionStateChangeCopyWith< - _$PeerConnectionEvent_IceConnectionStateChange> + _$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWith< + _$PeerConnectionEvent_IceConnectionStateChangeImpl> get copyWith => - __$$PeerConnectionEvent_IceConnectionStateChangeCopyWithImpl< - _$PeerConnectionEvent_IceConnectionStateChange>(this, _$identity); + __$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWithImpl< + _$PeerConnectionEvent_IceConnectionStateChangeImpl>( + this, _$identity); @override @optionalTypeArgs @@ -2488,33 +2500,33 @@ abstract class PeerConnectionEvent_IceConnectionStateChange implements PeerConnectionEvent { const factory PeerConnectionEvent_IceConnectionStateChange( final IceConnectionState field0) = - _$PeerConnectionEvent_IceConnectionStateChange; + _$PeerConnectionEvent_IceConnectionStateChangeImpl; IceConnectionState get field0; @JsonKey(ignore: true) - _$$PeerConnectionEvent_IceConnectionStateChangeCopyWith< - _$PeerConnectionEvent_IceConnectionStateChange> + _$$PeerConnectionEvent_IceConnectionStateChangeImplCopyWith< + _$PeerConnectionEvent_IceConnectionStateChangeImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_ConnectionStateChangeCopyWith<$Res> { - factory _$$PeerConnectionEvent_ConnectionStateChangeCopyWith( - _$PeerConnectionEvent_ConnectionStateChange value, - $Res Function(_$PeerConnectionEvent_ConnectionStateChange) then) = - __$$PeerConnectionEvent_ConnectionStateChangeCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_ConnectionStateChangeImplCopyWith<$Res> { + factory _$$PeerConnectionEvent_ConnectionStateChangeImplCopyWith( + _$PeerConnectionEvent_ConnectionStateChangeImpl value, + $Res Function(_$PeerConnectionEvent_ConnectionStateChangeImpl) then) = + __$$PeerConnectionEvent_ConnectionStateChangeImplCopyWithImpl<$Res>; @useResult $Res call({PeerConnectionState field0}); } /// @nodoc -class __$$PeerConnectionEvent_ConnectionStateChangeCopyWithImpl<$Res> +class __$$PeerConnectionEvent_ConnectionStateChangeImplCopyWithImpl<$Res> extends _$PeerConnectionEventCopyWithImpl<$Res, - _$PeerConnectionEvent_ConnectionStateChange> - implements _$$PeerConnectionEvent_ConnectionStateChangeCopyWith<$Res> { - __$$PeerConnectionEvent_ConnectionStateChangeCopyWithImpl( - _$PeerConnectionEvent_ConnectionStateChange _value, - $Res Function(_$PeerConnectionEvent_ConnectionStateChange) _then) + _$PeerConnectionEvent_ConnectionStateChangeImpl> + implements _$$PeerConnectionEvent_ConnectionStateChangeImplCopyWith<$Res> { + __$$PeerConnectionEvent_ConnectionStateChangeImplCopyWithImpl( + _$PeerConnectionEvent_ConnectionStateChangeImpl _value, + $Res Function(_$PeerConnectionEvent_ConnectionStateChangeImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -2522,7 +2534,7 @@ class __$$PeerConnectionEvent_ConnectionStateChangeCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$PeerConnectionEvent_ConnectionStateChange( + return _then(_$PeerConnectionEvent_ConnectionStateChangeImpl( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -2533,9 +2545,9 @@ class __$$PeerConnectionEvent_ConnectionStateChangeCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_ConnectionStateChange +class _$PeerConnectionEvent_ConnectionStateChangeImpl implements PeerConnectionEvent_ConnectionStateChange { - const _$PeerConnectionEvent_ConnectionStateChange(this.field0); + const _$PeerConnectionEvent_ConnectionStateChangeImpl(this.field0); @override final PeerConnectionState field0; @@ -2549,7 +2561,7 @@ class _$PeerConnectionEvent_ConnectionStateChange bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_ConnectionStateChange && + other is _$PeerConnectionEvent_ConnectionStateChangeImpl && (identical(other.field0, field0) || other.field0 == field0)); } @@ -2559,10 +2571,12 @@ class _$PeerConnectionEvent_ConnectionStateChange @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_ConnectionStateChangeCopyWith< - _$PeerConnectionEvent_ConnectionStateChange> - get copyWith => __$$PeerConnectionEvent_ConnectionStateChangeCopyWithImpl< - _$PeerConnectionEvent_ConnectionStateChange>(this, _$identity); + _$$PeerConnectionEvent_ConnectionStateChangeImplCopyWith< + _$PeerConnectionEvent_ConnectionStateChangeImpl> + get copyWith => + __$$PeerConnectionEvent_ConnectionStateChangeImplCopyWithImpl< + _$PeerConnectionEvent_ConnectionStateChangeImpl>( + this, _$identity); @override @optionalTypeArgs @@ -2705,31 +2719,33 @@ abstract class PeerConnectionEvent_ConnectionStateChange implements PeerConnectionEvent { const factory PeerConnectionEvent_ConnectionStateChange( final PeerConnectionState field0) = - _$PeerConnectionEvent_ConnectionStateChange; + _$PeerConnectionEvent_ConnectionStateChangeImpl; PeerConnectionState get field0; @JsonKey(ignore: true) - _$$PeerConnectionEvent_ConnectionStateChangeCopyWith< - _$PeerConnectionEvent_ConnectionStateChange> + _$$PeerConnectionEvent_ConnectionStateChangeImplCopyWith< + _$PeerConnectionEvent_ConnectionStateChangeImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$PeerConnectionEvent_TrackCopyWith<$Res> { - factory _$$PeerConnectionEvent_TrackCopyWith( - _$PeerConnectionEvent_Track value, - $Res Function(_$PeerConnectionEvent_Track) then) = - __$$PeerConnectionEvent_TrackCopyWithImpl<$Res>; +abstract class _$$PeerConnectionEvent_TrackImplCopyWith<$Res> { + factory _$$PeerConnectionEvent_TrackImplCopyWith( + _$PeerConnectionEvent_TrackImpl value, + $Res Function(_$PeerConnectionEvent_TrackImpl) then) = + __$$PeerConnectionEvent_TrackImplCopyWithImpl<$Res>; @useResult $Res call({RtcTrackEvent field0}); } /// @nodoc -class __$$PeerConnectionEvent_TrackCopyWithImpl<$Res> - extends _$PeerConnectionEventCopyWithImpl<$Res, _$PeerConnectionEvent_Track> - implements _$$PeerConnectionEvent_TrackCopyWith<$Res> { - __$$PeerConnectionEvent_TrackCopyWithImpl(_$PeerConnectionEvent_Track _value, - $Res Function(_$PeerConnectionEvent_Track) _then) +class __$$PeerConnectionEvent_TrackImplCopyWithImpl<$Res> + extends _$PeerConnectionEventCopyWithImpl<$Res, + _$PeerConnectionEvent_TrackImpl> + implements _$$PeerConnectionEvent_TrackImplCopyWith<$Res> { + __$$PeerConnectionEvent_TrackImplCopyWithImpl( + _$PeerConnectionEvent_TrackImpl _value, + $Res Function(_$PeerConnectionEvent_TrackImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -2737,7 +2753,7 @@ class __$$PeerConnectionEvent_TrackCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$PeerConnectionEvent_Track( + return _then(_$PeerConnectionEvent_TrackImpl( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -2748,8 +2764,8 @@ class __$$PeerConnectionEvent_TrackCopyWithImpl<$Res> /// @nodoc -class _$PeerConnectionEvent_Track implements PeerConnectionEvent_Track { - const _$PeerConnectionEvent_Track(this.field0); +class _$PeerConnectionEvent_TrackImpl implements PeerConnectionEvent_Track { + const _$PeerConnectionEvent_TrackImpl(this.field0); @override final RtcTrackEvent field0; @@ -2763,7 +2779,7 @@ class _$PeerConnectionEvent_Track implements PeerConnectionEvent_Track { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$PeerConnectionEvent_Track && + other is _$PeerConnectionEvent_TrackImpl && (identical(other.field0, field0) || other.field0 == field0)); } @@ -2773,9 +2789,9 @@ class _$PeerConnectionEvent_Track implements PeerConnectionEvent_Track { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$PeerConnectionEvent_TrackCopyWith<_$PeerConnectionEvent_Track> - get copyWith => __$$PeerConnectionEvent_TrackCopyWithImpl< - _$PeerConnectionEvent_Track>(this, _$identity); + _$$PeerConnectionEvent_TrackImplCopyWith<_$PeerConnectionEvent_TrackImpl> + get copyWith => __$$PeerConnectionEvent_TrackImplCopyWithImpl< + _$PeerConnectionEvent_TrackImpl>(this, _$identity); @override @optionalTypeArgs @@ -2916,11 +2932,11 @@ class _$PeerConnectionEvent_Track implements PeerConnectionEvent_Track { abstract class PeerConnectionEvent_Track implements PeerConnectionEvent { const factory PeerConnectionEvent_Track(final RtcTrackEvent field0) = - _$PeerConnectionEvent_Track; + _$PeerConnectionEvent_TrackImpl; RtcTrackEvent get field0; @JsonKey(ignore: true) - _$$PeerConnectionEvent_TrackCopyWith<_$PeerConnectionEvent_Track> + _$$PeerConnectionEvent_TrackImplCopyWith<_$PeerConnectionEvent_TrackImpl> get copyWith => throw _privateConstructorUsedError; } @@ -3006,25 +3022,25 @@ class _$RtcIceCandidateStatsCopyWithImpl<$Res, } /// @nodoc -abstract class _$$RtcIceCandidateStats_LocalCopyWith<$Res> +abstract class _$$RtcIceCandidateStats_LocalImplCopyWith<$Res> implements $RtcIceCandidateStatsCopyWith<$Res> { - factory _$$RtcIceCandidateStats_LocalCopyWith( - _$RtcIceCandidateStats_Local value, - $Res Function(_$RtcIceCandidateStats_Local) then) = - __$$RtcIceCandidateStats_LocalCopyWithImpl<$Res>; + factory _$$RtcIceCandidateStats_LocalImplCopyWith( + _$RtcIceCandidateStats_LocalImpl value, + $Res Function(_$RtcIceCandidateStats_LocalImpl) then) = + __$$RtcIceCandidateStats_LocalImplCopyWithImpl<$Res>; @override @useResult $Res call({IceCandidateStats field0}); } /// @nodoc -class __$$RtcIceCandidateStats_LocalCopyWithImpl<$Res> +class __$$RtcIceCandidateStats_LocalImplCopyWithImpl<$Res> extends _$RtcIceCandidateStatsCopyWithImpl<$Res, - _$RtcIceCandidateStats_Local> - implements _$$RtcIceCandidateStats_LocalCopyWith<$Res> { - __$$RtcIceCandidateStats_LocalCopyWithImpl( - _$RtcIceCandidateStats_Local _value, - $Res Function(_$RtcIceCandidateStats_Local) _then) + _$RtcIceCandidateStats_LocalImpl> + implements _$$RtcIceCandidateStats_LocalImplCopyWith<$Res> { + __$$RtcIceCandidateStats_LocalImplCopyWithImpl( + _$RtcIceCandidateStats_LocalImpl _value, + $Res Function(_$RtcIceCandidateStats_LocalImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -3032,7 +3048,7 @@ class __$$RtcIceCandidateStats_LocalCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$RtcIceCandidateStats_Local( + return _then(_$RtcIceCandidateStats_LocalImpl( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -3043,8 +3059,8 @@ class __$$RtcIceCandidateStats_LocalCopyWithImpl<$Res> /// @nodoc -class _$RtcIceCandidateStats_Local implements RtcIceCandidateStats_Local { - const _$RtcIceCandidateStats_Local(this.field0); +class _$RtcIceCandidateStats_LocalImpl implements RtcIceCandidateStats_Local { + const _$RtcIceCandidateStats_LocalImpl(this.field0); @override final IceCandidateStats field0; @@ -3058,7 +3074,7 @@ class _$RtcIceCandidateStats_Local implements RtcIceCandidateStats_Local { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcIceCandidateStats_Local && + other is _$RtcIceCandidateStats_LocalImpl && (identical(other.field0, field0) || other.field0 == field0)); } @@ -3068,9 +3084,9 @@ class _$RtcIceCandidateStats_Local implements RtcIceCandidateStats_Local { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcIceCandidateStats_LocalCopyWith<_$RtcIceCandidateStats_Local> - get copyWith => __$$RtcIceCandidateStats_LocalCopyWithImpl< - _$RtcIceCandidateStats_Local>(this, _$identity); + _$$RtcIceCandidateStats_LocalImplCopyWith<_$RtcIceCandidateStats_LocalImpl> + get copyWith => __$$RtcIceCandidateStats_LocalImplCopyWithImpl< + _$RtcIceCandidateStats_LocalImpl>(this, _$identity); @override @optionalTypeArgs @@ -3137,36 +3153,36 @@ class _$RtcIceCandidateStats_Local implements RtcIceCandidateStats_Local { abstract class RtcIceCandidateStats_Local implements RtcIceCandidateStats { const factory RtcIceCandidateStats_Local(final IceCandidateStats field0) = - _$RtcIceCandidateStats_Local; + _$RtcIceCandidateStats_LocalImpl; @override IceCandidateStats get field0; @override @JsonKey(ignore: true) - _$$RtcIceCandidateStats_LocalCopyWith<_$RtcIceCandidateStats_Local> + _$$RtcIceCandidateStats_LocalImplCopyWith<_$RtcIceCandidateStats_LocalImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcIceCandidateStats_RemoteCopyWith<$Res> +abstract class _$$RtcIceCandidateStats_RemoteImplCopyWith<$Res> implements $RtcIceCandidateStatsCopyWith<$Res> { - factory _$$RtcIceCandidateStats_RemoteCopyWith( - _$RtcIceCandidateStats_Remote value, - $Res Function(_$RtcIceCandidateStats_Remote) then) = - __$$RtcIceCandidateStats_RemoteCopyWithImpl<$Res>; + factory _$$RtcIceCandidateStats_RemoteImplCopyWith( + _$RtcIceCandidateStats_RemoteImpl value, + $Res Function(_$RtcIceCandidateStats_RemoteImpl) then) = + __$$RtcIceCandidateStats_RemoteImplCopyWithImpl<$Res>; @override @useResult $Res call({IceCandidateStats field0}); } /// @nodoc -class __$$RtcIceCandidateStats_RemoteCopyWithImpl<$Res> +class __$$RtcIceCandidateStats_RemoteImplCopyWithImpl<$Res> extends _$RtcIceCandidateStatsCopyWithImpl<$Res, - _$RtcIceCandidateStats_Remote> - implements _$$RtcIceCandidateStats_RemoteCopyWith<$Res> { - __$$RtcIceCandidateStats_RemoteCopyWithImpl( - _$RtcIceCandidateStats_Remote _value, - $Res Function(_$RtcIceCandidateStats_Remote) _then) + _$RtcIceCandidateStats_RemoteImpl> + implements _$$RtcIceCandidateStats_RemoteImplCopyWith<$Res> { + __$$RtcIceCandidateStats_RemoteImplCopyWithImpl( + _$RtcIceCandidateStats_RemoteImpl _value, + $Res Function(_$RtcIceCandidateStats_RemoteImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -3174,7 +3190,7 @@ class __$$RtcIceCandidateStats_RemoteCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$RtcIceCandidateStats_Remote( + return _then(_$RtcIceCandidateStats_RemoteImpl( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -3185,8 +3201,8 @@ class __$$RtcIceCandidateStats_RemoteCopyWithImpl<$Res> /// @nodoc -class _$RtcIceCandidateStats_Remote implements RtcIceCandidateStats_Remote { - const _$RtcIceCandidateStats_Remote(this.field0); +class _$RtcIceCandidateStats_RemoteImpl implements RtcIceCandidateStats_Remote { + const _$RtcIceCandidateStats_RemoteImpl(this.field0); @override final IceCandidateStats field0; @@ -3200,7 +3216,7 @@ class _$RtcIceCandidateStats_Remote implements RtcIceCandidateStats_Remote { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcIceCandidateStats_Remote && + other is _$RtcIceCandidateStats_RemoteImpl && (identical(other.field0, field0) || other.field0 == field0)); } @@ -3210,9 +3226,9 @@ class _$RtcIceCandidateStats_Remote implements RtcIceCandidateStats_Remote { @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcIceCandidateStats_RemoteCopyWith<_$RtcIceCandidateStats_Remote> - get copyWith => __$$RtcIceCandidateStats_RemoteCopyWithImpl< - _$RtcIceCandidateStats_Remote>(this, _$identity); + _$$RtcIceCandidateStats_RemoteImplCopyWith<_$RtcIceCandidateStats_RemoteImpl> + get copyWith => __$$RtcIceCandidateStats_RemoteImplCopyWithImpl< + _$RtcIceCandidateStats_RemoteImpl>(this, _$identity); @override @optionalTypeArgs @@ -3279,13 +3295,13 @@ class _$RtcIceCandidateStats_Remote implements RtcIceCandidateStats_Remote { abstract class RtcIceCandidateStats_Remote implements RtcIceCandidateStats { const factory RtcIceCandidateStats_Remote(final IceCandidateStats field0) = - _$RtcIceCandidateStats_Remote; + _$RtcIceCandidateStats_RemoteImpl; @override IceCandidateStats get field0; @override @JsonKey(ignore: true) - _$$RtcIceCandidateStats_RemoteCopyWith<_$RtcIceCandidateStats_Remote> + _$$RtcIceCandidateStats_RemoteImplCopyWith<_$RtcIceCandidateStats_RemoteImpl> get copyWith => throw _privateConstructorUsedError; } @@ -3413,11 +3429,11 @@ class _$RtcInboundRtpStreamMediaTypeCopyWithImpl<$Res, } /// @nodoc -abstract class _$$RtcInboundRtpStreamMediaType_AudioCopyWith<$Res> { - factory _$$RtcInboundRtpStreamMediaType_AudioCopyWith( - _$RtcInboundRtpStreamMediaType_Audio value, - $Res Function(_$RtcInboundRtpStreamMediaType_Audio) then) = - __$$RtcInboundRtpStreamMediaType_AudioCopyWithImpl<$Res>; +abstract class _$$RtcInboundRtpStreamMediaType_AudioImplCopyWith<$Res> { + factory _$$RtcInboundRtpStreamMediaType_AudioImplCopyWith( + _$RtcInboundRtpStreamMediaType_AudioImpl value, + $Res Function(_$RtcInboundRtpStreamMediaType_AudioImpl) then) = + __$$RtcInboundRtpStreamMediaType_AudioImplCopyWithImpl<$Res>; @useResult $Res call( {bool? voiceActivityFlag, @@ -3430,13 +3446,13 @@ abstract class _$$RtcInboundRtpStreamMediaType_AudioCopyWith<$Res> { } /// @nodoc -class __$$RtcInboundRtpStreamMediaType_AudioCopyWithImpl<$Res> +class __$$RtcInboundRtpStreamMediaType_AudioImplCopyWithImpl<$Res> extends _$RtcInboundRtpStreamMediaTypeCopyWithImpl<$Res, - _$RtcInboundRtpStreamMediaType_Audio> - implements _$$RtcInboundRtpStreamMediaType_AudioCopyWith<$Res> { - __$$RtcInboundRtpStreamMediaType_AudioCopyWithImpl( - _$RtcInboundRtpStreamMediaType_Audio _value, - $Res Function(_$RtcInboundRtpStreamMediaType_Audio) _then) + _$RtcInboundRtpStreamMediaType_AudioImpl> + implements _$$RtcInboundRtpStreamMediaType_AudioImplCopyWith<$Res> { + __$$RtcInboundRtpStreamMediaType_AudioImplCopyWithImpl( + _$RtcInboundRtpStreamMediaType_AudioImpl _value, + $Res Function(_$RtcInboundRtpStreamMediaType_AudioImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -3450,7 +3466,7 @@ class __$$RtcInboundRtpStreamMediaType_AudioCopyWithImpl<$Res> Object? totalAudioEnergy = freezed, Object? totalSamplesDuration = freezed, }) { - return _then(_$RtcInboundRtpStreamMediaType_Audio( + return _then(_$RtcInboundRtpStreamMediaType_AudioImpl( voiceActivityFlag: freezed == voiceActivityFlag ? _value.voiceActivityFlag : voiceActivityFlag // ignore: cast_nullable_to_non_nullable @@ -3485,9 +3501,9 @@ class __$$RtcInboundRtpStreamMediaType_AudioCopyWithImpl<$Res> /// @nodoc -class _$RtcInboundRtpStreamMediaType_Audio +class _$RtcInboundRtpStreamMediaType_AudioImpl implements RtcInboundRtpStreamMediaType_Audio { - const _$RtcInboundRtpStreamMediaType_Audio( + const _$RtcInboundRtpStreamMediaType_AudioImpl( {this.voiceActivityFlag, this.totalSamplesReceived, this.concealedSamples, @@ -3562,7 +3578,7 @@ class _$RtcInboundRtpStreamMediaType_Audio bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcInboundRtpStreamMediaType_Audio && + other is _$RtcInboundRtpStreamMediaType_AudioImpl && (identical(other.voiceActivityFlag, voiceActivityFlag) || other.voiceActivityFlag == voiceActivityFlag) && (identical(other.totalSamplesReceived, totalSamplesReceived) || @@ -3593,10 +3609,10 @@ class _$RtcInboundRtpStreamMediaType_Audio @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcInboundRtpStreamMediaType_AudioCopyWith< - _$RtcInboundRtpStreamMediaType_Audio> - get copyWith => __$$RtcInboundRtpStreamMediaType_AudioCopyWithImpl< - _$RtcInboundRtpStreamMediaType_Audio>(this, _$identity); + _$$RtcInboundRtpStreamMediaType_AudioImplCopyWith< + _$RtcInboundRtpStreamMediaType_AudioImpl> + get copyWith => __$$RtcInboundRtpStreamMediaType_AudioImplCopyWithImpl< + _$RtcInboundRtpStreamMediaType_AudioImpl>(this, _$identity); @override @optionalTypeArgs @@ -3752,7 +3768,7 @@ abstract class RtcInboundRtpStreamMediaType_Audio final double? audioLevel, final double? totalAudioEnergy, final double? totalSamplesDuration}) = - _$RtcInboundRtpStreamMediaType_Audio; + _$RtcInboundRtpStreamMediaType_AudioImpl; /// Indicator whether the last RTP packet whose frame was delivered to /// the [RTCRtpReceiver]'s [MediaStreamTrack][1] for playout contained @@ -3804,17 +3820,17 @@ abstract class RtcInboundRtpStreamMediaType_Audio /// [1]: https://w3.org/TR/webrtc-stats#dom-rtcaudiosourcestats double? get totalSamplesDuration; @JsonKey(ignore: true) - _$$RtcInboundRtpStreamMediaType_AudioCopyWith< - _$RtcInboundRtpStreamMediaType_Audio> + _$$RtcInboundRtpStreamMediaType_AudioImplCopyWith< + _$RtcInboundRtpStreamMediaType_AudioImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcInboundRtpStreamMediaType_VideoCopyWith<$Res> { - factory _$$RtcInboundRtpStreamMediaType_VideoCopyWith( - _$RtcInboundRtpStreamMediaType_Video value, - $Res Function(_$RtcInboundRtpStreamMediaType_Video) then) = - __$$RtcInboundRtpStreamMediaType_VideoCopyWithImpl<$Res>; +abstract class _$$RtcInboundRtpStreamMediaType_VideoImplCopyWith<$Res> { + factory _$$RtcInboundRtpStreamMediaType_VideoImplCopyWith( + _$RtcInboundRtpStreamMediaType_VideoImpl value, + $Res Function(_$RtcInboundRtpStreamMediaType_VideoImpl) then) = + __$$RtcInboundRtpStreamMediaType_VideoImplCopyWithImpl<$Res>; @useResult $Res call( {int? framesDecoded, @@ -3831,13 +3847,13 @@ abstract class _$$RtcInboundRtpStreamMediaType_VideoCopyWith<$Res> { } /// @nodoc -class __$$RtcInboundRtpStreamMediaType_VideoCopyWithImpl<$Res> +class __$$RtcInboundRtpStreamMediaType_VideoImplCopyWithImpl<$Res> extends _$RtcInboundRtpStreamMediaTypeCopyWithImpl<$Res, - _$RtcInboundRtpStreamMediaType_Video> - implements _$$RtcInboundRtpStreamMediaType_VideoCopyWith<$Res> { - __$$RtcInboundRtpStreamMediaType_VideoCopyWithImpl( - _$RtcInboundRtpStreamMediaType_Video _value, - $Res Function(_$RtcInboundRtpStreamMediaType_Video) _then) + _$RtcInboundRtpStreamMediaType_VideoImpl> + implements _$$RtcInboundRtpStreamMediaType_VideoImplCopyWith<$Res> { + __$$RtcInboundRtpStreamMediaType_VideoImplCopyWithImpl( + _$RtcInboundRtpStreamMediaType_VideoImpl _value, + $Res Function(_$RtcInboundRtpStreamMediaType_VideoImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -3855,7 +3871,7 @@ class __$$RtcInboundRtpStreamMediaType_VideoCopyWithImpl<$Res> Object? concealmentEvents = freezed, Object? framesReceived = freezed, }) { - return _then(_$RtcInboundRtpStreamMediaType_Video( + return _then(_$RtcInboundRtpStreamMediaType_VideoImpl( framesDecoded: freezed == framesDecoded ? _value.framesDecoded : framesDecoded // ignore: cast_nullable_to_non_nullable @@ -3906,9 +3922,9 @@ class __$$RtcInboundRtpStreamMediaType_VideoCopyWithImpl<$Res> /// @nodoc -class _$RtcInboundRtpStreamMediaType_Video +class _$RtcInboundRtpStreamMediaType_VideoImpl implements RtcInboundRtpStreamMediaType_Video { - const _$RtcInboundRtpStreamMediaType_Video( + const _$RtcInboundRtpStreamMediaType_VideoImpl( {this.framesDecoded, this.keyFramesDecoded, this.frameWidth, @@ -4003,7 +4019,7 @@ class _$RtcInboundRtpStreamMediaType_Video bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcInboundRtpStreamMediaType_Video && + other is _$RtcInboundRtpStreamMediaType_VideoImpl && (identical(other.framesDecoded, framesDecoded) || other.framesDecoded == framesDecoded) && (identical(other.keyFramesDecoded, keyFramesDecoded) || @@ -4046,10 +4062,10 @@ class _$RtcInboundRtpStreamMediaType_Video @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcInboundRtpStreamMediaType_VideoCopyWith< - _$RtcInboundRtpStreamMediaType_Video> - get copyWith => __$$RtcInboundRtpStreamMediaType_VideoCopyWithImpl< - _$RtcInboundRtpStreamMediaType_Video>(this, _$identity); + _$$RtcInboundRtpStreamMediaType_VideoImplCopyWith< + _$RtcInboundRtpStreamMediaType_VideoImpl> + get copyWith => __$$RtcInboundRtpStreamMediaType_VideoImplCopyWithImpl< + _$RtcInboundRtpStreamMediaType_VideoImpl>(this, _$identity); @override @optionalTypeArgs @@ -4220,7 +4236,7 @@ abstract class RtcInboundRtpStreamMediaType_Video final int? pliCount, final int? sliCount, final int? concealmentEvents, - final int? framesReceived}) = _$RtcInboundRtpStreamMediaType_Video; + final int? framesReceived}) = _$RtcInboundRtpStreamMediaType_VideoImpl; /// Total number of frames correctly decoded for this RTP stream, i.e. /// frames that would be displayed if no frames are dropped. @@ -4284,8 +4300,8 @@ abstract class RtcInboundRtpStreamMediaType_Video /// This metric is incremented when the complete frame is received. int? get framesReceived; @JsonKey(ignore: true) - _$$RtcInboundRtpStreamMediaType_VideoCopyWith< - _$RtcInboundRtpStreamMediaType_Video> + _$$RtcInboundRtpStreamMediaType_VideoImplCopyWith< + _$RtcInboundRtpStreamMediaType_VideoImpl> get copyWith => throw _privateConstructorUsedError; } @@ -4385,26 +4401,28 @@ class _$RtcMediaSourceStatsMediaTypeCopyWithImpl<$Res, } /// @nodoc -abstract class _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWith< +abstract class _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWith< $Res> { - factory _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWith( - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats value, - $Res Function(_$RtcMediaSourceStatsMediaType_RtcVideoSourceStats) + factory _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWith( + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl value, + $Res Function(_$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl) then) = - __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWithImpl<$Res>; + __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWithImpl< + $Res>; @useResult $Res call({int? width, int? height, int? frames, double? framesPerSecond}); } /// @nodoc -class __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWithImpl<$Res> +class __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWithImpl<$Res> extends _$RtcMediaSourceStatsMediaTypeCopyWithImpl<$Res, - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats> + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl> implements - _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWith<$Res> { - __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWithImpl( - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats _value, - $Res Function(_$RtcMediaSourceStatsMediaType_RtcVideoSourceStats) _then) + _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWith<$Res> { + __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWithImpl( + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl _value, + $Res Function(_$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl) + _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -4415,7 +4433,7 @@ class __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWithImpl<$Res> Object? frames = freezed, Object? framesPerSecond = freezed, }) { - return _then(_$RtcMediaSourceStatsMediaType_RtcVideoSourceStats( + return _then(_$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl( width: freezed == width ? _value.width : width // ignore: cast_nullable_to_non_nullable @@ -4438,9 +4456,9 @@ class __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWithImpl<$Res> /// @nodoc -class _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats +class _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl implements RtcMediaSourceStatsMediaType_RtcVideoSourceStats { - const _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats( + const _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl( {this.width, this.height, this.frames, this.framesPerSecond}); /// Width (in pixels) of the last frame originating from the source. @@ -4472,7 +4490,7 @@ class _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats && + other is _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl && (identical(other.width, width) || other.width == width) && (identical(other.height, height) || other.height == height) && (identical(other.frames, frames) || other.frames == frames) && @@ -4487,11 +4505,11 @@ class _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWith< - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats> + _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWith< + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl> get copyWith => - __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWithImpl< - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats>( + __$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWithImpl< + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl>( this, _$identity); @override @@ -4596,7 +4614,7 @@ abstract class RtcMediaSourceStatsMediaType_RtcVideoSourceStats final int? height, final int? frames, final double? framesPerSecond}) = - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats; + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl; /// Width (in pixels) of the last frame originating from the source. /// Before a frame has been produced this attribute is missing. @@ -4614,19 +4632,20 @@ abstract class RtcMediaSourceStatsMediaType_RtcVideoSourceStats /// attribute is missing. double? get framesPerSecond; @JsonKey(ignore: true) - _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsCopyWith< - _$RtcMediaSourceStatsMediaType_RtcVideoSourceStats> + _$$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImplCopyWith< + _$RtcMediaSourceStatsMediaType_RtcVideoSourceStatsImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWith< +abstract class _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWith< $Res> { - factory _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWith( - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats value, - $Res Function(_$RtcMediaSourceStatsMediaType_RtcAudioSourceStats) + factory _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWith( + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl value, + $Res Function(_$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl) then) = - __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWithImpl<$Res>; + __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWithImpl< + $Res>; @useResult $Res call( {double? audioLevel, @@ -4637,14 +4656,15 @@ abstract class _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWith< } /// @nodoc -class __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWithImpl<$Res> +class __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWithImpl<$Res> extends _$RtcMediaSourceStatsMediaTypeCopyWithImpl<$Res, - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats> + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl> implements - _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWith<$Res> { - __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWithImpl( - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats _value, - $Res Function(_$RtcMediaSourceStatsMediaType_RtcAudioSourceStats) _then) + _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWith<$Res> { + __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWithImpl( + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl _value, + $Res Function(_$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl) + _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -4656,7 +4676,7 @@ class __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWithImpl<$Res> Object? echoReturnLoss = freezed, Object? echoReturnLossEnhancement = freezed, }) { - return _then(_$RtcMediaSourceStatsMediaType_RtcAudioSourceStats( + return _then(_$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl( audioLevel: freezed == audioLevel ? _value.audioLevel : audioLevel // ignore: cast_nullable_to_non_nullable @@ -4683,9 +4703,9 @@ class __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWithImpl<$Res> /// @nodoc -class _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats +class _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl implements RtcMediaSourceStatsMediaType_RtcAudioSourceStats { - const _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats( + const _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl( {this.audioLevel, this.totalAudioEnergy, this.totalSamplesDuration, @@ -4727,7 +4747,7 @@ class _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats && + other is _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl && (identical(other.audioLevel, audioLevel) || other.audioLevel == audioLevel) && (identical(other.totalAudioEnergy, totalAudioEnergy) || @@ -4748,11 +4768,11 @@ class _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWith< - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats> + _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWith< + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl> get copyWith => - __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWithImpl< - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats>( + __$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWithImpl< + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl>( this, _$identity); @override @@ -4861,7 +4881,7 @@ abstract class RtcMediaSourceStatsMediaType_RtcAudioSourceStats final double? totalSamplesDuration, final double? echoReturnLoss, final double? echoReturnLossEnhancement}) = - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats; + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl; /// Audio level of the media source. double? get audioLevel; @@ -4884,8 +4904,8 @@ abstract class RtcMediaSourceStatsMediaType_RtcAudioSourceStats /// [1]: https://w3.org/TR/mediacapture-streams#mediastreamtrack double? get echoReturnLossEnhancement; @JsonKey(ignore: true) - _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsCopyWith< - _$RtcMediaSourceStatsMediaType_RtcAudioSourceStats> + _$$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImplCopyWith< + _$RtcMediaSourceStatsMediaType_RtcAudioSourceStatsImpl> get copyWith => throw _privateConstructorUsedError; } @@ -4962,23 +4982,23 @@ class _$RtcOutboundRtpStreamStatsMediaTypeCopyWithImpl<$Res, } /// @nodoc -abstract class _$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWith<$Res> { - factory _$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWith( - _$RtcOutboundRtpStreamStatsMediaType_Audio value, - $Res Function(_$RtcOutboundRtpStreamStatsMediaType_Audio) then) = - __$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWithImpl<$Res>; +abstract class _$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWith<$Res> { + factory _$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWith( + _$RtcOutboundRtpStreamStatsMediaType_AudioImpl value, + $Res Function(_$RtcOutboundRtpStreamStatsMediaType_AudioImpl) then) = + __$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWithImpl<$Res>; @useResult $Res call({int? totalSamplesSent, bool? voiceActivityFlag}); } /// @nodoc -class __$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWithImpl<$Res> +class __$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWithImpl<$Res> extends _$RtcOutboundRtpStreamStatsMediaTypeCopyWithImpl<$Res, - _$RtcOutboundRtpStreamStatsMediaType_Audio> - implements _$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWith<$Res> { - __$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWithImpl( - _$RtcOutboundRtpStreamStatsMediaType_Audio _value, - $Res Function(_$RtcOutboundRtpStreamStatsMediaType_Audio) _then) + _$RtcOutboundRtpStreamStatsMediaType_AudioImpl> + implements _$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWith<$Res> { + __$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWithImpl( + _$RtcOutboundRtpStreamStatsMediaType_AudioImpl _value, + $Res Function(_$RtcOutboundRtpStreamStatsMediaType_AudioImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -4987,7 +5007,7 @@ class __$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWithImpl<$Res> Object? totalSamplesSent = freezed, Object? voiceActivityFlag = freezed, }) { - return _then(_$RtcOutboundRtpStreamStatsMediaType_Audio( + return _then(_$RtcOutboundRtpStreamStatsMediaType_AudioImpl( totalSamplesSent: freezed == totalSamplesSent ? _value.totalSamplesSent : totalSamplesSent // ignore: cast_nullable_to_non_nullable @@ -5002,9 +5022,9 @@ class __$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWithImpl<$Res> /// @nodoc -class _$RtcOutboundRtpStreamStatsMediaType_Audio +class _$RtcOutboundRtpStreamStatsMediaType_AudioImpl implements RtcOutboundRtpStreamStatsMediaType_Audio { - const _$RtcOutboundRtpStreamStatsMediaType_Audio( + const _$RtcOutboundRtpStreamStatsMediaType_AudioImpl( {this.totalSamplesSent, this.voiceActivityFlag}); /// Total number of samples that have been sent over the RTP stream. @@ -5025,7 +5045,7 @@ class _$RtcOutboundRtpStreamStatsMediaType_Audio bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcOutboundRtpStreamStatsMediaType_Audio && + other is _$RtcOutboundRtpStreamStatsMediaType_AudioImpl && (identical(other.totalSamplesSent, totalSamplesSent) || other.totalSamplesSent == totalSamplesSent) && (identical(other.voiceActivityFlag, voiceActivityFlag) || @@ -5039,10 +5059,11 @@ class _$RtcOutboundRtpStreamStatsMediaType_Audio @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWith< - _$RtcOutboundRtpStreamStatsMediaType_Audio> - get copyWith => __$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWithImpl< - _$RtcOutboundRtpStreamStatsMediaType_Audio>(this, _$identity); + _$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWith< + _$RtcOutboundRtpStreamStatsMediaType_AudioImpl> + get copyWith => + __$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWithImpl< + _$RtcOutboundRtpStreamStatsMediaType_AudioImpl>(this, _$identity); @override @optionalTypeArgs @@ -5120,7 +5141,7 @@ abstract class RtcOutboundRtpStreamStatsMediaType_Audio implements RtcOutboundRtpStreamStatsMediaType { const factory RtcOutboundRtpStreamStatsMediaType_Audio( {final int? totalSamplesSent, final bool? voiceActivityFlag}) = - _$RtcOutboundRtpStreamStatsMediaType_Audio; + _$RtcOutboundRtpStreamStatsMediaType_AudioImpl; /// Total number of samples that have been sent over the RTP stream. int? get totalSamplesSent; @@ -5129,29 +5150,29 @@ abstract class RtcOutboundRtpStreamStatsMediaType_Audio /// based on the presence of the V bit in the extension header. bool? get voiceActivityFlag; @JsonKey(ignore: true) - _$$RtcOutboundRtpStreamStatsMediaType_AudioCopyWith< - _$RtcOutboundRtpStreamStatsMediaType_Audio> + _$$RtcOutboundRtpStreamStatsMediaType_AudioImplCopyWith< + _$RtcOutboundRtpStreamStatsMediaType_AudioImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWith<$Res> { - factory _$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWith( - _$RtcOutboundRtpStreamStatsMediaType_Video value, - $Res Function(_$RtcOutboundRtpStreamStatsMediaType_Video) then) = - __$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWithImpl<$Res>; +abstract class _$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWith<$Res> { + factory _$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWith( + _$RtcOutboundRtpStreamStatsMediaType_VideoImpl value, + $Res Function(_$RtcOutboundRtpStreamStatsMediaType_VideoImpl) then) = + __$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWithImpl<$Res>; @useResult $Res call({int? frameWidth, int? frameHeight, double? framesPerSecond}); } /// @nodoc -class __$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWithImpl<$Res> +class __$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWithImpl<$Res> extends _$RtcOutboundRtpStreamStatsMediaTypeCopyWithImpl<$Res, - _$RtcOutboundRtpStreamStatsMediaType_Video> - implements _$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWith<$Res> { - __$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWithImpl( - _$RtcOutboundRtpStreamStatsMediaType_Video _value, - $Res Function(_$RtcOutboundRtpStreamStatsMediaType_Video) _then) + _$RtcOutboundRtpStreamStatsMediaType_VideoImpl> + implements _$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWith<$Res> { + __$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWithImpl( + _$RtcOutboundRtpStreamStatsMediaType_VideoImpl _value, + $Res Function(_$RtcOutboundRtpStreamStatsMediaType_VideoImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -5161,7 +5182,7 @@ class __$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWithImpl<$Res> Object? frameHeight = freezed, Object? framesPerSecond = freezed, }) { - return _then(_$RtcOutboundRtpStreamStatsMediaType_Video( + return _then(_$RtcOutboundRtpStreamStatsMediaType_VideoImpl( frameWidth: freezed == frameWidth ? _value.frameWidth : frameWidth // ignore: cast_nullable_to_non_nullable @@ -5180,9 +5201,9 @@ class __$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWithImpl<$Res> /// @nodoc -class _$RtcOutboundRtpStreamStatsMediaType_Video +class _$RtcOutboundRtpStreamStatsMediaType_VideoImpl implements RtcOutboundRtpStreamStatsMediaType_Video { - const _$RtcOutboundRtpStreamStatsMediaType_Video( + const _$RtcOutboundRtpStreamStatsMediaType_VideoImpl( {this.frameWidth, this.frameHeight, this.framesPerSecond}); /// Width of the last encoded frame. @@ -5225,7 +5246,7 @@ class _$RtcOutboundRtpStreamStatsMediaType_Video bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcOutboundRtpStreamStatsMediaType_Video && + other is _$RtcOutboundRtpStreamStatsMediaType_VideoImpl && (identical(other.frameWidth, frameWidth) || other.frameWidth == frameWidth) && (identical(other.frameHeight, frameHeight) || @@ -5241,10 +5262,11 @@ class _$RtcOutboundRtpStreamStatsMediaType_Video @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWith< - _$RtcOutboundRtpStreamStatsMediaType_Video> - get copyWith => __$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWithImpl< - _$RtcOutboundRtpStreamStatsMediaType_Video>(this, _$identity); + _$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWith< + _$RtcOutboundRtpStreamStatsMediaType_VideoImpl> + get copyWith => + __$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWithImpl< + _$RtcOutboundRtpStreamStatsMediaType_VideoImpl>(this, _$identity); @override @optionalTypeArgs @@ -5324,7 +5346,7 @@ abstract class RtcOutboundRtpStreamStatsMediaType_Video {final int? frameWidth, final int? frameHeight, final double? framesPerSecond}) = - _$RtcOutboundRtpStreamStatsMediaType_Video; + _$RtcOutboundRtpStreamStatsMediaType_VideoImpl; /// Width of the last encoded frame. /// @@ -5354,8 +5376,8 @@ abstract class RtcOutboundRtpStreamStatsMediaType_Video /// [1]: https://tinyurl.com/rrmkrfk double? get framesPerSecond; @JsonKey(ignore: true) - _$$RtcOutboundRtpStreamStatsMediaType_VideoCopyWith< - _$RtcOutboundRtpStreamStatsMediaType_Video> + _$$RtcOutboundRtpStreamStatsMediaType_VideoImplCopyWith< + _$RtcOutboundRtpStreamStatsMediaType_VideoImpl> get copyWith => throw _privateConstructorUsedError; } @@ -5593,11 +5615,11 @@ class _$RtcStatsTypeCopyWithImpl<$Res, $Val extends RtcStatsType> } /// @nodoc -abstract class _$$RtcStatsType_RtcMediaSourceStatsCopyWith<$Res> { - factory _$$RtcStatsType_RtcMediaSourceStatsCopyWith( - _$RtcStatsType_RtcMediaSourceStats value, - $Res Function(_$RtcStatsType_RtcMediaSourceStats) then) = - __$$RtcStatsType_RtcMediaSourceStatsCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcMediaSourceStatsImplCopyWith<$Res> { + factory _$$RtcStatsType_RtcMediaSourceStatsImplCopyWith( + _$RtcStatsType_RtcMediaSourceStatsImpl value, + $Res Function(_$RtcStatsType_RtcMediaSourceStatsImpl) then) = + __$$RtcStatsType_RtcMediaSourceStatsImplCopyWithImpl<$Res>; @useResult $Res call({String? trackIdentifier, RtcMediaSourceStatsMediaType kind}); @@ -5605,12 +5627,13 @@ abstract class _$$RtcStatsType_RtcMediaSourceStatsCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcMediaSourceStatsCopyWithImpl<$Res> - extends _$RtcStatsTypeCopyWithImpl<$Res, _$RtcStatsType_RtcMediaSourceStats> - implements _$$RtcStatsType_RtcMediaSourceStatsCopyWith<$Res> { - __$$RtcStatsType_RtcMediaSourceStatsCopyWithImpl( - _$RtcStatsType_RtcMediaSourceStats _value, - $Res Function(_$RtcStatsType_RtcMediaSourceStats) _then) +class __$$RtcStatsType_RtcMediaSourceStatsImplCopyWithImpl<$Res> + extends _$RtcStatsTypeCopyWithImpl<$Res, + _$RtcStatsType_RtcMediaSourceStatsImpl> + implements _$$RtcStatsType_RtcMediaSourceStatsImplCopyWith<$Res> { + __$$RtcStatsType_RtcMediaSourceStatsImplCopyWithImpl( + _$RtcStatsType_RtcMediaSourceStatsImpl _value, + $Res Function(_$RtcStatsType_RtcMediaSourceStatsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -5619,7 +5642,7 @@ class __$$RtcStatsType_RtcMediaSourceStatsCopyWithImpl<$Res> Object? trackIdentifier = freezed, Object? kind = null, }) { - return _then(_$RtcStatsType_RtcMediaSourceStats( + return _then(_$RtcStatsType_RtcMediaSourceStatsImpl( trackIdentifier: freezed == trackIdentifier ? _value.trackIdentifier : trackIdentifier // ignore: cast_nullable_to_non_nullable @@ -5642,9 +5665,9 @@ class __$$RtcStatsType_RtcMediaSourceStatsCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcMediaSourceStats +class _$RtcStatsType_RtcMediaSourceStatsImpl implements RtcStatsType_RtcMediaSourceStats { - const _$RtcStatsType_RtcMediaSourceStats( + const _$RtcStatsType_RtcMediaSourceStatsImpl( {this.trackIdentifier, required this.kind}); /// Value of the [MediaStreamTrack][1]'s ID attribute. @@ -5666,7 +5689,7 @@ class _$RtcStatsType_RtcMediaSourceStats bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcMediaSourceStats && + other is _$RtcStatsType_RtcMediaSourceStatsImpl && (identical(other.trackIdentifier, trackIdentifier) || other.trackIdentifier == trackIdentifier) && (identical(other.kind, kind) || other.kind == kind)); @@ -5678,10 +5701,10 @@ class _$RtcStatsType_RtcMediaSourceStats @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcMediaSourceStatsCopyWith< - _$RtcStatsType_RtcMediaSourceStats> - get copyWith => __$$RtcStatsType_RtcMediaSourceStatsCopyWithImpl< - _$RtcStatsType_RtcMediaSourceStats>(this, _$identity); + _$$RtcStatsType_RtcMediaSourceStatsImplCopyWith< + _$RtcStatsType_RtcMediaSourceStatsImpl> + get copyWith => __$$RtcStatsType_RtcMediaSourceStatsImplCopyWithImpl< + _$RtcStatsType_RtcMediaSourceStatsImpl>(this, _$identity); @override @optionalTypeArgs @@ -5923,7 +5946,7 @@ abstract class RtcStatsType_RtcMediaSourceStats implements RtcStatsType { const factory RtcStatsType_RtcMediaSourceStats( {final String? trackIdentifier, required final RtcMediaSourceStatsMediaType kind}) = - _$RtcStatsType_RtcMediaSourceStats; + _$RtcStatsType_RtcMediaSourceStatsImpl; /// Value of the [MediaStreamTrack][1]'s ID attribute. /// @@ -5933,17 +5956,17 @@ abstract class RtcStatsType_RtcMediaSourceStats implements RtcStatsType { /// Fields which should be in these [`RtcStats`] based on their `kind`. RtcMediaSourceStatsMediaType get kind; @JsonKey(ignore: true) - _$$RtcStatsType_RtcMediaSourceStatsCopyWith< - _$RtcStatsType_RtcMediaSourceStats> + _$$RtcStatsType_RtcMediaSourceStatsImplCopyWith< + _$RtcStatsType_RtcMediaSourceStatsImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcIceCandidateStatsCopyWith<$Res> { - factory _$$RtcStatsType_RtcIceCandidateStatsCopyWith( - _$RtcStatsType_RtcIceCandidateStats value, - $Res Function(_$RtcStatsType_RtcIceCandidateStats) then) = - __$$RtcStatsType_RtcIceCandidateStatsCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcIceCandidateStatsImplCopyWith<$Res> { + factory _$$RtcStatsType_RtcIceCandidateStatsImplCopyWith( + _$RtcStatsType_RtcIceCandidateStatsImpl value, + $Res Function(_$RtcStatsType_RtcIceCandidateStatsImpl) then) = + __$$RtcStatsType_RtcIceCandidateStatsImplCopyWithImpl<$Res>; @useResult $Res call({RtcIceCandidateStats field0}); @@ -5951,13 +5974,13 @@ abstract class _$$RtcStatsType_RtcIceCandidateStatsCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcIceCandidateStatsCopyWithImpl<$Res> +class __$$RtcStatsType_RtcIceCandidateStatsImplCopyWithImpl<$Res> extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcIceCandidateStats> - implements _$$RtcStatsType_RtcIceCandidateStatsCopyWith<$Res> { - __$$RtcStatsType_RtcIceCandidateStatsCopyWithImpl( - _$RtcStatsType_RtcIceCandidateStats _value, - $Res Function(_$RtcStatsType_RtcIceCandidateStats) _then) + _$RtcStatsType_RtcIceCandidateStatsImpl> + implements _$$RtcStatsType_RtcIceCandidateStatsImplCopyWith<$Res> { + __$$RtcStatsType_RtcIceCandidateStatsImplCopyWithImpl( + _$RtcStatsType_RtcIceCandidateStatsImpl _value, + $Res Function(_$RtcStatsType_RtcIceCandidateStatsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -5965,7 +5988,7 @@ class __$$RtcStatsType_RtcIceCandidateStatsCopyWithImpl<$Res> $Res call({ Object? field0 = null, }) { - return _then(_$RtcStatsType_RtcIceCandidateStats( + return _then(_$RtcStatsType_RtcIceCandidateStatsImpl( null == field0 ? _value.field0 : field0 // ignore: cast_nullable_to_non_nullable @@ -5984,9 +6007,9 @@ class __$$RtcStatsType_RtcIceCandidateStatsCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcIceCandidateStats +class _$RtcStatsType_RtcIceCandidateStatsImpl implements RtcStatsType_RtcIceCandidateStats { - const _$RtcStatsType_RtcIceCandidateStats(this.field0); + const _$RtcStatsType_RtcIceCandidateStatsImpl(this.field0); @override final RtcIceCandidateStats field0; @@ -6000,7 +6023,7 @@ class _$RtcStatsType_RtcIceCandidateStats bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcIceCandidateStats && + other is _$RtcStatsType_RtcIceCandidateStatsImpl && (identical(other.field0, field0) || other.field0 == field0)); } @@ -6010,10 +6033,10 @@ class _$RtcStatsType_RtcIceCandidateStats @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcIceCandidateStatsCopyWith< - _$RtcStatsType_RtcIceCandidateStats> - get copyWith => __$$RtcStatsType_RtcIceCandidateStatsCopyWithImpl< - _$RtcStatsType_RtcIceCandidateStats>(this, _$identity); + _$$RtcStatsType_RtcIceCandidateStatsImplCopyWith< + _$RtcStatsType_RtcIceCandidateStatsImpl> + get copyWith => __$$RtcStatsType_RtcIceCandidateStatsImplCopyWithImpl< + _$RtcStatsType_RtcIceCandidateStatsImpl>(this, _$identity); @override @optionalTypeArgs @@ -6253,21 +6276,22 @@ class _$RtcStatsType_RtcIceCandidateStats abstract class RtcStatsType_RtcIceCandidateStats implements RtcStatsType { const factory RtcStatsType_RtcIceCandidateStats( - final RtcIceCandidateStats field0) = _$RtcStatsType_RtcIceCandidateStats; + final RtcIceCandidateStats field0) = + _$RtcStatsType_RtcIceCandidateStatsImpl; RtcIceCandidateStats get field0; @JsonKey(ignore: true) - _$$RtcStatsType_RtcIceCandidateStatsCopyWith< - _$RtcStatsType_RtcIceCandidateStats> + _$$RtcStatsType_RtcIceCandidateStatsImplCopyWith< + _$RtcStatsType_RtcIceCandidateStatsImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWith<$Res> { - factory _$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWith( - _$RtcStatsType_RtcOutboundRtpStreamStats value, - $Res Function(_$RtcStatsType_RtcOutboundRtpStreamStats) then) = - __$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWith<$Res> { + factory _$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWith( + _$RtcStatsType_RtcOutboundRtpStreamStatsImpl value, + $Res Function(_$RtcStatsType_RtcOutboundRtpStreamStatsImpl) then) = + __$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWithImpl<$Res>; @useResult $Res call( {String? trackId, @@ -6280,13 +6304,13 @@ abstract class _$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWithImpl<$Res> +class __$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWithImpl<$Res> extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcOutboundRtpStreamStats> - implements _$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWith<$Res> { - __$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWithImpl( - _$RtcStatsType_RtcOutboundRtpStreamStats _value, - $Res Function(_$RtcStatsType_RtcOutboundRtpStreamStats) _then) + _$RtcStatsType_RtcOutboundRtpStreamStatsImpl> + implements _$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWith<$Res> { + __$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWithImpl( + _$RtcStatsType_RtcOutboundRtpStreamStatsImpl _value, + $Res Function(_$RtcStatsType_RtcOutboundRtpStreamStatsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -6298,7 +6322,7 @@ class __$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWithImpl<$Res> Object? packetsSent = freezed, Object? mediaSourceId = freezed, }) { - return _then(_$RtcStatsType_RtcOutboundRtpStreamStats( + return _then(_$RtcStatsType_RtcOutboundRtpStreamStatsImpl( trackId: freezed == trackId ? _value.trackId : trackId // ignore: cast_nullable_to_non_nullable @@ -6334,9 +6358,9 @@ class __$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcOutboundRtpStreamStats +class _$RtcStatsType_RtcOutboundRtpStreamStatsImpl implements RtcStatsType_RtcOutboundRtpStreamStats { - const _$RtcStatsType_RtcOutboundRtpStreamStats( + const _$RtcStatsType_RtcOutboundRtpStreamStatsImpl( {this.trackId, required this.mediaType, this.bytesSent, @@ -6379,7 +6403,7 @@ class _$RtcStatsType_RtcOutboundRtpStreamStats bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcOutboundRtpStreamStats && + other is _$RtcStatsType_RtcOutboundRtpStreamStatsImpl && (identical(other.trackId, trackId) || other.trackId == trackId) && (identical(other.mediaType, mediaType) || other.mediaType == mediaType) && @@ -6398,10 +6422,11 @@ class _$RtcStatsType_RtcOutboundRtpStreamStats @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWith< - _$RtcStatsType_RtcOutboundRtpStreamStats> - get copyWith => __$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWithImpl< - _$RtcStatsType_RtcOutboundRtpStreamStats>(this, _$identity); + _$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWith< + _$RtcStatsType_RtcOutboundRtpStreamStatsImpl> + get copyWith => + __$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWithImpl< + _$RtcStatsType_RtcOutboundRtpStreamStatsImpl>(this, _$identity); @override @optionalTypeArgs @@ -6644,11 +6669,12 @@ class _$RtcStatsType_RtcOutboundRtpStreamStats abstract class RtcStatsType_RtcOutboundRtpStreamStats implements RtcStatsType { const factory RtcStatsType_RtcOutboundRtpStreamStats( - {final String? trackId, - required final RtcOutboundRtpStreamStatsMediaType mediaType, - final int? bytesSent, - final int? packetsSent, - final String? mediaSourceId}) = _$RtcStatsType_RtcOutboundRtpStreamStats; + {final String? trackId, + required final RtcOutboundRtpStreamStatsMediaType mediaType, + final int? bytesSent, + final int? packetsSent, + final String? mediaSourceId}) = + _$RtcStatsType_RtcOutboundRtpStreamStatsImpl; /// ID of the stats object representing the current track attachment to /// the sender of the stream. @@ -6672,17 +6698,17 @@ abstract class RtcStatsType_RtcOutboundRtpStreamStats implements RtcStatsType { /// the sender of the stream. String? get mediaSourceId; @JsonKey(ignore: true) - _$$RtcStatsType_RtcOutboundRtpStreamStatsCopyWith< - _$RtcStatsType_RtcOutboundRtpStreamStats> + _$$RtcStatsType_RtcOutboundRtpStreamStatsImplCopyWith< + _$RtcStatsType_RtcOutboundRtpStreamStatsImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcInboundRtpStreamStatsCopyWith<$Res> { - factory _$$RtcStatsType_RtcInboundRtpStreamStatsCopyWith( - _$RtcStatsType_RtcInboundRtpStreamStats value, - $Res Function(_$RtcStatsType_RtcInboundRtpStreamStats) then) = - __$$RtcStatsType_RtcInboundRtpStreamStatsCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWith<$Res> { + factory _$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWith( + _$RtcStatsType_RtcInboundRtpStreamStatsImpl value, + $Res Function(_$RtcStatsType_RtcInboundRtpStreamStatsImpl) then) = + __$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWithImpl<$Res>; @useResult $Res call( {String? remoteId, @@ -6698,13 +6724,13 @@ abstract class _$$RtcStatsType_RtcInboundRtpStreamStatsCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcInboundRtpStreamStatsCopyWithImpl<$Res> +class __$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWithImpl<$Res> extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcInboundRtpStreamStats> - implements _$$RtcStatsType_RtcInboundRtpStreamStatsCopyWith<$Res> { - __$$RtcStatsType_RtcInboundRtpStreamStatsCopyWithImpl( - _$RtcStatsType_RtcInboundRtpStreamStats _value, - $Res Function(_$RtcStatsType_RtcInboundRtpStreamStats) _then) + _$RtcStatsType_RtcInboundRtpStreamStatsImpl> + implements _$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWith<$Res> { + __$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWithImpl( + _$RtcStatsType_RtcInboundRtpStreamStatsImpl _value, + $Res Function(_$RtcStatsType_RtcInboundRtpStreamStatsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -6719,7 +6745,7 @@ class __$$RtcStatsType_RtcInboundRtpStreamStatsCopyWithImpl<$Res> Object? jitterBufferEmittedCount = freezed, Object? mediaType = freezed, }) { - return _then(_$RtcStatsType_RtcInboundRtpStreamStats( + return _then(_$RtcStatsType_RtcInboundRtpStreamStatsImpl( remoteId: freezed == remoteId ? _value.remoteId : remoteId // ignore: cast_nullable_to_non_nullable @@ -6771,9 +6797,9 @@ class __$$RtcStatsType_RtcInboundRtpStreamStatsCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcInboundRtpStreamStats +class _$RtcStatsType_RtcInboundRtpStreamStatsImpl implements RtcStatsType_RtcInboundRtpStreamStats { - const _$RtcStatsType_RtcInboundRtpStreamStats( + const _$RtcStatsType_RtcInboundRtpStreamStatsImpl( {this.remoteId, this.bytesReceived, this.packetsReceived, @@ -6851,7 +6877,7 @@ class _$RtcStatsType_RtcInboundRtpStreamStats bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcInboundRtpStreamStats && + other is _$RtcStatsType_RtcInboundRtpStreamStatsImpl && (identical(other.remoteId, remoteId) || other.remoteId == remoteId) && (identical(other.bytesReceived, bytesReceived) || @@ -6885,10 +6911,10 @@ class _$RtcStatsType_RtcInboundRtpStreamStats @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcInboundRtpStreamStatsCopyWith< - _$RtcStatsType_RtcInboundRtpStreamStats> - get copyWith => __$$RtcStatsType_RtcInboundRtpStreamStatsCopyWithImpl< - _$RtcStatsType_RtcInboundRtpStreamStats>(this, _$identity); + _$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWith< + _$RtcStatsType_RtcInboundRtpStreamStatsImpl> + get copyWith => __$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWithImpl< + _$RtcStatsType_RtcInboundRtpStreamStatsImpl>(this, _$identity); @override @optionalTypeArgs @@ -7160,7 +7186,7 @@ abstract class RtcStatsType_RtcInboundRtpStreamStats implements RtcStatsType { final double? totalDecodeTime, final int? jitterBufferEmittedCount, final RtcInboundRtpStreamMediaType? mediaType}) = - _$RtcStatsType_RtcInboundRtpStreamStats; + _$RtcStatsType_RtcInboundRtpStreamStatsImpl; /// ID of the stats object representing the receiving track. String? get remoteId; @@ -7213,17 +7239,17 @@ abstract class RtcStatsType_RtcInboundRtpStreamStats implements RtcStatsType { /// `media_type`. RtcInboundRtpStreamMediaType? get mediaType; @JsonKey(ignore: true) - _$$RtcStatsType_RtcInboundRtpStreamStatsCopyWith< - _$RtcStatsType_RtcInboundRtpStreamStats> + _$$RtcStatsType_RtcInboundRtpStreamStatsImplCopyWith< + _$RtcStatsType_RtcInboundRtpStreamStatsImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcIceCandidatePairStatsCopyWith<$Res> { - factory _$$RtcStatsType_RtcIceCandidatePairStatsCopyWith( - _$RtcStatsType_RtcIceCandidatePairStats value, - $Res Function(_$RtcStatsType_RtcIceCandidatePairStats) then) = - __$$RtcStatsType_RtcIceCandidatePairStatsCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWith<$Res> { + factory _$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWith( + _$RtcStatsType_RtcIceCandidatePairStatsImpl value, + $Res Function(_$RtcStatsType_RtcIceCandidatePairStatsImpl) then) = + __$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWithImpl<$Res>; @useResult $Res call( {RtcStatsIceCandidatePairState state, @@ -7236,13 +7262,13 @@ abstract class _$$RtcStatsType_RtcIceCandidatePairStatsCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcIceCandidatePairStatsCopyWithImpl<$Res> +class __$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWithImpl<$Res> extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcIceCandidatePairStats> - implements _$$RtcStatsType_RtcIceCandidatePairStatsCopyWith<$Res> { - __$$RtcStatsType_RtcIceCandidatePairStatsCopyWithImpl( - _$RtcStatsType_RtcIceCandidatePairStats _value, - $Res Function(_$RtcStatsType_RtcIceCandidatePairStats) _then) + _$RtcStatsType_RtcIceCandidatePairStatsImpl> + implements _$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWith<$Res> { + __$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWithImpl( + _$RtcStatsType_RtcIceCandidatePairStatsImpl _value, + $Res Function(_$RtcStatsType_RtcIceCandidatePairStatsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -7256,7 +7282,7 @@ class __$$RtcStatsType_RtcIceCandidatePairStatsCopyWithImpl<$Res> Object? currentRoundTripTime = freezed, Object? availableOutgoingBitrate = freezed, }) { - return _then(_$RtcStatsType_RtcIceCandidatePairStats( + return _then(_$RtcStatsType_RtcIceCandidatePairStatsImpl( state: null == state ? _value.state : state // ignore: cast_nullable_to_non_nullable @@ -7291,9 +7317,9 @@ class __$$RtcStatsType_RtcIceCandidatePairStatsCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcIceCandidatePairStats +class _$RtcStatsType_RtcIceCandidatePairStatsImpl implements RtcStatsType_RtcIceCandidatePairStats { - const _$RtcStatsType_RtcIceCandidatePairStats( + const _$RtcStatsType_RtcIceCandidatePairStatsImpl( {required this.state, this.nominated, this.bytesSent, @@ -7378,7 +7404,7 @@ class _$RtcStatsType_RtcIceCandidatePairStats bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcIceCandidatePairStats && + other is _$RtcStatsType_RtcIceCandidatePairStatsImpl && (identical(other.state, state) || other.state == state) && (identical(other.nominated, nominated) || other.nominated == nominated) && @@ -7409,10 +7435,10 @@ class _$RtcStatsType_RtcIceCandidatePairStats @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcIceCandidatePairStatsCopyWith< - _$RtcStatsType_RtcIceCandidatePairStats> - get copyWith => __$$RtcStatsType_RtcIceCandidatePairStatsCopyWithImpl< - _$RtcStatsType_RtcIceCandidatePairStats>(this, _$identity); + _$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWith< + _$RtcStatsType_RtcIceCandidatePairStatsImpl> + get copyWith => __$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWithImpl< + _$RtcStatsType_RtcIceCandidatePairStatsImpl>(this, _$identity); @override @optionalTypeArgs @@ -7674,7 +7700,7 @@ abstract class RtcStatsType_RtcIceCandidatePairStats implements RtcStatsType { final double? totalRoundTripTime, final double? currentRoundTripTime, final double? availableOutgoingBitrate}) = - _$RtcStatsType_RtcIceCandidatePairStats; + _$RtcStatsType_RtcIceCandidatePairStatsImpl; /// State of the checklist for the local and remote candidates in a /// pair. @@ -7736,17 +7762,17 @@ abstract class RtcStatsType_RtcIceCandidatePairStats implements RtcStatsType { /// [1]: https://tinyurl.com/rfc72eh double? get availableOutgoingBitrate; @JsonKey(ignore: true) - _$$RtcStatsType_RtcIceCandidatePairStatsCopyWith< - _$RtcStatsType_RtcIceCandidatePairStats> + _$$RtcStatsType_RtcIceCandidatePairStatsImplCopyWith< + _$RtcStatsType_RtcIceCandidatePairStatsImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcTransportStatsCopyWith<$Res> { - factory _$$RtcStatsType_RtcTransportStatsCopyWith( - _$RtcStatsType_RtcTransportStats value, - $Res Function(_$RtcStatsType_RtcTransportStats) then) = - __$$RtcStatsType_RtcTransportStatsCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcTransportStatsImplCopyWith<$Res> { + factory _$$RtcStatsType_RtcTransportStatsImplCopyWith( + _$RtcStatsType_RtcTransportStatsImpl value, + $Res Function(_$RtcStatsType_RtcTransportStatsImpl) then) = + __$$RtcStatsType_RtcTransportStatsImplCopyWithImpl<$Res>; @useResult $Res call( {int? packetsSent, @@ -7757,12 +7783,13 @@ abstract class _$$RtcStatsType_RtcTransportStatsCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcTransportStatsCopyWithImpl<$Res> - extends _$RtcStatsTypeCopyWithImpl<$Res, _$RtcStatsType_RtcTransportStats> - implements _$$RtcStatsType_RtcTransportStatsCopyWith<$Res> { - __$$RtcStatsType_RtcTransportStatsCopyWithImpl( - _$RtcStatsType_RtcTransportStats _value, - $Res Function(_$RtcStatsType_RtcTransportStats) _then) +class __$$RtcStatsType_RtcTransportStatsImplCopyWithImpl<$Res> + extends _$RtcStatsTypeCopyWithImpl<$Res, + _$RtcStatsType_RtcTransportStatsImpl> + implements _$$RtcStatsType_RtcTransportStatsImplCopyWith<$Res> { + __$$RtcStatsType_RtcTransportStatsImplCopyWithImpl( + _$RtcStatsType_RtcTransportStatsImpl _value, + $Res Function(_$RtcStatsType_RtcTransportStatsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -7774,7 +7801,7 @@ class __$$RtcStatsType_RtcTransportStatsCopyWithImpl<$Res> Object? bytesReceived = freezed, Object? iceRole = freezed, }) { - return _then(_$RtcStatsType_RtcTransportStats( + return _then(_$RtcStatsType_RtcTransportStatsImpl( packetsSent: freezed == packetsSent ? _value.packetsSent : packetsSent // ignore: cast_nullable_to_non_nullable @@ -7801,9 +7828,9 @@ class __$$RtcStatsType_RtcTransportStatsCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcTransportStats +class _$RtcStatsType_RtcTransportStatsImpl implements RtcStatsType_RtcTransportStats { - const _$RtcStatsType_RtcTransportStats( + const _$RtcStatsType_RtcTransportStatsImpl( {this.packetsSent, this.packetsReceived, this.bytesSent, @@ -7850,7 +7877,7 @@ class _$RtcStatsType_RtcTransportStats bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcTransportStats && + other is _$RtcStatsType_RtcTransportStatsImpl && (identical(other.packetsSent, packetsSent) || other.packetsSent == packetsSent) && (identical(other.packetsReceived, packetsReceived) || @@ -7869,9 +7896,10 @@ class _$RtcStatsType_RtcTransportStats @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcTransportStatsCopyWith<_$RtcStatsType_RtcTransportStats> - get copyWith => __$$RtcStatsType_RtcTransportStatsCopyWithImpl< - _$RtcStatsType_RtcTransportStats>(this, _$identity); + _$$RtcStatsType_RtcTransportStatsImplCopyWith< + _$RtcStatsType_RtcTransportStatsImpl> + get copyWith => __$$RtcStatsType_RtcTransportStatsImplCopyWithImpl< + _$RtcStatsType_RtcTransportStatsImpl>(this, _$identity); @override @optionalTypeArgs @@ -8118,7 +8146,7 @@ abstract class RtcStatsType_RtcTransportStats implements RtcStatsType { final int? packetsReceived, final int? bytesSent, final int? bytesReceived, - final IceRole? iceRole}) = _$RtcStatsType_RtcTransportStats; + final IceRole? iceRole}) = _$RtcStatsType_RtcTransportStatsImpl; /// Total number of packets sent over this transport. int? get packetsSent; @@ -8146,16 +8174,19 @@ abstract class RtcStatsType_RtcTransportStats implements RtcStatsType { /// [3]: https://w3.org/TR/webrtc#dom-rtcdtlstransport-icetransport IceRole? get iceRole; @JsonKey(ignore: true) - _$$RtcStatsType_RtcTransportStatsCopyWith<_$RtcStatsType_RtcTransportStats> + _$$RtcStatsType_RtcTransportStatsImplCopyWith< + _$RtcStatsType_RtcTransportStatsImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWith<$Res> { - factory _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWith( - _$RtcStatsType_RtcRemoteInboundRtpStreamStats value, - $Res Function(_$RtcStatsType_RtcRemoteInboundRtpStreamStats) then) = - __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWith< + $Res> { + factory _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWith( + _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl value, + $Res Function(_$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl) + then) = + __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWithImpl<$Res>; @useResult $Res call( {String? localId, @@ -8167,13 +8198,14 @@ abstract class _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWith<$Res> { } /// @nodoc -class __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWithImpl<$Res> +class __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWithImpl<$Res> extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcRemoteInboundRtpStreamStats> - implements _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWith<$Res> { - __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWithImpl( - _$RtcStatsType_RtcRemoteInboundRtpStreamStats _value, - $Res Function(_$RtcStatsType_RtcRemoteInboundRtpStreamStats) _then) + _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl> + implements + _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWith<$Res> { + __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWithImpl( + _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl _value, + $Res Function(_$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -8186,7 +8218,7 @@ class __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWithImpl<$Res> Object? reportsReceived = freezed, Object? roundTripTimeMeasurements = freezed, }) { - return _then(_$RtcStatsType_RtcRemoteInboundRtpStreamStats( + return _then(_$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl( localId: freezed == localId ? _value.localId : localId // ignore: cast_nullable_to_non_nullable @@ -8217,9 +8249,9 @@ class __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcRemoteInboundRtpStreamStats +class _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl implements RtcStatsType_RtcRemoteInboundRtpStreamStats { - const _$RtcStatsType_RtcRemoteInboundRtpStreamStats( + const _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl( {this.localId, this.jitter, this.roundTripTime, @@ -8286,7 +8318,7 @@ class _$RtcStatsType_RtcRemoteInboundRtpStreamStats bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcRemoteInboundRtpStreamStats && + other is _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl && (identical(other.localId, localId) || other.localId == localId) && (identical(other.jitter, jitter) || other.jitter == jitter) && (identical(other.roundTripTime, roundTripTime) || @@ -8307,11 +8339,12 @@ class _$RtcStatsType_RtcRemoteInboundRtpStreamStats @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWith< - _$RtcStatsType_RtcRemoteInboundRtpStreamStats> + _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWith< + _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl> get copyWith => - __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWithImpl< - _$RtcStatsType_RtcRemoteInboundRtpStreamStats>(this, _$identity); + __$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWithImpl< + _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl>( + this, _$identity); @override @optionalTypeArgs @@ -8561,7 +8594,7 @@ abstract class RtcStatsType_RtcRemoteInboundRtpStreamStats final double? fractionLost, final int? reportsReceived, final int? roundTripTimeMeasurements}) = - _$RtcStatsType_RtcRemoteInboundRtpStreamStats; + _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl; /// [localId] is used for looking up the local /// [RTCOutboundRtpStreamStats][1] object for the same [SSRC]. @@ -8607,29 +8640,32 @@ abstract class RtcStatsType_RtcRemoteInboundRtpStreamStats /// [SSRC]: https://w3.org/TR/webrtc-stats#dfn-ssrc int? get roundTripTimeMeasurements; @JsonKey(ignore: true) - _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsCopyWith< - _$RtcStatsType_RtcRemoteInboundRtpStreamStats> + _$$RtcStatsType_RtcRemoteInboundRtpStreamStatsImplCopyWith< + _$RtcStatsType_RtcRemoteInboundRtpStreamStatsImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWith<$Res> { - factory _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWith( - _$RtcStatsType_RtcRemoteOutboundRtpStreamStats value, - $Res Function(_$RtcStatsType_RtcRemoteOutboundRtpStreamStats) then) = - __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWith< + $Res> { + factory _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWith( + _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl value, + $Res Function(_$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl) + then) = + __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWithImpl<$Res>; @useResult $Res call({String? localId, double? remoteTimestamp, int? reportsSent}); } /// @nodoc -class __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWithImpl<$Res> +class __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWithImpl<$Res> extends _$RtcStatsTypeCopyWithImpl<$Res, - _$RtcStatsType_RtcRemoteOutboundRtpStreamStats> - implements _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWith<$Res> { - __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWithImpl( - _$RtcStatsType_RtcRemoteOutboundRtpStreamStats _value, - $Res Function(_$RtcStatsType_RtcRemoteOutboundRtpStreamStats) _then) + _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl> + implements + _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWith<$Res> { + __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWithImpl( + _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl _value, + $Res Function(_$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl) _then) : super(_value, _then); @pragma('vm:prefer-inline') @@ -8639,7 +8675,7 @@ class __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWithImpl<$Res> Object? remoteTimestamp = freezed, Object? reportsSent = freezed, }) { - return _then(_$RtcStatsType_RtcRemoteOutboundRtpStreamStats( + return _then(_$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl( localId: freezed == localId ? _value.localId : localId // ignore: cast_nullable_to_non_nullable @@ -8658,9 +8694,9 @@ class __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWithImpl<$Res> /// @nodoc -class _$RtcStatsType_RtcRemoteOutboundRtpStreamStats +class _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl implements RtcStatsType_RtcRemoteOutboundRtpStreamStats { - const _$RtcStatsType_RtcRemoteOutboundRtpStreamStats( + const _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl( {this.localId, this.remoteTimestamp, this.reportsSent}); /// [localId] is used for looking up the local @@ -8701,7 +8737,7 @@ class _$RtcStatsType_RtcRemoteOutboundRtpStreamStats bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_RtcRemoteOutboundRtpStreamStats && + other is _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl && (identical(other.localId, localId) || other.localId == localId) && (identical(other.remoteTimestamp, remoteTimestamp) || other.remoteTimestamp == remoteTimestamp) && @@ -8716,11 +8752,12 @@ class _$RtcStatsType_RtcRemoteOutboundRtpStreamStats @JsonKey(ignore: true) @override @pragma('vm:prefer-inline') - _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWith< - _$RtcStatsType_RtcRemoteOutboundRtpStreamStats> + _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWith< + _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl> get copyWith => - __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWithImpl< - _$RtcStatsType_RtcRemoteOutboundRtpStreamStats>(this, _$identity); + __$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWithImpl< + _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl>( + this, _$identity); @override @optionalTypeArgs @@ -8964,9 +9001,10 @@ class _$RtcStatsType_RtcRemoteOutboundRtpStreamStats abstract class RtcStatsType_RtcRemoteOutboundRtpStreamStats implements RtcStatsType { const factory RtcStatsType_RtcRemoteOutboundRtpStreamStats( - {final String? localId, - final double? remoteTimestamp, - final int? reportsSent}) = _$RtcStatsType_RtcRemoteOutboundRtpStreamStats; + {final String? localId, + final double? remoteTimestamp, + final int? reportsSent}) = + _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl; /// [localId] is used for looking up the local /// [RTCInboundRtpStreamStats][1] object for the same [SSRC]. @@ -8994,33 +9032,33 @@ abstract class RtcStatsType_RtcRemoteOutboundRtpStreamStats /// [SSRC]: https://w3.org/TR/webrtc-stats#dfn-ssrc int? get reportsSent; @JsonKey(ignore: true) - _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsCopyWith< - _$RtcStatsType_RtcRemoteOutboundRtpStreamStats> + _$$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImplCopyWith< + _$RtcStatsType_RtcRemoteOutboundRtpStreamStatsImpl> get copyWith => throw _privateConstructorUsedError; } /// @nodoc -abstract class _$$RtcStatsType_UnimplementedCopyWith<$Res> { - factory _$$RtcStatsType_UnimplementedCopyWith( - _$RtcStatsType_Unimplemented value, - $Res Function(_$RtcStatsType_Unimplemented) then) = - __$$RtcStatsType_UnimplementedCopyWithImpl<$Res>; +abstract class _$$RtcStatsType_UnimplementedImplCopyWith<$Res> { + factory _$$RtcStatsType_UnimplementedImplCopyWith( + _$RtcStatsType_UnimplementedImpl value, + $Res Function(_$RtcStatsType_UnimplementedImpl) then) = + __$$RtcStatsType_UnimplementedImplCopyWithImpl<$Res>; } /// @nodoc -class __$$RtcStatsType_UnimplementedCopyWithImpl<$Res> - extends _$RtcStatsTypeCopyWithImpl<$Res, _$RtcStatsType_Unimplemented> - implements _$$RtcStatsType_UnimplementedCopyWith<$Res> { - __$$RtcStatsType_UnimplementedCopyWithImpl( - _$RtcStatsType_Unimplemented _value, - $Res Function(_$RtcStatsType_Unimplemented) _then) +class __$$RtcStatsType_UnimplementedImplCopyWithImpl<$Res> + extends _$RtcStatsTypeCopyWithImpl<$Res, _$RtcStatsType_UnimplementedImpl> + implements _$$RtcStatsType_UnimplementedImplCopyWith<$Res> { + __$$RtcStatsType_UnimplementedImplCopyWithImpl( + _$RtcStatsType_UnimplementedImpl _value, + $Res Function(_$RtcStatsType_UnimplementedImpl) _then) : super(_value, _then); } /// @nodoc -class _$RtcStatsType_Unimplemented implements RtcStatsType_Unimplemented { - const _$RtcStatsType_Unimplemented(); +class _$RtcStatsType_UnimplementedImpl implements RtcStatsType_Unimplemented { + const _$RtcStatsType_UnimplementedImpl(); @override String toString() { @@ -9031,7 +9069,7 @@ class _$RtcStatsType_Unimplemented implements RtcStatsType_Unimplemented { bool operator ==(dynamic other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$RtcStatsType_Unimplemented); + other is _$RtcStatsType_UnimplementedImpl); } @override @@ -9274,5 +9312,5 @@ class _$RtcStatsType_Unimplemented implements RtcStatsType_Unimplemented { } abstract class RtcStatsType_Unimplemented implements RtcStatsType { - const factory RtcStatsType_Unimplemented() = _$RtcStatsType_Unimplemented; + const factory RtcStatsType_Unimplemented() = _$RtcStatsType_UnimplementedImpl; } diff --git a/lib/src/platform/native/media_stream_track.dart b/lib/src/platform/native/media_stream_track.dart index 3957f6b4dc..6da3c613e3 100644 --- a/lib/src/platform/native/media_stream_track.dart +++ b/lib/src/platform/native/media_stream_track.dart @@ -247,12 +247,11 @@ class _NativeMediaStreamTrackFFI extends NativeMediaStreamTrack { @override Future height() async { return await api! - .trackHieght(trackId: _id, kind: ffi.MediaType.values[_kind.index]); + .trackHeight(trackId: _id, kind: ffi.MediaType.values[_kind.index]); } @override Future width() async { - print("BOOM"); return await api! .trackWidth(trackId: _id, kind: ffi.MediaType.values[_kind.index]); } diff --git a/lib/src/platform/track.dart b/lib/src/platform/track.dart index c13b100455..f1136a374f 100644 --- a/lib/src/platform/track.dart +++ b/lib/src/platform/track.dart @@ -58,6 +58,9 @@ abstract class MediaStreamTrack { /// Returns [FacingMode] of this [MediaStreamTrack]. FacingMode? facingMode(); + /// Returns width of this [MediaStreamTrack]. Future width(); + + /// Returns height of this [MediaStreamTrack]. Future height(); } diff --git a/lib/src/platform/web/media_stream_track.dart b/lib/src/platform/web/media_stream_track.dart index 4d726ed64b..6e9d9b6849 100644 --- a/lib/src/platform/web/media_stream_track.dart +++ b/lib/src/platform/web/media_stream_track.dart @@ -79,4 +79,16 @@ class WebMediaStreamTrack extends MediaStreamTrack { } return null; } + + @override + Future height() { + var settings = jsTrack.getSettings(); + return settings['height']; + } + + @override + Future width() { + var settings = jsTrack.getSettings(); + return settings['width']; + } } From bb1a3c0a0243e5b26fa0ded2a77eb9f88114eb42 Mon Sep 17 00:00:00 2001 From: rogurotus Date: Wed, 11 Oct 2023 14:04:33 +0300 Subject: [PATCH 04/14] fmt --- .../proxy/VideoTrackProxy.kt | 2 +- crates/libwebrtc-sys/src/cpp/bridge.cc | 3 --- crates/libwebrtc-sys/src/cpp/video_sink.cc | 1 - crates/libwebrtc-sys/src/lib.rs | 1 - crates/native/src/api.rs | 18 ++++++++++++------ crates/native/src/user_media.rs | 2 +- example/lib/src/get_user_media.dart | 6 ------ example/lib/src/loopback.dart | 1 - 8 files changed, 14 insertions(+), 20 deletions(-) diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/VideoTrackProxy.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/VideoTrackProxy.kt index 5fb1780d92..dc3adccfc1 100644 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/VideoTrackProxy.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/VideoTrackProxy.kt @@ -43,6 +43,6 @@ class VideoTrackProxy(private val track: MediaStreamTrackProxy) { * Adds every [SurfaceTextureRenderer] from the [sinks] to the updater underlying [WVideoTrack]. */ private fun renewSinks() { - // sinks.forEach { getVideoTrack().addSink(it) } + sinks.forEach { getVideoTrack().addSink(it) } } } diff --git a/crates/libwebrtc-sys/src/cpp/bridge.cc b/crates/libwebrtc-sys/src/cpp/bridge.cc index 4d7a00bfa6..067a3fe1da 100644 --- a/crates/libwebrtc-sys/src/cpp/bridge.cc +++ b/crates/libwebrtc-sys/src/cpp/bridge.cc @@ -23,8 +23,6 @@ #include "pc/proxy.h" #include "test_audio_device_module.cc" -#include - namespace bridge { // Creates a new `TrackEventObserver`. @@ -452,7 +450,6 @@ TrackState audio_track_state(const AudioTrackInterface& track) { // Used to connect the given `track` to the underlying video engine. void add_or_update_video_sink(const VideoTrackInterface& track, VideoSinkInterface& sink) { - std::cout << "ADD SINk " << std::endl; track->AddOrUpdateSink(&sink, rtc::VideoSinkWants()); } diff --git a/crates/libwebrtc-sys/src/cpp/video_sink.cc b/crates/libwebrtc-sys/src/cpp/video_sink.cc index 64d7ef0da8..6c1e63c210 100644 --- a/crates/libwebrtc-sys/src/cpp/video_sink.cc +++ b/crates/libwebrtc-sys/src/cpp/video_sink.cc @@ -1,6 +1,5 @@ #include "libwebrtc-sys/include/video_sink.h" #include "libwebrtc-sys/src/bridge.rs.h" -#include namespace video_sink { diff --git a/crates/libwebrtc-sys/src/lib.rs b/crates/libwebrtc-sys/src/lib.rs index 4446e44ab1..34887af661 100644 --- a/crates/libwebrtc-sys/src/lib.rs +++ b/crates/libwebrtc-sys/src/lib.rs @@ -1840,7 +1840,6 @@ impl VideoTrackInterface { /// Used to connect this [`VideoTrackInterface`] to the underlying video /// engine. pub fn add_or_update_sink(&self, sink: &mut VideoSinkInterface) { - println!("ADD"); webrtc::add_or_update_video_sink(&self.inner, sink.0.pin_mut()); } diff --git a/crates/native/src/api.rs b/crates/native/src/api.rs index e564381b94..546f62ab0d 100644 --- a/crates/native/src/api.rs +++ b/crates/native/src/api.rs @@ -2184,7 +2184,11 @@ pub fn track_state( WEBRTC.lock().unwrap().track_state(track_id, kind) } -// todo +/// Returns the [height][0] property of the media track by its ID and +/// media type. +/// Blocks until height is initialized. +/// +/// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height pub fn track_height( track_id: String, kind: MediaType, @@ -2193,11 +2197,14 @@ pub fn track_height( return Ok(None); } - let res = WEBRTC.lock().unwrap().track_height(track_id).map(Some); - res + WEBRTC.lock().unwrap().track_height(track_id).map(Some) } -// todo +/// Returns the [width][0] property of the media track by its ID and +/// media type. +/// Blocks until width is initialized. +/// +/// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height pub fn track_width( track_id: String, kind: MediaType, @@ -2206,8 +2213,7 @@ pub fn track_width( return Ok(None); } - let res = WEBRTC.lock().unwrap().track_width(track_id).map(Some); - res + WEBRTC.lock().unwrap().track_width(track_id).map(Some) } /// Changes the [enabled][1] property of the [`MediaStreamTrack`] by its ID and diff --git a/crates/native/src/user_media.rs b/crates/native/src/user_media.rs index 5ff2050004..440ba2ebe6 100644 --- a/crates/native/src/user_media.rs +++ b/crates/native/src/user_media.rs @@ -367,7 +367,7 @@ impl Webrtc { /// Returns the [height][0] property of the media track by its ID and /// media type. - /// Blocks until width is initialized. + /// Blocks until height is initialized. /// /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height pub fn track_height(&self, id: String) -> anyhow::Result { diff --git a/example/lib/src/get_user_media.dart b/example/lib/src/get_user_media.dart index d1134c8c52..b9fe5dcbd9 100644 --- a/example/lib/src/get_user_media.dart +++ b/example/lib/src/get_user_media.dart @@ -51,21 +51,15 @@ class _GetUserMediaSampleState extends State { caps.audio.mandatory!.deviceId = audioInputDevice; caps.video.mandatory = DeviceVideoConstraints(); - caps.video.optional = DeviceVideoConstraints(); caps.video.mandatory!.deviceId = videoInputDevice; caps.video.mandatory!.width = 1920; caps.video.mandatory!.height = 1080; - // caps.video.optional!.width = 200; - // caps.video.optional!.height = 200; caps.video.mandatory!.fps = 30; try { var stream = await getUserMedia(caps); _mediaDevicesList = await enumerateDevices(); _tracks = stream; - for (var i in _tracks!) { - print("W - ${await i.width()} H - ${await i.height()}"); - } await _localRenderer.setSrcObject(_tracks!.firstWhere((track) { return track.kind() == MediaKind.video; })); diff --git a/example/lib/src/loopback.dart b/example/lib/src/loopback.dart index b0d2c3df76..8f3b4b4b34 100644 --- a/example/lib/src/loopback.dart +++ b/example/lib/src/loopback.dart @@ -70,7 +70,6 @@ class _LoopbackState extends State { try { _mediaDevicesList = await enumerateDevices(); _tracks = await getUserMedia(caps); - await _localRenderer.setSrcObject( _tracks!.firstWhere((track) => track.kind() == MediaKind.video)); From e5adcc1bc0634f29b519ea524669e5ab7b17065a Mon Sep 17 00:00:00 2001 From: alexlapa Date: Thu, 12 Oct 2023 19:04:23 +0300 Subject: [PATCH 05/14] corections --- Cargo.lock | 28 ++-- crates/native/src/bridge_generated.rs | 87 +++++++--- crates/native/src/lib.rs | 3 +- crates/native/src/pc.rs | 12 +- crates/native/src/user_media.rs | 53 +++--- example/integration_test/webrtc_test.dart | 14 ++ lib/src/api/bridge.g.dart | 193 ++++++++++++++-------- lib/src/api/bridge.g.freezed.dart | 10 +- 8 files changed, 256 insertions(+), 144 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eecab65c70..ab7ce101bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -188,9 +188,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.108" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "292b4841d939b20ba44fff686a35808b0ab31a3256e3629917d9aedd43eb7b3a" +checksum = "c390c123d671cc547244943ecad81bdaab756c6ea332d9ca9c1f48d952a24895" dependencies = [ "cc", "cxxbridge-flags", @@ -200,9 +200,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.108" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e7e35cf85fd4e90dcaba251f3ee95e08fb6f9d66e5c0588816f16a6ab939b40" +checksum = "00d3d3ac9ffb900304edf51ca719187c779f4001bb544f26c4511d621de905cf" dependencies = [ "cc", "codespan-reporting", @@ -215,15 +215,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.108" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7030aff1908ba2b7eb639466df50792b2a3fdf02bea9557c4ee1a531975554b" +checksum = "94415827ecfea0f0c74c8cad7d1a86ddb3f05354d6a6ddeda0adee5e875d2939" [[package]] name = "cxxbridge-macro" -version = "1.0.108" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79418ecb0c2322a7926a5fa5a9660535432b5b3588b947e1eb484cc509edbe3c" +checksum = "e33dbbe9f5621c9247f97ec14213b04f350bff4b6cebefe834c60055db266ecf" dependencies = [ "proc-macro2", "quote", @@ -1013,9 +1013,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.18" +version = "0.38.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a74ee2d7c2581cd139b42447d7d9389b889bdaad3a73f1ebb16f2a3237bb19c" +checksum = "745ecfa778e66b2b63c88a61cb36e0eea109e803b0b86bf9879fbc77c70e86ed" dependencies = [ "bitflags 2.4.0", "errno", @@ -1091,18 +1091,18 @@ checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", diff --git a/crates/native/src/bridge_generated.rs b/crates/native/src/bridge_generated.rs index 76cf1b5d3b..0d2c71af27 100644 --- a/crates/native/src/bridge_generated.rs +++ b/crates/native/src/bridge_generated.rs @@ -18,6 +18,8 @@ use std::{ffi::c_void, sync::Arc}; // Section: imports +use crate::renderer::TextureEvent; + // Section: wire functions fn wire_enable_fake_media_impl(port_: MessagePort) { @@ -175,7 +177,7 @@ fn wire_set_transceiver_init_direction_impl( fn wire_add_transceiver_init_send_encoding_impl( port_: MessagePort, init: impl Wire2Api>> + UnwindSafe, - encoding: impl Wire2Api>> + UnwindSafe, + enc: impl Wire2Api>> + UnwindSafe, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>( WrapInfo { @@ -185,9 +187,9 @@ fn wire_add_transceiver_init_send_encoding_impl( }, move || { let api_init = init.wire2api(); - let api_encoding = encoding.wire2api(); + let api_enc = enc.wire2api(); move |task_callback| { - Ok(add_transceiver_init_send_encoding(api_init, api_encoding)) + Ok(add_transceiver_init_send_encoding(api_init, api_enc)) } }, ) @@ -202,7 +204,7 @@ fn wire_create_encoding_parameters_impl( scalability_mode: impl Wire2Api> + UnwindSafe, ) { FLUTTER_RUST_BRIDGE_HANDLER - .wrap::<_, _, _, RustOpaque>>( + .wrap::<_, _, _, RustOpaque>>( WrapInfo { debug_name: "create_encoding_parameters", port: Some(port_), @@ -737,19 +739,27 @@ fn wire_create_video_sink_impl( sink_id: impl Wire2Api + UnwindSafe, track_id: impl Wire2Api + UnwindSafe, callback_ptr: impl Wire2Api + UnwindSafe, + texture_id: impl Wire2Api + UnwindSafe, ) { FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, ()>( WrapInfo { debug_name: "create_video_sink", port: Some(port_), - mode: FfiCallMode::Normal, + mode: FfiCallMode::Stream, }, move || { let api_sink_id = sink_id.wire2api(); let api_track_id = track_id.wire2api(); let api_callback_ptr = callback_ptr.wire2api(); + let api_texture_id = texture_id.wire2api(); move |task_callback| { - create_video_sink(api_sink_id, api_track_id, api_callback_ptr) + create_video_sink( + task_callback.stream_sink::<_, TextureEvent>(), + api_sink_id, + api_track_id, + api_callback_ptr, + api_texture_id, + ) } }, ) @@ -1623,6 +1633,35 @@ impl rust2dart::IntoIntoDart for SignalingState { } } +impl support::IntoDart for TextureEvent { + fn into_dart(self) -> support::DartAbi { + match self { + Self::OnTextureChange { + texture_id, + width, + height, + rotation, + } => vec![ + 0.into_dart(), + texture_id.into_into_dart().into_dart(), + width.into_into_dart().into_dart(), + height.into_into_dart().into_dart(), + rotation.into_into_dart().into_dart(), + ], + Self::OnFirstFrameRendered { texture_id } => { + vec![1.into_dart(), texture_id.into_into_dart().into_dart()] + } + } + .into_dart() + } +} +impl support::IntoDartExceptPrimitive for TextureEvent {} +impl rust2dart::IntoIntoDart for TextureEvent { + fn into_into_dart(self) -> Self { + self + } +} + impl support::IntoDart for TrackEvent { fn into_dart(self) -> support::DartAbi { match self { @@ -1746,9 +1785,9 @@ mod io { pub extern "C" fn wire_add_transceiver_init_send_encoding( port_: i64, init: wire_ArcRtpTransceiverInit, - encoding: wire_ArcRtpEncodingParams, + enc: wire_ArcRtpEncodingParameters, ) { - wire_add_transceiver_init_send_encoding_impl(port_, init, encoding) + wire_add_transceiver_init_send_encoding_impl(port_, init, enc) } #[no_mangle] @@ -2018,8 +2057,15 @@ mod io { sink_id: i64, track_id: *mut wire_uint_8_list, callback_ptr: u64, + texture_id: i64, ) { - wire_create_video_sink_impl(port_, sink_id, track_id, callback_ptr) + wire_create_video_sink_impl( + port_, + sink_id, + track_id, + callback_ptr, + texture_id, + ) } #[no_mangle] @@ -2035,8 +2081,9 @@ mod io { } #[no_mangle] - pub extern "C" fn new_ArcRtpEncodingParams() -> wire_ArcRtpEncodingParams { - wire_ArcRtpEncodingParams::new_with_null_ptr() + pub extern "C" fn new_ArcRtpEncodingParameters( + ) -> wire_ArcRtpEncodingParameters { + wire_ArcRtpEncodingParameters::new_with_null_ptr() } #[no_mangle] @@ -2141,18 +2188,18 @@ mod io { } #[no_mangle] - pub extern "C" fn drop_opaque_ArcRtpEncodingParams(ptr: *const c_void) { + pub extern "C" fn drop_opaque_ArcRtpEncodingParameters(ptr: *const c_void) { unsafe { - Arc::>::decrement_strong_count(ptr as _); + Arc::>::decrement_strong_count(ptr as _); } } #[no_mangle] - pub extern "C" fn share_opaque_ArcRtpEncodingParams( + pub extern "C" fn share_opaque_ArcRtpEncodingParameters( ptr: *const c_void, ) -> *const c_void { unsafe { - Arc::>::increment_strong_count(ptr as _); + Arc::>::increment_strong_count(ptr as _); ptr } } @@ -2198,10 +2245,10 @@ mod io { unsafe { support::opaque_from_dart(self.ptr as _) } } } - impl Wire2Api>> - for wire_ArcRtpEncodingParams + impl Wire2Api>> + for wire_ArcRtpEncodingParameters { - fn wire2api(self) -> RustOpaque> { + fn wire2api(self) -> RustOpaque> { unsafe { support::opaque_from_dart(self.ptr as _) } } } @@ -2341,7 +2388,7 @@ mod io { #[repr(C)] #[derive(Clone)] - pub struct wire_ArcRtpEncodingParams { + pub struct wire_ArcRtpEncodingParameters { ptr: *const core::ffi::c_void, } @@ -2436,7 +2483,7 @@ mod io { } } } - impl NewWithNullPtr for wire_ArcRtpEncodingParams { + impl NewWithNullPtr for wire_ArcRtpEncodingParameters { fn new_with_null_ptr() -> Self { Self { ptr: core::ptr::null(), diff --git a/crates/native/src/lib.rs b/crates/native/src/lib.rs index efc6c63933..ea56c92e34 100644 --- a/crates/native/src/lib.rs +++ b/crates/native/src/lib.rs @@ -35,7 +35,8 @@ use crate::video_sink::Id as VideoSinkId; #[doc(inline)] pub use crate::{ pc::{ - PeerConnection, RtpEncodingParams, RtpTransceiver, RtpTransceiverInit, + PeerConnection, RtpEncodingParameters, RtpTransceiver, + RtpTransceiverInit, }, user_media::{ AudioDeviceId, AudioDeviceModule, AudioTrack, AudioTrackId, diff --git a/crates/native/src/pc.rs b/crates/native/src/pc.rs index 2623a16ad9..74f88812c4 100644 --- a/crates/native/src/pc.rs +++ b/crates/native/src/pc.rs @@ -592,7 +592,10 @@ impl RtpTransceiverInit { /// /// If the mutex guarding the [`sys::RtpTransceiverInit`] or the /// [`sys::RtpEncodingParameters`] is poisoned. - pub fn add_encoding(&self, encoding: &RustOpaque>) { + pub fn add_encoding( + &self, + encoding: &RustOpaque>, + ) { self.0 .lock() .unwrap() @@ -607,9 +610,9 @@ impl Default for RtpTransceiverInit { } /// Wrapper around a [`sys::RtpEncodingParameters`]. -pub struct RtpEncodingParams(Arc>); +pub struct RtpEncodingParameters(Arc>); -impl RtpEncodingParams { +impl RtpEncodingParameters { /// Creates a new [`RtpEncodingParameters`]. #[must_use] pub fn new() -> Self { @@ -678,7 +681,7 @@ impl RtpEncodingParams { } } -impl Default for RtpEncodingParams { +impl Default for RtpEncodingParameters { fn default() -> Self { Self::new() } @@ -996,7 +999,6 @@ impl sys::PeerConnectionEventsHandler for PeerConnectionObserver { } fn on_track(&mut self, transceiver: sys::RtpTransceiverInterface) { - println!("ONT"); let track_id = transceiver.receiver().track().id(); let track_id = VideoTrackId::from(track_id); if self.video_tracks.contains_key(&track_id) { diff --git a/crates/native/src/user_media.rs b/crates/native/src/user_media.rs index 440ba2ebe6..3ea9acfa98 100644 --- a/crates/native/src/user_media.rs +++ b/crates/native/src/user_media.rs @@ -344,46 +344,37 @@ impl Webrtc { } /// Returns the [width][0] property of the media track by its ID and - /// media type. - /// Blocks until width is initialized. + /// media type. Blocks until width is initialized. /// /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-width pub fn track_width(&self, id: String) -> anyhow::Result { - Ok({ - let id = VideoTrackId::from(id); - - *self - .video_tracks - .get(&id) - .ok_or_else(|| { - anyhow!("Cannot find video track with ID `{id}`") - })? - .width - .wait() - .read() - .unwrap() - }) + let id = VideoTrackId::from(id); + + Ok(*self + .video_tracks + .get(&id) + .ok_or_else(|| anyhow!("Cannot find video track with ID `{id}`"))? + .width + .wait() + .read() + .unwrap()) } /// Returns the [height][0] property of the media track by its ID and - /// media type. - /// Blocks until height is initialized. + /// media type. Blocks until height is initialized. /// /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height pub fn track_height(&self, id: String) -> anyhow::Result { - Ok({ - let id = VideoTrackId::from(id); - *self - .video_tracks - .get(&id) - .ok_or_else(|| { - anyhow!("Cannot find video track with ID `{id}`") - })? - .height - .wait() - .read() - .unwrap() - }) + let id = VideoTrackId::from(id); + + Ok(*self + .video_tracks + .get(&id) + .ok_or_else(|| anyhow!("Cannot find video track with ID `{id}`"))? + .height + .wait() + .read() + .unwrap()) } /// Changes the [enabled][1] property of the media track by its ID. diff --git a/example/integration_test/webrtc_test.dart b/example/integration_test/webrtc_test.dart index b7851ed90d..9429d77b16 100644 --- a/example/integration_test/webrtc_test.dart +++ b/example/integration_test/webrtc_test.dart @@ -876,6 +876,20 @@ void main() { } }); + testWidgets('Video dimensions', (WidgetTester tester) async { + var caps = DeviceConstraints(); + caps.video.mandatory = DeviceVideoConstraints(); + + var track = (await getUserMedia(caps))[0]; + + var w = await track.width(); + var h = await track.height(); + + expect(w, equals(640)); + expect(h, equals(480)); + + }); + testWidgets('on_track when peer has transceiver.', (WidgetTester tester) async { var pc1 = await PeerConnection.create(IceTransportType.all, []); diff --git a/lib/src/api/bridge.g.dart b/lib/src/api/bridge.g.dart index 6c3600ea24..1334cd19cd 100644 --- a/lib/src/api/bridge.g.dart +++ b/lib/src/api/bridge.g.dart @@ -81,13 +81,13 @@ abstract class MedeaFlutterWebrtcNative { /// Adds the provided [`RtpEncodingParameters`] to the [`RtpTransceiverInit`]. Future addTransceiverInitSendEncoding( {required ArcRtpTransceiverInit init, - required ArcRtpEncodingParams encoding, + required ArcRtpEncodingParameters enc, dynamic hint}); FlutterRustBridgeTaskConstMeta get kAddTransceiverInitSendEncodingConstMeta; /// Creates new [`RtpEncodingParameters`] with the provided settings. - Future createEncodingParameters( + Future createEncodingParameters( {required String rid, required bool active, int? maxBitrate, @@ -265,11 +265,21 @@ abstract class MedeaFlutterWebrtcNative { FlutterRustBridgeTaskConstMeta get kTrackStateConstMeta; + /// Returns the [height][0] property of the media track by its ID and + /// media type. + /// Blocks until height is initialized. + /// + /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height Future trackHeight( {required String trackId, required MediaType kind, dynamic hint}); FlutterRustBridgeTaskConstMeta get kTrackHeightConstMeta; + /// Returns the [width][0] property of the media track by its ID and + /// media type. + /// Blocks until width is initialized. + /// + /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height Future trackWidth( {required String trackId, required MediaType kind, dynamic hint}); @@ -312,10 +322,11 @@ abstract class MedeaFlutterWebrtcNative { /// /// `callback_ptr` argument should be a pointer to an [`UniquePtr`] pointing to /// an [`OnFrameCallbackInterface`]. - Future createVideoSink( + Stream createVideoSink( {required int sinkId, required String trackId, required int callbackPtr, + required int textureId, dynamic hint}); FlutterRustBridgeTaskConstMeta get kCreateVideoSinkConstMeta; @@ -329,9 +340,9 @@ abstract class MedeaFlutterWebrtcNative { ShareFnType get shareOpaqueArcPeerConnection; OpaqueTypeFinalizer get ArcPeerConnectionFinalizer; - DropFnType get dropOpaqueArcRtpEncodingParams; - ShareFnType get shareOpaqueArcRtpEncodingParams; - OpaqueTypeFinalizer get ArcRtpEncodingParamsFinalizer; + DropFnType get dropOpaqueArcRtpEncodingParameters; + ShareFnType get shareOpaqueArcRtpEncodingParameters; + OpaqueTypeFinalizer get ArcRtpEncodingParametersFinalizer; DropFnType get dropOpaqueArcRtpTransceiver; ShareFnType get shareOpaqueArcRtpTransceiver; @@ -358,19 +369,19 @@ class ArcPeerConnection extends FrbOpaque { } @sealed -class ArcRtpEncodingParams extends FrbOpaque { +class ArcRtpEncodingParameters extends FrbOpaque { final MedeaFlutterWebrtcNative bridge; - ArcRtpEncodingParams.fromRaw(int ptr, int size, this.bridge) + ArcRtpEncodingParameters.fromRaw(int ptr, int size, this.bridge) : super.unsafe(ptr, size); @override - DropFnType get dropFn => bridge.dropOpaqueArcRtpEncodingParams; + DropFnType get dropFn => bridge.dropOpaqueArcRtpEncodingParameters; @override - ShareFnType get shareFn => bridge.shareOpaqueArcRtpEncodingParams; + ShareFnType get shareFn => bridge.shareOpaqueArcRtpEncodingParameters; @override OpaqueTypeFinalizer get staticFinalizer => - bridge.ArcRtpEncodingParamsFinalizer; + bridge.ArcRtpEncodingParametersFinalizer; } @sealed @@ -1785,6 +1796,30 @@ enum SignalingState { closed, } +@freezed +sealed class TextureEvent with _$TextureEvent { + /// Height, width, or rotation have changed. + const factory TextureEvent.onTextureChange({ + /// ID of the texture. + required int textureId, + + /// Width of the last processed frame. + required int width, + + /// Height of the last processed frame. + required int height, + + /// Rotation of the last processed frame. + required int rotation, + }) = TextureEvent_OnTextureChange; + + /// First frame event. + const factory TextureEvent.onFirstFrameRendered({ + /// ID of the texture. + required int textureId, + }) = TextureEvent_OnFirstFrameRendered; +} + /// Indicator of the current state of a [`MediaStreamTrack`]. enum TrackEvent { /// Ended event of the [`MediaStreamTrack`] interface is fired when playback @@ -2024,16 +2059,16 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { Future addTransceiverInitSendEncoding( {required ArcRtpTransceiverInit init, - required ArcRtpEncodingParams encoding, + required ArcRtpEncodingParameters enc, dynamic hint}) { var arg0 = _platform.api2wire_ArcRtpTransceiverInit(init); - var arg1 = _platform.api2wire_ArcRtpEncodingParams(encoding); + var arg1 = _platform.api2wire_ArcRtpEncodingParameters(enc); return _platform.executeNormal(FlutterRustBridgeTask( callFfi: (port_) => _platform.inner .wire_add_transceiver_init_send_encoding(port_, arg0, arg1), parseSuccessData: _wire2api_unit, constMeta: kAddTransceiverInitSendEncodingConstMeta, - argValues: [init, encoding], + argValues: [init, enc], hint: hint, )); } @@ -2041,10 +2076,10 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { FlutterRustBridgeTaskConstMeta get kAddTransceiverInitSendEncodingConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "add_transceiver_init_send_encoding", - argNames: ["init", "encoding"], + argNames: ["init", "enc"], ); - Future createEncodingParameters( + Future createEncodingParameters( {required String rid, required bool active, int? maxBitrate, @@ -2061,7 +2096,7 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { return _platform.executeNormal(FlutterRustBridgeTask( callFfi: (port_) => _platform.inner.wire_create_encoding_parameters( port_, arg0, arg1, arg2, arg3, arg4, arg5), - parseSuccessData: _wire2api_ArcRtpEncodingParams, + parseSuccessData: _wire2api_ArcRtpEncodingParameters, constMeta: kCreateEncodingParametersConstMeta, argValues: [ rid, @@ -2646,20 +2681,22 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { argNames: [], ); - Future createVideoSink( + Stream createVideoSink( {required int sinkId, required String trackId, required int callbackPtr, + required int textureId, dynamic hint}) { var arg0 = _platform.api2wire_i64(sinkId); var arg1 = _platform.api2wire_String(trackId); var arg2 = _platform.api2wire_u64(callbackPtr); - return _platform.executeNormal(FlutterRustBridgeTask( + var arg3 = _platform.api2wire_i64(textureId); + return _platform.executeStream(FlutterRustBridgeTask( callFfi: (port_) => - _platform.inner.wire_create_video_sink(port_, arg0, arg1, arg2), - parseSuccessData: _wire2api_unit, + _platform.inner.wire_create_video_sink(port_, arg0, arg1, arg2, arg3), + parseSuccessData: _wire2api_texture_event, constMeta: kCreateVideoSinkConstMeta, - argValues: [sinkId, trackId, callbackPtr], + argValues: [sinkId, trackId, callbackPtr, textureId], hint: hint, )); } @@ -2667,7 +2704,7 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { FlutterRustBridgeTaskConstMeta get kCreateVideoSinkConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "create_video_sink", - argNames: ["sinkId", "trackId", "callbackPtr"], + argNames: ["sinkId", "trackId", "callbackPtr", "textureId"], ); Future disposeVideoSink({required int sinkId, dynamic hint}) { @@ -2694,12 +2731,12 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { OpaqueTypeFinalizer get ArcPeerConnectionFinalizer => _platform.ArcPeerConnectionFinalizer; - DropFnType get dropOpaqueArcRtpEncodingParams => - _platform.inner.drop_opaque_ArcRtpEncodingParams; - ShareFnType get shareOpaqueArcRtpEncodingParams => - _platform.inner.share_opaque_ArcRtpEncodingParams; - OpaqueTypeFinalizer get ArcRtpEncodingParamsFinalizer => - _platform.ArcRtpEncodingParamsFinalizer; + DropFnType get dropOpaqueArcRtpEncodingParameters => + _platform.inner.drop_opaque_ArcRtpEncodingParameters; + ShareFnType get shareOpaqueArcRtpEncodingParameters => + _platform.inner.share_opaque_ArcRtpEncodingParameters; + OpaqueTypeFinalizer get ArcRtpEncodingParametersFinalizer => + _platform.ArcRtpEncodingParametersFinalizer; DropFnType get dropOpaqueArcRtpTransceiver => _platform.inner.drop_opaque_ArcRtpTransceiver; @@ -2724,8 +2761,8 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { return ArcPeerConnection.fromRaw(raw[0], raw[1], this); } - ArcRtpEncodingParams _wire2api_ArcRtpEncodingParams(dynamic raw) { - return ArcRtpEncodingParams.fromRaw(raw[0], raw[1], this); + ArcRtpEncodingParameters _wire2api_ArcRtpEncodingParameters(dynamic raw) { + return ArcRtpEncodingParameters.fromRaw(raw[0], raw[1], this); } ArcRtpTransceiver _wire2api_ArcRtpTransceiver(dynamic raw) { @@ -3257,6 +3294,24 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { return SignalingState.values[raw as int]; } + TextureEvent _wire2api_texture_event(dynamic raw) { + switch (raw[0]) { + case 0: + return TextureEvent_OnTextureChange( + textureId: _wire2api_i64(raw[1]), + width: _wire2api_i32(raw[2]), + height: _wire2api_i32(raw[3]), + rotation: _wire2api_i32(raw[4]), + ); + case 1: + return TextureEvent_OnFirstFrameRendered( + textureId: _wire2api_i64(raw[1]), + ); + default: + throw Exception("unreachable"); + } + } + TrackEvent _wire2api_track_event(dynamic raw) { return TrackEvent.values[raw as int]; } @@ -3355,10 +3410,10 @@ class MedeaFlutterWebrtcNativePlatform } @protected - wire_ArcRtpEncodingParams api2wire_ArcRtpEncodingParams( - ArcRtpEncodingParams raw) { - final ptr = inner.new_ArcRtpEncodingParams(); - _api_fill_to_wire_ArcRtpEncodingParams(raw, ptr); + wire_ArcRtpEncodingParameters api2wire_ArcRtpEncodingParameters( + ArcRtpEncodingParameters raw) { + final ptr = inner.new_ArcRtpEncodingParameters(); + _api_fill_to_wire_ArcRtpEncodingParameters(raw, ptr); return ptr; } @@ -3498,10 +3553,10 @@ class MedeaFlutterWebrtcNativePlatform OpaqueTypeFinalizer(inner._drop_opaque_ArcPeerConnectionPtr); OpaqueTypeFinalizer get ArcPeerConnectionFinalizer => _ArcPeerConnectionFinalizer; - late final OpaqueTypeFinalizer _ArcRtpEncodingParamsFinalizer = - OpaqueTypeFinalizer(inner._drop_opaque_ArcRtpEncodingParamsPtr); - OpaqueTypeFinalizer get ArcRtpEncodingParamsFinalizer => - _ArcRtpEncodingParamsFinalizer; + late final OpaqueTypeFinalizer _ArcRtpEncodingParametersFinalizer = + OpaqueTypeFinalizer(inner._drop_opaque_ArcRtpEncodingParametersPtr); + OpaqueTypeFinalizer get ArcRtpEncodingParametersFinalizer => + _ArcRtpEncodingParametersFinalizer; late final OpaqueTypeFinalizer _ArcRtpTransceiverFinalizer = OpaqueTypeFinalizer(inner._drop_opaque_ArcRtpTransceiverPtr); OpaqueTypeFinalizer get ArcRtpTransceiverFinalizer => @@ -3517,8 +3572,8 @@ class MedeaFlutterWebrtcNativePlatform wireObj.ptr = apiObj.shareOrMove(); } - void _api_fill_to_wire_ArcRtpEncodingParams( - ArcRtpEncodingParams apiObj, wire_ArcRtpEncodingParams wireObj) { + void _api_fill_to_wire_ArcRtpEncodingParameters( + ArcRtpEncodingParameters apiObj, wire_ArcRtpEncodingParameters wireObj) { wireObj.ptr = apiObj.shareOrMove(); } @@ -3854,24 +3909,24 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { void wire_add_transceiver_init_send_encoding( int port_, wire_ArcRtpTransceiverInit init, - wire_ArcRtpEncodingParams encoding, + wire_ArcRtpEncodingParameters enc, ) { return _wire_add_transceiver_init_send_encoding( port_, init, - encoding, + enc, ); } late final _wire_add_transceiver_init_send_encodingPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Int64, wire_ArcRtpTransceiverInit, - wire_ArcRtpEncodingParams)>>( + wire_ArcRtpEncodingParameters)>>( 'wire_add_transceiver_init_send_encoding'); late final _wire_add_transceiver_init_send_encoding = _wire_add_transceiver_init_send_encodingPtr.asFunction< - void Function( - int, wire_ArcRtpTransceiverInit, wire_ArcRtpEncodingParams)>(); + void Function(int, wire_ArcRtpTransceiverInit, + wire_ArcRtpEncodingParameters)>(); void wire_create_encoding_parameters( int port_, @@ -4447,21 +4502,23 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { int sink_id, ffi.Pointer track_id, int callback_ptr, + int texture_id, ) { return _wire_create_video_sink( port_, sink_id, track_id, callback_ptr, + texture_id, ); } late final _wire_create_video_sinkPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Int64, ffi.Int64, ffi.Pointer, - ffi.Uint64)>>('wire_create_video_sink'); + ffi.Uint64, ffi.Int64)>>('wire_create_video_sink'); late final _wire_create_video_sink = _wire_create_video_sinkPtr.asFunction< - void Function(int, int, ffi.Pointer, int)>(); + void Function(int, int, ffi.Pointer, int, int)>(); void wire_dispose_video_sink( int port_, @@ -4489,15 +4546,15 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { late final _new_ArcPeerConnection = _new_ArcPeerConnectionPtr.asFunction(); - wire_ArcRtpEncodingParams new_ArcRtpEncodingParams() { - return _new_ArcRtpEncodingParams(); + wire_ArcRtpEncodingParameters new_ArcRtpEncodingParameters() { + return _new_ArcRtpEncodingParameters(); } - late final _new_ArcRtpEncodingParamsPtr = - _lookup>( - 'new_ArcRtpEncodingParams'); - late final _new_ArcRtpEncodingParams = _new_ArcRtpEncodingParamsPtr - .asFunction(); + late final _new_ArcRtpEncodingParametersPtr = + _lookup>( + 'new_ArcRtpEncodingParameters'); + late final _new_ArcRtpEncodingParameters = _new_ArcRtpEncodingParametersPtr + .asFunction(); wire_ArcRtpTransceiver new_ArcRtpTransceiver() { return _new_ArcRtpTransceiver(); @@ -4667,35 +4724,35 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { _share_opaque_ArcPeerConnectionPtr .asFunction Function(ffi.Pointer)>(); - void drop_opaque_ArcRtpEncodingParams( + void drop_opaque_ArcRtpEncodingParameters( ffi.Pointer ptr, ) { - return _drop_opaque_ArcRtpEncodingParams( + return _drop_opaque_ArcRtpEncodingParameters( ptr, ); } - late final _drop_opaque_ArcRtpEncodingParamsPtr = + late final _drop_opaque_ArcRtpEncodingParametersPtr = _lookup)>>( - 'drop_opaque_ArcRtpEncodingParams'); - late final _drop_opaque_ArcRtpEncodingParams = - _drop_opaque_ArcRtpEncodingParamsPtr + 'drop_opaque_ArcRtpEncodingParameters'); + late final _drop_opaque_ArcRtpEncodingParameters = + _drop_opaque_ArcRtpEncodingParametersPtr .asFunction)>(); - ffi.Pointer share_opaque_ArcRtpEncodingParams( + ffi.Pointer share_opaque_ArcRtpEncodingParameters( ffi.Pointer ptr, ) { - return _share_opaque_ArcRtpEncodingParams( + return _share_opaque_ArcRtpEncodingParameters( ptr, ); } - late final _share_opaque_ArcRtpEncodingParamsPtr = _lookup< + late final _share_opaque_ArcRtpEncodingParametersPtr = _lookup< ffi.NativeFunction< ffi.Pointer Function( - ffi.Pointer)>>('share_opaque_ArcRtpEncodingParams'); - late final _share_opaque_ArcRtpEncodingParams = - _share_opaque_ArcRtpEncodingParamsPtr + ffi.Pointer)>>('share_opaque_ArcRtpEncodingParameters'); + late final _share_opaque_ArcRtpEncodingParameters = + _share_opaque_ArcRtpEncodingParametersPtr .asFunction Function(ffi.Pointer)>(); void drop_opaque_ArcRtpTransceiver( @@ -4823,7 +4880,7 @@ final class wire_ArcRtpTransceiverInit extends ffi.Struct { external ffi.Pointer ptr; } -final class wire_ArcRtpEncodingParams extends ffi.Struct { +final class wire_ArcRtpEncodingParameters extends ffi.Struct { external ffi.Pointer ptr; } diff --git a/lib/src/api/bridge.g.freezed.dart b/lib/src/api/bridge.g.freezed.dart index c6a9f6dfbf..4ad33baeff 100644 --- a/lib/src/api/bridge.g.freezed.dart +++ b/lib/src/api/bridge.g.freezed.dart @@ -9317,7 +9317,7 @@ abstract class RtcStatsType_Unimplemented implements RtcStatsType { /// @nodoc mixin _$TextureEvent { - /// Id of the texture. + /// ID of the texture. int get textureId => throw _privateConstructorUsedError; @optionalTypeArgs TResult when({ @@ -9464,7 +9464,7 @@ class _$TextureEvent_OnTextureChangeImpl required this.height, required this.rotation}); - /// Id of the texture. + /// ID of the texture. @override final int textureId; @@ -9590,7 +9590,7 @@ abstract class TextureEvent_OnTextureChange implements TextureEvent { @override - /// Id of the texture. + /// ID of the texture. int get textureId; /// Width of the last processed frame. @@ -9650,7 +9650,7 @@ class _$TextureEvent_OnFirstFrameRenderedImpl implements TextureEvent_OnFirstFrameRendered { const _$TextureEvent_OnFirstFrameRenderedImpl({required this.textureId}); - /// Id of the texture. + /// ID of the texture. @override final int textureId; @@ -9756,7 +9756,7 @@ abstract class TextureEvent_OnFirstFrameRendered implements TextureEvent { @override - /// Id of the texture. + /// ID of the texture. int get textureId; @override @JsonKey(ignore: true) From 82ad0a5d8ffb1295bbdcae2dde4b7c619df67097 Mon Sep 17 00:00:00 2001 From: alexlapa Date: Fri, 20 Oct 2023 11:38:08 +0300 Subject: [PATCH 06/14] corections --- example/integration_test/webrtc_test.dart | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/example/integration_test/webrtc_test.dart b/example/integration_test/webrtc_test.dart index 4255814aac..949bb4cb0b 100644 --- a/example/integration_test/webrtc_test.dart +++ b/example/integration_test/webrtc_test.dart @@ -918,18 +918,17 @@ void main() { }); testWidgets('Video dimensions', (WidgetTester tester) async { - var caps = DeviceConstraints(); - caps.video.mandatory = DeviceVideoConstraints(); - - var track = (await getUserMedia(caps))[0]; + var caps = DeviceConstraints(); + caps.video.mandatory = DeviceVideoConstraints(); - var w = await track.width(); - var h = await track.height(); + var track = (await getUserMedia(caps))[0]; - expect(w, equals(640)); - expect(h, equals(480)); + var w = await track.width(); + var h = await track.height(); - }); + expect(w, equals(640)); + expect(h, equals(480)); + }); testWidgets('on_track when peer has transceiver.', (WidgetTester tester) async { From dd6b9de9bd2715c07b8a2a58d0e68a5f6c72f4da Mon Sep 17 00:00:00 2001 From: alexlapa Date: Tue, 28 Nov 2023 14:58:53 +0200 Subject: [PATCH 07/14] corrections --- Cargo.lock | 95 ++++++++++--------- Makefile | 4 +- .../proxy/MediaStreamTrackProxy.kt | 22 ++--- crates/native/src/api.rs | 24 ++++- crates/native/src/bridge_generated.rs | 18 ++-- crates/native/src/pc.rs | 14 ++- crates/native/src/user_media.rs | 26 +++-- crates/native/src/video_sink.rs | 6 +- example/integration_test/webrtc_test.dart | 37 ++++++-- example/pubspec.lock | 34 +++---- lib/src/api/bridge.g.dart | 66 +++++++++---- .../platform/native/media_stream_track.dart | 34 +++---- 12 files changed, 231 insertions(+), 149 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 05f1bb8c80..04e63b4fcd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -293,12 +293,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.52.0", ] [[package]] @@ -316,7 +316,7 @@ dependencies = [ "cfg-if", "libc", "redox_syscall 0.3.5", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -382,9 +382,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -449,9 +449,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "h2" @@ -474,9 +474,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] name = "hermit-abi" @@ -557,9 +557,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -589,9 +589,9 @@ checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -755,7 +755,7 @@ checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" dependencies = [ "libc", "wasi", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -834,9 +834,9 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "openssl" -version = "0.10.59" +version = "0.10.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" +checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" dependencies = [ "bitflags 2.4.1", "cfg-if", @@ -866,9 +866,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.95" +version = "0.9.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" +checksum = "3812c071ba60da8b5677cc12bcb1d42989a65553772897a7e0355545a819838f" dependencies = [ "cc", "libc", @@ -901,9 +901,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project-lite" @@ -925,9 +925,9 @@ checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -1022,7 +1022,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1046,7 +1046,7 @@ version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1176,7 +1176,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" dependencies = [ "libc", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1243,7 +1243,7 @@ dependencies = [ "fastrand", "redox_syscall 0.4.1", "rustix", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1292,7 +1292,7 @@ dependencies = [ "num_cpus", "pin-project-lite", "socket2 0.5.5", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] @@ -1385,9 +1385,9 @@ checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", "idna", @@ -1433,9 +1433,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1443,9 +1443,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", @@ -1458,9 +1458,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ "cfg-if", "js-sys", @@ -1470,9 +1470,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1480,9 +1480,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", @@ -1493,9 +1493,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "web-sys" @@ -1590,6 +1590,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -1711,7 +1720,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ "cfg-if", - "windows-sys", + "windows-sys 0.48.0", ] [[package]] diff --git a/Makefile b/Makefile index 97d27bd10b..8911001d35 100644 --- a/Makefile +++ b/Makefile @@ -441,8 +441,8 @@ test.flutter: flutter.test.desktop flutter.test.mobile cargo.test \ docs.rust \ flutter.analyze flutter.clean flutter.build flutter.fmt flutter.pub \ - flutter.run flutter.test.desktop flutter.test.mobile \ + flutter.run flutter.test flutter.test.desktop flutter.test.mobile \ kt.fmt \ rustup.targets \ swift.fmt \ - test.cargo test.flutter + test.cargo diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt index 0b44d3f6c0..46fd04b5e0 100644 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt @@ -43,17 +43,14 @@ class MediaStreamTrackProxy( /** [VideoSink] to track height and width changes. */ private lateinit var sink: VideoSink - /** Provides asynchronous wait for [width] initialization. */ - private val widthInit = CompletableDeferred() - - /** Provides asynchronous wait for [height] initialization. */ - private val heightInit = CompletableDeferred() + /** Provides asynchronous wait for [width] and [height] initialization. */ + private val fetchDimensions = CompletableDeferred() /** Video width */ - var width: Int = 0 + @Volatile private var width: Int = 0 /** Video height */ - var height: Int = 0 + @Volatile private var height: Int = 0 /** [MediaType] of the underlying [MediaStreamTrack]. */ val kind: MediaType = @@ -84,16 +81,13 @@ class MediaStreamTrackProxy( if (kind == MediaType.VIDEO) { if (deviceId == "remote") { - widthInit.complete(Unit) - heightInit.complete(Unit) + fetchDimensions.complete(Unit) } sink = VideoSink { p0 -> width = p0.rotatedWidth - widthInit.complete(Unit) - height = p0.rotatedHeight - heightInit.complete(Unit) + fetchDimensions.complete(Unit) } (obj as VideoTrack).addSink(sink) @@ -107,7 +101,7 @@ class MediaStreamTrackProxy( return null } - widthInit.await() + fetchDimensions.await() return width } @@ -116,7 +110,7 @@ class MediaStreamTrackProxy( if (kind == MediaType.AUDIO) { return null } - heightInit.await() + fetchDimensions.await() return height } diff --git a/crates/native/src/api.rs b/crates/native/src/api.rs index 4d5e47a6dd..768e41515e 100644 --- a/crates/native/src/api.rs +++ b/crates/native/src/api.rs @@ -1599,7 +1599,7 @@ pub struct MediaDisplayInfo { /// [MediaStreamConstraints], used to instruct what sort of /// [`MediaStreamTrack`]s to include in the [`MediaStream`] returned by -/// [`Webrtc::get_users_media()`]. +/// [`Webrtc::get_media()`]. /// /// [1]: https://w3.org/TR/mediacapture-streams#dom-mediastreamconstraints #[derive(Debug)] @@ -1612,7 +1612,7 @@ pub struct MediaStreamConstraints { } /// Nature and settings of the video [`MediaStreamTrack`] returned by -/// [`Webrtc::get_users_media()`]. +/// [`Webrtc::get_media()`]. #[derive(Debug)] pub struct VideoConstraints { /// Identifier of the device generating the content of the @@ -1636,7 +1636,7 @@ pub struct VideoConstraints { } /// Nature and settings of the audio [`MediaStreamTrack`] returned by -/// [`Webrtc::get_users_media()`]. +/// [`Webrtc::get_media()`]. #[derive(Debug)] pub struct AudioConstraints { /// Identifier of the device generating the content of the @@ -2267,13 +2267,20 @@ pub fn track_state( /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height pub fn track_height( track_id: String, + peer_id: Option, kind: MediaType, ) -> anyhow::Result> { if kind == MediaType::Audio { return Ok(None); } - WEBRTC.lock().unwrap().track_height(track_id).map(Some) + let track_origin = TrackOrigin::from(peer_id.map(PeerConnectionId::from)); + + WEBRTC + .lock() + .unwrap() + .track_height(track_id, track_origin) + .map(Some) } /// Returns the [width][0] property of the media track by its ID and @@ -2283,13 +2290,20 @@ pub fn track_height( /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height pub fn track_width( track_id: String, + peer_id: Option, kind: MediaType, ) -> anyhow::Result> { if kind == MediaType::Audio { return Ok(None); } - WEBRTC.lock().unwrap().track_width(track_id).map(Some) + let track_origin = TrackOrigin::from(peer_id.map(PeerConnectionId::from)); + + WEBRTC + .lock() + .unwrap() + .track_width(track_id, track_origin) + .map(Some) } /// Changes the [enabled][1] property of the [`MediaStreamTrack`] by its ID and diff --git a/crates/native/src/bridge_generated.rs b/crates/native/src/bridge_generated.rs index d041f2da64..e03861759a 100644 --- a/crates/native/src/bridge_generated.rs +++ b/crates/native/src/bridge_generated.rs @@ -557,9 +557,10 @@ fn wire_track_state_impl( fn wire_track_height_impl( port_: MessagePort, track_id: impl Wire2Api + UnwindSafe, + peer_id: impl Wire2Api> + UnwindSafe, kind: impl Wire2Api + UnwindSafe, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option>( + FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option, _>( WrapInfo { debug_name: "track_height", port: Some(port_), @@ -567,17 +568,19 @@ fn wire_track_height_impl( }, move || { let api_track_id = track_id.wire2api(); + let api_peer_id = peer_id.wire2api(); let api_kind = kind.wire2api(); - move |task_callback| track_height(api_track_id, api_kind) + move |task_callback| track_height(api_track_id, api_peer_id, api_kind) }, ) } fn wire_track_width_impl( port_: MessagePort, track_id: impl Wire2Api + UnwindSafe, + peer_id: impl Wire2Api> + UnwindSafe, kind: impl Wire2Api + UnwindSafe, ) { - FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option>( + FLUTTER_RUST_BRIDGE_HANDLER.wrap::<_, _, _, Option, _>( WrapInfo { debug_name: "track_width", port: Some(port_), @@ -585,8 +588,9 @@ fn wire_track_width_impl( }, move || { let api_track_id = track_id.wire2api(); + let api_peer_id = peer_id.wire2api(); let api_kind = kind.wire2api(); - move |task_callback| track_width(api_track_id, api_kind) + move |task_callback| track_width(api_track_id, api_peer_id, api_kind) }, ) } @@ -1891,18 +1895,20 @@ mod io { pub extern "C" fn wire_track_height( port_: i64, track_id: *mut wire_uint_8_list, + peer_id: *mut u64, kind: i32, ) { - wire_track_height_impl(port_, track_id, kind) + wire_track_height_impl(port_, track_id, peer_id, kind) } #[no_mangle] pub extern "C" fn wire_track_width( port_: i64, track_id: *mut wire_uint_8_list, + peer_id: *mut u64, kind: i32, ) { - wire_track_width_impl(port_, track_id, kind) + wire_track_width_impl(port_, track_id, peer_id, kind) } #[no_mangle] diff --git a/crates/native/src/pc.rs b/crates/native/src/pc.rs index 74033f321f..d6bb335a9c 100644 --- a/crates/native/src/pc.rs +++ b/crates/native/src/pc.rs @@ -1175,10 +1175,9 @@ impl sys::PeerConnectionEventsHandler for PeerConnectionObserver { let track = match transceiver.media_type() { sys::MediaType::MEDIA_TYPE_AUDIO => { let track_id = AudioTrackId::from(track_id); - if audio_tracks.contains_key(&( - track_id.clone(), - track_origin.clone(), - )) { + if audio_tracks + .contains_key(&(track_id.clone(), track_origin)) + { return; } @@ -1191,10 +1190,9 @@ impl sys::PeerConnectionEventsHandler for PeerConnectionObserver { } sys::MediaType::MEDIA_TYPE_VIDEO => { let track_id = VideoTrackId::from(track_id); - if video_tracks.contains_key(&( - track_id.clone(), - track_origin.clone(), - )) { + if video_tracks + .contains_key(&(track_id.clone(), track_origin)) + { return; } diff --git a/crates/native/src/user_media.rs b/crates/native/src/user_media.rs index 10cae82962..cbe4c1669e 100644 --- a/crates/native/src/user_media.rs +++ b/crates/native/src/user_media.rs @@ -369,12 +369,16 @@ impl Webrtc { /// media type. Blocks until width is initialized. /// /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-width - pub fn track_width(&self, id: String) -> anyhow::Result { + pub fn track_width( + &self, + id: String, + track_origin: TrackOrigin, + ) -> anyhow::Result { let id = VideoTrackId::from(id); Ok(*self .video_tracks - .get(&id) + .get(&(id.clone(), track_origin)) .ok_or_else(|| anyhow!("Cannot find video track with ID `{id}`"))? .width .wait() @@ -386,12 +390,16 @@ impl Webrtc { /// media type. Blocks until height is initialized. /// /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height - pub fn track_height(&self, id: String) -> anyhow::Result { + pub fn track_height( + &self, + id: String, + track_origin: TrackOrigin, + ) -> anyhow::Result { let id = VideoTrackId::from(id); Ok(*self .video_tracks - .get(&id) + .get(&(id.clone(), track_origin)) .ok_or_else(|| anyhow!("Cannot find video track with ID `{id}`"))? .height .wait() @@ -960,7 +968,7 @@ impl AudioDeviceModule { /// [1]: https://w3.org/TR/mediacapture-streams#dom-mediadevices-getusermedia /// [2]: https://w3.org/TR/screen-capture/#dom-mediadevices-getdisplaymedia /// [3]: https://w3.org/TR/webrtc/#dom-rtcpeerconnection-ontrack -#[derive(Clone, Debug, Eq, From, Hash, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, From, Hash, PartialEq)] pub enum TrackOrigin { Local, Remote(PeerConnectionId), @@ -1043,6 +1051,7 @@ impl VideoTrack { src: Arc, ) -> anyhow::Result { let id = VideoTrackId(next_id().to_string()); + let track_origin = TrackOrigin::Local; let width = Arc::new(OnceCell::new()); let height = Arc::new(OnceCell::new()); @@ -1055,6 +1064,7 @@ impl VideoTrack { }, )), id.clone(), + track_origin, ); let mut res = Self { @@ -1067,7 +1077,7 @@ impl VideoTrack { width, height, sink: None, - track_origin: TrackOrigin::Local, + track_origin, }; res.add_video_sink(&mut sink); @@ -1084,6 +1094,7 @@ impl VideoTrack { ) -> Self { let receiver = transceiver.receiver(); let track = receiver.track(); + let track_origin = TrackOrigin::Remote(peer.id()); let width = Arc::new(OnceCell::new()); width.set(RwLock::from(0)).unwrap(); @@ -1098,6 +1109,7 @@ impl VideoTrack { }, )), VideoTrackId(track.id().clone()), + track_origin, ); let mut res = Self { @@ -1115,7 +1127,7 @@ impl VideoTrack { width, height, sink: None, - track_origin: TrackOrigin::Remote(peer.id()), + track_origin, }; res.add_video_sink(&mut sink); diff --git a/crates/native/src/video_sink.rs b/crates/native/src/video_sink.rs index 512d75c7fc..9b31b1281f 100644 --- a/crates/native/src/video_sink.rs +++ b/crates/native/src/video_sink.rs @@ -25,7 +25,7 @@ impl Webrtc { OnFrameCallback(handler), )), track_id: track_id.clone(), - track_origin: track_origin.clone(), + track_origin, }; let mut track = self @@ -44,7 +44,7 @@ impl Webrtc { if let Some(sink) = self.video_sinks.remove(&Id(sink_id)) { if let Some(mut track) = self .video_tracks - .get_mut(&(sink.track_id.clone(), sink.track_origin.clone())) + .get_mut(&(sink.track_id.clone(), sink.track_origin)) { track.remove_video_sink(sink); } @@ -82,11 +82,13 @@ impl VideoSink { id: i64, sink: sys::VideoSinkInterface, track_id: VideoTrackId, + track_origin: TrackOrigin, ) -> Self { Self { id: Id(id), inner: sink, track_id, + track_origin, } } diff --git a/example/integration_test/webrtc_test.dart b/example/integration_test/webrtc_test.dart index 20e3dd0154..eb0804e4a7 100644 --- a/example/integration_test/webrtc_test.dart +++ b/example/integration_test/webrtc_test.dart @@ -1013,16 +1013,39 @@ void main() { }); testWidgets('Video dimensions', (WidgetTester tester) async { - var caps = DeviceConstraints(); - caps.video.mandatory = DeviceVideoConstraints(); + { + var caps = DeviceConstraints(); + caps.video.mandatory = DeviceVideoConstraints(); + caps.video.mandatory!.width = 640; + caps.video.mandatory!.height = 480; + + var track = (await getUserMedia(caps))[0]; + + var w = await track.width(); + var h = await track.height(); + + expect(w, equals(640)); + expect(h, equals(480)); + + await track.dispose(); + } + + { + var caps = DisplayConstraints(); + caps.video.mandatory = DeviceVideoConstraints(); + caps.video.mandatory!.width = 320; + caps.video.mandatory!.height = 240; - var track = (await getUserMedia(caps))[0]; + var track = (await getDisplayMedia(caps))[0]; - var w = await track.width(); - var h = await track.height(); + var w = await track.width(); + var h = await track.height(); - expect(w, equals(640)); - expect(h, equals(480)); + expect(w, equals(320)); + expect(h, equals(240)); + + await track.dispose(); + } }); testWidgets('on_track when peer has transceiver.', diff --git a/example/pubspec.lock b/example/pubspec.lock index 9e07f0681b..e41876ab42 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -157,10 +157,10 @@ packages: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" convert: dependency: transitive description: @@ -389,10 +389,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" mime: dependency: transitive description: @@ -429,10 +429,10 @@ packages: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.2" pointycastle: dependency: transitive description: @@ -530,18 +530,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -578,10 +578,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.1" timing: dependency: transitive description: @@ -626,10 +626,10 @@ packages: dependency: transitive description: name: vm_service - sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f + sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 url: "https://pub.dev" source: hosted - version: "11.7.1" + version: "11.10.0" watcher: dependency: transitive description: @@ -642,10 +642,10 @@ packages: dependency: transitive description: name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "0.3.0" web_socket_channel: dependency: transitive description: @@ -671,5 +671,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.1.0 <4.0.0" + dart: ">=3.2.0-194.0.dev <4.0.0" flutter: ">=3.10.0" diff --git a/lib/src/api/bridge.g.dart b/lib/src/api/bridge.g.dart index f5ed355c1a..09898c305a 100644 --- a/lib/src/api/bridge.g.dart +++ b/lib/src/api/bridge.g.dart @@ -258,7 +258,10 @@ abstract class MedeaFlutterWebrtcNative { /// /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height Future trackHeight( - {required String trackId, required MediaType kind, dynamic hint}); + {required String trackId, + int? peerId, + required MediaType kind, + dynamic hint}); FlutterRustBridgeTaskConstMeta get kTrackHeightConstMeta; @@ -268,7 +271,10 @@ abstract class MedeaFlutterWebrtcNative { /// /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height Future trackWidth( - {required String trackId, required MediaType kind, dynamic hint}); + {required String trackId, + int? peerId, + required MediaType kind, + dynamic hint}); FlutterRustBridgeTaskConstMeta get kTrackWidthConstMeta; @@ -410,7 +416,7 @@ class ArcRtpTransceiver extends FrbOpaque { } /// Nature and settings of the audio [`MediaStreamTrack`] returned by -/// [`Webrtc::get_users_media()`]. +/// [`Webrtc::get_media()`]. class AudioConstraints { /// Identifier of the device generating the content of the /// [`MediaStreamTrack`]. @@ -727,7 +733,7 @@ class MediaDisplayInfo { /// [MediaStreamConstraints], used to instruct what sort of /// [`MediaStreamTrack`]s to include in the [`MediaStream`] returned by -/// [`Webrtc::get_users_media()`]. +/// [`Webrtc::get_media()`]. /// /// [1]: https://w3.org/TR/mediacapture-streams#dom-mediastreamconstraints class MediaStreamConstraints { @@ -1922,7 +1928,7 @@ enum TrackState { } /// Nature and settings of the video [`MediaStreamTrack`] returned by -/// [`Webrtc::get_users_media()`]. +/// [`Webrtc::get_media()`]. class VideoConstraints { /// Identifier of the device generating the content of the /// [`MediaStreamTrack`]. @@ -2620,14 +2626,20 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { ); Future trackHeight( - {required String trackId, required MediaType kind, dynamic hint}) { + {required String trackId, + int? peerId, + required MediaType kind, + dynamic hint}) { var arg0 = _platform.api2wire_String(trackId); - var arg1 = api2wire_media_type(kind); + var arg1 = _platform.api2wire_opt_box_autoadd_u64(peerId); + var arg2 = api2wire_media_type(kind); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_track_height(port_, arg0, arg1), + callFfi: (port_) => + _platform.inner.wire_track_height(port_, arg0, arg1, arg2), parseSuccessData: _wire2api_opt_box_autoadd_i32, + parseErrorData: _wire2api_FrbAnyhowException, constMeta: kTrackHeightConstMeta, - argValues: [trackId, kind], + argValues: [trackId, peerId, kind], hint: hint, )); } @@ -2635,18 +2647,24 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { FlutterRustBridgeTaskConstMeta get kTrackHeightConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "track_height", - argNames: ["trackId", "kind"], + argNames: ["trackId", "peerId", "kind"], ); Future trackWidth( - {required String trackId, required MediaType kind, dynamic hint}) { + {required String trackId, + int? peerId, + required MediaType kind, + dynamic hint}) { var arg0 = _platform.api2wire_String(trackId); - var arg1 = api2wire_media_type(kind); + var arg1 = _platform.api2wire_opt_box_autoadd_u64(peerId); + var arg2 = api2wire_media_type(kind); return _platform.executeNormal(FlutterRustBridgeTask( - callFfi: (port_) => _platform.inner.wire_track_width(port_, arg0, arg1), + callFfi: (port_) => + _platform.inner.wire_track_width(port_, arg0, arg1, arg2), parseSuccessData: _wire2api_opt_box_autoadd_i32, + parseErrorData: _wire2api_FrbAnyhowException, constMeta: kTrackWidthConstMeta, - argValues: [trackId, kind], + argValues: [trackId, peerId, kind], hint: hint, )); } @@ -2654,7 +2672,7 @@ class MedeaFlutterWebrtcNativeImpl implements MedeaFlutterWebrtcNative { FlutterRustBridgeTaskConstMeta get kTrackWidthConstMeta => const FlutterRustBridgeTaskConstMeta( debugName: "track_width", - argNames: ["trackId", "kind"], + argNames: ["trackId", "peerId", "kind"], ); Future setTrackEnabled( @@ -4548,11 +4566,13 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { void wire_track_height( int port_, ffi.Pointer track_id, + ffi.Pointer peer_id, int kind, ) { return _wire_track_height( port_, track_id, + peer_id, kind, ); } @@ -4560,18 +4580,21 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { late final _wire_track_heightPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Int32)>>('wire_track_height'); - late final _wire_track_height = _wire_track_heightPtr - .asFunction, int)>(); + ffi.Pointer, ffi.Int32)>>('wire_track_height'); + late final _wire_track_height = _wire_track_heightPtr.asFunction< + void Function( + int, ffi.Pointer, ffi.Pointer, int)>(); void wire_track_width( int port_, ffi.Pointer track_id, + ffi.Pointer peer_id, int kind, ) { return _wire_track_width( port_, track_id, + peer_id, kind, ); } @@ -4579,9 +4602,10 @@ class MedeaFlutterWebrtcNativeWire implements FlutterRustBridgeWireBase { late final _wire_track_widthPtr = _lookup< ffi.NativeFunction< ffi.Void Function(ffi.Int64, ffi.Pointer, - ffi.Int32)>>('wire_track_width'); - late final _wire_track_width = _wire_track_widthPtr - .asFunction, int)>(); + ffi.Pointer, ffi.Int32)>>('wire_track_width'); + late final _wire_track_width = _wire_track_widthPtr.asFunction< + void Function( + int, ffi.Pointer, ffi.Pointer, int)>(); void wire_set_track_enabled( int port_, diff --git a/lib/src/platform/native/media_stream_track.dart b/lib/src/platform/native/media_stream_track.dart index bc4dcf7ce8..fd328f3dec 100644 --- a/lib/src/platform/native/media_stream_track.dart +++ b/lib/src/platform/native/media_stream_track.dart @@ -249,19 +249,6 @@ class _NativeMediaStreamTrackFFI extends NativeMediaStreamTrack { : MediaStreamTrackState.ended; } - @override - Future stop() async { - if (!_stopped) { - _onEnded = null; - - await api!.disposeTrack( - trackId: _id, - peerId: _peerId, - kind: ffi.MediaType.values[_kind.index]); - } - _stopped = true; - } - @override FacingMode? facingMode() { return null; @@ -269,13 +256,26 @@ class _NativeMediaStreamTrackFFI extends NativeMediaStreamTrack { @override Future height() async { - return await api! - .trackHeight(trackId: _id, kind: ffi.MediaType.values[_kind.index]); + return await api!.trackHeight( + trackId: _id, peerId: _peerId, kind: ffi.MediaType.values[_kind.index]); } @override Future width() async { - return await api! - .trackWidth(trackId: _id, kind: ffi.MediaType.values[_kind.index]); + return await api!.trackWidth( + trackId: _id, peerId: _peerId, kind: ffi.MediaType.values[_kind.index]); + } + + @override + Future stop() async { + if (!_stopped) { + _onEnded = null; + + await api!.disposeTrack( + trackId: _id, + peerId: _peerId, + kind: ffi.MediaType.values[_kind.index]); + } + _stopped = true; } } From b36c0bc0e7652a16de5a46e9b9081da702f046c9 Mon Sep 17 00:00:00 2001 From: alexlapa Date: Thu, 30 Nov 2023 15:47:43 +0200 Subject: [PATCH 08/14] corrections --- .../proxy/MediaStreamTrackProxy.kt | 6 +- example/integration_test/webrtc_test.dart | 3 +- example/ios/Podfile.lock | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example/macos/Podfile.lock | 2 +- .../macos/Runner.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- example/pubspec.lock | 34 ++++---- .../MediaStreamTrackController.swift | 20 ++++- .../VideoRendererEventController.swift | 26 ++++--- ios/Classes/proxy/MediaStreamTrackProxy.swift | 78 +++++++++++++++++++ 11 files changed, 137 insertions(+), 40 deletions(-) diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt index 46fd04b5e0..f9da8500dc 100644 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt @@ -40,7 +40,7 @@ class MediaStreamTrackProxy( /** Indicator whether the underlying [MediaStreamTrack] had been disposed. */ private var disposed: Boolean = false - /** [VideoSink] to track height and width changes. */ + /** [VideoSink] that tracks height and width changes. */ private lateinit var sink: VideoSink /** Provides asynchronous wait for [width] and [height] initialization. */ @@ -80,10 +80,6 @@ class MediaStreamTrackProxy( TrackRepository.addTrack(this) if (kind == MediaType.VIDEO) { - if (deviceId == "remote") { - fetchDimensions.complete(Unit) - } - sink = VideoSink { p0 -> width = p0.rotatedWidth height = p0.rotatedHeight diff --git a/example/integration_test/webrtc_test.dart b/example/integration_test/webrtc_test.dart index eb0804e4a7..761e37333f 100644 --- a/example/integration_test/webrtc_test.dart +++ b/example/integration_test/webrtc_test.dart @@ -1030,7 +1030,8 @@ void main() { await track.dispose(); } - { + // Desktop only since screen sharing is unimplemented on mobile platforms + if (!Platform.isAndroid && !Platform.isIOS) { var caps = DisplayConstraints(); caps.video.mandatory = DeviceVideoConstraints(); caps.video.mandatory!.width = 320; diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 1e8ab7deca..6bbe543721 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -36,4 +36,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: be3ab4e988bb308d23906be69146fcbef66fac55 -COCOAPODS: 1.12.1 +COCOAPODS: 1.14.2 diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index c87d15a335..a6b826db27 100644 --- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ =3.2.0-194.0.dev <4.0.0" + dart: ">=3.1.0 <4.0.0" flutter: ">=3.10.0" diff --git a/ios/Classes/controller/MediaStreamTrackController.swift b/ios/Classes/controller/MediaStreamTrackController.swift index 750c52a7ce..4069717202 100644 --- a/ios/Classes/controller/MediaStreamTrackController.swift +++ b/ios/Classes/controller/MediaStreamTrackController.swift @@ -20,6 +20,9 @@ class MediaStreamTrackController { /// Controller of the `eventChannel` management. private var eventController: EventController + /// Indicator whether this controller is disposed. + private var isDisposed: Bool = false + /// Initializes a new `MediaStreamTrackController` for the provided /// `MediaStreamTrackProxy`. init(messenger: FlutterBinaryMessenger, track: MediaStreamTrackProxy) { @@ -54,7 +57,7 @@ class MediaStreamTrackController { /// Handles all the supported Flutter method calls for the controlled /// `MediaStreamTrackProxy`. - func onMethodCall(call: FlutterMethodCall, result: FlutterResult) { + func onMethodCall(call: FlutterMethodCall, result: @escaping FlutterResult) { let argsMap = call.arguments as? [String: Any] switch call.method { case "setEnabled": @@ -79,8 +82,23 @@ class MediaStreamTrackController { result(error) } case "dispose": + self.isDisposed = true self.channel.setMethodCallHandler(nil) result(nil) + case "width": + Task { + var width = await self.track.getWidth() + if !self.isDisposed { + result(width) + } + } + case "height": + Task { + var height = await self.track.getHeight() + if !self.isDisposed { + result(height) + } + } default: result(FlutterMethodNotImplemented) } diff --git a/ios/Classes/controller/VideoRendererEventController.swift b/ios/Classes/controller/VideoRendererEventController.swift index 304bafafba..e8bc71a0ec 100644 --- a/ios/Classes/controller/VideoRendererEventController.swift +++ b/ios/Classes/controller/VideoRendererEventController.swift @@ -15,20 +15,24 @@ class VideoRendererEventController: VideoRendererEvent { /// Sends an `onFirstFrameRendered` event to Flutter side. func onFirstFrameRendered(id: Int64) { - self.eventController.sendEvent(data: [ - "event": "onFirstFrameRendered", - "id": id, - ]) + DispatchQueue.main.async { + self.eventController.sendEvent(data: [ + "event": "onFirstFrameRendered", + "id": id, + ]) + } } /// Sends an `onTextureChange` event to Flutter side. func onTextureChange(id: Int64, height: Int32, width: Int32, rotation: Int) { - self.eventController.sendEvent(data: [ - "event": "onTextureChange", - "id": id, - "width": width, - "height": height, - "rotation": rotation, - ]) + DispatchQueue.main.async { + self.eventController.sendEvent(data: [ + "event": "onTextureChange", + "id": id, + "width": width, + "height": height, + "rotation": rotation, + ]) + } } } diff --git a/ios/Classes/proxy/MediaStreamTrackProxy.swift b/ios/Classes/proxy/MediaStreamTrackProxy.swift index ba28fcd10f..bce788a97a 100644 --- a/ios/Classes/proxy/MediaStreamTrackProxy.swift +++ b/ios/Classes/proxy/MediaStreamTrackProxy.swift @@ -20,6 +20,52 @@ class MediaStreamTrackProxy: Equatable { /// Subscribers for `onEnded` callback of this `MediaStreamTrackProxy`. private var onEndedSubscribers: [() -> Void] = [] + /// `RTCVideoRenderer` that tracks video track height and width changes. + private var dimensionsSink: VideoTrackDimensionsSink? + + /// `RTCVideoRenderer` that tracks video track height and width changes. + class VideoTrackDimensionsSink: NSObject, RTCVideoRenderer { + /// Lock that protects width and height. + let cond = NSCondition() + + /// Latest video frame width. + var width: Int? + + /// Latest video frame height. + var height: Int? + + /// Blocks current thread until width and height values are set, should + /// be called before accessing these values to ensure correct + /// synchronization. + func waitForVideoDimensions() { + self.cond.lock() + while self.width == nil || self.height == nil { + self.cond.wait() + } + self.cond.unlock() + } + + /// Fetches width and height values + func renderFrame(_ renderFrame: RTCVideoFrame?) { + let width = Int(renderFrame!.buffer.width) + let height = Int(renderFrame!.buffer.height) + + if height == 0 || width == 0 { + return + } + + self.cond.lock() + + self.width = width + self.height = height + + self.cond.broadcast() + self.cond.unlock() + } + + func setSize(_: CGSize) {} + } + /// Initializes a new `MediaStreamTrackProxy` based on the provided data. init( track: RTCMediaStreamTrack, @@ -32,6 +78,12 @@ class MediaStreamTrackProxy: Equatable { } self.track = track MediaStreamTrackStore.tracks[track.trackId] = self + + if track.kind == "video" { + self.dimensionsSink = VideoTrackDimensionsSink() + let videoTrack = self.track as! RTCVideoTrack + videoTrack.add(self.dimensionsSink!) + } } /// Compares two `MediaStreamTrackProxy`s based on underlying @@ -74,6 +126,32 @@ class MediaStreamTrackProxy: Equatable { } } + /// Returns latest frame width if this is a video track or nil otherwise. + func getWidth() async -> Int? { + if self.dimensionsSink == nil { + return nil + } else { + let task = Task.detached { + self.dimensionsSink!.waitForVideoDimensions() + return self.dimensionsSink!.width! + } + return await task.get() + } + } + + /// Returns latest frame height if this is a video track or nil otherwise. + func getHeight() async -> Int? { + if self.dimensionsSink == nil { + return nil + } else { + let task = Task.detached { + self.dimensionsSink!.waitForVideoDimensions() + return self.dimensionsSink!.height! + } + return await task.get() + } + } + /// Returns `FacingMode` of this `MediaStreamTrackProxy`. /// /// Returns `nil` if it's an audio track. From fb3126e764fc183d4bd99a9e7266940b5ec3a088 Mon Sep 17 00:00:00 2001 From: alexlapa Date: Thu, 30 Nov 2023 16:52:24 +0200 Subject: [PATCH 09/14] fix android --- Cargo.lock | 22 ++++---- Makefile | 4 +- .../proxy/MediaStreamTrackProxy.kt | 6 +-- crates/native/src/user_media.rs | 8 +-- example/pubspec.lock | 50 +++++++++---------- 5 files changed, 45 insertions(+), 45 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 04e63b4fcd..4ee81c7d45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -145,9 +145,9 @@ checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -155,9 +155,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cpufeatures" @@ -682,9 +682,9 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" @@ -1014,15 +1014,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.25" +version = "0.38.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +checksum = "9470c4bf8246c8daf25f9598dca807fb6510347b1e1cfa55749113850c79d88a" dependencies = [ "bitflags 2.4.1", "errno", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1499,9 +1499,9 @@ checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/Makefile b/Makefile index 8911001d35..97d27bd10b 100644 --- a/Makefile +++ b/Makefile @@ -441,8 +441,8 @@ test.flutter: flutter.test.desktop flutter.test.mobile cargo.test \ docs.rust \ flutter.analyze flutter.clean flutter.build flutter.fmt flutter.pub \ - flutter.run flutter.test flutter.test.desktop flutter.test.mobile \ + flutter.run flutter.test.desktop flutter.test.mobile \ kt.fmt \ rustup.targets \ swift.fmt \ - test.cargo + test.cargo test.flutter diff --git a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt index f9da8500dc..7c630aae3b 100644 --- a/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt +++ b/android/src/main/kotlin/com/instrumentisto/medea_flutter_webrtc/proxy/MediaStreamTrackProxy.kt @@ -80,9 +80,9 @@ class MediaStreamTrackProxy( TrackRepository.addTrack(this) if (kind == MediaType.VIDEO) { - sink = VideoSink { p0 -> - width = p0.rotatedWidth - height = p0.rotatedHeight + sink = VideoSink { frame -> + width = frame.buffer.width + height = frame.buffer.height fetchDimensions.complete(Unit) } (obj as VideoTrack).addSink(sink) diff --git a/crates/native/src/user_media.rs b/crates/native/src/user_media.rs index cbe4c1669e..5af67ad0fd 100644 --- a/crates/native/src/user_media.rs +++ b/crates/native/src/user_media.rs @@ -7,11 +7,10 @@ use std::{ use anyhow::{anyhow, bail, Context}; use derive_more::{AsRef, Display, From, Into}; use libwebrtc_sys as sys; +use once_cell::sync::OnceCell; use sys::{OnFrameCallback, TrackEventObserver}; use xxhash::xxh3::xxh3_64; -use once_cell::sync::OnceCell; - use crate::{ api, devices, next_id, pc::{PeerConnectionId, RtpTransceiver}, @@ -1038,9 +1037,10 @@ impl OnFrameCallback for VideoFormatSink { if self.width.get().is_none() { self.width.set(RwLock::from(frame.width())).unwrap(); self.height.set(RwLock::from(frame.height())).unwrap(); + } else { + *self.width.get().unwrap().write().unwrap() = frame.width(); + *self.height.get().unwrap().write().unwrap() = frame.height(); } - *self.width.get().unwrap().write().unwrap() = frame.width(); - *self.height.get().unwrap().write().unwrap() = frame.height(); } } diff --git a/example/pubspec.lock b/example/pubspec.lock index 9e07f0681b..ae06bd7a4e 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -93,10 +93,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b" + sha256: "67d591d602906ef9201caf93452495ad1812bea2074f04e25dbd7c133785821b" url: "https://pub.dev" source: hosted - version: "2.4.6" + version: "2.4.7" build_runner_core: dependency: transitive description: @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: built_value - sha256: "723b4021e903217dfc445ec4cf5b42e27975aece1fc4ebbc1ca6329c2d9fb54e" + sha256: "69acb7007eb2a31dc901512bfe0f7b767168be34cb734835d54c070bfa74c1b2" url: "https://pub.dev" source: hosted - version: "8.7.0" + version: "8.8.0" characters: dependency: transitive description: @@ -157,10 +157,10 @@ packages: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" convert: dependency: transitive description: @@ -297,10 +297,10 @@ packages: dependency: transitive description: name: http - sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" + sha256: d4872660c46d929f6b8a9ef4e7a7eff7e49bbf0c4ec3f385ee32df5119175139 url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.2" http_multi_server: dependency: transitive description: @@ -389,10 +389,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" mime: dependency: transitive description: @@ -421,18 +421,18 @@ packages: dependency: transitive description: name: petitparser - sha256: eeb2d1428ee7f4170e2bd498827296a18d4e7fc462b71727d111c0ac7707cfa6 + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "6.0.1" + version: "6.0.2" platform: dependency: transitive description: name: platform - sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76" + sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102 url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.2" pointycastle: dependency: transitive description: @@ -530,18 +530,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" stream_transform: dependency: transitive description: @@ -578,10 +578,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.1" timing: dependency: transitive description: @@ -626,10 +626,10 @@ packages: dependency: transitive description: name: vm_service - sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f + sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583 url: "https://pub.dev" source: hosted - version: "11.7.1" + version: "11.10.0" watcher: dependency: transitive description: @@ -642,10 +642,10 @@ packages: dependency: transitive description: name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "0.3.0" web_socket_channel: dependency: transitive description: @@ -671,5 +671,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.1.0 <4.0.0" + dart: ">=3.2.0 <4.0.0" flutter: ">=3.10.0" From 5e5fdf3164e5af5669bfcffe764903efc6fc39ff Mon Sep 17 00:00:00 2001 From: alexlapa Date: Fri, 1 Dec 2023 12:01:39 +0200 Subject: [PATCH 10/14] fix ios --- example/integration_test/webrtc_test.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/example/integration_test/webrtc_test.dart b/example/integration_test/webrtc_test.dart index 761e37333f..e088368872 100644 --- a/example/integration_test/webrtc_test.dart +++ b/example/integration_test/webrtc_test.dart @@ -1013,7 +1013,8 @@ void main() { }); testWidgets('Video dimensions', (WidgetTester tester) async { - { + // iOS simulator does not have camera + if (!Platform.isIOS) { var caps = DeviceConstraints(); caps.video.mandatory = DeviceVideoConstraints(); caps.video.mandatory!.width = 640; From dc3fbe012ef69e13a7b22b2b9c06e7746bb3f506 Mon Sep 17 00:00:00 2001 From: alexlapa Date: Fri, 1 Dec 2023 12:12:11 +0200 Subject: [PATCH 11/14] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3e6872b86..c738b86b86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ All user visible changes to this project will be documented in this file. This p ### Added - `RtpTransceiverInit.sendEncodings` field with `SendEncodingParameters`. ([#125]) +- `MediaStreamTrack.height` and `MediaStreamTrack.width` methods. ([#129]) - `RtpParameters` class, `RtpSender.getParameters()` and `RtpSender.setParameters()` methods. ([#135]) ### Changed @@ -34,6 +35,7 @@ All user visible changes to this project will be documented in this file. This p [#123]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/123 [#124]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/124 [#125]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/125 +[#129]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/129 [#133]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/133 [#135]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/135 [#136]: https://github.com/instrumentisto/medea-flutter-webrtc/pull/136 From b7b0e5aa869e57b95344bca6544addb61bd6395d Mon Sep 17 00:00:00 2001 From: tyranron Date: Mon, 4 Dec 2023 12:37:52 +0100 Subject: [PATCH 12/14] Corrections --- CHANGELOG.md | 2 +- Cargo.lock | 1 - crates/native/Cargo.toml | 3 +-- crates/native/src/api.rs | 17 ++++++------ crates/native/src/pc.rs | 7 +++-- crates/native/src/user_media.rs | 33 ++++++++++++----------- example/integration_test/webrtc_test.dart | 2 +- lib/src/api/bridge.g.dart | 17 ++++++------ lib/src/platform/track.dart | 8 ++++-- 9 files changed, 47 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c738b86b86..4345cf2ded 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ All user visible changes to this project will be documented in this file. This p ### Added - `RtpTransceiverInit.sendEncodings` field with `SendEncodingParameters`. ([#125]) -- `MediaStreamTrack.height` and `MediaStreamTrack.width` methods. ([#129]) +- `MediaStreamTrack.height()` and `MediaStreamTrack.width()` methods. ([#129]) - `RtpParameters` class, `RtpSender.getParameters()` and `RtpSender.setParameters()` methods. ([#135]) ### Changed diff --git a/Cargo.lock b/Cargo.lock index 4ee81c7d45..3ed39d0ae4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -720,7 +720,6 @@ dependencies = [ "libwebrtc-sys", "log", "nix", - "once_cell", "threadpool", "windows", "xxhash-rust", diff --git a/crates/native/Cargo.toml b/crates/native/Cargo.toml index a12b4d509d..5fee612e01 100644 --- a/crates/native/Cargo.toml +++ b/crates/native/Cargo.toml @@ -2,7 +2,7 @@ name = "medea-flutter-webrtc-native" version = "0.0.0" edition = "2021" -rust-version = "1.62" +rust-version = "1.70" publish = false [lib] @@ -18,7 +18,6 @@ flutter_rust_bridge_macros = { version = "=1.82.4", default-features = false } lazy_static = "1.4" libwebrtc-sys = { path = "../libwebrtc-sys" } log = "0.4" -once_cell = "1.17" threadpool = "1.8" xxhash = { package = "xxhash-rust", version = "0.8", features = ["xxh3"] } diff --git a/crates/native/src/api.rs b/crates/native/src/api.rs index 768e41515e..b8288983b2 100644 --- a/crates/native/src/api.rs +++ b/crates/native/src/api.rs @@ -2260,11 +2260,12 @@ pub fn track_state( .track_state(track_id, track_origin, kind) } -/// Returns the [height][0] property of the media track by its ID and -/// media type. -/// Blocks until height is initialized. +/// Returns the [height] property of the media track by its ID and +/// [`MediaType`]. +/// +/// Blocks until the [height] is initialized. /// -/// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height +/// [height]: https://w3.org/TR/mediacapture-streams#dfn-height pub fn track_height( track_id: String, peer_id: Option, @@ -2283,11 +2284,11 @@ pub fn track_height( .map(Some) } -/// Returns the [width][0] property of the media track by its ID and -/// media type. -/// Blocks until width is initialized. +/// Returns the [width] property of the media track by its ID and [`MediaType`]. +/// +/// Blocks until the [width] is initialized. /// -/// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height +/// [width]: https://w3.org/TR/mediacapture-streams#dfn-height pub fn track_width( track_id: String, peer_id: Option, diff --git a/crates/native/src/pc.rs b/crates/native/src/pc.rs index d6bb335a9c..8b523fca08 100644 --- a/crates/native/src/pc.rs +++ b/crates/native/src/pc.rs @@ -3,7 +3,7 @@ use std::{ mem, sync::{ atomic::{AtomicBool, Ordering}, - mpsc, Arc, Mutex, Weak, + mpsc, Arc, Mutex, OnceLock, Weak, }, }; @@ -13,7 +13,6 @@ use dashmap::DashMap; use derive_more::{Display, From, Into}; use flutter_rust_bridge::RustOpaque; use libwebrtc_sys as sys; -use once_cell::sync::OnceCell; use threadpool::ThreadPool; use crate::{ @@ -273,7 +272,7 @@ impl PeerConnection { configuration: api::RtcConfiguration, pool: ThreadPool, ) -> anyhow::Result> { - let obs_peer = Arc::new(OnceCell::new()); + let obs_peer = Arc::new(OnceLock::new()); let observer = sys::PeerConnectionObserver::new(Box::new( PeerConnectionObserver { observer: Arc::new(Mutex::new(observer)), @@ -1055,7 +1054,7 @@ struct PeerConnectionObserver { /// /// Tasks with [`InnerPeer`] must be offloaded to a separate [`ThreadPool`], /// so the signalling thread wouldn't be blocked. - peer: Arc>>, + peer: Arc>>, /// Map of the remote [`VideoTrack`]s shared with the [`crate::Webrtc`]. video_tracks: Arc>, diff --git a/crates/native/src/user_media.rs b/crates/native/src/user_media.rs index 5af67ad0fd..456bde25d8 100644 --- a/crates/native/src/user_media.rs +++ b/crates/native/src/user_media.rs @@ -1,13 +1,12 @@ use std::{ collections::{HashMap, HashSet}, hash::Hash, - sync::{Arc, RwLock, Weak}, + sync::{Arc, OnceLock, RwLock, Weak}, }; use anyhow::{anyhow, bail, Context}; use derive_more::{AsRef, Display, From, Into}; use libwebrtc_sys as sys; -use once_cell::sync::OnceCell; use sys::{OnFrameCallback, TrackEventObserver}; use xxhash::xxh3::xxh3_64; @@ -364,10 +363,11 @@ impl Webrtc { }) } - /// Returns the [width][0] property of the media track by its ID and - /// media type. Blocks until width is initialized. + /// Returns the [width] property of the media track by its ID and origin. /// - /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-width + /// Blocks until the [width] is initialized. + /// + /// [width]: https://w3.org/TR/mediacapture-streams#dfn-width pub fn track_width( &self, id: String, @@ -385,10 +385,11 @@ impl Webrtc { .unwrap()) } - /// Returns the [height][0] property of the media track by its ID and - /// media type. Blocks until height is initialized. + /// Returns the [height] property of the media track by its ID and origin. + /// + /// Blocks until the [height] is initialized. /// - /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height + /// [height]: https://w3.org/TR/mediacapture-streams#dfn-height pub fn track_height( &self, id: String, @@ -1017,19 +1018,19 @@ pub struct VideoTrack { sink: Option, /// Video width. - width: Arc>>, + width: Arc>>, /// Video height. - height: Arc>>, + height: Arc>>, } /// Tracks changes in video `height` and `width`. struct VideoFormatSink { /// Video width. - width: Arc>>, + width: Arc>>, /// Video height. - height: Arc>>, + height: Arc>>, } impl OnFrameCallback for VideoFormatSink { @@ -1053,8 +1054,8 @@ impl VideoTrack { let id = VideoTrackId(next_id().to_string()); let track_origin = TrackOrigin::Local; - let width = Arc::new(OnceCell::new()); - let height = Arc::new(OnceCell::new()); + let width = Arc::new(OnceLock::new()); + let height = Arc::new(OnceLock::new()); let mut sink = VideoSink::new( i64::try_from(next_id()).unwrap(), sys::VideoSinkInterface::create_forwarding(Box::new( @@ -1096,9 +1097,9 @@ impl VideoTrack { let track = receiver.track(); let track_origin = TrackOrigin::Remote(peer.id()); - let width = Arc::new(OnceCell::new()); + let width = Arc::new(OnceLock::new()); width.set(RwLock::from(0)).unwrap(); - let height = Arc::new(OnceCell::new()); + let height = Arc::new(OnceLock::new()); height.set(RwLock::from(0)).unwrap(); let mut sink = VideoSink::new( i64::try_from(next_id()).unwrap(), diff --git a/example/integration_test/webrtc_test.dart b/example/integration_test/webrtc_test.dart index e088368872..ce00ba9c09 100644 --- a/example/integration_test/webrtc_test.dart +++ b/example/integration_test/webrtc_test.dart @@ -1031,7 +1031,7 @@ void main() { await track.dispose(); } - // Desktop only since screen sharing is unimplemented on mobile platforms + // Desktop only, since screen sharing is unimplemented on mobile platforms. if (!Platform.isAndroid && !Platform.isIOS) { var caps = DisplayConstraints(); caps.video.mandatory = DeviceVideoConstraints(); diff --git a/lib/src/api/bridge.g.dart b/lib/src/api/bridge.g.dart index 09898c305a..20c57115e9 100644 --- a/lib/src/api/bridge.g.dart +++ b/lib/src/api/bridge.g.dart @@ -252,11 +252,12 @@ abstract class MedeaFlutterWebrtcNative { FlutterRustBridgeTaskConstMeta get kTrackStateConstMeta; - /// Returns the [height][0] property of the media track by its ID and - /// media type. - /// Blocks until height is initialized. + /// Returns the [height] property of the media track by its ID and + /// [`MediaType`]. + /// + /// Blocks until the [height] is initialized. /// - /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height + /// [height]: https://w3.org/TR/mediacapture-streams#dfn-height Future trackHeight( {required String trackId, int? peerId, @@ -265,11 +266,11 @@ abstract class MedeaFlutterWebrtcNative { FlutterRustBridgeTaskConstMeta get kTrackHeightConstMeta; - /// Returns the [width][0] property of the media track by its ID and - /// media type. - /// Blocks until width is initialized. + /// Returns the [width] property of the media track by its ID and [`MediaType`]. + /// + /// Blocks until the [width] is initialized. /// - /// [0]: https://www.w3.org/TR/mediacapture-streams/#dfn-height + /// [width]: https://w3.org/TR/mediacapture-streams#dfn-height Future trackWidth( {required String trackId, int? peerId, diff --git a/lib/src/platform/track.dart b/lib/src/platform/track.dart index f1136a374f..5f07150eda 100644 --- a/lib/src/platform/track.dart +++ b/lib/src/platform/track.dart @@ -58,9 +58,13 @@ abstract class MediaStreamTrack { /// Returns [FacingMode] of this [MediaStreamTrack]. FacingMode? facingMode(); - /// Returns width of this [MediaStreamTrack]. + /// Returns [width] of this [MediaStreamTrack]. + /// + /// [width]: https://w3.org/TR/mediacapture-streams#dfn-width Future width(); - /// Returns height of this [MediaStreamTrack]. + /// Returns [height] of this [MediaStreamTrack]. + /// + /// [height]: https://w3.org/TR/mediacapture-streams#dfn-height Future height(); } From eec6b0132417d2b2c81a7f03bfd305be1ff318f1 Mon Sep 17 00:00:00 2001 From: tyranron Date: Mon, 4 Dec 2023 12:59:38 +0100 Subject: [PATCH 13/14] Fix --- Cargo.lock | 1 + crates/native/Cargo.toml | 1 + crates/native/src/pc.rs | 4 +--- crates/native/src/user_media.rs | 29 ++++++++++++++--------------- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3ed39d0ae4..4ee81c7d45 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -720,6 +720,7 @@ dependencies = [ "libwebrtc-sys", "log", "nix", + "once_cell", "threadpool", "windows", "xxhash-rust", diff --git a/crates/native/Cargo.toml b/crates/native/Cargo.toml index 5fee612e01..2883c54a53 100644 --- a/crates/native/Cargo.toml +++ b/crates/native/Cargo.toml @@ -18,6 +18,7 @@ flutter_rust_bridge_macros = { version = "=1.82.4", default-features = false } lazy_static = "1.4" libwebrtc-sys = { path = "../libwebrtc-sys" } log = "0.4" +once_cell = "1.17" threadpool = "1.8" xxhash = { package = "xxhash-rust", version = "0.8", features = ["xxh3"] } diff --git a/crates/native/src/pc.rs b/crates/native/src/pc.rs index 8b523fca08..4a028427b4 100644 --- a/crates/native/src/pc.rs +++ b/crates/native/src/pc.rs @@ -1162,9 +1162,7 @@ impl sys::PeerConnectionEventsHandler for PeerConnectionObserver { let audio_tracks = Arc::clone(&self.audio_tracks); move || { - let peer = if let Some(peer) = peer.get().unwrap().upgrade() { - peer - } else { + let Some(peer) = peer.get().unwrap().upgrade() else { // `peer` is already dropped on the Rust side, so just don't // do anything. return; diff --git a/crates/native/src/user_media.rs b/crates/native/src/user_media.rs index 456bde25d8..5c2a385c45 100644 --- a/crates/native/src/user_media.rs +++ b/crates/native/src/user_media.rs @@ -1,13 +1,14 @@ use std::{ collections::{HashMap, HashSet}, hash::Hash, - sync::{Arc, OnceLock, RwLock, Weak}, + sync::{Arc, RwLock, Weak}, }; use anyhow::{anyhow, bail, Context}; use derive_more::{AsRef, Display, From, Into}; -use libwebrtc_sys as sys; -use sys::{OnFrameCallback, TrackEventObserver}; +use libwebrtc_sys::{self as sys, OnFrameCallback, TrackEventObserver}; +// TODO: Use `std::sync::OnceLock` instead, once it support `.wait()` API. +use once_cell::sync::OnceCell; use xxhash::xxh3::xxh3_64; use crate::{ @@ -301,11 +302,9 @@ impl Webrtc { } }; - let device_index = if let Some(index) = + let Some(device_index) = self.get_index_of_audio_recording_device(&device_id)? - { - index - } else { + else { bail!( "Cannot find audio device with the specified ID `{device_id}`", ); @@ -1018,19 +1017,19 @@ pub struct VideoTrack { sink: Option, /// Video width. - width: Arc>>, + width: Arc>>, /// Video height. - height: Arc>>, + height: Arc>>, } /// Tracks changes in video `height` and `width`. struct VideoFormatSink { /// Video width. - width: Arc>>, + width: Arc>>, /// Video height. - height: Arc>>, + height: Arc>>, } impl OnFrameCallback for VideoFormatSink { @@ -1054,8 +1053,8 @@ impl VideoTrack { let id = VideoTrackId(next_id().to_string()); let track_origin = TrackOrigin::Local; - let width = Arc::new(OnceLock::new()); - let height = Arc::new(OnceLock::new()); + let width = Arc::new(OnceCell::new()); + let height = Arc::new(OnceCell::new()); let mut sink = VideoSink::new( i64::try_from(next_id()).unwrap(), sys::VideoSinkInterface::create_forwarding(Box::new( @@ -1097,9 +1096,9 @@ impl VideoTrack { let track = receiver.track(); let track_origin = TrackOrigin::Remote(peer.id()); - let width = Arc::new(OnceLock::new()); + let width = Arc::new(OnceCell::new()); width.set(RwLock::from(0)).unwrap(); - let height = Arc::new(OnceLock::new()); + let height = Arc::new(OnceCell::new()); height.set(RwLock::from(0)).unwrap(); let mut sink = VideoSink::new( i64::try_from(next_id()).unwrap(), From 8fa9d71f38d832799f40e97355a035332a8b9c12 Mon Sep 17 00:00:00 2001 From: tyranron Date: Mon, 4 Dec 2023 13:06:21 +0100 Subject: [PATCH 14/14] Fix --- crates/native/src/devices.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/native/src/devices.rs b/crates/native/src/devices.rs index b5e884e6ba..80cba1a9db 100644 --- a/crates/native/src/devices.rs +++ b/crates/native/src/devices.rs @@ -398,9 +398,8 @@ pub mod linux_device_change { loop { ppoll(&mut [fds], None, None)?; - let event = match socket.receive_event() { - Some(evt) => evt, - None => continue, + let Some(event) = socket.receive_event() else { + continue; }; if matches!(