mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-12-23 02:26:35 +00:00
rtp: tests: add run_test_pipeline_full() that checks output caps too
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1571>
This commit is contained in:
parent
10e0294d5a
commit
72006215cb
1 changed files with 17 additions and 0 deletions
|
@ -188,6 +188,17 @@ pub fn run_test_pipeline(
|
|||
depay: &str,
|
||||
expected_pay: Vec<Vec<ExpectedPacket>>,
|
||||
expected_depay: Vec<Vec<ExpectedBuffer>>,
|
||||
) {
|
||||
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<Vec<ExpectedPacket>>,
|
||||
expected_depay: Vec<Vec<ExpectedBuffer>>,
|
||||
expected_depay_caps: Option<gst::Caps>,
|
||||
) {
|
||||
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()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue