mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 05:21:00 +00:00
cdgdec: fix test with gst master
Test was relying on 'blocksize' property on the source which can
only be used in push mode.
This change in baseparse broke it:
e906197c62
so ensure we are actually in push mode by using pushfilesrc.
This commit is contained in:
parent
896bda12f9
commit
6c6917077d
1 changed files with 12 additions and 8 deletions
|
@ -37,17 +37,21 @@ fn test_cdgdec() {
|
||||||
r
|
r
|
||||||
};
|
};
|
||||||
|
|
||||||
let filesrc = gst::ElementFactory::make("filesrc", None).unwrap();
|
// Ensure we are in push mode so 'blocksize' prop is used
|
||||||
|
let filesrc = gst::ElementFactory::make("pushfilesrc", None).unwrap();
|
||||||
filesrc
|
filesrc
|
||||||
.set_property("location", &input_path.to_str().unwrap())
|
.set_property("location", &input_path.to_str().unwrap())
|
||||||
.expect("failed to set 'location' property");
|
.expect("failed to set 'location' property");
|
||||||
filesrc
|
{
|
||||||
.set_property("num-buffers", &1)
|
let child_proxy = filesrc.dynamic_cast_ref::<gst::ChildProxy>().unwrap();
|
||||||
.expect("failed to set 'num-buffers' property");
|
child_proxy
|
||||||
let blocksize: u32 = 24; // One CDG instruction
|
.set_child_property("real-filesrc::num-buffers", &1)
|
||||||
filesrc
|
.expect("failed to set 'num-buffers' property");
|
||||||
.set_property("blocksize", &blocksize)
|
let blocksize: u32 = 24; // One CDG instruction
|
||||||
.expect("failed to set 'blocksize' property");
|
child_proxy
|
||||||
|
.set_child_property("real-filesrc::blocksize", &blocksize)
|
||||||
|
.expect("failed to set 'blocksize' property");
|
||||||
|
}
|
||||||
|
|
||||||
let parse = gst::ElementFactory::make("cdgparse", None).unwrap();
|
let parse = gst::ElementFactory::make("cdgparse", None).unwrap();
|
||||||
let dec = gst::ElementFactory::make("cdgdec", None).unwrap();
|
let dec = gst::ElementFactory::make("cdgdec", None).unwrap();
|
||||||
|
|
Loading…
Reference in a new issue