Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/video/cdg
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.com>2020-05-01 11:28:31 +0300
committerGuillaume Desmottes <guillaume.desmottes@collabora.com>2020-05-01 11:29:28 +0300
commit6c6917077d942b4d84c6aa97f88cfb4f2797e986 (patch)
treee21634c7ff1548d74c42e7de1a63e1755cffdc48 /video/cdg
parent896bda12f9622cb837d19aa6eaa7aebfa8789900 (diff)
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: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/e906197c622725e48b6250a71a922d45b006fb14 so ensure we are actually in push mode by using pushfilesrc.
Diffstat (limited to 'video/cdg')
-rw-r--r--video/cdg/tests/cdgdec.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/video/cdg/tests/cdgdec.rs b/video/cdg/tests/cdgdec.rs
index df53800fc..f8997767d 100644
--- a/video/cdg/tests/cdgdec.rs
+++ b/video/cdg/tests/cdgdec.rs
@@ -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)
- .expect("failed to set 'num-buffers' property");
- let blocksize: u32 = 24; // One CDG instruction
- filesrc
- .set_property("blocksize", &blocksize)
- .expect("failed to set 'blocksize' property");
+ {
+ 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
+ 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();