diff --git a/src/encode/cmds.rs b/src/encode/cmds.rs index 56a98a9..f7f8d67 100644 --- a/src/encode/cmds.rs +++ b/src/encode/cmds.rs @@ -8,7 +8,7 @@ use crate::encode::codecs; pub fn spawn(metadata: Arc, v_target: util::VideoCodec, a_target: util::AudioCodec) -> Result<(impl Encoder, impl Encoder), Box> { let v = match v_target { - util::VideoCodec::VP9 => codecs::video::new_vp9(metadata.clone())?, + util::VideoCodec::AV1 => codecs::video::new_av1(metadata.clone())?, _ => return Err(Box::new(util::EncoderError::CodecNotSupported)) }; let a = match a_target { diff --git a/src/main.rs b/src/main.rs index fca4d83..7389440 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ use std::time::Duration; fn init() -> Result<[mpsc::Receiver>; 4], Box>{ let (v_out, a_out, metadata, demux_err_recv) = demux::spawn()?; let (raw_v_out, raw_a_out, decode_err_recv) = decode::spawn(v_out, a_out, metadata.clone())?; - let (enc_v_out, enc_a_out, encode_err_recv) = encode::spawn(raw_v_out, raw_a_out, metadata.clone(), util::VideoCodec::VP9, util::AudioCodec::OPUS)?; + let (enc_v_out, enc_a_out, encode_err_recv) = encode::spawn(raw_v_out, raw_a_out, metadata.clone(), util::VideoCodec::AV1, util::AudioCodec::OPUS)?; let muxer_err_recv = muxer::spawn(enc_v_out, enc_a_out, metadata.clone())?; return Ok([demux_err_recv, decode_err_recv, encode_err_recv, muxer_err_recv]); } diff --git a/src/util/mod.rs b/src/util/mod.rs index c1f40f5..e2c546f 100644 --- a/src/util/mod.rs +++ b/src/util/mod.rs @@ -16,7 +16,7 @@ pub struct VideoMetadata { #[derive(Copy, Clone)] pub enum VideoCodec { H264, - VP9, + AV1, } #[derive(Default)]