From 0290ef624aba6f8acefc80dd0c7f83c1e553f97b Mon Sep 17 00:00:00 2001 From: FredApps Date: Fri, 20 Nov 2026 00:54:24 +0100 Subject: [PATCH] Include track decoding trials in video integration suite --- crates/video/Cargo.toml | 4 ---- crates/video/tests/it/main.rs | 3 +++ crates/video/tests/{ => it}/track/av1.rs | 2 +- crates/video/tests/{ => it}/track/common/mod.rs | 0 crates/video/tests/{ => it}/track/h264.rs | 2 +- crates/video/tests/{ => it}/track/hevc.rs | 2 +- crates/video/tests/{ => it}/track/main.rs | 0 crates/video/tests/{ => it}/track/mpeg2.rs | 2 +- crates/video/tests/{ => it}/track/vp9.rs | 2 +- 9 files changed, 8 insertions(+), 9 deletions(-) rename crates/video/tests/{ => it}/track/av1.rs (99%) rename crates/video/tests/{ => it}/track/common/mod.rs (100%) rename crates/video/tests/{ => it}/track/h264.rs (99%) rename crates/video/tests/{ => it}/track/hevc.rs (99%) rename crates/video/tests/{ => it}/track/main.rs (100%) rename crates/video/tests/{ => it}/track/mpeg2.rs (99%) rename crates/video/tests/{ => it}/track/vp9.rs (96%) diff --git a/crates/video/Cargo.toml b/crates/video/Cargo.toml index b04450ad6..30cee4a92 100644 --- a/crates/video/Cargo.toml +++ b/crates/video/Cargo.toml @@ -85,10 +85,6 @@ craft-media-testkit = { workspace = true } # demuxers, for the track decoder's tests; the VMD demuxer, for the VMD decoder's. craft-media = { workspace = true, features = ["avi", "isobmff", "mpegts", "vmd"] } -# Built with any decoder feature; each codec's tests need its own. -[[test]] -name = "track" - [[example]] name = "vp8_fuzz" required-features = ["vp8-decode"] diff --git a/crates/video/tests/it/main.rs b/crates/video/tests/it/main.rs index 49be451ef..9c4dd414f 100644 --- a/crates/video/tests/it/main.rs +++ b/crates/video/tests/it/main.rs @@ -71,3 +71,6 @@ mod hevc; #[cfg(feature = "av1")] #[path = "av1/main.rs"] mod av1; + +#[path = "track/main.rs"] +mod track; diff --git a/crates/video/tests/track/av1.rs b/crates/video/tests/it/track/av1.rs similarity index 99% rename from crates/video/tests/track/av1.rs rename to crates/video/tests/it/track/av1.rs index cef856f2b..a282a80df 100644 --- a/crates/video/tests/track/av1.rs +++ b/crates/video/tests/it/track/av1.rs @@ -1,6 +1,6 @@ //! AV1 in MP4 (an `av1C` record whose config OBUs hold the sequence header). -use crate::common; +use super::common; use craft_media::CodecId; /// libaom when ffmpeg has it, else SVT-AV1: a fixture name and the encoder arguments. diff --git a/crates/video/tests/track/common/mod.rs b/crates/video/tests/it/track/common/mod.rs similarity index 100% rename from crates/video/tests/track/common/mod.rs rename to crates/video/tests/it/track/common/mod.rs diff --git a/crates/video/tests/track/h264.rs b/crates/video/tests/it/track/h264.rs similarity index 99% rename from crates/video/tests/track/h264.rs rename to crates/video/tests/it/track/h264.rs index 74a9477de..4cc56d148 100644 --- a/crates/video/tests/track/h264.rs +++ b/crates/video/tests/it/track/h264.rs @@ -1,7 +1,7 @@ //! H.264 in MP4 (an `avcC` record, length-prefixed packets), MPEG-TS (Annex B, no configuration) //! and AVI with the parameter sets in the stream header only (an Annex B configuration). -use crate::common; +use super::common; use craft_media::CodecId; use craft_video::{TrackDecoder, VideoError}; diff --git a/crates/video/tests/track/hevc.rs b/crates/video/tests/it/track/hevc.rs similarity index 99% rename from crates/video/tests/track/hevc.rs rename to crates/video/tests/it/track/hevc.rs index ac2cf672d..135870e5b 100644 --- a/crates/video/tests/track/hevc.rs +++ b/crates/video/tests/it/track/hevc.rs @@ -1,7 +1,7 @@ //! HEVC in MP4 (an `hvcC` record, length-prefixed packets) and MPEG-TS (Annex B, no //! configuration), 8-bit and 10-bit. -use crate::common; +use super::common; use craft_media::CodecId; /// Closed GOPs every 12 frames with B-frames, so decoding from a key packet gives every frame diff --git a/crates/video/tests/track/main.rs b/crates/video/tests/it/track/main.rs similarity index 100% rename from crates/video/tests/track/main.rs rename to crates/video/tests/it/track/main.rs diff --git a/crates/video/tests/track/mpeg2.rs b/crates/video/tests/it/track/mpeg2.rs similarity index 99% rename from crates/video/tests/track/mpeg2.rs rename to crates/video/tests/it/track/mpeg2.rs index e0fc19328..d465a7704 100644 --- a/crates/video/tests/track/mpeg2.rs +++ b/crates/video/tests/it/track/mpeg2.rs @@ -1,7 +1,7 @@ //! MPEG-2 video in MPEG-TS (no configuration), and with its sequence header moved from the //! packets into `extradata`. -use crate::common; +use super::common; use craft_media::CodecId; /// Closed GOPs every 12 frames with B-frames (ffmpeg's encoder needs scene change detection off diff --git a/crates/video/tests/track/vp9.rs b/crates/video/tests/it/track/vp9.rs similarity index 96% rename from crates/video/tests/track/vp9.rs rename to crates/video/tests/it/track/vp9.rs index 3fd75484c..421cc60e4 100644 --- a/crates/video/tests/track/vp9.rs +++ b/crates/video/tests/it/track/vp9.rs @@ -1,6 +1,6 @@ //! VP9 in MP4 (a `vpcC` record, which the decoder does not need). -use crate::common; +use super::common; use craft_media::CodecId; #[test]