diff options
Diffstat (limited to 'tutorial/src/rgb2gray/imp.rs')
-rw-r--r-- | tutorial/src/rgb2gray/imp.rs | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/tutorial/src/rgb2gray/imp.rs b/tutorial/src/rgb2gray/imp.rs index 5ff2cd612..6d65a0968 100644 --- a/tutorial/src/rgb2gray/imp.rs +++ b/tutorial/src/rgb2gray/imp.rs @@ -98,22 +98,19 @@ impl ObjectImpl for Rgb2Gray { // Metadata for the properties static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { vec![ - glib::ParamSpecBoolean::new( - "invert", - "Invert", - "Invert grayscale output", - DEFAULT_INVERT, - glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, - ), - glib::ParamSpecUInt::new( - "shift", - "Shift", - "Shift grayscale output (wrapping around)", - 0, - 255, - DEFAULT_SHIFT, - glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, - ), + glib::ParamSpecBoolean::builder("invert") + .nick("Invert") + .blurb("Invert grayscale output") + .default_value(DEFAULT_INVERT) + .mutable_playing() + .build(), + glib::ParamSpecUInt::builder("shift") + .nick("Shift") + .blurb("Shift grayscale output (wrapping around)") + .maximum(255) + .default_value(DEFAULT_SHIFT) + .mutable_playing() + .build(), ] }); |