From 1a401864856022be9103253e7374bde51aa1a226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 5 Sep 2022 11:45:47 +0300 Subject: [PATCH] Update for GLib ParamSpec builder API changes --- audio/audiofx/src/ebur128level/imp.rs | 4 ++-- audio/audiofx/src/hrtfrender/imp.rs | 13 +++++-------- generic/fmp4/src/fmp4mux/imp.rs | 3 +-- generic/sodium/src/decrypter/imp.rs | 4 ++-- generic/sodium/src/encrypter/imp.rs | 4 ++-- generic/threadshare/src/appsrc/imp.rs | 2 +- generic/threadshare/src/inputselector/imp.rs | 2 +- generic/threadshare/src/jitterbuffer/imp.rs | 2 +- generic/threadshare/src/tcpclientsrc/imp.rs | 2 +- generic/threadshare/src/udpsink/imp.rs | 8 ++++---- generic/threadshare/src/udpsrc/imp.rs | 6 +++--- generic/threadshare/tests/pad.rs | 14 ++++++-------- net/aws/src/aws_transcriber/imp.rs | 6 ++---- net/aws/src/s3hlssink/imp.rs | 2 +- net/aws/src/s3sink/imp.rs | 5 ++--- net/hlssink3/src/imp.rs | 3 +-- net/raptorq/src/raptorqdec/imp.rs | 2 +- net/reqwest/src/reqwesthttpsrc/imp.rs | 6 +++--- text/ahead/src/textahead/imp.rs | 6 +++--- text/regex/src/gstregex/imp.rs | 2 +- tutorial/src/progressbin/imp.rs | 3 +-- .../src/fallbacksrc/custom_source/imp.rs | 14 ++++++-------- utils/fallbackswitch/src/fallbacksrc/imp.rs | 11 +++++------ utils/fallbackswitch/src/fallbackswitch/imp.rs | 2 +- utils/uriplaylistbin/src/uriplaylistbin/imp.rs | 2 +- video/closedcaption/src/mcc_enc/imp.rs | 2 +- video/closedcaption/src/transcriberbin/imp.rs | 10 ++++------ video/closedcaption/src/tttocea608/imp.rs | 3 +-- video/closedcaption/src/tttojson/imp.rs | 3 +-- video/gtk4/src/sink/imp.rs | 2 +- video/rav1e/src/rav1enc/imp.rs | 3 +-- video/rspng/src/pngenc/imp.rs | 17 +++++++++-------- 32 files changed, 75 insertions(+), 93 deletions(-) diff --git a/audio/audiofx/src/ebur128level/imp.rs b/audio/audiofx/src/ebur128level/imp.rs index 7c889c54..ae9fa35f 100644 --- a/audio/audiofx/src/ebur128level/imp.rs +++ b/audio/audiofx/src/ebur128level/imp.rs @@ -144,10 +144,10 @@ impl ObjectImpl for EbuR128Level { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { vec![ - glib::ParamSpecFlags::builder("mode", Mode::static_type()) + glib::ParamSpecFlags::builder::("mode") .nick("Mode") .blurb("Selection of metrics to calculate") - .default_value(DEFAULT_MODE.bits() as u32) + .default_value(DEFAULT_MODE) .mutable_ready() .build(), glib::ParamSpecBoolean::builder("post-messages") diff --git a/audio/audiofx/src/hrtfrender/imp.rs b/audio/audiofx/src/hrtfrender/imp.rs index fc949f7e..76b22748 100644 --- a/audio/audiofx/src/hrtfrender/imp.rs +++ b/audio/audiofx/src/hrtfrender/imp.rs @@ -404,7 +404,7 @@ impl ObjectImpl for HrtfRender { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { vec![ - glib::ParamSpecBoxed::builder("hrir-raw", glib::Bytes::static_type()) + glib::ParamSpecBoxed::builder::("hrir-raw") .nick("Head Transform Impulse Response") .blurb("Head Transform Impulse Response raw bytes") .mutable_ready() @@ -430,13 +430,10 @@ impl ObjectImpl for HrtfRender { .build(), gst::ParamSpecArray::builder("spatial-objects") .element_spec( - &glib::ParamSpecBoxed::builder( - "spatial-object", - gst::Structure::static_type(), - ) - .nick("Spatial Object") - .blurb("Spatial Object Metadata") - .build(), + &glib::ParamSpecBoxed::builder::("spatial-object") + .nick("Spatial Object") + .blurb("Spatial Object Metadata") + .build(), ) .nick("Spatial Objects") .blurb("Spatial object Metadata to apply on input channels") diff --git a/generic/fmp4/src/fmp4mux/imp.rs b/generic/fmp4/src/fmp4mux/imp.rs index e6a0166d..306ec687 100644 --- a/generic/fmp4/src/fmp4mux/imp.rs +++ b/generic/fmp4/src/fmp4mux/imp.rs @@ -1550,10 +1550,9 @@ impl ObjectImpl for FMP4Mux { .default_value(DEFAULT_FRAGMENT_DURATION.nseconds()) .mutable_ready() .build(), - glib::ParamSpecEnum::builder("header-update-mode", super::HeaderUpdateMode::static_type()) + glib::ParamSpecEnum::builder::("header-update-mode", DEFAULT_HEADER_UPDATE_MODE) .nick("Header update mode") .blurb("Mode for updating the header at the end of the stream") - .default_value(DEFAULT_HEADER_UPDATE_MODE as i32) .mutable_ready() .build(), glib::ParamSpecBoolean::builder("write-mfra") diff --git a/generic/sodium/src/decrypter/imp.rs b/generic/sodium/src/decrypter/imp.rs index 9e71d9ad..7f35582c 100644 --- a/generic/sodium/src/decrypter/imp.rs +++ b/generic/sodium/src/decrypter/imp.rs @@ -597,11 +597,11 @@ impl ObjectImpl for Decrypter { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { vec![ - glib::ParamSpecBoxed::builder("receiver-key", glib::Bytes::static_type()) + glib::ParamSpecBoxed::builder::("receiver-key") .nick("Receiver Key") .blurb("The private key of the Receiver") .build(), - glib::ParamSpecBoxed::builder("sender-key", glib::Bytes::static_type()) + glib::ParamSpecBoxed::builder::("sender-key") .nick("Sender Key") .blurb("The public key of the Sender") .write_only() diff --git a/generic/sodium/src/encrypter/imp.rs b/generic/sodium/src/encrypter/imp.rs index e35b7dfa..fc7b0b4c 100644 --- a/generic/sodium/src/encrypter/imp.rs +++ b/generic/sodium/src/encrypter/imp.rs @@ -389,11 +389,11 @@ impl ObjectImpl for Encrypter { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { vec![ - glib::ParamSpecBoxed::builder("receiver-key", glib::Bytes::static_type()) + glib::ParamSpecBoxed::builder::("receiver-key") .nick("Receiver Key") .blurb("The public key of the Receiver") .build(), - glib::ParamSpecBoxed::builder("sender-key", glib::Bytes::static_type()) + glib::ParamSpecBoxed::builder::("sender-key") .nick("Sender Key") .blurb("The private key of the Sender") .write_only() diff --git a/generic/threadshare/src/appsrc/imp.rs b/generic/threadshare/src/appsrc/imp.rs index ec4ca620..a88e8352 100644 --- a/generic/threadshare/src/appsrc/imp.rs +++ b/generic/threadshare/src/appsrc/imp.rs @@ -476,7 +476,7 @@ impl ObjectImpl for AppSrc { .minimum(1) .default_value(DEFAULT_MAX_BUFFERS) .build(), - glib::ParamSpecBoxed::builder("caps", gst::Caps::static_type()) + glib::ParamSpecBoxed::builder::("caps") .nick("Caps") .blurb("Caps to use") .build(), diff --git a/generic/threadshare/src/inputselector/imp.rs b/generic/threadshare/src/inputselector/imp.rs index f6ae8202..5ab487d8 100644 --- a/generic/threadshare/src/inputselector/imp.rs +++ b/generic/threadshare/src/inputselector/imp.rs @@ -419,7 +419,7 @@ impl ObjectImpl for InputSelector { .default_value(DEFAULT_CONTEXT_WAIT.as_millis() as u32) .readwrite() .build(), - glib::ParamSpecObject::builder("active-pad", gst::Pad::static_type()) + glib::ParamSpecObject::builder::("active-pad") .nick("Active Pad") .blurb("Currently active pad") .readwrite() diff --git a/generic/threadshare/src/jitterbuffer/imp.rs b/generic/threadshare/src/jitterbuffer/imp.rs index 82683225..699f7df5 100644 --- a/generic/threadshare/src/jitterbuffer/imp.rs +++ b/generic/threadshare/src/jitterbuffer/imp.rs @@ -1393,7 +1393,7 @@ impl ObjectImpl for JitterBuffer { .blurb("The maximum time (milliseconds) of misordered packets tolerated.") .default_value(DEFAULT_MAX_MISORDER_TIME) .build(), - glib::ParamSpecBoxed::builder("stats", gst::Structure::static_type()) + glib::ParamSpecBoxed::builder::("stats") .nick("Statistics") .blurb("Various statistics") .read_only() diff --git a/generic/threadshare/src/tcpclientsrc/imp.rs b/generic/threadshare/src/tcpclientsrc/imp.rs index 7cb5aeb7..bd272c69 100644 --- a/generic/threadshare/src/tcpclientsrc/imp.rs +++ b/generic/threadshare/src/tcpclientsrc/imp.rs @@ -543,7 +543,7 @@ impl ObjectImpl for TcpClientSrc { .maximum(u16::MAX as i32) .default_value(DEFAULT_PORT) .build(), - glib::ParamSpecBoxed::builder("caps", gst::Caps::static_type()) + glib::ParamSpecBoxed::builder::("caps") .nick("Caps") .blurb("Caps to use") .build(), diff --git a/generic/threadshare/src/udpsink/imp.rs b/generic/threadshare/src/udpsink/imp.rs index 5fedd3ef..7e2adde5 100644 --- a/generic/threadshare/src/udpsink/imp.rs +++ b/generic/threadshare/src/udpsink/imp.rs @@ -1003,20 +1003,20 @@ impl ObjectImpl for UdpSink { .maximum(u16::MAX as i32) .default_value(DEFAULT_BIND_PORT_V6) .build(), - glib::ParamSpecObject::builder("socket", gio::Socket::static_type()) + glib::ParamSpecObject::builder::("socket") .nick("Socket") .blurb("Socket to use for UDP transmission. (None == allocate)") .build(), - glib::ParamSpecObject::builder("used-socket", gio::Socket::static_type()) + glib::ParamSpecObject::builder::("used-socket") .nick("Used Socket") .blurb("Socket currently in use for UDP transmission. (None = no socket)") .read_only() .build(), - glib::ParamSpecObject::builder("socket-v6", gio::Socket::static_type()) + glib::ParamSpecObject::builder::("socket-v6") .nick("Socket V6") .blurb("IPV6 Socket to use for UDP transmission. (None == allocate)") .build(), - glib::ParamSpecObject::builder("used-socket-v6", gio::Socket::static_type()) + glib::ParamSpecObject::builder::("used-socket-v6") .nick("Used Socket V6") .blurb("V6 Socket currently in use for UDP transmission. (None = no socket)") .read_only() diff --git a/generic/threadshare/src/udpsrc/imp.rs b/generic/threadshare/src/udpsrc/imp.rs index e1160e45..78c9acd2 100644 --- a/generic/threadshare/src/udpsrc/imp.rs +++ b/generic/threadshare/src/udpsrc/imp.rs @@ -676,7 +676,7 @@ impl ObjectImpl for UdpSrc { .blurb("Allow reuse of the port") .default_value(DEFAULT_REUSE) .build(), - glib::ParamSpecBoxed::builder("caps", gst::Caps::static_type()) + glib::ParamSpecBoxed::builder::("caps") .nick("Caps") .blurb("Caps to use") .build(), @@ -696,13 +696,13 @@ impl ObjectImpl for UdpSrc { #[cfg(not(windows))] { properties.push( - glib::ParamSpecObject::builder("socket", gio::Socket::static_type()) + glib::ParamSpecObject::builder::("socket") .nick("Socket") .blurb("Socket to use for UDP reception. (None == allocate)") .build(), ); properties.push( - glib::ParamSpecObject::builder("used-socket", gio::Socket::static_type()) + glib::ParamSpecObject::builder::("used-socket") .nick("Used Socket") .blurb("Socket currently in use for UDP reception. (None = no socket)") .read_only() diff --git a/generic/threadshare/tests/pad.rs b/generic/threadshare/tests/pad.rs index 3d2dfc3e..424df29b 100644 --- a/generic/threadshare/tests/pad.rs +++ b/generic/threadshare/tests/pad.rs @@ -636,14 +636,12 @@ mod imp_sink { impl ObjectImpl for ElementSinkTest { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { - vec![ - glib::ParamSpecBoxed::builder("sender", ItemSender::static_type()) - .nick("Sender") - .blurb("Channel sender to forward the incoming items to") - .write_only() - .construct_only() - .build(), - ] + vec![glib::ParamSpecBoxed::builder::("sender") + .nick("Sender") + .blurb("Channel sender to forward the incoming items to") + .write_only() + .construct_only() + .build()] }); PROPERTIES.as_ref() diff --git a/net/aws/src/aws_transcriber/imp.rs b/net/aws/src/aws_transcriber/imp.rs index 21e5f8ca..ad6677bc 100644 --- a/net/aws/src/aws_transcriber/imp.rs +++ b/net/aws/src/aws_transcriber/imp.rs @@ -1210,10 +1210,9 @@ impl ObjectImpl for Transcriber { .blurb("The ID of the transcription session, must be length 36") .mutable_ready() .build(), - glib::ParamSpecEnum::builder("results-stability", AwsTranscriberResultStability::static_type()) + glib::ParamSpecEnum::builder::("results-stability", DEFAULT_STABILITY) .nick("Results stability") .blurb("Defines how fast results should stabilize") - .default_value(DEFAULT_STABILITY as i32) .mutable_ready() .build(), glib::ParamSpecString::builder("access-key") @@ -1238,10 +1237,9 @@ impl ObjectImpl for Transcriber { for more information") .mutable_ready() .build(), - glib::ParamSpecEnum::builder("vocabulary-filter-method", AwsTranscriberVocabularyFilterMethod::static_type()) + glib::ParamSpecEnum::builder::("vocabulary-filter-method", DEFAULT_VOCABULARY_FILTER_METHOD) .nick("Vocabulary Filter Method") .blurb("Defines how filtered words will be edited, has no effect when vocabulary-filter-name isn't set") - .default_value(DEFAULT_VOCABULARY_FILTER_METHOD as i32) .mutable_ready() .build(), ] diff --git a/net/aws/src/s3hlssink/imp.rs b/net/aws/src/s3hlssink/imp.rs index 37651598..23a7ff94 100644 --- a/net/aws/src/s3hlssink/imp.rs +++ b/net/aws/src/s3hlssink/imp.rs @@ -463,7 +463,7 @@ impl ObjectImpl for S3HlsSink { .blurb("The AWS region for the S3 bucket (e.g. eu-west-2).") .mutable_ready() .build(), - glib::ParamSpecObject::builder("hlssink", gst::Element::static_type()) + glib::ParamSpecObject::builder::("hlssink") .nick("HLS Sink") .blurb("The underlying HLS sink being used") .read_only() diff --git a/net/aws/src/s3sink/imp.rs b/net/aws/src/s3sink/imp.rs index 118b5ec7..f98c1fb8 100644 --- a/net/aws/src/s3sink/imp.rs +++ b/net/aws/src/s3sink/imp.rs @@ -701,15 +701,14 @@ impl ObjectImpl for S3Sink { .blurb("AWS temporary Session Token from STS") .mutable_ready() .build(), - glib::ParamSpecBoxed::builder("metadata", gst::Structure::static_type()) + glib::ParamSpecBoxed::builder::("metadata") .nick("Metadata") .blurb("A map of metadata to store with the object in S3; field values need to be convertible to strings.") .mutable_ready() .build(), - glib::ParamSpecEnum::builder("on-error", OnError::static_type()) + glib::ParamSpecEnum::builder::("on-error", DEFAULT_MULTIPART_UPLOAD_ON_ERROR) .nick("Whether to upload or complete the multipart upload on error") .blurb("Do nothing, abort or complete a multipart upload request on error") - .default_value(DEFAULT_MULTIPART_UPLOAD_ON_ERROR as i32) .mutable_ready() .build(), glib::ParamSpecUInt::builder("retry-attempts") diff --git a/net/hlssink3/src/imp.rs b/net/hlssink3/src/imp.rs index 4ee17a88..78c97480 100644 --- a/net/hlssink3/src/imp.rs +++ b/net/hlssink3/src/imp.rs @@ -456,10 +456,9 @@ impl ObjectImpl for HlsSink3 { .blurb("Length of HLS playlist. To allow players to conform to section 6.3.3 of the HLS specification, this should be at least 3. If set to 0, the playlist will be infinite.") .default_value(DEFAULT_PLAYLIST_LENGTH) .build(), - glib::ParamSpecEnum::builder("playlist-type", HlsSink3PlaylistType::static_type()) + glib::ParamSpecEnum::builder::("playlist-type", DEFAULT_PLAYLIST_TYPE) .nick("Playlist Type") .blurb("The type of the playlist to use. When VOD type is set, the playlist will be live until the pipeline ends execution.") - .default_value(DEFAULT_PLAYLIST_TYPE as i32) .build(), glib::ParamSpecBoolean::builder("send-keyframe-requests") .nick("Send Keyframe Requests") diff --git a/net/raptorq/src/raptorqdec/imp.rs b/net/raptorq/src/raptorqdec/imp.rs index 74ae64ed..7b30946a 100644 --- a/net/raptorq/src/raptorqdec/imp.rs +++ b/net/raptorq/src/raptorqdec/imp.rs @@ -677,7 +677,7 @@ impl ObjectImpl for RaptorqDec { .default_value(DEFAULT_MEDIA_PACKETS_RESET_THRESHOLD) .mutable_ready() .build(), - glib::ParamSpecBoxed::builder("stats", gst::Structure::static_type()) + glib::ParamSpecBoxed::builder::("stats") .nick("Statistics") .blurb("Various statistics") .read_only() diff --git a/net/reqwest/src/reqwesthttpsrc/imp.rs b/net/reqwest/src/reqwesthttpsrc/imp.rs index 752eebe8..9e5d6254 100644 --- a/net/reqwest/src/reqwesthttpsrc/imp.rs +++ b/net/reqwest/src/reqwesthttpsrc/imp.rs @@ -674,7 +674,7 @@ impl ObjectImpl for ReqwestHttpSrc { let mut user_agent_pspec = glib::ParamSpecString::builder("user-agent") .nick("User-Agent") .blurb("Value of the User-Agent HTTP request header field") - .default_value("GStreamer reqwesthttpsrc".into()) + .default_value("GStreamer reqwesthttpsrc") .readwrite() .readwrite() .mutable_ready(); @@ -726,13 +726,13 @@ impl ObjectImpl for ReqwestHttpSrc { .readwrite() .mutable_ready() .build(), - glib::ParamSpecBoxed::builder("extra-headers", gst::Structure::static_type()) + glib::ParamSpecBoxed::builder::("extra-headers") .nick("Extra Headers") .blurb("Extra headers to append to the HTTP request") .readwrite() .mutable_ready() .build(), - glib::ParamSpecBoxed::builder("cookies", Vec::::static_type()) + glib::ParamSpecBoxed::builder::>("cookies") .nick("Cookies") .nick("HTTP request cookies") .readwrite() diff --git a/text/ahead/src/textahead/imp.rs b/text/ahead/src/textahead/imp.rs index b658fcf8..61bb0277 100644 --- a/text/ahead/src/textahead/imp.rs +++ b/text/ahead/src/textahead/imp.rs @@ -116,20 +116,20 @@ impl ObjectImpl for TextAhead { glib::ParamSpecString::builder("separator") .nick("Separator") .blurb("Text inserted between each text buffers") - .default_value(Some(&default.separator)) + .default_value(&*default.separator) .mutable_playing() .build(), // See https://developer.gimp.org/api/2.0/pango/PangoMarkupFormat.html for pango attributes glib::ParamSpecString::builder("current-attributes") .nick("Current attributes") .blurb("Pango span attributes to set on the text from the current buffer") - .default_value(Some(&default.current_attributes)) + .default_value(&*default.current_attributes) .mutable_playing() .build(), glib::ParamSpecString::builder("ahead-attributes") .nick("Ahead attributes") .blurb("Pango span attributes to set on the ahead text") - .default_value(Some(&default.ahead_attributes)) + .default_value(&*default.ahead_attributes) .mutable_playing() .build(), glib::ParamSpecBoolean::builder("buffer-start-segment") diff --git a/text/regex/src/gstregex/imp.rs b/text/regex/src/gstregex/imp.rs index 6a97bb4c..bfb8faa9 100644 --- a/text/regex/src/gstregex/imp.rs +++ b/text/regex/src/gstregex/imp.rs @@ -145,7 +145,7 @@ impl ObjectImpl for RegEx { .nick("Commands") .blurb("A set of commands to apply on input text") .element_spec( - &glib::ParamSpecBoxed::builder("command", gst::Structure::static_type()) + &glib::ParamSpecBoxed::builder::("command") .nick("Command") .blurb("A command to apply on input text") .build(), diff --git a/tutorial/src/progressbin/imp.rs b/tutorial/src/progressbin/imp.rs index 26b7f85b..d80e2a88 100644 --- a/tutorial/src/progressbin/imp.rs +++ b/tutorial/src/progressbin/imp.rs @@ -83,10 +83,9 @@ impl ObjectImpl for ProgressBin { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { vec![ - glib::ParamSpecEnum::builder("output", ProgressBinOutput::static_type()) + glib::ParamSpecEnum::builder::("output", DEFAULT_OUTPUT_TYPE) .nick("Output") .blurb("Defines the output type of the progressbin") - .default_value(DEFAULT_OUTPUT_TYPE as i32) .mutable_playing() .build(), ] diff --git a/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs b/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs index f5ef8922..2bc2afdd 100644 --- a/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs +++ b/utils/fallbackswitch/src/fallbacksrc/custom_source/imp.rs @@ -57,14 +57,12 @@ impl ObjectSubclass for CustomSource { impl ObjectImpl for CustomSource { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { - vec![ - glib::ParamSpecObject::builder("source", gst::Element::static_type()) - .nick("Source") - .blurb("Source") - .write_only() - .construct_only() - .build(), - ] + vec![glib::ParamSpecObject::builder::("source") + .nick("Source") + .blurb("Source") + .write_only() + .construct_only() + .build()] }); PROPERTIES.as_ref() diff --git a/utils/fallbackswitch/src/fallbacksrc/imp.rs b/utils/fallbackswitch/src/fallbacksrc/imp.rs index ad54e2e1..907c007e 100644 --- a/utils/fallbackswitch/src/fallbacksrc/imp.rs +++ b/utils/fallbackswitch/src/fallbacksrc/imp.rs @@ -215,7 +215,7 @@ impl ObjectImpl for FallbackSrc { .blurb("URI to use") .mutable_ready() .build(), - glib::ParamSpecObject::builder("source", gst::Element::static_type()) + glib::ParamSpecObject::builder::("source") .nick("Source") .blurb("Source to use instead of the URI") .mutable_ready() @@ -252,10 +252,9 @@ impl ObjectImpl for FallbackSrc { .default_value(false) .mutable_ready() .build(), - glib::ParamSpecEnum::builder("status", Status::static_type()) + glib::ParamSpecEnum::builder::("status", Status::Stopped) .nick("Status") .blurb("Current source status") - .default_value(Status::Stopped as i32) .read_only() .build(), glib::ParamSpecUInt64::builder("min-latency") @@ -274,7 +273,7 @@ impl ObjectImpl for FallbackSrc { .default_value(-1) .mutable_ready() .build(), - glib::ParamSpecBoxed::builder("statistics", gst::Structure::static_type()) + glib::ParamSpecBoxed::builder::("statistics") .nick("Statistics") .blurb("Various statistics") .read_only() @@ -291,12 +290,12 @@ impl ObjectImpl for FallbackSrc { .default_value(false) .mutable_ready() .build(), - glib::ParamSpecBoxed::builder("fallback-video-caps", gst::Caps::static_type()) + glib::ParamSpecBoxed::builder::("fallback-video-caps") .nick("Fallback Video Caps") .blurb("Raw video caps for fallback stream") .mutable_ready() .build(), - glib::ParamSpecBoxed::builder("fallback-audio-caps", gst::Caps::static_type()) + glib::ParamSpecBoxed::builder::("fallback-audio-caps") .nick("Fallback Audio Caps") .blurb("Raw audio caps for fallback stream") .mutable_ready() diff --git a/utils/fallbackswitch/src/fallbackswitch/imp.rs b/utils/fallbackswitch/src/fallbackswitch/imp.rs index 03cc29b5..8567ac2b 100644 --- a/utils/fallbackswitch/src/fallbackswitch/imp.rs +++ b/utils/fallbackswitch/src/fallbackswitch/imp.rs @@ -1068,7 +1068,7 @@ impl ObjectImpl for FallbackSwitch { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { vec![ - glib::ParamSpecObject::builder(PROP_ACTIVE_PAD, gst::Pad::static_type()) + glib::ParamSpecObject::builder::(PROP_ACTIVE_PAD) .nick("Active Pad") .blurb("Currently active pad") .mutable_playing() diff --git a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs index 2ea95bc7..8953d03e 100644 --- a/utils/uriplaylistbin/src/uriplaylistbin/imp.rs +++ b/utils/uriplaylistbin/src/uriplaylistbin/imp.rs @@ -737,7 +737,7 @@ impl ObjectImpl for UriPlaylistBin { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { vec![ - glib::ParamSpecBoxed::builder("uris", Vec::::static_type()) + glib::ParamSpecBoxed::builder::>("uris") .nick("URIs") .blurb("URIs of the medias to play") .mutable_ready() diff --git a/video/closedcaption/src/mcc_enc/imp.rs b/video/closedcaption/src/mcc_enc/imp.rs index ff766b09..a401450e 100644 --- a/video/closedcaption/src/mcc_enc/imp.rs +++ b/video/closedcaption/src/mcc_enc/imp.rs @@ -481,7 +481,7 @@ impl ObjectImpl for MccEnc { .blurb("UUID for the output file") .mutable_ready() .build(), - glib::ParamSpecBoxed::builder("creation-date", glib::DateTime::static_type()) + glib::ParamSpecBoxed::builder::("creation-date") .nick("Creation Date") .blurb("Creation date for the output file") .mutable_ready() diff --git a/video/closedcaption/src/transcriberbin/imp.rs b/video/closedcaption/src/transcriberbin/imp.rs index 671a6baa..fa4c275f 100644 --- a/video/closedcaption/src/transcriberbin/imp.rs +++ b/video/closedcaption/src/transcriberbin/imp.rs @@ -616,28 +616,26 @@ impl ObjectImpl for TranscriberBin { .default_value(DEFAULT_ACCUMULATE.mseconds() as u32) .mutable_ready() .build(), - glib::ParamSpecEnum::builder("mode", Cea608Mode::static_type()) + glib::ParamSpecEnum::builder::("mode", DEFAULT_MODE) .nick("Mode") .blurb("Which closed caption mode to operate in") - .default_value(DEFAULT_MODE as i32) .mutable_playing() .build(), - glib::ParamSpecBoxed::builder("cc-caps", gst::Caps::static_type()) + glib::ParamSpecBoxed::builder::("cc-caps") .nick("Closed Caption caps") .blurb("The expected format of the closed captions") .mutable_ready() .build(), - glib::ParamSpecObject::builder("transcriber", gst::Element::static_type()) + glib::ParamSpecObject::builder::("transcriber") .nick("Transcriber") .blurb("The transcriber element to use") .mutable_ready() .build(), - glib::ParamSpecEnum::builder("caption-source", CaptionSource::static_type()) + glib::ParamSpecEnum::builder::("caption-source", DEFAULT_CAPTION_SOURCE) .nick("Caption source") .blurb("Caption source to use. \ If \"Transcription\" or \"Inband\" is selected, the caption meta \ of the other source will be dropped by transcriberbin") - .default_value(DEFAULT_CAPTION_SOURCE as i32) .mutable_playing() .build(), ] diff --git a/video/closedcaption/src/tttocea608/imp.rs b/video/closedcaption/src/tttocea608/imp.rs index 0846d041..c20ff2fb 100644 --- a/video/closedcaption/src/tttocea608/imp.rs +++ b/video/closedcaption/src/tttocea608/imp.rs @@ -1061,10 +1061,9 @@ impl ObjectImpl for TtToCea608 { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { vec![ - glib::ParamSpecEnum::builder("mode", Cea608Mode::static_type()) + glib::ParamSpecEnum::builder::("mode", DEFAULT_MODE) .nick("Mode") .blurb("Which mode to operate in") - .default_value(DEFAULT_MODE as i32) .mutable_playing() .build(), glib::ParamSpecInt::builder("origin-row") diff --git a/video/closedcaption/src/tttojson/imp.rs b/video/closedcaption/src/tttojson/imp.rs index ec0d7eff..4efc494f 100644 --- a/video/closedcaption/src/tttojson/imp.rs +++ b/video/closedcaption/src/tttojson/imp.rs @@ -224,10 +224,9 @@ impl ObjectImpl for TtToJson { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { vec![ - glib::ParamSpecEnum::builder("mode", Cea608Mode::static_type()) + glib::ParamSpecEnum::builder::("mode", DEFAULT_MODE) .nick("Mode") .blurb("Which mode to operate in") - .default_value(DEFAULT_MODE as i32) .mutable_ready() .build(), ] diff --git a/video/gtk4/src/sink/imp.rs b/video/gtk4/src/sink/imp.rs index c36faa26..054c3e72 100644 --- a/video/gtk4/src/sink/imp.rs +++ b/video/gtk4/src/sink/imp.rs @@ -69,7 +69,7 @@ impl ObjectImpl for PaintableSink { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { vec![ - glib::ParamSpecObject::builder("paintable", gtk::gdk::Paintable::static_type()) + glib::ParamSpecObject::builder::("paintable") .nick("Paintable") .blurb("The Paintable the sink renders to") .read_only() diff --git a/video/rav1e/src/rav1enc/imp.rs b/video/rav1e/src/rav1enc/imp.rs index c19b0235..ce459dcc 100644 --- a/video/rav1e/src/rav1enc/imp.rs +++ b/video/rav1e/src/rav1enc/imp.rs @@ -319,10 +319,9 @@ impl ObjectImpl for Rav1Enc { .default_value(DEFAULT_RDO_LOOKAHEAD_FRAMES) .mutable_ready() .build(), - glib::ParamSpecEnum::builder("tune", Tune::static_type()) + glib::ParamSpecEnum::builder::("tune", DEFAULT_TUNE) .nick("Tune") .blurb("Tune") - .default_value(DEFAULT_TUNE as i32) .mutable_ready() .build(), glib::ParamSpecInt::builder("reservoir-frame-delay") diff --git a/video/rspng/src/pngenc/imp.rs b/video/rspng/src/pngenc/imp.rs index 9fca75ad..04b82ec3 100644 --- a/video/rspng/src/pngenc/imp.rs +++ b/video/rspng/src/pngenc/imp.rs @@ -176,16 +176,17 @@ impl ObjectImpl for PngEncoder { fn properties() -> &'static [glib::ParamSpec] { static PROPERTIES: Lazy> = Lazy::new(|| { vec![ - glib::ParamSpecEnum::builder("compression-level", CompressionLevel::static_type()) - .nick("Compression level") - .blurb("Selects the compression algorithm to use") - .default_value(DEFAULT_COMPRESSION_LEVEL as i32) - .mutable_ready() - .build(), - glib::ParamSpecEnum::builder("filter", FilterType::static_type()) + glib::ParamSpecEnum::builder::( + "compression-level", + DEFAULT_COMPRESSION_LEVEL, + ) + .nick("Compression level") + .blurb("Selects the compression algorithm to use") + .mutable_ready() + .build(), + glib::ParamSpecEnum::builder::("filter", DEFAULT_FILTER_TYPE) .nick("Filter") .blurb("Selects the filter type to applied") - .default_value(DEFAULT_FILTER_TYPE as i32) .mutable_ready() .build(), ]