mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-29 15:01:07 +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
|
||||
};
|
||||
|
||||
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
|
||||
.set_property("location", &input_path.to_str().unwrap())
|
||||
.expect("failed to set 'location' property");
|
||||
filesrc
|
||||
.set_property("num-buffers", &1)
|
||||
{
|
||||
let child_proxy = filesrc.dynamic_cast_ref::<gst::ChildProxy>().unwrap();
|
||||
child_proxy
|
||||
.set_child_property("real-filesrc::num-buffers", &1)
|
||||
.expect("failed to set 'num-buffers' property");
|
||||
let blocksize: u32 = 24; // One CDG instruction
|
||||
filesrc
|
||||
.set_property("blocksize", &blocksize)
|
||||
child_proxy
|
||||
.set_child_property("real-filesrc::blocksize", &blocksize)
|
||||
.expect("failed to set 'blocksize' property");
|
||||
}
|
||||
|
||||
let parse = gst::ElementFactory::make("cdgparse", None).unwrap();
|
||||
let dec = gst::ElementFactory::make("cdgdec", None).unwrap();
|
||||
|
|
Loading…
Reference in a new issue