diff --git a/net/rtp/src/tests.rs b/net/rtp/src/tests.rs index 7744573b..35379401 100644 --- a/net/rtp/src/tests.rs +++ b/net/rtp/src/tests.rs @@ -188,6 +188,17 @@ pub fn run_test_pipeline( depay: &str, expected_pay: Vec>, expected_depay: Vec>, +) { + run_test_pipeline_full(src, pay, depay, expected_pay, expected_depay, None); +} + +pub fn run_test_pipeline_full( + src: Source, + pay: &str, + depay: &str, + expected_pay: Vec>, + expected_depay: Vec>, + expected_depay_caps: Option, ) { let pipeline = Pipeline(gst::Pipeline::new()); @@ -448,6 +459,12 @@ pub fn run_test_pipeline( depay_samples.len() ); + if let Some(expected_depay_caps) = expected_depay_caps { + if let Some(first_depay_sample) = depay_samples.first() { + assert_eq!(expected_depay_caps, *first_depay_sample.caps().unwrap()); + } + } + for (i, (expected_list, sample)) in Iterator::zip(expected_depay.into_iter(), depay_samples.into_iter()).enumerate() {