feat: overseer

This commit is contained in:
2024-11-15 15:54:51 +00:00
parent 04df558a2d
commit 60199cfa06
27 changed files with 3262 additions and 578 deletions

View File

@ -5,7 +5,7 @@ use std::fs;
use std::path::PathBuf;
use uuid::Uuid;
use crate::egress::{Egress, EgressConfig};
use crate::egress::{Egress, EgressConfig, EgressResult};
pub struct RecorderEgress {
id: Uuid,
@ -39,11 +39,14 @@ impl RecorderEgress {
}
impl Egress for RecorderEgress {
unsafe fn process_pkt(&mut self, packet: *mut AVPacket, variant: &Uuid) -> Result<()> {
unsafe fn process_pkt(
&mut self,
packet: *mut AVPacket,
variant: &Uuid,
) -> Result<EgressResult> {
if self.config.variants.contains(variant) {
self.muxer.write_packet(packet)
} else {
Ok(())
self.muxer.write_packet(packet)?;
}
Ok(EgressResult::None)
}
}