diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index 519b7ff..00617c3 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -9,21 +9,21 @@ tokio.workspace = true quinn = { workspace = true, features = ["rustls-ring", "platform-verifier"] } gpui-kit = { version = "0.11.0", features = ["syntect"] } -ec-opus = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-core = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-probe = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-mp4 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-matroska = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-ogg = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-h264 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-vp8 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-aac = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-mp3 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-vorbis = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-flac = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-h265 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-vp9 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-av1 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } +ec-opus = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-core = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-probe = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-mp4 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-matroska = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-ogg = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-h264 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-vp8 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-aac = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-mp3 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-vorbis = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-flac = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-h265 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-vp9 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-av1 = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } ureq = "3.5.2" bytes = "1.12.2" tracing = "0.1.44" @@ -38,8 +38,8 @@ rtrb = "0.4.1" pipewire = { version = "0.10.1", features = ["v0_3_49"] } ksni = "0.3.7" ashpd = { version = "0.14.3", default-features = false, features = ["tokio", "screencast"] } -ec-hw = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } -ec-va = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "24666c0482f23b366ea752d2eb988c41ea07657f" } +ec-hw = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } +ec-va = { git = "https://git.tahinli.com/Tahinli/edith_codecs.git", rev = "9953355c2c468d9c357fdebbec67345ea006d173" } [target.'cfg(target_os = "windows")'.dependencies] wasapi = "0.27.0" diff --git a/crates/client/src/media/decode.rs b/crates/client/src/media/decode.rs index 91e9a29..87d64c5 100644 --- a/crates/client/src/media/decode.rs +++ b/crates/client/src/media/decode.rs @@ -231,6 +231,7 @@ impl VideoDecoder { warn!("video packet skipped: {error}"); return Vec::new(); } + decoder.end_picture(); drain_h265(decoder, seconds) } VideoDecoder::Vp9(decoder) => match decoder.decode(&packet.data) { @@ -352,7 +353,7 @@ fn plane(samples: &[u16], shift: u32) -> Vec { fn drain_h265(decoder: &mut ec_h265::Decoder, pts: f64) -> Vec<(f64, Picture)> { std::iter::from_fn(|| decoder.next_frame()) - .map(|frame| (pts, h265_picture(&frame.picture))) + .map(|frame| (pts, h265_picture(&frame.cropped()))) .collect() } diff --git a/crates/client/src/share/session.rs b/crates/client/src/share/session.rs index 4fa5991..5d7f432 100644 --- a/crates/client/src/share/session.rs +++ b/crates/client/src/share/session.rs @@ -787,9 +787,7 @@ mod tests { let encoded: Vec = rx.try_iter().collect(); let mut decoders = vec![VideoDecoder::for_codec(codec).expect("decoder")]; - if codec != Codec::H265 { - decoders.push(crate::media::decode::software(codec).expect("software decoder")); - } + decoders.push(crate::media::decode::software(codec).expect("software decoder")); let lumas: Vec> = decoders .into_iter() .map(|mut decoder| { @@ -813,7 +811,7 @@ mod tests { } } } - assert!(pictures.len() >= 9, "{codec:?} {:?} {}", decoder.engine(), pictures.len()); + assert_eq!(pictures.len(), 10, "{codec:?} {:?}", decoder.engine()); let last = pictures.pop().expect("picture"); assert_eq!((last.width, last.height), (width, height), "{codec:?} {:?}", decoder.engine()); (0..height as usize)