feat: add ffi datachannel & mute events (#88)

This commit is contained in:
Théo Monnom
2023-06-18 22:45:05 +02:00
committed by GitHub
parent 33dfcb27b0
commit 25f4c9a075
69 changed files with 1934 additions and 1546 deletions
+4 -4
View File
@@ -1,7 +1,8 @@
use image::ImageFormat;
use image::RgbaImage;
use livekit::options::{TrackPublishOptions, VideoCaptureOptions};
use livekit::options::TrackPublishOptions;
use livekit::prelude::*;
use livekit::webrtc::video_source::RtcVideoSource;
use livekit::webrtc::{
native::yuv_helper,
video_frame::native::I420BufferExt,
@@ -61,8 +62,7 @@ impl LogoTrack {
let (close_tx, close_rx) = oneshot::channel();
let track = LocalVideoTrack::create_video_track(
"livekit_logo",
VideoCaptureOptions::default(),
self.rtc_source.clone(),
RtcVideoSource::Native(self.rtc_source.clone()),
);
let task = tokio::spawn(Self::track_task(close_rx, self.rtc_source.clone()));
@@ -118,7 +118,7 @@ impl LogoTrack {
video_frame: Arc::new(Mutex::new(VideoFrame {
rotation: VideoRotation::VideoRotation0,
buffer: I420Buffer::new(FB_WIDTH as u32, FB_HEIGHT as u32),
timestamp: 0,
timestamp_us: 0,
})),
pos: (0, 0),
direction: (1, 1),