feat: clean shutdown RTMP stream
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2025-06-19 13:08:15 +01:00
parent 5c2a58ed46
commit 68fad98000
9 changed files with 84 additions and 35 deletions

View File

@ -13,7 +13,6 @@ use ringbuf::traits::{Observer, Split};
use ringbuf::{HeapCons, HeapRb};
use std::io::Read;
use std::sync::Arc;
use std::time::Duration;
use tiny_skia::Pixmap;
use tokio::runtime::Handle;
use uuid::Uuid;
@ -21,10 +20,6 @@ use uuid::Uuid;
pub async fn listen(out_dir: String, overseer: Arc<dyn Overseer>) -> Result<()> {
info!("Test pattern enabled");
// add a delay, there is a race condition somewhere, the test pattern doesnt always
// get added to active_streams
tokio::time::sleep(Duration::from_secs(1)).await;
let info = ConnectionInfo {
id: Uuid::new_v4(),
endpoint: "test-pattern",
@ -36,9 +31,11 @@ pub async fn listen(out_dir: String, overseer: Arc<dyn Overseer>) -> Result<()>
spawn_pipeline(
Handle::current(),
info,
out_dir.clone(),
overseer.clone(),
out_dir,
overseer,
Box::new(src),
None,
None,
);
Ok(())
}