diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2021-11-06 10:34:10 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2021-11-06 10:34:10 +0300 |
commit | d9bda62a4720c0539a443a4e489645e9bb4af1eb (patch) | |
tree | d59eef871715fda4a9b37e355909a345dbd598d0 /video/dav1d | |
parent | c99b7785f941fa4f9388a88e52d74c0fa34129ec (diff) |
Update for GLib/GStreamer API changes
And clean up a lot of related property/caps/structure code.
Diffstat (limited to 'video/dav1d')
-rw-r--r-- | video/dav1d/src/dav1ddec/imp.rs | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/video/dav1d/src/dav1ddec/imp.rs b/video/dav1d/src/dav1ddec/imp.rs index b73d168a2..bb95e0c2d 100644 --- a/video/dav1d/src/dav1ddec/imp.rs +++ b/video/dav1d/src/dav1ddec/imp.rs @@ -365,7 +365,7 @@ impl ElementImpl for Dav1dDec { fn pad_templates() -> &'static [gst::PadTemplate] { static PAD_TEMPLATES: Lazy<Vec<gst::PadTemplate>> = Lazy::new(|| { - let sink_caps = gst::Caps::new_simple("video/x-av1", &[]); + let sink_caps = gst::Caps::builder("video/x-av1").build(); let sink_pad_template = gst::PadTemplate::new( "sink", gst::PadDirection::Sink, @@ -374,21 +374,18 @@ impl ElementImpl for Dav1dDec { ) .unwrap(); - let src_caps = gst::Caps::new_simple( - "video/x-raw", - &[ - ("format", &gst::List::from_owned(video_output_formats())), - ("width", &gst::IntRange::<i32>::new(1, i32::MAX)), - ("height", &gst::IntRange::<i32>::new(1, i32::MAX)), - ( - "framerate", - &gst::FractionRange::new( - gst::Fraction::new(0, 1), - gst::Fraction::new(i32::MAX, 1), - ), + let src_caps = gst::Caps::builder("video/x-raw") + .field("format", gst::List::from(video_output_formats())) + .field("width", gst::IntRange::new(1, i32::MAX)) + .field("height", gst::IntRange::new(1, i32::MAX)) + .field( + "framerate", + gst::FractionRange::new( + gst::Fraction::new(0, 1), + gst::Fraction::new(i32::MAX, 1), ), - ], - ); + ) + .build(); let src_pad_template = gst::PadTemplate::new( "src", gst::PadDirection::Src, |