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
diff options
context:
space:
mode:
authorVivia Nikolaidou <vivia@ahiru.eu>2022-08-18 15:04:15 +0300
committerVivia Nikolaidou <vivia@ahiru.eu>2022-08-22 17:58:43 +0300
commit560611134588f63270a569e92160ecac5ceabc37 (patch)
treeac5f4447c55c1e5dd4d8f15f92c335c36aa5bab8 /video/dav1d
parent84f6484140098826b3f074d806e0eb052198df43 (diff)
plugins: Simplify code using ParamSpecBuilder
Diffstat (limited to 'video/dav1d')
-rw-r--r--video/dav1d/src/dav1ddec/imp.rs32
1 files changed, 14 insertions, 18 deletions
diff --git a/video/dav1d/src/dav1ddec/imp.rs b/video/dav1d/src/dav1ddec/imp.rs
index 11309ed2a..02eb10fd9 100644
--- a/video/dav1d/src/dav1ddec/imp.rs
+++ b/video/dav1d/src/dav1ddec/imp.rs
@@ -496,24 +496,20 @@ impl ObjectImpl for Dav1dDec {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
- glib::ParamSpecUInt::new(
- "n-threads",
- "Number of threads",
- "Number of threads to use while decoding (set to 0 to use number of logical cores)",
- 0,
- std::u32::MAX,
- DEFAULT_N_THREADS,
- glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
- ),
- glib::ParamSpecInt64::new(
- "max-frame-delay",
- "Maximum frame delay",
- "Maximum delay in frames for the decoder (set to 1 for low latency, 0 to be equal to the number of logical cores. -1 to choose between these two based on pipeline liveness)",
- -1,
- std::u32::MAX.into(),
- DEFAULT_MAX_FRAME_DELAY,
- glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
- ),
+ glib::ParamSpecUInt::builder("n-threads")
+ .nick("Number of threads")
+ .blurb("Number of threads to use while decoding (set to 0 to use number of logical cores)")
+ .default_value(DEFAULT_N_THREADS)
+ .mutable_ready()
+ .build(),
+ glib::ParamSpecInt64::builder("max-frame-delay")
+ .nick("Maximum frame delay")
+ .blurb("Maximum delay in frames for the decoder (set to 1 for low latency, 0 to be equal to the number of logical cores. -1 to choose between these two based on pipeline liveness)")
+ .minimum(-1)
+ .maximum(std::u32::MAX.into())
+ .default_value(DEFAULT_MAX_FRAME_DELAY)
+ .mutable_ready()
+ .build(),
]
});