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

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/net/rtp
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2023-01-21 19:34:55 +0300
committerSebastian Dröge <sebastian@centricular.com>2023-01-21 19:34:55 +0300
commit4582ae91ab4cc14b17c01a6ba8494fdb0f66f177 (patch)
treeb69a0fd297cbda29650c52ed212537198223fe15 /net/rtp
parent458b2386ed5c3cdfde45b0eab127220f0431bf0d (diff)
Move remaining plugins to `ParamSpec` builders
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1054>
Diffstat (limited to 'net/rtp')
-rw-r--r--net/rtp/src/gcc/imp.rs59
1 files changed, 26 insertions, 33 deletions
diff --git a/net/rtp/src/gcc/imp.rs b/net/rtp/src/gcc/imp.rs
index 383216d3..4f8f24c9 100644
--- a/net/rtp/src/gcc/imp.rs
+++ b/net/rtp/src/gcc/imp.rs
@@ -18,11 +18,7 @@
*
*/
use chrono::Duration;
-use gst::{
- glib::{self},
- prelude::*,
- subclass::prelude::*,
-};
+use gst::{glib, prelude::*, subclass::prelude::*};
use once_cell::sync::Lazy;
use std::{
collections::{BTreeMap, VecDeque},
@@ -1247,35 +1243,32 @@ impl ObjectImpl for BandwidthEstimator {
* Currently computed network bitrate, should be used
* to set encoders bitrate.
*/
- glib::ParamSpecUInt::new(
- "estimated-bitrate",
- "Estimated Bitrate",
- "Currently estimated bitrate. Can be set before starting
+ glib::ParamSpecUInt::builder("estimated-bitrate")
+ .nick("Estimated Bitrate")
+ .blurb("Currently estimated bitrate. Can be set before starting
the element to configure the starting bitrate, in which case the
- encoder should also use it as target bitrate",
- 1,
- u32::MAX,
- DEFAULT_MIN_BITRATE,
- glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
- ),
- glib::ParamSpecUInt::new(
- "min-bitrate",
- "Minimal Bitrate",
- "Minimal bitrate to use (in bit/sec) when computing it through the bandwidth estimation algorithm",
- 1,
- u32::MAX,
- DEFAULT_MIN_BITRATE,
- glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
- ),
- glib::ParamSpecUInt::new(
- "max-bitrate",
- "Maximal Bitrate",
- "Maximal bitrate to use (in bit/sec) when computing it through the bandwidth estimation algorithm",
- 1,
- u32::MAX,
- DEFAULT_MAX_BITRATE,
- glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
- ),
+ encoder should also use it as target bitrate")
+ .minimum(1)
+ .maximum(u32::MAX)
+ .default_value(DEFAULT_MIN_BITRATE)
+ .mutable_ready()
+ .build(),
+ glib::ParamSpecUInt::builder("min-bitrate")
+ .nick("Minimal Bitrate")
+ .blurb("Minimal bitrate to use (in bit/sec) when computing it through the bandwidth estimation algorithm")
+ .minimum(1)
+ .maximum(u32::MAX)
+ .default_value(DEFAULT_MIN_BITRATE)
+ .mutable_ready()
+ .build(),
+ glib::ParamSpecUInt::builder("max-bitrate")
+ .nick("Maximal Bitrate")
+ .blurb("Maximal bitrate to use (in bit/sec) when computing it through the bandwidth estimation algorithm")
+ .minimum(1)
+ .maximum(u32::MAX)
+ .default_value(DEFAULT_MAX_BITRATE)
+ .mutable_ready()
+ .build(),
]
});