stuff
This commit is contained in:
parent
cf4cf3feb9
commit
6ab27127bf
3 changed files with 23 additions and 8 deletions
6
Cargo.lock
generated
6
Cargo.lock
generated
|
@ -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"
|
||||
|
|
|
@ -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" }
|
||||
|
|
23
src/main.rs
23
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::<SignallerEvent>();
|
||||
|
||||
*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!");
|
||||
|
||||
|
|
Loading…
Reference in a new issue