From 6ab27127bfd19efe7395f8afe78960658d55d77e Mon Sep 17 00:00:00 2001 From: Nickiel12 Date: Sat, 17 Aug 2024 20:10:37 +0000 Subject: [PATCH] stuff --- Cargo.lock | 6 ++++++ Cargo.toml | 2 ++ src/main.rs | 23 +++++++++++++++-------- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 149e710..e634a47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2449,9 +2449,15 @@ dependencies = [ "toml", "tracing", "tracing-subscriber", + "vcs-common", "webrtc", ] +[[package]] +name = "vcs-common" +version = "0.1.0" +source = "git+https://git.nickiel.net/VCC/vcs-common.git?branch=main#898d5181e08ed7cbfef745bf9036eae71a08be52" + [[package]] name = "version-compare" version = "0.2.0" diff --git a/Cargo.toml b/Cargo.toml index ea61952..7e23297 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,3 +22,5 @@ toml = "0.8.19" tracing = "0.1.40" tracing-subscriber = "0.3.18" webrtc = "0.11.0" + +vcs-common = { git = "https://git.nickiel.net/VCC/vcs-common.git", branch = "main" } diff --git a/src/main.rs b/src/main.rs index a22ab2e..396ff05 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,12 +2,8 @@ use std::sync::{atomic::AtomicBool, Arc}; use anyhow::Error; use gstreamer::{prelude::*, Element, ElementFactory, Pipeline, State}; -use gstrswebrtc::{signaller::Signallable, webrtcsink}; mod config; -mod signaller; - -use signaller::{SignallerEvent, SENDER_CHANNEL}; fn main() -> Result<(), Error> { // TRACING SETUP @@ -18,10 +14,6 @@ fn main() -> Result<(), Error> { let config = config::load_config(); - let (sender, receiver) = std::sync::mpsc::channel::(); - - *SENDER_CHANNEL.lock().unwrap() = Some(sender.clone()); - // EXIT HANDLER let to_quit = Arc::new(AtomicBool::new(false)); let to_quit_2 = to_quit.clone(); @@ -32,6 +24,7 @@ fn main() -> Result<(), Error> { // GSTREAMER SETUP gstreamer::init()?; +<<<<<<< HEAD gstrswebrtc::plugin_register_static()?; gstrsrtp::plugin_register_static()?; @@ -82,6 +75,20 @@ fn main() -> Result<(), Error> { gstreamer::ClockTime::NONE, &[gstreamer::MessageType::Eos] ); +======= + + + + + loop { + if to_quit.load(std::sync::atomic::Ordering::SeqCst) { + println!("Recieved Ctrl+C, stopping"); + + break; + } + std::thread::sleep(std::time::Duration::from_millis(200)); + } +>>>>>>> 29a8ccf (added vcs-common) println!("Success!");