plugins: Simplify code using ParamSpecBuilder

This commit is contained in:
Vivia Nikolaidou 2022-08-18 15:04:15 +03:00
parent 84f6484140
commit 5606111345
63 changed files with 1871 additions and 2462 deletions

View file

@ -96,40 +96,36 @@ impl ObjectImpl for AudioEcho {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecUInt64::new("max-delay", glib::ParamSpecUInt64::builder("max-delay")
"Maximum Delay", .nick("Maximum Delay")
"Maximum delay of the echo in nanoseconds (can't be changed in PLAYING or PAUSED state)", .blurb("Maximum delay of the echo in nanoseconds (can't be changed in PLAYING or PAUSED state)")
0, u64::MAX - 1, .maximum(u64::MAX - 1)
DEFAULT_MAX_DELAY.nseconds(), .default_value(DEFAULT_MAX_DELAY.nseconds())
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .mutable_ready()
), .build(),
glib::ParamSpecUInt64::new( glib::ParamSpecUInt64::builder("delay")
"delay", .nick("Delay")
"Delay", .blurb("Delay of the echo in nanoseconds")
"Delay of the echo in nanoseconds", .maximum(u64::MAX - 1)
0, .default_value(DEFAULT_DELAY.nseconds())
u64::MAX - 1, .mutable_ready()
DEFAULT_DELAY.nseconds(), .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, glib::ParamSpecDouble::builder("intensity")
), .nick("Intensity")
glib::ParamSpecDouble::new( .blurb("Intensity of the echo")
"intensity", .minimum(0.0)
"Intensity", .maximum(1.0)
"Intensity of the echo", .default_value(DEFAULT_INTENSITY)
0.0, .mutable_ready()
1.0, .build(),
DEFAULT_INTENSITY, glib::ParamSpecDouble::builder("feedback")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .nick("Feedback")
), .blurb("Amount of feedback")
glib::ParamSpecDouble::new( .minimum(0.0)
"feedback", .maximum(1.0)
"Feedback", .default_value(DEFAULT_FEEDBACK)
"Amount of feedback", .mutable_ready()
0.0, .build(),
1.0,
DEFAULT_FEEDBACK,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
] ]
}); });

View file

@ -1762,42 +1762,38 @@ impl ObjectImpl for AudioLoudNorm {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecDouble::new( glib::ParamSpecDouble::builder("loudness-target")
"loudness-target", .nick("Loudness Target")
"Loudness Target", .blurb("Loudness target in LUFS")
"Loudness target in LUFS", .minimum(-70.0)
-70.0, .maximum(-5.0)
-5.0, .default_value(DEFAULT_LOUDNESS_TARGET)
DEFAULT_LOUDNESS_TARGET, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecDouble::builder("loudness-range-target")
glib::ParamSpecDouble::new( .nick("Loudness Range Target")
"loudness-range-target", .blurb("Loudness range target in LU")
"Loudness Range Target", .minimum(1.0)
"Loudness range target in LU", .maximum(20.0)
1.0, .default_value(DEFAULT_LOUDNESS_RANGE_TARGET)
20.0, .mutable_ready()
DEFAULT_LOUDNESS_RANGE_TARGET, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecDouble::builder("max-true-peak")
), .nick("Maximum True Peak")
glib::ParamSpecDouble::new( .blurb("Maximum True Peak in dbTP")
"max-true-peak", .minimum(-9.0)
"Maximum True Peak", .maximum(0.0)
"Maximum True Peak in dbTP", .default_value(DEFAULT_MAX_TRUE_PEAK)
-9.0, .mutable_ready()
0.0, .build(),
DEFAULT_MAX_TRUE_PEAK, glib::ParamSpecDouble::builder("offset")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Offset Gain")
), .blurb("Offset Gain in LU")
glib::ParamSpecDouble::new( .minimum(-99.0)
"offset", .maximum(99.0)
"Offset Gain", .default_value(DEFAULT_OFFSET)
"Offset Gain in LU", .mutable_ready()
-99.0, .build(),
99.0,
DEFAULT_OFFSET,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -144,30 +144,25 @@ impl ObjectImpl for EbuR128Level {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecFlags::new( glib::ParamSpecFlags::builder("mode", Mode::static_type())
"mode", .nick("Mode")
"Mode", .blurb("Selection of metrics to calculate")
"Selection of metrics to calculate", .default_value(DEFAULT_MODE.bits() as u32)
Mode::static_type(), .mutable_ready()
DEFAULT_MODE.bits() as u32, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecBoolean::builder("post-messages")
), .nick("Post Messages")
glib::ParamSpecBoolean::new( .blurb("Whether to post messages on the bus for each interval")
"post-messages", .default_value(DEFAULT_POST_MESSAGES)
"Post Messages", .mutable_playing()
"Whether to post messages on the bus for each interval", .build(),
DEFAULT_POST_MESSAGES, glib::ParamSpecUInt64::builder("interval")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .nick("Interval")
), .blurb("Interval in nanoseconds for posting messages")
glib::ParamSpecUInt64::new( .maximum(u64::MAX - 1)
"interval", .default_value(DEFAULT_INTERVAL.nseconds())
"Interval", .mutable_ready()
"Interval in nanoseconds for posting messages", .build(),
0,
u64::MAX - 1,
DEFAULT_INTERVAL.nseconds(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -404,51 +404,44 @@ impl ObjectImpl for HrtfRender {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecBoxed::new( glib::ParamSpecBoxed::builder("hrir-raw", glib::Bytes::static_type())
"hrir-raw", .nick("Head Transform Impulse Response")
"Head Transform Impulse Response", .blurb("Head Transform Impulse Response raw bytes")
"Head Transform Impulse Response raw bytes", .mutable_ready()
glib::Bytes::static_type(), .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecString::builder("hrir-file")
), .nick("Head Transform Impulse Response")
glib::ParamSpecString::new( .blurb("Head Transform Impulse Response file location to read from")
"hrir-file", .mutable_ready()
"Head Transform Impulse Response", .build(),
"Head Transform Impulse Response file location to read from", glib::ParamSpecUInt64::builder("interpolation-steps")
None, .nick("Interpolation Steps")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .blurb("Interpolation Steps is the amount of slices to cut source to")
), .maximum(u64::MAX - 1)
glib::ParamSpecUInt64::new( .default_value(DEFAULT_INTERPOLATION_STEPS)
"interpolation-steps", .mutable_ready()
"Interpolation Steps", .build(),
"Interpolation Steps is the amount of slices to cut source to", glib::ParamSpecUInt64::builder("block-length")
0, .nick("Block Length")
u64::MAX - 1, .blurb("Block Length is the length of each slice")
DEFAULT_INTERPOLATION_STEPS, .maximum(u64::MAX - 1)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .default_value(DEFAULT_BLOCK_LENGTH)
), .mutable_ready()
glib::ParamSpecUInt64::new( .build(),
"block-length", gst::ParamSpecArray::builder("spatial-objects")
"Block Length", .element_spec(
"Block Length is the length of each slice", &glib::ParamSpecBoxed::builder(
0, "spatial-object",
u64::MAX - 1, gst::Structure::static_type(),
DEFAULT_BLOCK_LENGTH, )
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Spatial Object")
), .blurb("Spatial Object Metadata")
gst::ParamSpecArray::new( .build(),
"spatial-objects", )
"Spatial Objects", .nick("Spatial Objects")
"Spatial object Metadata to apply on input channels", .blurb("Spatial object Metadata to apply on input channels")
Some(&glib::ParamSpecBoxed::new( .mutable_playing()
"spatial-object", .build(),
"Spatial Object",
"Spatial Object Metadata",
gst::Structure::static_type(),
glib::ParamFlags::READWRITE,
)),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
] ]
}); });

View file

@ -336,38 +336,31 @@ impl ObjectImpl for CsoundFilter {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecBoolean::new( glib::ParamSpecBoolean::builder("loop")
"loop", .nick("Loop")
"Loop", .blurb("loop over the score (can be changed in PLAYING or PAUSED state)")
"loop over the score (can be changed in PLAYING or PAUSED state)", .default_value(DEFAULT_LOOP)
DEFAULT_LOOP, .mutable_playing()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .build(),
), glib::ParamSpecString::builder("location")
glib::ParamSpecString::new( .nick("Location")
"location", .blurb("Location of the csd file to be used by csound.
"Location", Use either location or CSD-text but not both at the same time, if so and error would be triggered")
"Location of the csd file to be used by csound. .mutable_ready()
Use either location or CSD-text but not both at the same time, if so and error would be triggered", .build(),
None, glib::ParamSpecString::builder("csd-text")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("CSD-text")
), .blurb("The content of a csd file passed as a String.
glib::ParamSpecString::new( Use either location or csd-text but not both at the same time, if so and error would be triggered")
"csd-text", .mutable_ready()
"CSD-text", .build(),
"The content of a csd file passed as a String. glib::ParamSpecDouble::builder("score-offset")
Use either location or csd-text but not both at the same time, if so and error would be triggered", .nick("Score Offset")
None, .blurb("Score offset in seconds to start the performance")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .minimum(0.0)
), .default_value(SCORE_OFFSET_DEFAULT)
glib::ParamSpecDouble::new( .mutable_ready()
"score-offset", .build(),
"Score Offset",
"Score offset in seconds to start the performance",
0.0,
f64::MAX,
SCORE_OFFSET_DEFAULT,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -88,48 +88,42 @@ impl ObjectSubclass for SpotifyAudioSrc {
impl ObjectImpl for SpotifyAudioSrc { impl ObjectImpl for SpotifyAudioSrc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecString::new( vec![glib::ParamSpecString::builder("username")
"username", .nick("Username")
"Username", .blurb("Spotify device username from https://www.spotify.com/us/account/set-device-password/")
"Spotify device username from https://www.spotify.com/us/account/set-device-password/", .default_value(Some(""))
Some(""), .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecString::builder("password")
glib::ParamSpecString::new( .nick("Password")
"password", .blurb("Spotify device password from https://www.spotify.com/us/account/set-device-password/")
"Password", .default_value(Some(""))
"Spotify device password from https://www.spotify.com/us/account/set-device-password/", .mutable_ready()
Some(""), .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecString::builder("cache-credentials")
), .nick("Credentials cache")
glib::ParamSpecString::new( .blurb("Directory where to cache Spotify credentials")
"cache-credentials", .default_value(Some(""))
"Credentials cache", .mutable_ready()
"Directory where to cache Spotify credentials", .build(),
Some(""), glib::ParamSpecString::builder("cache-files")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Files cache")
), .blurb("Directory where to cache downloaded files from Spotify")
glib::ParamSpecString::new( .default_value(Some(""))
"cache-files", .mutable_ready()
"Files cache", .build(),
"Directory where to cache downloaded files from Spotify", glib::ParamSpecUInt64::builder("cache-max-size")
Some(""), .nick("Cache max size")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .blurb("The max allowed size of the cache, in bytes, or 0 to disable the cache limit")
), .default_value(0)
glib::ParamSpecUInt64::new( .mutable_ready()
"cache-max-size", .build(),
"Cache max size", glib::ParamSpecString::builder("track")
"The max allowed size of the cache, in bytes, or 0 to disable the cache limit", .nick("Spotify URI")
0, u64::MAX, 0, .blurb("Spotify track URI, in the form 'spotify:track:$SPOTIFY_ID'")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .default_value(Some(""))
), .mutable_ready()
glib::ParamSpecString::new( .build(),
"track",
"Spotify URI",
"Spotify track URI, in the form 'spotify:track:$SPOTIFY_ID'",
Some(""),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -118,13 +118,10 @@ impl ObjectSubclass for FileSink {
impl ObjectImpl for FileSink { impl ObjectImpl for FileSink {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecString::new( vec![glib::ParamSpecString::builder("location")
"location", .nick("File Location")
"File Location", .blurb("Location of the file to write")
"Location of the file to write", .build()]
None,
glib::ParamFlags::READWRITE,
)]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -132,13 +132,11 @@ impl ObjectSubclass for FileSrc {
impl ObjectImpl for FileSrc { impl ObjectImpl for FileSrc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecString::new( vec![glib::ParamSpecString::builder("location")
"location", .nick("File Location")
"File Location", .blurb("Location of the file to read from")
"Location of the file to read from", .mutable_ready()
None, .build()]
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
)]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -1544,56 +1544,42 @@ impl ObjectImpl for FMP4Mux {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
// TODO: Add chunk-duration property separate from fragment-size // TODO: Add chunk-duration property separate from fragment-size
glib::ParamSpecUInt64::new( glib::ParamSpecUInt64::builder("fragment-duration")
"fragment-duration", .nick("Fragment Duration")
"Fragment Duration", .blurb("Duration for each FMP4 fragment")
"Duration for each FMP4 fragment", .default_value(DEFAULT_FRAGMENT_DURATION.nseconds())
0, .mutable_ready()
u64::MAX, .build(),
DEFAULT_FRAGMENT_DURATION.nseconds(), glib::ParamSpecEnum::builder("header-update-mode", super::HeaderUpdateMode::static_type())
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Header update mode")
), .blurb("Mode for updating the header at the end of the stream")
glib::ParamSpecEnum::new( .default_value(DEFAULT_HEADER_UPDATE_MODE as i32)
"header-update-mode", .mutable_ready()
"Header update mode", .build(),
"Mode for updating the header at the end of the stream", glib::ParamSpecBoolean::builder("write-mfra")
super::HeaderUpdateMode::static_type(), .nick("Write mfra box")
DEFAULT_HEADER_UPDATE_MODE as i32, .blurb("Write fragment random access box at the end of the stream")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .default_value(DEFAULT_WRITE_MFRA)
), .mutable_ready()
glib::ParamSpecBoolean::new( .build(),
"write-mfra", glib::ParamSpecBoolean::builder("write-mehd")
"Write mfra box", .nick("Write mehd box")
"Write fragment random access box at the end of the stream", .blurb("Write movie extends header box with the duration at the end of the stream (needs a header-update-mode enabled)")
DEFAULT_WRITE_MFRA, .default_value(DEFAULT_WRITE_MFRA)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .mutable_ready()
), .build(),
glib::ParamSpecBoolean::new( glib::ParamSpecUInt64::builder("interleave-bytes")
"write-mehd", .nick("Interleave Bytes")
"Write mehd box", .blurb("Interleave between streams in bytes")
"Write movie extends header box with the duration at the end of the stream (needs a header-update-mode enabled)", .default_value(DEFAULT_INTERLEAVE_BYTES.unwrap_or(0))
DEFAULT_WRITE_MFRA, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecUInt64::builder("interleave-time")
glib::ParamSpecUInt64::new( .nick("Interleave Time")
"interleave-bytes", .blurb("Interleave between streams in nanoseconds")
"Interleave Bytes", .default_value(DEFAULT_INTERLEAVE_TIME.map(gst::ClockTime::nseconds).unwrap_or(u64::MAX))
"Interleave between streams in bytes", .mutable_ready()
0, .build(),
u64::MAX,
DEFAULT_INTERLEAVE_BYTES.unwrap_or(0),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecUInt64::new(
"interleave-time",
"Interleave Time",
"Interleave between streams in nanoseconds",
0,
u64::MAX,
DEFAULT_INTERLEAVE_TIME.map(gst::ClockTime::nseconds).unwrap_or(u64::MAX),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -597,20 +597,15 @@ impl ObjectImpl for Decrypter {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecBoxed::new( glib::ParamSpecBoxed::builder("receiver-key", glib::Bytes::static_type())
"receiver-key", .nick("Receiver Key")
"Receiver Key", .blurb("The private key of the Receiver")
"The private key of the Reeiver", .build(),
glib::Bytes::static_type(), glib::ParamSpecBoxed::builder("sender-key", glib::Bytes::static_type())
glib::ParamFlags::READWRITE, .nick("Sender Key")
), .blurb("The public key of the Sender")
glib::ParamSpecBoxed::new( .write_only()
"sender-key", .build(),
"Sender Key",
"The public key of the Sender",
glib::Bytes::static_type(),
glib::ParamFlags::WRITABLE,
),
] ]
}); });

View file

@ -389,29 +389,21 @@ impl ObjectImpl for Encrypter {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecBoxed::new( glib::ParamSpecBoxed::builder("receiver-key", glib::Bytes::static_type())
"receiver-key", .nick("Receiver Key")
"Receiver Key", .blurb("The public key of the Receiver")
"The public key of the Receiver", .build(),
glib::Bytes::static_type(), glib::ParamSpecBoxed::builder("sender-key", glib::Bytes::static_type())
glib::ParamFlags::READWRITE, .nick("Sender Key")
), .blurb("The private key of the Sender")
glib::ParamSpecBoxed::new( .write_only()
"sender-key", .build(),
"Sender Key", glib::ParamSpecUInt::builder("block-size")
"The private key of the Sender", .nick("Block Size")
glib::Bytes::static_type(), .blurb("The block-size of the chunks")
glib::ParamFlags::WRITABLE, .minimum(1024)
), .default_value(32768)
glib::ParamSpecUInt::new( .build(),
"block-size",
"Block Size",
"The block-size of the chunks",
1024,
std::u32::MAX,
32768,
glib::ParamFlags::READWRITE,
),
] ]
}); });

View file

@ -605,36 +605,28 @@ impl ObjectImpl for TestSink {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("context")
"context", .nick("Context")
"Context", .blurb("Context name to share threads with")
"Context name to share threads with", .default_value(Some(DEFAULT_CONTEXT))
Some(DEFAULT_CONTEXT), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecUInt::builder("context-wait")
), .nick("Context Wait")
glib::ParamSpecUInt::new( .blurb("Throttle poll loop to run at most once every this many ms")
"context-wait", .maximum(1000)
"Context Wait", .default_value(DEFAULT_CONTEXT_WAIT.as_millis() as u32)
"Throttle poll loop to run at most once every this many ms", .build(),
0, glib::ParamSpecBoolean::builder("sync")
1000, .nick("Sync")
DEFAULT_CONTEXT_WAIT.as_millis() as u32, .blurb("Sync on the clock")
glib::ParamFlags::READWRITE, .default_value(DEFAULT_SYNC)
), .build(),
glib::ParamSpecBoolean::new( glib::ParamSpecBoolean::builder("must-log-stats")
"sync", .nick("Must Log Stats")
"Sync", .blurb("Whether statistics should be logged")
"Sync on the clock", .default_value(DEFAULT_MUST_LOG_STATS)
DEFAULT_SYNC, .write_only()
glib::ParamFlags::READWRITE, .build(),
),
glib::ParamSpecBoolean::new(
"must-log-stats",
"Must Log Stats",
"Whether statistics should be logged",
DEFAULT_MUST_LOG_STATS,
glib::ParamFlags::WRITABLE,
),
] ]
}); });

View file

@ -337,31 +337,23 @@ impl ObjectImpl for TestSrc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("context")
"context", .nick("Context")
"Context", .blurb("Context name to share threads with")
"Context name to share threads with", .default_value(Some(DEFAULT_CONTEXT))
Some(DEFAULT_CONTEXT), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecUInt::builder("context-wait")
), .nick("Context Wait")
glib::ParamSpecUInt::new( .blurb("Throttle poll loop to run at most once every this many ms")
"context-wait", .maximum(1000)
"Context Wait", .default_value(DEFAULT_CONTEXT_WAIT.as_millis() as u32)
"Throttle poll loop to run at most once every this many ms", .build(),
0, glib::ParamSpecInt::builder("num-buffers")
1000, .nick("Num Buffers")
DEFAULT_CONTEXT_WAIT.as_millis() as u32, .blurb("Number of buffers to output before sending EOS (-1 = unlimited)")
glib::ParamFlags::READWRITE, .minimum(-1i32)
), .default_value(DEFAULT_NUM_BUFFERS)
glib::ParamSpecInt::new( .build(),
"num-buffers",
"Num Buffers",
"Number of buffers to output before sending EOS (-1 = unlimited)",
-1i32,
i32::MAX,
DEFAULT_NUM_BUFFERS,
glib::ParamFlags::READWRITE,
),
] ]
}); });

View file

@ -459,45 +459,32 @@ impl ObjectImpl for AppSrc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("context")
"context", .nick("Context")
"Context", .blurb("Context name to share threads with")
"Context name to share threads with", .default_value(Some(DEFAULT_CONTEXT))
Some(DEFAULT_CONTEXT), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecUInt::builder("context-wait")
), .nick("Context Wait")
glib::ParamSpecUInt::new( .blurb("Throttle poll loop to run at most once every this many ms")
"context-wait", .maximum(1000)
"Context Wait", .default_value(DEFAULT_CONTEXT_WAIT.as_millis() as u32)
"Throttle poll loop to run at most once every this many ms", .build(),
0, glib::ParamSpecUInt::builder("max-buffers")
1000, .nick("Max Buffers")
DEFAULT_CONTEXT_WAIT.as_millis() as u32, .blurb("Maximum number of buffers to queue up")
glib::ParamFlags::READWRITE, .minimum(1)
), .default_value(DEFAULT_MAX_BUFFERS)
glib::ParamSpecUInt::new( .build(),
"max-buffers", glib::ParamSpecBoxed::builder("caps", gst::Caps::static_type())
"Max Buffers", .nick("Caps")
"Maximum number of buffers to queue up", .blurb("Caps to use")
1, .build(),
u32::MAX, glib::ParamSpecBoolean::builder("do-timestamp")
DEFAULT_MAX_BUFFERS, .nick("Do Timestamp")
glib::ParamFlags::READWRITE, .blurb("Timestamp buffers with the current running time on arrival")
), .default_value(DEFAULT_DO_TIMESTAMP)
glib::ParamSpecBoxed::new( .build(),
"caps",
"Caps",
"Caps to use",
gst::Caps::static_type(),
glib::ParamFlags::READWRITE,
),
glib::ParamSpecBoolean::new(
"do-timestamp",
"Do Timestamp",
"Timestamp buffers with the current running time on arrival",
DEFAULT_DO_TIMESTAMP,
glib::ParamFlags::READWRITE,
),
] ]
}); });

View file

@ -406,29 +406,25 @@ impl ObjectImpl for InputSelector {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("context")
"context", .nick("Context")
"Context", .blurb("Context name to share threads with")
"Context name to share threads with", .default_value(Some(DEFAULT_CONTEXT))
Some(DEFAULT_CONTEXT), .readwrite()
glib::ParamFlags::READWRITE, .build(),
), glib::ParamSpecUInt::builder("context-wait")
glib::ParamSpecUInt::new( .nick("Context Wait")
"context-wait", .blurb("Throttle poll loop to run at most once every this many ms")
"Context Wait", .maximum(1000)
"Throttle poll loop to run at most once every this many ms", .default_value(DEFAULT_CONTEXT_WAIT.as_millis() as u32)
0, .readwrite()
1000, .build(),
DEFAULT_CONTEXT_WAIT.as_millis() as u32, glib::ParamSpecObject::builder("active-pad", gst::Pad::static_type())
glib::ParamFlags::READWRITE, .nick("Active Pad")
), .blurb("Currently active pad")
glib::ParamSpecObject::new( .readwrite()
"active-pad", .mutable_playing()
"Active Pad", .build(),
"Currently active pad",
gst::Pad::static_type(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
] ]
}); });

View file

@ -1362,63 +1362,42 @@ impl ObjectImpl for JitterBuffer {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("context")
"context", .nick("Context")
"Context", .blurb("Context name to share threads with")
"Context name to share threads with", .default_value(Some(DEFAULT_CONTEXT))
Some(DEFAULT_CONTEXT), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecUInt::builder("context-wait")
), .nick("Context Wait")
glib::ParamSpecUInt::new( .blurb("Throttle poll loop to run at most once every this many ms")
"context-wait", .maximum(1000)
"Context Wait", .default_value(DEFAULT_CONTEXT_WAIT.mseconds() as u32)
"Throttle poll loop to run at most once every this many ms", .build(),
0, glib::ParamSpecUInt::builder("latency")
1000, .nick("Buffer latency in ms")
DEFAULT_CONTEXT_WAIT.mseconds() as u32, .blurb("Amount of ms to buffer")
glib::ParamFlags::READWRITE, .default_value(DEFAULT_LATENCY.mseconds() as u32)
), .build(),
glib::ParamSpecUInt::new( glib::ParamSpecBoolean::builder("do-lost")
"latency", .nick("Do Lost")
"Buffer latency in ms", .blurb("Send an event downstream when a packet is lost")
"Amount of ms to buffer", .default_value(DEFAULT_DO_LOST)
0, .build(),
std::u32::MAX, glib::ParamSpecUInt::builder("max-dropout-time")
DEFAULT_LATENCY.mseconds() as u32, .nick("Max dropout time")
glib::ParamFlags::READWRITE, .blurb("The maximum time (milliseconds) of missing packets tolerated.")
), .default_value(DEFAULT_MAX_DROPOUT_TIME)
glib::ParamSpecBoolean::new( .build(),
"do-lost", glib::ParamSpecUInt::builder("max-misorder-time")
"Do Lost", .nick("Max misorder time")
"Send an event downstream when a packet is lost", .blurb("The maximum time (milliseconds) of misordered packets tolerated.")
DEFAULT_DO_LOST, .default_value(DEFAULT_MAX_MISORDER_TIME)
glib::ParamFlags::READWRITE, .build(),
), glib::ParamSpecBoxed::builder("stats", gst::Structure::static_type())
glib::ParamSpecUInt::new( .nick("Statistics")
"max-dropout-time", .blurb("Various statistics")
"Max dropout time", .read_only()
"The maximum time (milliseconds) of missing packets tolerated.", .build(),
0,
std::u32::MAX,
DEFAULT_MAX_DROPOUT_TIME,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecUInt::new(
"max-misorder-time",
"Max misorder time",
"The maximum time (milliseconds) of misordered packets tolerated.",
0,
std::u32::MAX,
DEFAULT_MAX_MISORDER_TIME,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecBoxed::new(
"stats",
"Statistics",
"Various statistics",
gst::Structure::static_type(),
glib::ParamFlags::READABLE,
),
] ]
}); });

View file

@ -589,13 +589,11 @@ impl ObjectSubclass for ProxySink {
impl ObjectImpl for ProxySink { impl ObjectImpl for ProxySink {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecString::new( vec![glib::ParamSpecString::builder("proxy-context")
"proxy-context", .nick("Proxy Context")
"Proxy Context", .blurb("Context name of the proxy to share with")
"Context name of the proxy to share with", .default_value(Some(DEFAULT_PROXY_CONTEXT))
Some(DEFAULT_PROXY_CONTEXT), .build()]
glib::ParamFlags::READWRITE,
)]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()
@ -1117,56 +1115,38 @@ impl ObjectImpl for ProxySrc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("context")
"context", .nick("Context")
"Context", .blurb("Context name to share threads with")
"Context name to share threads with", .default_value(Some(DEFAULT_CONTEXT))
Some(DEFAULT_CONTEXT), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecUInt::builder("context-wait")
), .nick("Context Wait")
glib::ParamSpecUInt::new( .blurb("Throttle poll loop to run at most once every this many ms")
"context-wait", .maximum(1000)
"Context Wait", .default_value(DEFAULT_CONTEXT_WAIT.as_millis() as u32)
"Throttle poll loop to run at most once every this many ms", .build(),
0, glib::ParamSpecString::builder("proxy-context")
1000, .nick("Proxy Context")
DEFAULT_CONTEXT_WAIT.as_millis() as u32, .blurb("Context name of the proxy to share with")
glib::ParamFlags::READWRITE, .default_value(Some(DEFAULT_PROXY_CONTEXT))
), .build(),
glib::ParamSpecString::new( glib::ParamSpecUInt::builder("max-size-buffers")
"proxy-context", .nick("Max Size Buffers")
"Proxy Context", .blurb("Maximum number of buffers to queue (0=unlimited)")
"Context name of the proxy to share with", .default_value(DEFAULT_MAX_SIZE_BUFFERS)
Some(DEFAULT_PROXY_CONTEXT), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecUInt::builder("max-size-bytes")
), .nick("Max Size Bytes")
glib::ParamSpecUInt::new( .blurb("Maximum number of bytes to queue (0=unlimited)")
"max-size-buffers", .default_value(DEFAULT_MAX_SIZE_BYTES)
"Max Size Buffers", .build(),
"Maximum number of buffers to queue (0=unlimited)", glib::ParamSpecUInt64::builder("max-size-time")
0, .nick("Max Size Time")
u32::MAX, .blurb("Maximum number of nanoseconds to queue (0=unlimited)")
DEFAULT_MAX_SIZE_BUFFERS, .maximum(u64::MAX - 1)
glib::ParamFlags::READWRITE, .default_value(DEFAULT_MAX_SIZE_TIME.nseconds())
), .build(),
glib::ParamSpecUInt::new(
"max-size-bytes",
"Max Size Bytes",
"Maximum number of bytes to queue (0=unlimited)",
0,
u32::MAX,
DEFAULT_MAX_SIZE_BYTES,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecUInt64::new(
"max-size-time",
"Max Size Time",
"Maximum number of nanoseconds to queue (0=unlimited)",
0,
u64::MAX - 1,
DEFAULT_MAX_SIZE_TIME.nseconds(),
glib::ParamFlags::READWRITE,
),
] ]
}); });

View file

@ -705,49 +705,33 @@ impl ObjectImpl for Queue {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("context")
"context", .nick("Context")
"Context", .blurb("Context name to share threads with")
"Context name to share threads with", .default_value(Some(DEFAULT_CONTEXT))
Some(DEFAULT_CONTEXT), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecUInt::builder("context-wait")
), .nick("Context Wait")
glib::ParamSpecUInt::new( .blurb("Throttle poll loop to run at most once every this many ms")
"context-wait", .maximum(1000)
"Context Wait", .default_value(DEFAULT_CONTEXT_WAIT.as_millis() as u32)
"Throttle poll loop to run at most once every this many ms", .build(),
0, glib::ParamSpecUInt::builder("max-size-buffers")
1000, .nick("Max Size Buffers")
DEFAULT_CONTEXT_WAIT.as_millis() as u32, .blurb("Maximum number of buffers to queue (0=unlimited)")
glib::ParamFlags::READWRITE, .default_value(DEFAULT_MAX_SIZE_BUFFERS)
), .build(),
glib::ParamSpecUInt::new( glib::ParamSpecUInt::builder("max-size-bytes")
"max-size-buffers", .nick("Max Size Bytes")
"Max Size Buffers", .blurb("Maximum number of bytes to queue (0=unlimited)")
"Maximum number of buffers to queue (0=unlimited)", .default_value(DEFAULT_MAX_SIZE_BYTES)
0, .build(),
u32::MAX, glib::ParamSpecUInt64::builder("max-size-time")
DEFAULT_MAX_SIZE_BUFFERS, .nick("Max Size Time")
glib::ParamFlags::READWRITE, .blurb("Maximum number of nanoseconds to queue (0=unlimited)")
), .maximum(u64::MAX - 1)
glib::ParamSpecUInt::new( .default_value(DEFAULT_MAX_SIZE_TIME.nseconds())
"max-size-bytes", .build(),
"Max Size Bytes",
"Maximum number of bytes to queue (0=unlimited)",
0,
u32::MAX,
DEFAULT_MAX_SIZE_BYTES,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecUInt64::new(
"max-size-time",
"Max Size Time",
"Maximum number of nanoseconds to queue (0=unlimited)",
0,
u64::MAX - 1,
DEFAULT_MAX_SIZE_TIME.nseconds(),
glib::ParamFlags::READWRITE,
),
] ]
}); });

View file

@ -520,54 +520,38 @@ impl ObjectImpl for TcpClientSrc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("context")
"context", .nick("Context")
"Context", .blurb("Context name to share threads with")
"Context name to share threads with", .default_value(Some(DEFAULT_CONTEXT))
Some(DEFAULT_CONTEXT), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecUInt::builder("context-wait")
), .nick("Context Wait")
glib::ParamSpecUInt::new( .blurb("Throttle poll loop to run at most once every this many ms")
"context-wait", .maximum(1000)
"Context Wait", .default_value(DEFAULT_CONTEXT_WAIT.as_millis() as u32)
"Throttle poll loop to run at most once every this many ms", .build(),
0, glib::ParamSpecString::builder("host")
1000, .nick("Host")
DEFAULT_CONTEXT_WAIT.as_millis() as u32, .blurb("The host IP address to receive packets from")
glib::ParamFlags::READWRITE, .default_value(DEFAULT_HOST)
), .build(),
glib::ParamSpecString::new( glib::ParamSpecInt::builder("port")
"host", .nick("Port")
"Host", .blurb("Port to receive packets from")
"The host IP address to receive packets from", .minimum(0)
DEFAULT_HOST, .maximum(u16::MAX as i32)
glib::ParamFlags::READWRITE, .default_value(DEFAULT_PORT)
), .build(),
glib::ParamSpecInt::new( glib::ParamSpecBoxed::builder("caps", gst::Caps::static_type())
"port", .nick("Caps")
"Port", .blurb("Caps to use")
"Port to receive packets from", .build(),
0, glib::ParamSpecUInt::builder("blocksize")
u16::MAX as i32, .nick("Blocksize")
DEFAULT_PORT, .blurb("Size in bytes to read per buffer (-1 = default)")
glib::ParamFlags::READWRITE, .default_value(DEFAULT_BLOCKSIZE)
), .build(),
glib::ParamSpecBoxed::new(
"caps",
"Caps",
"Caps to use",
gst::Caps::static_type(),
glib::ParamFlags::READWRITE,
),
glib::ParamSpecUInt::new(
"blocksize",
"Blocksize",
"Size in bytes to read per buffer (-1 = default)",
0,
u32::MAX,
DEFAULT_BLOCKSIZE,
glib::ParamFlags::READWRITE,
),
] ]
}); });

View file

@ -963,137 +963,98 @@ impl ObjectImpl for UdpSink {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("context")
"context", .nick("Context")
"Context", .blurb("Context name to share threads with")
"Context name to share threads with", .default_value(Some(DEFAULT_CONTEXT))
Some(DEFAULT_CONTEXT), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecUInt::builder("context-wait")
), .nick("Context Wait")
glib::ParamSpecUInt::new( .blurb("Throttle poll loop to run at most once every this many ms")
"context-wait", .maximum(1000)
"Context Wait", .default_value(DEFAULT_CONTEXT_WAIT.as_millis() as u32)
"Throttle poll loop to run at most once every this many ms", .build(),
0, glib::ParamSpecBoolean::builder("sync")
1000, .nick("Sync")
DEFAULT_CONTEXT_WAIT.as_millis() as u32, .blurb("Sync on the clock")
glib::ParamFlags::READWRITE, .default_value(DEFAULT_SYNC)
), .build(),
glib::ParamSpecBoolean::new( glib::ParamSpecString::builder("bind-address")
"sync", .nick("Bind Address")
"Sync", .blurb("Address to bind the socket to")
"Sync on the clock", .default_value(Some(DEFAULT_BIND_ADDRESS))
DEFAULT_SYNC, .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecInt::builder("bind-port")
), .nick("Bind Port")
glib::ParamSpecString::new( .blurb("Port to bind the socket to")
"bind-address", .minimum(0)
"Bind Address", .maximum(u16::MAX as i32)
"Address to bind the socket to", .default_value(DEFAULT_BIND_PORT)
Some(DEFAULT_BIND_ADDRESS), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecString::builder("bind-address-v6")
), .nick("Bind Address V6")
glib::ParamSpecInt::new( .blurb("Address to bind the V6 socket to")
"bind-port", .default_value(Some(DEFAULT_BIND_ADDRESS_V6))
"Bind Port", .build(),
"Port to bind the socket to", glib::ParamSpecInt::builder("bind-port-v6")
0, .nick("Bind Port")
u16::MAX as i32, .blurb("Port to bind the V6 socket to")
DEFAULT_BIND_PORT, .minimum(0)
glib::ParamFlags::READWRITE, .maximum(u16::MAX as i32)
), .default_value(DEFAULT_BIND_PORT_V6)
glib::ParamSpecString::new( .build(),
"bind-address-v6", glib::ParamSpecObject::builder("socket", gio::Socket::static_type())
"Bind Address V6", .nick("Socket")
"Address to bind the V6 socket to", .blurb("Socket to use for UDP transmission. (None == allocate)")
Some(DEFAULT_BIND_ADDRESS_V6), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecObject::builder("used-socket", gio::Socket::static_type())
), .nick("Used Socket")
glib::ParamSpecInt::new( .blurb("Socket currently in use for UDP transmission. (None = no socket)")
"bind-port-v6", .read_only()
"Bind Port", .build(),
"Port to bind the V6 socket to", glib::ParamSpecObject::builder("socket-v6", gio::Socket::static_type())
0, .nick("Socket V6")
u16::MAX as i32, .blurb("IPV6 Socket to use for UDP transmission. (None == allocate)")
DEFAULT_BIND_PORT_V6, .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecObject::builder("used-socket-v6", gio::Socket::static_type())
), .nick("Used Socket V6")
glib::ParamSpecObject::new( .blurb("V6 Socket currently in use for UDP transmission. (None = no socket)")
"socket", .read_only()
"Socket", .build(),
"Socket to use for UDP transmission. (None == allocate)", glib::ParamSpecBoolean::builder("auto-multicast")
gio::Socket::static_type(), .nick("Auto multicast")
glib::ParamFlags::READWRITE, .blurb("Automatically join/leave the multicast groups, FALSE means user has to do it himself")
), .default_value(DEFAULT_AUTO_MULTICAST)
glib::ParamSpecObject::new( .build(),
"used-socket", glib::ParamSpecBoolean::builder("loop")
"Used Socket", .nick("Loop")
"Socket currently in use for UDP transmission. (None = no socket)", .blurb("Set the multicast loop parameter.")
gio::Socket::static_type(), .default_value(DEFAULT_LOOP)
glib::ParamFlags::READABLE, .build(),
), glib::ParamSpecUInt::builder("ttl")
glib::ParamSpecObject::new( .nick("Time To Live")
"socket-v6", .blurb("Used for setting the unicast TTL parameter")
"Socket V6", .maximum(u8::MAX as u32)
"IPV6 Socket to use for UDP transmission. (None == allocate)", .default_value(DEFAULT_TTL)
gio::Socket::static_type(), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecUInt::builder("ttl-mc")
), .nick("Time To Live Multicast")
glib::ParamSpecObject::new( .blurb("Used for setting the multicast TTL parameter")
"used-socket-v6", .maximum(u8::MAX as u32)
"Used Socket V6", .default_value(DEFAULT_TTL_MC)
"V6 Socket currently in use for UDP transmission. (None = no socket)", .build(),
gio::Socket::static_type(), glib::ParamSpecInt::builder("qos-dscp")
glib::ParamFlags::READABLE, .nick("QoS DSCP")
), .blurb("Quality of Service, differentiated services code point (-1 default)")
glib::ParamSpecBoolean::new( .minimum(-1)
"auto-multicast", .maximum(63)
"Auto multicast", .default_value(DEFAULT_QOS_DSCP)
"Automatically join/leave the multicast groups, FALSE means user has to do it himself", .build(),
DEFAULT_AUTO_MULTICAST, glib::ParamSpecString::builder("clients")
glib::ParamFlags::READWRITE, .nick("Clients")
), .blurb("A comma separated list of host:port pairs with destinations")
glib::ParamSpecBoolean::new( .default_value(Some(DEFAULT_CLIENTS))
"loop", .build(),
"Loop",
"Set the multicast loop parameter.",
DEFAULT_LOOP,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecUInt::new(
"ttl",
"Time To Live",
"Used for setting the unicast TTL parameter",
0,
u8::MAX as u32,
DEFAULT_TTL,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecUInt::new(
"ttl-mc",
"Time To Live Multicast",
"Used for setting the multicast TTL parameter",
0,
u8::MAX as u32,
DEFAULT_TTL_MC,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecInt::new(
"qos-dscp",
"QoS DSCP",
"Quality of Service, differentiated services code point (-1 default)",
-1,
63,
DEFAULT_QOS_DSCP,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecString::new(
"clients",
"Clients",
"A comma separated list of host:port pairs with destinations",
Some(DEFAULT_CLIENTS),
glib::ParamFlags::READWRITE,
),
] ]
}); });

View file

@ -648,86 +648,66 @@ impl ObjectImpl for UdpSrc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
let mut properties = vec![ let mut properties = vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("context")
"context", .nick("Context")
"Context", .blurb("Context name to share threads with")
"Context name to share threads with", .default_value(Some(DEFAULT_CONTEXT))
Some(DEFAULT_CONTEXT), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecUInt::builder("context-wait")
), .nick("Context Wait")
glib::ParamSpecUInt::new( .blurb("Throttle poll loop to run at most once every this many ms")
"context-wait", .maximum(1000)
"Context Wait", .default_value(DEFAULT_CONTEXT_WAIT.as_millis() as u32)
"Throttle poll loop to run at most once every this many ms", .build(),
0, glib::ParamSpecString::builder("address")
1000, .nick("Address")
DEFAULT_CONTEXT_WAIT.as_millis() as u32, .blurb("Address/multicast group to listen on")
glib::ParamFlags::READWRITE, .default_value(DEFAULT_ADDRESS)
), .build(),
glib::ParamSpecString::new( glib::ParamSpecInt::builder("port")
"address", .nick("Port")
"Address", .blurb("Port to listen on")
"Address/multicast group to listen on", .minimum(0)
DEFAULT_ADDRESS, .maximum(u16::MAX as i32)
glib::ParamFlags::READWRITE, .default_value(DEFAULT_PORT)
), .build(),
glib::ParamSpecInt::new( glib::ParamSpecBoolean::builder("reuse")
"port", .nick("Reuse")
"Port", .blurb("Allow reuse of the port")
"Port to listen on", .default_value(DEFAULT_REUSE)
0, .build(),
u16::MAX as i32, glib::ParamSpecBoxed::builder("caps", gst::Caps::static_type())
DEFAULT_PORT, .nick("Caps")
glib::ParamFlags::READWRITE, .blurb("Caps to use")
), .build(),
glib::ParamSpecBoolean::new( glib::ParamSpecUInt::builder("mtu")
"reuse", .nick("MTU")
"Reuse", .blurb("Maximum expected packet size. This directly defines the allocation size of the receive buffer pool")
"Allow reuse of the port", .maximum(i32::MAX as u32)
DEFAULT_REUSE, .default_value(DEFAULT_MTU)
glib::ParamFlags::READWRITE, .build(),
), glib::ParamSpecBoolean::builder("retrieve-sender-address")
glib::ParamSpecBoxed::new( .nick("Retrieve sender address")
"caps", .blurb("Whether to retrieve the sender address and add it to buffers as meta. Disabling this might result in minor performance improvements in certain scenarios")
"Caps", .default_value(DEFAULT_RETRIEVE_SENDER_ADDRESS)
"Caps to use", .build(),
gst::Caps::static_type(),
glib::ParamFlags::READWRITE,
),
glib::ParamSpecUInt::new(
"mtu",
"MTU",
"Maximum expected packet size. This directly defines the allocation size of the receive buffer pool",
0,
i32::MAX as u32,
DEFAULT_MTU,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecBoolean::new(
"retrieve-sender-address",
"Retrieve sender address",
"Whether to retrieve the sender address and add it to buffers as meta. Disabling this might result in minor performance improvements in certain scenarios",
DEFAULT_RETRIEVE_SENDER_ADDRESS,
glib::ParamFlags::READWRITE,
),
]; ];
#[cfg(not(windows))] #[cfg(not(windows))]
{ {
properties.push(glib::ParamSpecObject::new( properties.push(
"socket", glib::ParamSpecObject::builder("socket", gio::Socket::static_type())
"Socket", .nick("Socket")
"Socket to use for UDP reception. (None == allocate)", .blurb("Socket to use for UDP reception. (None == allocate)")
gio::Socket::static_type(), .build(),
glib::ParamFlags::READWRITE, );
)); properties.push(
properties.push(glib::ParamSpecObject::new( glib::ParamSpecObject::builder("used-socket", gio::Socket::static_type())
"used-socket", .nick("Used Socket")
"Used Socket", .blurb("Socket currently in use for UDP reception. (None = no socket)")
"Socket currently in use for UDP reception. (None = no socket)", .read_only()
gio::Socket::static_type(), .build(),
glib::ParamFlags::READABLE, );
));
} }
properties properties

View file

@ -304,13 +304,12 @@ mod imp_src {
impl ObjectImpl for ElementSrcTest { impl ObjectImpl for ElementSrcTest {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecString::new( vec![glib::ParamSpecString::builder("context")
"context", .nick("Context")
"Context", .blurb("Context name to share threads with")
"Context name to share threads with", .default_value(Some(DEFAULT_CONTEXT))
Some(DEFAULT_CONTEXT), .write_only()
glib::ParamFlags::WRITABLE, .build()]
)]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()
@ -637,13 +636,14 @@ mod imp_sink {
impl ObjectImpl for ElementSinkTest { impl ObjectImpl for ElementSinkTest {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecBoxed::new( vec![
"sender", glib::ParamSpecBoxed::builder("sender", ItemSender::static_type())
"Sender", .nick("Sender")
"Channel sender to forward the incoming items to", .blurb("Channel sender to forward the incoming items to")
ItemSender::static_type(), .write_only()
glib::ParamFlags::WRITABLE | glib::ParamFlags::CONSTRUCT_ONLY, .construct_only()
)] .build(),
]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -1178,95 +1178,72 @@ impl ObjectImpl for Transcriber {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("language-code")
"language-code", .nick("Language Code")
"Language Code", .blurb("The Language of the Stream, see \
"The Language of the Stream, see \
<https://docs.aws.amazon.com/transcribe/latest/dg/how-streaming-transcription.html> \ <https://docs.aws.amazon.com/transcribe/latest/dg/how-streaming-transcription.html> \
for an up to date list of allowed languages", for an up to date list of allowed languages")
Some("en-US"), .default_value(Some("en-US"))
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .mutable_ready()
), .build(),
glib::ParamSpecUInt::new( glib::ParamSpecUInt::builder("latency")
"latency", .nick("Latency")
"Latency", .blurb("Amount of milliseconds to allow AWS transcribe")
"Amount of milliseconds to allow AWS transcribe", .default_value(DEFAULT_LATENCY.mseconds() as u32)
0, .mutable_ready()
std::u32::MAX, .build(),
DEFAULT_LATENCY.mseconds() as u32, glib::ParamSpecUInt::builder("lateness")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Lateness")
), .blurb("Amount of milliseconds to introduce as lateness")
glib::ParamSpecUInt::new( .default_value(DEFAULT_LATENESS.mseconds() as u32)
"lateness", .mutable_ready()
"Lateness", .build(),
"Amount of milliseconds to introduce as lateness", glib::ParamSpecString::builder("vocabulary-name")
0, .nick("Vocabulary Name")
std::u32::MAX, .blurb("The name of a custom vocabulary, see \
DEFAULT_LATENESS.mseconds() as u32,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecString::new(
"vocabulary-name",
"Vocabulary Name",
"The name of a custom vocabulary, see \
<https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html> \ <https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html> \
for more information", for more information")
None, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecString::builder("session-id")
glib::ParamSpecString::new( .nick("Session ID")
"session-id", .blurb("The ID of the transcription session, must be length 36")
"Session ID", .mutable_ready()
"The ID of the transcription session, must be length 36", .build(),
None, glib::ParamSpecEnum::builder("results-stability", AwsTranscriberResultStability::static_type())
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Results stability")
), .blurb("Defines how fast results should stabilize")
glib::ParamSpecEnum::new( .default_value(DEFAULT_STABILITY as i32)
"results-stability", .mutable_ready()
"Results stability", .build(),
"Defines how fast results should stabilize", glib::ParamSpecString::builder("access-key")
AwsTranscriberResultStability::static_type(), .nick("Access Key")
DEFAULT_STABILITY as i32, .blurb("AWS Access Key")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .mutable_ready()
), .build(),
glib::ParamSpecString::new( glib::ParamSpecString::builder("secret-access-key")
"access-key", .nick("Secret Access Key")
"Access Key", .blurb("AWS Secret Access Key")
"AWS Access Key", .mutable_ready()
None, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecString::builder("session-token")
), .nick("Session Token")
glib::ParamSpecString::new( .blurb("AWS temporary Session Token from STS")
"secret-access-key", .mutable_ready()
"Secret Access Key", .build(),
"AWS Secret Access Key", glib::ParamSpecString::builder("vocabulary-filter-name")
None, .nick("Vocabulary Filter Name")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .blurb("The name of a custom filter vocabulary, see \
),
glib::ParamSpecString::new(
"session-token",
"Session Token",
"AWS temporary Session Token from STS",
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecString::new(
"vocabulary-filter-name",
"Vocabulary Filter Name",
"The name of a custom filter vocabulary, see \
<https://docs.aws.amazon.com/transcribe/latest/help-panel/vocab-filter.html> \ <https://docs.aws.amazon.com/transcribe/latest/help-panel/vocab-filter.html> \
for more information", for more information")
None, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecEnum::builder("vocabulary-filter-method", AwsTranscriberVocabularyFilterMethod::static_type())
glib::ParamSpecEnum::new( .nick("Vocabulary Filter Method")
"vocabulary-filter-method", .blurb("Defines how filtered words will be edited, has no effect when vocabulary-filter-name isn't set")
"Vocabulary Filter Method", .default_value(DEFAULT_VOCABULARY_FILTER_METHOD as i32)
"Defines how filtered words will be edited, has no effect when vocabulary-filter-name isn't set", .mutable_ready()
AwsTranscriberVocabularyFilterMethod::static_type(), .build(),
DEFAULT_VOCABULARY_FILTER_METHOD as i32,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -433,87 +433,66 @@ impl ObjectImpl for S3HlsSink {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("access-key")
"access-key", .nick("Access Key")
"Access Key", .blurb("AWS Access Key")
"AWS Access Key", .mutable_ready()
None, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecString::builder("secret-access-key")
), .nick("Secret Access Key")
glib::ParamSpecString::new( .blurb("AWS Secret Access Key")
"secret-access-key", .mutable_ready()
"Secret Access Key", .build(),
"AWS Secret Access Key", glib::ParamSpecString::builder("session-token")
None, .nick("Session Token")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .blurb("AWS temporary session token from STS")
), .mutable_ready()
glib::ParamSpecString::new( .build(),
"session-token", glib::ParamSpecString::builder("bucket")
"Session Token", .nick("S3 Bucket")
"AWS temporary session token from STS", .blurb("The bucket of the file to write")
None, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecString::builder("key-prefix")
glib::ParamSpecString::new( .nick("S3 key prefix")
"bucket", .blurb("The key prefix for segment and playlist files")
"S3 Bucket", .mutable_ready()
"The bucket of the file to write", .build(),
None, glib::ParamSpecString::builder("region")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("AWS Region")
), .blurb("The AWS region for the S3 bucket (e.g. eu-west-2).")
glib::ParamSpecString::new( .mutable_ready()
"key-prefix", .build(),
"S3 key prefix", glib::ParamSpecObject::builder("hlssink", gst::Element::static_type())
"The key prefix for segment and playlist files", .nick("HLS Sink")
None, .blurb("The underlying HLS sink being used")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .read_only()
), .build(),
glib::ParamSpecString::new( glib::ParamSpecString::builder("acl")
"region", .nick("S3 ACL")
"AWS Region", .blurb("Canned ACL to use for uploading to S3")
"The AWS region for the S3 bucket (e.g. eu-west-2).", .default_value(Some(S3_ACL_DEFAULT.as_str()))
None, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecUInt::builder("retry-attempts")
), .nick("Retry attempts")
glib::ParamSpecObject::new( .blurb(
"hlssink", "Number of times AWS SDK attempts a request before abandoning the request",
"HLS Sink", )
"The underlying HLS sink being used", .minimum(1)
gst::Element::static_type(), .maximum(10)
glib::ParamFlags::READABLE, .default_value(DEFAULT_RETRY_ATTEMPTS)
), .build(),
glib::ParamSpecString::new( glib::ParamSpecUInt64::builder("request-timeout")
"acl", .nick("API call timeout")
"S3 ACL", .blurb("Timeout for request to S3 service (in ms)")
"Canned ACL to use for uploading to S3", .minimum(1)
Some(S3_ACL_DEFAULT.as_str()), .default_value(DEFAULT_TIMEOUT_IN_MSECS)
glib::ParamFlags::READWRITE, .build(),
), glib::ParamSpecString::builder("endpoint-uri")
glib::ParamSpecUInt::new( .nick("S3 endpoint URI")
"retry-attempts", .blurb("The S3 endpoint URI to use")
"Retry attempts", .mutable_ready()
"Number of times AWS SDK attempts a request before abandoning the request", .build(),
1,
10,
DEFAULT_RETRY_ATTEMPTS,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecUInt64::new(
"request-timeout",
"API call timeout",
"Timeout for request to S3 service (in ms)",
1,
std::u64::MAX,
DEFAULT_TIMEOUT_IN_MSECS,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecString::new(
"endpoint-uri",
"S3 endpoint URI",
"The S3 endpoint URI to use",
None,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -657,149 +657,108 @@ impl ObjectImpl for S3Sink {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("bucket")
"bucket", .nick("S3 Bucket")
"S3 Bucket", .blurb("The bucket of the file to write")
"The bucket of the file to write", .mutable_ready()
None, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecString::builder("key")
), .nick("S3 Key")
glib::ParamSpecString::new( .blurb("The key of the file to write")
"key", .mutable_ready()
"S3 Key", .build(),
"The key of the file to write", glib::ParamSpecString::builder("region")
None, .nick("AWS Region")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .blurb("An AWS region (e.g. eu-west-2).")
), .default_value(Some("us-west-2"))
glib::ParamSpecString::new( .mutable_ready()
"region", .build(),
"AWS Region", glib::ParamSpecUInt64::builder("part-size")
"An AWS region (e.g. eu-west-2).", .nick("Part size")
Some("us-west-2"), .blurb("A size (in bytes) of an individual part used for multipart upload.")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .minimum(5 * 1024 * 1024) // 5 MB
), .maximum(5 * 1024 * 1024 * 1024) // 5 GB
glib::ParamSpecUInt64::new( .default_value(DEFAULT_BUFFER_SIZE)
"part-size", .mutable_ready()
"Part size", .build(),
"A size (in bytes) of an individual part used for multipart upload.", glib::ParamSpecString::builder("uri")
5 * 1024 * 1024, // 5 MB .nick("URI")
5 * 1024 * 1024 * 1024, // 5 GB .blurb("The S3 object URI")
DEFAULT_BUFFER_SIZE, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecString::builder("access-key")
glib::ParamSpecString::new( .nick("Access Key")
"uri", .blurb("AWS Access Key")
"URI", .mutable_ready()
"The S3 object URI", .build(),
None, glib::ParamSpecString::builder("secret-access-key")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Secret Access Key")
), .blurb("AWS Secret Access Key")
glib::ParamSpecString::new( .mutable_ready()
"access-key", .build(),
"Access Key", glib::ParamSpecString::builder("session-token")
"AWS Access Key", .nick("Session Token")
None, .blurb("AWS temporary Session Token from STS")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .mutable_ready()
), .build(),
glib::ParamSpecString::new( glib::ParamSpecBoxed::builder("metadata", gst::Structure::static_type())
"secret-access-key", .nick("Metadata")
"Secret Access Key", .blurb("A map of metadata to store with the object in S3; field values need to be convertible to strings.")
"AWS Secret Access Key", .mutable_ready()
None, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecEnum::builder("on-error", OnError::static_type())
), .nick("Whether to upload or complete the multipart upload on error")
glib::ParamSpecString::new( .blurb("Do nothing, abort or complete a multipart upload request on error")
"session-token", .default_value(DEFAULT_MULTIPART_UPLOAD_ON_ERROR as i32)
"Session Token", .mutable_ready()
"AWS temporary Session Token from STS", .build(),
None, glib::ParamSpecUInt::builder("retry-attempts")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Retry attempts")
), .blurb("Number of times AWS SDK attempts a request before abandoning the request")
glib::ParamSpecBoxed::new( .minimum(1)
"metadata", .maximum(10)
"Metadata", .default_value(DEFAULT_RETRY_ATTEMPTS)
"A map of metadata to store with the object in S3; field values need to be convertible to strings.", .build(),
gst::Structure::static_type(), glib::ParamSpecInt64::builder("request-timeout")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Request timeout")
), .blurb("Timeout for general S3 requests (in ms, set to -1 for infinity)")
glib::ParamSpecEnum::new( .minimum(-1)
"on-error", .default_value(DEFAULT_REQUEST_TIMEOUT_MSEC as i64)
"Whether to upload or complete the multipart upload on error", .build(),
"Do nothing, abort or complete a multipart upload request on error", glib::ParamSpecInt64::builder("upload-part-request-timeout")
OnError::static_type(), .nick("Upload part request timeout")
DEFAULT_MULTIPART_UPLOAD_ON_ERROR as i32, .blurb("Timeout for a single upload part request (in ms, set to -1 for infinity) (Deprecated. Use request-timeout.)")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .minimum(-1)
), .default_value(DEFAULT_UPLOAD_PART_REQUEST_TIMEOUT_MSEC as i64)
glib::ParamSpecUInt::new( .build(),
"retry-attempts", glib::ParamSpecInt64::builder("complete-upload-request-timeout")
"Retry attempts", .nick("Complete upload request timeout")
"Number of times AWS SDK attempts a request before abandoning the request", .blurb("Timeout for the complete multipart upload request (in ms, set to -1 for infinity) (Deprecated. Use request-timeout.)")
1, .minimum(-1)
10, .default_value(DEFAULT_COMPLETE_REQUEST_TIMEOUT_MSEC as i64)
DEFAULT_RETRY_ATTEMPTS, .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecInt64::builder("retry-duration")
), .nick("Retry duration")
glib::ParamSpecInt64::new( .blurb("How long we should retry general S3 requests before giving up (in ms, set to -1 for infinity) (Deprecated. Use retry-attempts.)")
"request-timeout", .minimum(-1)
"Request timeout", .default_value(DEFAULT_RETRY_DURATION_MSEC as i64)
"Timeout for general S3 requests (in ms, set to -1 for infinity)", .build(),
-1, glib::ParamSpecInt64::builder("upload-part-retry-duration")
std::i64::MAX, .nick("Upload part retry duration")
DEFAULT_REQUEST_TIMEOUT_MSEC as i64, .blurb("How long we should retry upload part requests before giving up (in ms, set to -1 for infinity) (Deprecated. Use retry-attempts.)")
glib::ParamFlags::READWRITE, .minimum(-1)
), .default_value(DEFAULT_UPLOAD_PART_RETRY_DURATION_MSEC as i64)
glib::ParamSpecInt64::new( .build(),
"upload-part-request-timeout", glib::ParamSpecInt64::builder("complete-upload-retry-duration")
"Upload part request timeout", .nick("Complete upload retry duration")
"Timeout for a single upload part request (in ms, set to -1 for infinity) (Deprecated. Use request-timeout.)", .blurb("How long we should retry complete multipart upload requests before giving up (in ms, set to -1 for infinity) (Deprecated. Use retry-attempts.)")
-1, .minimum(-1)
std::i64::MAX, .default_value(DEFAULT_COMPLETE_RETRY_DURATION_MSEC as i64)
DEFAULT_UPLOAD_PART_REQUEST_TIMEOUT_MSEC as i64, .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecString::builder("endpoint-uri")
), .nick("S3 endpoint URI")
glib::ParamSpecInt64::new( .blurb("The S3 endpoint URI to use")
"complete-upload-request-timeout", .build(),
"Complete upload request timeout",
"Timeout for the complete multipart upload request (in ms, set to -1 for infinity) (Deprecated. Use request-timeout.)",
-1,
std::i64::MAX,
DEFAULT_COMPLETE_REQUEST_TIMEOUT_MSEC as i64,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecInt64::new(
"retry-duration",
"Retry duration",
"How long we should retry general S3 requests before giving up (in ms, set to -1 for infinity) (Deprecated. Use retry-attempts.)",
-1,
std::i64::MAX,
DEFAULT_RETRY_DURATION_MSEC as i64,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecInt64::new(
"upload-part-retry-duration",
"Upload part retry duration",
"How long we should retry upload part requests before giving up (in ms, set to -1 for infinity) (Deprecated. Use retry-attempts.)",
-1,
std::i64::MAX,
DEFAULT_UPLOAD_PART_RETRY_DURATION_MSEC as i64,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecInt64::new(
"complete-upload-retry-duration",
"Complete upload retry duration",
"How long we should retry complete multipart upload requests before giving up (in ms, set to -1 for infinity) (Deprecated. Use retry-attempts.)",
-1,
std::i64::MAX,
DEFAULT_COMPLETE_RETRY_DURATION_MSEC as i64,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecString::new(
"endpoint-uri",
"S3 endpoint URI",
"The S3 endpoint URI to use",
None,
glib::ParamFlags::READWRITE,
),
] ]
}); });

View file

@ -297,68 +297,49 @@ impl ObjectImpl for S3Src {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("uri")
"uri", .nick("URI")
"URI", .blurb("The S3 object URI")
"The S3 object URI", .mutable_ready()
None, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecString::builder("access-key")
), .nick("Access Key")
glib::ParamSpecString::new( .blurb("AWS Access Key")
"access-key", .mutable_ready()
"Access Key", .build(),
"AWS Access Key", glib::ParamSpecString::builder("secret-access-key")
None, .nick("Secret Access Key")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .blurb("AWS Secret Access Key")
), .mutable_ready()
glib::ParamSpecString::new( .build(),
"secret-access-key", glib::ParamSpecString::builder("session-token")
"Secret Access Key", .nick("Session Token")
"AWS Secret Access Key", .blurb("AWS temporary Session Token from STS")
None, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecInt64::builder("request-timeout")
glib::ParamSpecString::new( .nick("Request timeout")
"session-token", .blurb("Timeout for each S3 request (in ms, set to -1 for infinity)")
"Session Token", .minimum(-1)
"AWS temporary Session Token from STS", .default_value(DEFAULT_REQUEST_TIMEOUT_MSEC as i64)
None, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecInt64::builder("retry-duration")
), .nick("Retry duration")
glib::ParamSpecInt64::new( .blurb("How long we should retry S3 requests before giving up (in ms, set to -1 for infinity) (Deprecated. Use retry-attempts.)")
"request-timeout", .minimum(-1)
"Request timeout", .default_value(DEFAULT_RETRY_DURATION_MSEC as i64)
"Timeout for each S3 request (in ms, set to -1 for infinity)", .build(),
-1, glib::ParamSpecUInt::builder("retry-attempts")
std::i64::MAX, .nick("Retry attempts")
DEFAULT_REQUEST_TIMEOUT_MSEC as i64, .blurb("Number of times AWS SDK attempts a request before abandoning the request")
glib::ParamFlags::READWRITE, .minimum(1)
), .maximum(10)
glib::ParamSpecInt64::new( .default_value(DEFAULT_RETRY_ATTEMPTS)
"retry-duration", .build(),
"Retry duration", glib::ParamSpecString::builder("endpoint-uri")
"How long we should retry S3 requests before giving up (in ms, set to -1 for infinity) (Deprecated. Use retry-attempts.)", .nick("S3 endpoint URI")
-1, .blurb("The S3 endpoint URI to use")
std::i64::MAX, .build(),
DEFAULT_RETRY_DURATION_MSEC as i64,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecUInt::new(
"retry-attempts",
"Retry attempts",
"Number of times AWS SDK attempts a request before abandoning the request",
1,
10,
DEFAULT_RETRY_ATTEMPTS,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecString::new(
"endpoint-uri",
"S3 endpoint URI",
"The S3 endpoint URI to use",
None,
glib::ParamFlags::READWRITE,
),
] ]
}); });

View file

@ -428,69 +428,44 @@ impl ObjectImpl for HlsSink3 {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("location")
"location", .nick("File Location")
"File Location", .blurb("Location of the file to write")
"Location of the file to write", .default_value(Some(DEFAULT_LOCATION))
Some(DEFAULT_LOCATION), .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecString::builder("playlist-location")
), .nick("Playlist Location")
glib::ParamSpecString::new( .blurb("Location of the playlist to write.")
"playlist-location", .default_value(Some(DEFAULT_PLAYLIST_LOCATION))
"Playlist Location", .build(),
"Location of the playlist to write.", glib::ParamSpecString::builder("playlist-root")
Some(DEFAULT_PLAYLIST_LOCATION), .nick("Playlist Root")
glib::ParamFlags::READWRITE, .blurb("Base path for the segments in the playlist file.")
), .build(),
glib::ParamSpecString::new( glib::ParamSpecUInt::builder("max-files")
"playlist-root", .nick("Max files")
"Playlist Root", .blurb("Maximum number of files to keep on disk. Once the maximum is reached, old files start to be deleted to make room for new ones.")
"Base path for the segments in the playlist file.", .build(),
None, glib::ParamSpecUInt::builder("target-duration")
glib::ParamFlags::READWRITE, .nick("Target duration")
), .blurb("The target duration in seconds of a segment/file. (0 - disabled, useful for management of segment duration by the streaming server)")
glib::ParamSpecUInt::new( .default_value(DEFAULT_TARGET_DURATION)
"max-files", .build(),
"Max files", glib::ParamSpecUInt::builder("playlist-length")
"Maximum number of files to keep on disk. Once the maximum is reached, old files start to be deleted to make room for new ones.", .nick("Playlist length")
0, .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.")
u32::MAX, .default_value(DEFAULT_PLAYLIST_LENGTH)
DEFAULT_MAX_NUM_SEGMENT_FILES, .build(),
glib::ParamFlags::READWRITE, glib::ParamSpecEnum::builder("playlist-type", HlsSink3PlaylistType::static_type())
), .nick("Playlist Type")
glib::ParamSpecUInt::new( .blurb("The type of the playlist to use. When VOD type is set, the playlist will be live until the pipeline ends execution.")
"target-duration", .default_value(DEFAULT_PLAYLIST_TYPE as i32)
"Target duration", .build(),
"The target duration in seconds of a segment/file. (0 - disabled, useful for management of segment duration by the streaming server)", glib::ParamSpecBoolean::builder("send-keyframe-requests")
0, .nick("Send Keyframe Requests")
u32::MAX, .blurb("Send keyframe requests to ensure correct fragmentation. If this is disabled then the input must have keyframes in regular intervals.")
DEFAULT_TARGET_DURATION, .default_value(DEFAULT_SEND_KEYFRAME_REQUESTS)
glib::ParamFlags::READWRITE, .build(),
),
glib::ParamSpecUInt::new(
"playlist-length",
"Playlist length",
"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.",
0,
u32::MAX,
DEFAULT_PLAYLIST_LENGTH,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecEnum::new(
"playlist-type",
"Playlist Type",
"The type of the playlist to use. When VOD type is set, the playlist will be live until the pipeline ends execution.",
HlsSink3PlaylistType::static_type(),
DEFAULT_PLAYLIST_TYPE as i32,
glib::ParamFlags::READWRITE,
),
glib::ParamSpecBoolean::new(
"send-keyframe-requests",
"Send Keyframe Requests",
"Send keyframe requests to ensure correct fragmentation. If this is disabled then the input must have keyframes in regular intervals.",
DEFAULT_SEND_KEYFRAME_REQUESTS,
glib::ParamFlags::READWRITE,
),
] ]
}); });

View file

@ -519,19 +519,20 @@ impl ObjectSubclass for OnvifMetadataParse {
impl ObjectImpl for OnvifMetadataParse { impl ObjectImpl for OnvifMetadataParse {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecUInt64::new( vec![glib::ParamSpecUInt64::builder("latency")
"latency", .nick("Latency")
"Latency", .blurb(
"Maximum latency to introduce for reordering metadata \ "Maximum latency to introduce for reordering metadata \
(max=auto: 6s if unparsed input, 0s if parsed input)", (max=auto: 6s if unparsed input, 0s if parsed input)",
0, )
u64::MAX, .default_value(
Settings::default() Settings::default()
.latency .latency
.map(|l| l.nseconds()) .map(|l| l.nseconds())
.unwrap_or(u64::MAX), .unwrap_or(u64::MAX),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, )
)] .mutable_ready()
.build()]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -758,13 +758,11 @@ impl ObjectSubclass for OnvifOverlay {
impl ObjectImpl for OnvifOverlay { impl ObjectImpl for OnvifOverlay {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecString::new( vec![glib::ParamSpecString::builder("font-desc")
"font-desc", .nick("Font Description")
"Font Description", .blurb("Pango font description of font to be used for rendering")
"Pango font description of font to be used for rendering", .default_value(Some(DEFAULT_FONT_DESC))
Some(DEFAULT_FONT_DESC), .build()]
glib::ParamFlags::READWRITE,
)]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -661,33 +661,27 @@ impl ObjectImpl for RaptorqDec {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecUInt::new( glib::ParamSpecUInt::builder("repair-window-tolerance")
"repair-window-tolerance", .nick("Repair Window Tolerance (ms)")
"Repair Window Tolerance (ms)", .blurb("The amount of time to add to repair-window reported by RaptorQ encoder (in ms)")
"The amount of time to add to repair-window reported by RaptorQ encoder (in ms)", .maximum(u32::MAX - 1)
0, .default_value(DEFAULT_REPAIR_WINDOW_TOLERANCE)
u32::MAX - 1, .mutable_ready()
DEFAULT_REPAIR_WINDOW_TOLERANCE, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecUInt::builder("media-packets-reset-threshold")
), .nick("Media Packets Reset Threshold")
glib::ParamSpecUInt::new( .blurb("This is the maximum allowed number of buffered packets, before we reset the decoder. \
"media-packets-reset-threshold",
"Media Packets Reset Threshold",
"This is the maximum allowed number of buffered packets, before we reset the decoder. \
It can only be triggered if we don't receive repair packets for too long, or packets \ It can only be triggered if we don't receive repair packets for too long, or packets \
have no valid timestamps, (0 - disable)", have no valid timestamps, (0 - disable)")
0, .maximum(u32::MAX - 1)
u32::MAX - 1, .default_value(DEFAULT_MEDIA_PACKETS_RESET_THRESHOLD)
DEFAULT_MEDIA_PACKETS_RESET_THRESHOLD, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecBoxed::builder("stats", gst::Structure::static_type())
glib::ParamSpecBoxed::new( .nick("Statistics")
"stats", .blurb("Various statistics")
"Statistics", .read_only()
"Various statistics", .build(),
gst::Structure::static_type(),
glib::ParamFlags::READABLE,
),
] ]
}); });

View file

@ -753,61 +753,52 @@ impl ObjectImpl for RaptorqEnc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecUInt::new( glib::ParamSpecUInt::builder("protected-packets")
"protected-packets", .nick("Protected Packets")
"Protected Packets", .blurb("Number of packets to protect together")
"Number of packets to protect together", .minimum(1)
1, .maximum(u32::MAX - 1)
u32::MAX - 1, .default_value(DEFAULT_PROTECTED_PACKETS)
DEFAULT_PROTECTED_PACKETS, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecUInt::builder("repair-packets")
glib::ParamSpecUInt::new( .nick("Repair Packets")
"repair-packets", .blurb("Number of repair packets per block to send")
"Repair Packets", .minimum(1)
"Number of repair packets per block to send", .maximum(u32::MAX - 1)
1, .default_value(DEFAULT_REPAIR_PACKETS)
u32::MAX - 1, .mutable_ready()
DEFAULT_REPAIR_PACKETS, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecUInt::builder("repair-window")
), .nick("Repair Window")
glib::ParamSpecUInt::new( .blurb("A time span in milliseconds in which repair packets are send")
"repair-window", .maximum(u32::MAX - 1)
"Repair Window", .default_value(DEFAULT_REPAIR_PACKETS)
"A time span in milliseconds in which repair packets are send", .mutable_ready()
0, .build(),
u32::MAX - 1, glib::ParamSpecUInt::builder("symbol-size")
DEFAULT_REPAIR_PACKETS, .nick("Symbol Size")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .blurb("Size of RaptorQ data unit")
), .minimum(1)
glib::ParamSpecUInt::new( .maximum(u32::MAX - 1)
"symbol-size", .default_value(DEFAULT_SYMBOL_SIZE)
"Symbol Size", .mutable_ready()
"Size of RaptorQ data unit", .build(),
1, glib::ParamSpecUInt::builder("mtu") // TODO: maybe change this to max-rtp-packet-size or max-media-packet-size
u32::MAX - 1, .nick("MTU")
DEFAULT_SYMBOL_SIZE, .blurb("Maximum expected packet size")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .maximum(i32::MAX as u32)
), .default_value(DEFAULT_MTU)
glib::ParamSpecUInt::new( .mutable_ready()
// TODO: maybe change this to max-rtp-packet-size or max-media-packet-size .build(),
"mtu", glib::ParamSpecUInt::builder("pt")
"MTU", .nick("Payload Type")
"Maximum expected packet size", .blurb("The payload type of FEC packets")
0, .minimum(96)
i32::MAX as u32, .maximum(255)
DEFAULT_MTU, .default_value(DEFAULT_PT)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .mutable_ready()
), .build(),
glib::ParamSpecUInt::new(
"pt",
"Payload Type",
"The payload type of FEC packets",
96,
255,
DEFAULT_PT,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -671,106 +671,100 @@ impl ObjectImpl for ReqwestHttpSrc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("location")
"location", .nick("Location")
"Location", .blurb("URL to read from")
"URL to read from", .readwrite()
None, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecString::builder("user-agent")
glib::ParamSpecString::new( .nick("User-Agent")
"user-agent", .blurb("Value of the User-Agent HTTP request header field")
"User-Agent", .default_value(DEFAULT_USER_AGENT.into())
"Value of the User-Agent HTTP request header field", .readwrite()
DEFAULT_USER_AGENT.into(), .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecBoolean::builder("is-live")
glib::ParamSpecBoolean::new( .nick("Is Live")
"is-live", .blurb("Act like a live source")
"Is Live", .default_value(DEFAULT_IS_LIVE)
"Act like a live source", .readwrite()
DEFAULT_IS_LIVE, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecString::builder("user-id")
glib::ParamSpecString::new( .nick("User-id")
"user-id", .blurb("HTTP location URI user id for authentication")
"User-id", .readwrite()
"HTTP location URI user id for authentication", .mutable_ready()
None, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecString::builder("user-pw")
), .nick("User-pw")
glib::ParamSpecString::new( .blurb("HTTP location URI user password for authentication")
"user-pw", .readwrite()
"User-pw", .mutable_ready()
"HTTP location URI user password for authentication", .build(),
None, glib::ParamSpecUInt::builder("timeout")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Timeout")
), .blurb("Value in seconds to timeout a blocking I/O (0 = No timeout).")
glib::ParamSpecUInt::new( .maximum(3600)
"timeout", .default_value(DEFAULT_TIMEOUT)
"Timeout", .readwrite()
"Value in seconds to timeout a blocking I/O (0 = No timeout).", .mutable_ready()
0, .build(),
3600, glib::ParamSpecBoolean::builder("compress")
DEFAULT_TIMEOUT, .nick("Compress")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .blurb("Allow compressed content encodings")
), .default_value(DEFAULT_COMPRESS)
glib::ParamSpecBoolean::new( .readwrite()
"compress", .mutable_ready()
"Compress", .build(),
"Allow compressed content encodings", glib::ParamSpecBoxed::builder("extra-headers", gst::Structure::static_type())
DEFAULT_COMPRESS, .nick("Extra Headers")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .blurb("Extra headers to append to the HTTP request")
), .readwrite()
glib::ParamSpecBoxed::new( .mutable_ready()
"extra-headers", .build(),
"Extra Headers", glib::ParamSpecBoxed::builder("cookies", Vec::<String>::static_type())
"Extra headers to append to the HTTP request", .nick("Cookies")
gst::Structure::static_type(), .nick("HTTP request cookies")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .readwrite()
), .mutable_ready()
glib::ParamSpecBoxed::new( .build(),
"cookies", glib::ParamSpecBoolean::builder("iradio-mode")
"Cookies", .nick("I-Radio Mode")
"HTTP request cookies", .blurb("Enable internet radio mode (ask server to send shoutcast/icecast metadata interleaved with the actual stream data")
Vec::<String>::static_type(), .default_value(DEFAULT_IRADIO_MODE)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .readwrite()
), .mutable_ready()
glib::ParamSpecBoolean::new( .build(),
"iradio-mode", glib::ParamSpecBoolean::builder("keep-alive")
"I-Radio Mode", .nick("Keep Alive")
"Enable internet radio mode (ask server to send shoutcast/icecast metadata interleaved with the actual stream data", .blurb("Use HTTP persistent connections")
DEFAULT_IRADIO_MODE, .default_value(DEFAULT_KEEP_ALIVE)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .readwrite()
), .mutable_ready()
glib::ParamSpecBoolean::new( .build(),
"keep-alive", glib::ParamSpecString::builder("proxy")
"Keep Alive", .nick("Proxy")
"Use HTTP persistent connections", .blurb("HTTP proxy server URI")
DEFAULT_KEEP_ALIVE, .default_value(Some(""))
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .readwrite()
), .mutable_ready()
glib::ParamSpecString::new( .build(),
"proxy", glib::ParamSpecString::builder("proxy-id")
"Proxy", .nick("Proxy-id")
"HTTP proxy server URI", .blurb("HTTP proxy URI user id for authentication")
Some(""), .default_value(Some(""))
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .readwrite()
), .mutable_ready()
glib::ParamSpecString::new( .build(),
"proxy-id", glib::ParamSpecString::builder("proxy-pw")
"Proxy-id", .nick("Proxy-pw")
"HTTP proxy URI user id for authentication", .blurb("HTTP proxy URI user password for authentication")
Some(""), .default_value(Some(""))
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .readwrite()
), .mutable_ready()
glib::ParamSpecString::new( .build(),
"proxy-pw",
"Proxy-pw",
"HTTP proxy URI user password for authentication",
Some(""),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -103,37 +103,31 @@ impl ObjectImpl for TextAhead {
let default = Settings::default(); let default = Settings::default();
vec![ vec![
glib::ParamSpecUInt::new( glib::ParamSpecUInt::builder("n-ahead")
"n-ahead", .nick("n-ahead")
"n-ahead", .blurb("The number of ahead text buffers to display along with the current one")
"The number of ahead text buffers to display along with the current one", .default_value(default.n_ahead)
0, .mutable_playing()
u32::MAX, .build(),
default.n_ahead, glib::ParamSpecString::builder("separator")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .nick("Separator")
), .blurb("Text inserted between each text buffers")
glib::ParamSpecString::new( .default_value(Some(&default.separator))
"separator", .mutable_playing()
"Separator", .build(),
"Text inserted between each text buffers",
Some(&default.separator),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
// See https://developer.gimp.org/api/2.0/pango/PangoMarkupFormat.html for pango attributes // See https://developer.gimp.org/api/2.0/pango/PangoMarkupFormat.html for pango attributes
glib::ParamSpecString::new( glib::ParamSpecString::builder("current-attributes")
"current-attributes", .nick("Current attributes")
"Current attributes", .blurb("Pango span attributes to set on the text from the current buffer")
"Pango span attributes to set on the text from the current buffer", .default_value(Some(&default.current_attributes))
Some(&default.current_attributes), .mutable_playing()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .build(),
), glib::ParamSpecString::builder("ahead-attributes")
glib::ParamSpecString::new( .nick("Ahead attributes")
"ahead-attributes", .blurb("Pango span attributes to set on the ahead text")
"Ahead attributes", .default_value(Some(&default.ahead_attributes))
"Pango span attributes to set on the ahead text", .mutable_playing()
Some(&default.ahead_attributes), .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
] ]
}); });

View file

@ -141,19 +141,17 @@ impl ObjectSubclass for RegEx {
impl ObjectImpl for RegEx { impl ObjectImpl for RegEx {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![gst::ParamSpecArray::new( vec![gst::ParamSpecArray::builder("commands")
"commands", .nick("Commands")
"Commands", .blurb("A set of commands to apply on input text")
"A set of commands to apply on input text", .element_spec(
Some(&glib::ParamSpecBoxed::new( &glib::ParamSpecBoxed::builder("command", gst::Structure::static_type())
"command", .nick("Command")
"Command", .blurb("A command to apply on input text")
"A command to apply on input text", .build(),
gst::Structure::static_type(), )
glib::ParamFlags::READWRITE, .mutable_playing()
)), .build()]
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
)]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -456,45 +456,37 @@ impl ObjectSubclass for TextWrap {
impl ObjectImpl for TextWrap { impl ObjectImpl for TextWrap {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> =
vec![ Lazy::new(|| {
glib::ParamSpecString::new( vec![
"dictionary", glib::ParamSpecString::builder("dictionary")
"Dictionary", .nick("Dictionary")
"Path to a dictionary to load at runtime to perform hyphenation, see \ .blurb("Path to a dictionary to load at runtime to perform hyphenation, see \
<https://docs.rs/crate/hyphenation/0.7.1> for more information", <https://docs.rs/crate/hyphenation/0.7.1> for more information")
None, .mutable_playing()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .build(),
), glib::ParamSpecUInt::builder("columns")
glib::ParamSpecUInt::new( .nick("Columns")
"columns", .blurb("Maximum number of columns for any given line")
"Columns", .minimum(1)
"Maximum number of columns for any given line", .default_value(DEFAULT_COLUMNS)
1, .mutable_playing()
std::u32::MAX, .build(),
DEFAULT_COLUMNS, glib::ParamSpecUInt::builder("lines")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .nick("Lines")
), .blurb("Split input buffer into output buffers with max lines (0=do not split)")
glib::ParamSpecUInt::new( .default_value(DEFAULT_LINES)
"lines", .mutable_playing()
"Lines", .build(),
"Split input buffer into output buffers with max lines (0=do not split)", glib::ParamSpecUInt64::builder("accumulate-time")
0, .nick("accumulate-time")
std::u32::MAX, .blurb("Cut-off time for input text accumulation (0=do not accumulate)")
DEFAULT_LINES, .maximum(u64::MAX - 1)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .default_value(DEFAULT_ACCUMULATE.nseconds())
), .mutable_playing()
glib::ParamSpecUInt64::new( .build(),
"accumulate-time",
"accumulate-time",
"Cut-off time for input text accumulation (0=do not accumulate)",
0,
u64::MAX - 1,
DEFAULT_ACCUMULATE.nseconds(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
] ]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()
} }

View file

@ -82,14 +82,14 @@ impl ObjectImpl for ProgressBin {
// Metadata for the element's properties // Metadata for the element's properties
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecEnum::new( vec![
"output", glib::ParamSpecEnum::builder("output", ProgressBinOutput::static_type())
"Output", .nick("Output")
"Defines the output type of the progressbin", .blurb("Defines the output type of the progressbin")
ProgressBinOutput::static_type(), .default_value(DEFAULT_OUTPUT_TYPE as i32)
DEFAULT_OUTPUT_TYPE as i32, .mutable_playing()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .build(),
)] ]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -98,22 +98,19 @@ impl ObjectImpl for Rgb2Gray {
// Metadata for the properties // Metadata for the properties
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecBoolean::new( glib::ParamSpecBoolean::builder("invert")
"invert", .nick("Invert")
"Invert", .blurb("Invert grayscale output")
"Invert grayscale output", .default_value(DEFAULT_INVERT)
DEFAULT_INVERT, .mutable_playing()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .build(),
), glib::ParamSpecUInt::builder("shift")
glib::ParamSpecUInt::new( .nick("Shift")
"shift", .blurb("Shift grayscale output (wrapping around)")
"Shift", .maximum(255)
"Shift grayscale output (wrapping around)", .default_value(DEFAULT_SHIFT)
0, .mutable_playing()
255, .build(),
DEFAULT_SHIFT,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
] ]
}); });

View file

@ -168,47 +168,39 @@ impl ObjectImpl for SineSrc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecUInt::new( glib::ParamSpecUInt::builder("samples-per-buffer")
"samples-per-buffer", .nick("Samples Per Buffer")
"Samples Per Buffer", .blurb("Number of samples per output buffer")
"Number of samples per output buffer", .minimum(1)
1, .default_value(DEFAULT_SAMPLES_PER_BUFFER)
u32::MAX, .mutable_ready()
DEFAULT_SAMPLES_PER_BUFFER, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecUInt::builder("freq")
), .nick("Frequency")
glib::ParamSpecUInt::new( .blurb("Frequency")
"freq", .minimum(1)
"Frequency", .default_value(DEFAULT_FREQ)
"Frequency", .mutable_playing()
1, .build(),
u32::MAX, glib::ParamSpecDouble::builder("volume")
DEFAULT_FREQ, .nick("Volume")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .blurb("Output volume")
), .maximum(10.0)
glib::ParamSpecDouble::new( .default_value(DEFAULT_VOLUME)
"volume", .mutable_playing()
"Volume", .build(),
"Output volume", glib::ParamSpecBoolean::builder("mute")
0.0, .nick("Mute")
10.0, .blurb("Mute")
DEFAULT_VOLUME, .default_value(DEFAULT_MUTE)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .mutable_playing()
), .build(),
glib::ParamSpecBoolean::new( glib::ParamSpecBoolean::builder("is-live")
"mute", .nick("Is Live")
"Mute", .blurb("(Pseudo) live output")
"Mute", .default_value(DEFAULT_IS_LIVE)
DEFAULT_MUTE, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .build(),
),
glib::ParamSpecBoolean::new(
"is-live",
"Is Live",
"(Pseudo) live output",
DEFAULT_IS_LIVE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -732,22 +732,19 @@ impl ObjectImpl for Rgb2Gray {
// Metadata for the properties // Metadata for the properties
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpec::boolean( glib::ParamSpecBoolean::builder("invert")
"invert", .nick("Invert")
"Invert", .blurb("Invert grayscale output")
"Invert grayscale output", .default_value(DEFAULT_INVERT)
DEFAULT_INVERT, .mutable_playing()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .build(),
), glib::ParamSpecUInt::builder("shift")
glib::ParamSpec::uint( .nick("Shift")
"shift", .blurb("Shift grayscale output (wrapping around)")
"Shift", .maximum(255)
"Shift grayscale output (wrapping around)", .default_value(DEFAULT_SHIFT)
0, .mutable_playing()
255, .build(),
DEFAULT_SHIFT,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
] ]
}); });

View file

@ -168,47 +168,39 @@ impl ObjectImpl for SineSrc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpec::uint( glib::ParamSpecUInt::builder("samples-per-buffer")
"samples-per-buffer", .nick("Samples Per Buffer")
"Samples Per Buffer", .blurb("Number of samples per output buffer")
"Number of samples per output buffer", .minimum(1)
1, .default_value(DEFAULT_SAMPLES_PER_BUFFER)
u32::MAX, .mutable_ready()
DEFAULT_SAMPLES_PER_BUFFER, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecUInt::builder("freq")
), .nick("Frequency")
glib::ParamSpec::uint( .blurb("Frequency")
"freq", .minimum(1)
"Frequency", .default_value(DEFAULT_FREQ)
"Frequency", .mutable_playing()
1, .build(),
u32::MAX, glib::ParamSpecDouble::builder("volume")
DEFAULT_FREQ, .nick("Volume")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .blurb("Output volume")
), .maximum(10.0)
glib::ParamSpec::double( .default_value(DEFAULT_VOLUME)
"volume", .mutable_playing()
"Volume", .build(),
"Output volume", glib::ParamSpecBoolean::builder("mute")
0.0, .nick("Mute")
10.0, .blurb("Mute")
DEFAULT_VOLUME, .default_value(DEFAULT_MUTE)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .mutable_playing()
), .build(),
glib::ParamSpec::boolean( glib::ParamSpecBoolean::builder("is-live")
"mute", .nick("Is Live")
"Mute", .blurb("(Pseudo) live output")
"Mute", .default_value(DEFAULT_IS_LIVE)
DEFAULT_MUTE, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .build(),
),
glib::ParamSpec::boolean(
"is-live",
"Is Live",
"(Pseudo) live output",
DEFAULT_IS_LIVE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -57,13 +57,14 @@ impl ObjectSubclass for CustomSource {
impl ObjectImpl for CustomSource { impl ObjectImpl for CustomSource {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecObject::new( vec![
"source", glib::ParamSpecObject::builder("source", gst::Element::static_type())
"Source", .nick("Source")
"Source", .blurb("Source")
gst::Element::static_type(), .write_only()
glib::ParamFlags::WRITABLE | glib::ParamFlags::CONSTRUCT_ONLY, .construct_only()
)] .build(),
]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -198,132 +198,109 @@ impl ObjectImpl for FallbackSrc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecBoolean::new( glib::ParamSpecBoolean::builder("enable-audio")
"enable-audio", .nick("Enable Audio")
"Enable Audio", .blurb("Enable the audio stream, this will output silence if there's no audio in the configured URI")
"Enable the audio stream, this will output silence if there's no audio in the configured URI", .default_value(true)
true, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecBoolean::builder("enable-video")
glib::ParamSpecBoolean::new( .nick("Enable Video")
"enable-video", .blurb("Enable the video stream, this will output black or the fallback video if there's no video in the configured URI")
"Enable Video", .default_value(true)
"Enable the video stream, this will output black or the fallback video if there's no video in the configured URI", .mutable_ready()
true, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecString::builder("uri")
), .nick("URI")
glib::ParamSpecString::new("uri", "URI", "URI to use", None, glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY), .blurb("URI to use")
glib::ParamSpecObject::new( .mutable_ready()
"source", .build(),
"Source", glib::ParamSpecObject::builder("source", gst::Element::static_type())
"Source to use instead of the URI", .nick("Source")
gst::Element::static_type(), .blurb("Source to use instead of the URI")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .mutable_ready()
), .build(),
glib::ParamSpecString::new( glib::ParamSpecString::builder("fallback-uri")
"fallback-uri", .nick("Fallback URI")
"Fallback URI", .blurb("Fallback URI to use for video in case the main stream doesn't work")
"Fallback URI to use for video in case the main stream doesn't work", .mutable_ready()
None, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecUInt64::builder("timeout")
), .nick("Timeout")
glib::ParamSpecUInt64::new( .blurb("Timeout for switching to the fallback URI")
"timeout", .maximum(std::u64::MAX - 1)
"Timeout", .default_value(5 * *gst::ClockTime::SECOND)
"Timeout for switching to the fallback URI", .mutable_ready()
0, .build(),
std::u64::MAX - 1, glib::ParamSpecUInt64::builder("restart-timeout")
5 * *gst::ClockTime::SECOND, .nick("Timeout")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .blurb("Timeout for restarting an active source")
), .maximum(std::u64::MAX - 1)
glib::ParamSpecUInt64::new( .default_value(5 * *gst::ClockTime::SECOND)
"restart-timeout", .mutable_ready()
"Timeout", .build(),
"Timeout for restarting an active source", glib::ParamSpecUInt64::builder("retry-timeout")
0, .nick("Retry Timeout")
std::u64::MAX - 1, .blurb("Timeout for stopping after repeated failure")
5 * *gst::ClockTime::SECOND, .maximum(std::u64::MAX - 1)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .default_value(60 * *gst::ClockTime::SECOND)
), .mutable_ready()
glib::ParamSpecUInt64::new( .build(),
"retry-timeout", glib::ParamSpecBoolean::builder("restart-on-eos")
"Retry Timeout", .nick("Restart on EOS")
"Timeout for stopping after repeated failure", .blurb("Restart source on EOS")
0, .default_value(false)
std::u64::MAX - 1, .mutable_ready()
60 * *gst::ClockTime::SECOND, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecEnum::builder("status", Status::static_type())
), .nick("Status")
glib::ParamSpecBoolean::new( .blurb("Current source status")
"restart-on-eos", .default_value(Status::Stopped as i32)
"Restart on EOS", .read_only()
"Restart source on EOS", .build(),
false, glib::ParamSpecUInt64::builder("min-latency")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Minimum Latency")
), .blurb("When the main source has a higher latency than the fallback source \
glib::ParamSpecEnum::new(
"status",
"Status",
"Current source status",
Status::static_type(),
Status::Stopped as i32,
glib::ParamFlags::READABLE,
),
glib::ParamSpecUInt64::new(
"min-latency",
"Minimum Latency",
"When the main source has a higher latency than the fallback source \
this allows to configure a minimum latency that would be configured \ this allows to configure a minimum latency that would be configured \
if initially the fallback is enabled", if initially the fallback is enabled")
0, .maximum(std::u64::MAX - 1)
std::u64::MAX - 1, .mutable_ready()
0, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecInt64::builder("buffer-duration")
), .nick("Buffer Duration")
glib::ParamSpecInt64::new( .blurb("Buffer duration when buffering streams (-1 default value)")
"buffer-duration", .minimum(-1)
"Buffer Duration", .maximum(std::i64::MAX - 1)
"Buffer duration when buffering streams (-1 default value)", .default_value(-1)
-1, .mutable_ready()
std::i64::MAX - 1, .build(),
-1, glib::ParamSpecBoxed::builder("statistics", gst::Structure::static_type())
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Statistics")
), .blurb("Various statistics")
glib::ParamSpecBoxed::new( .read_only()
"statistics", .build(),
"Statistics", glib::ParamSpecBoolean::builder("manual-unblock")
"Various statistics", .nick("Manual unblock")
gst::Structure::static_type(), .blurb("When enabled, the application must call the unblock signal, except for live streams")
glib::ParamFlags::READABLE, .default_value(false)
), .mutable_ready()
glib::ParamSpecBoolean::new( .build(),
"manual-unblock", glib::ParamSpecBoolean::builder("immediate-fallback")
"Manual unblock", .nick("Immediate fallback")
"When enabled, the application must call the unblock signal, except for live streams", .blurb("Forward the fallback streams immediately at startup, when the primary streams are slow to start up and immediate output is required")
false, .default_value(false)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .mutable_ready()
), .build(),
glib::ParamSpecBoolean::new( glib::ParamSpecBoxed::builder("fallback-video-caps", gst::Caps::static_type())
"immediate-fallback", .nick("Fallback Video Caps")
"Immediate fallback", .blurb("Raw video caps for fallback stream")
"Forward the fallback streams immediately at startup, when the primary streams are slow to start up and immediate output is required", .mutable_ready()
false, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecBoxed::builder("fallback-audio-caps", gst::Caps::static_type())
), .nick("Fallback Audio Caps")
glib::ParamSpecBoxed::new( .blurb("Raw audio caps for fallback stream")
"fallback-video-caps", .mutable_ready()
"Fallback Video Caps", .build(),
"Raw video caps for fallback stream",
gst::Caps::static_type(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecBoxed::new(
"fallback-audio-caps",
"Fallback Audio Caps",
"Raw audio caps for fallback stream",
gst::Caps::static_type(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -73,22 +73,14 @@ impl ObjectImpl for VideoFallbackSource {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("uri")
"uri", .nick("URI")
"URI", .blurb("URI to use for video in case the main stream doesn't work")
"URI to use for video in case the main stream doesn't work", .build(),
None, glib::ParamSpecUInt64::builder("min-latency")
glib::ParamFlags::READWRITE, .nick("Minimum Latency")
), .blurb("Minimum Latency")
glib::ParamSpecUInt64::new( .build(),
"min-latency",
"Minimum Latency",
"Minimum Latency",
0,
std::u64::MAX,
0,
glib::ParamFlags::READWRITE,
),
] ]
}); });

View file

@ -136,22 +136,17 @@ impl ObjectImpl for FallbackSwitchSinkPad {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecUInt::new( glib::ParamSpecUInt::builder(PROP_PRIORITY)
PROP_PRIORITY, .nick("Stream Priority")
"Stream Priority", .blurb("Selection priority for this stream")
"Selection priority for this stream", .default_value(SinkSettings::default().priority)
0, .build(),
std::u32::MAX, glib::ParamSpecBoolean::builder(PROP_IS_HEALTHY)
SinkSettings::default().priority, .nick("Stream Health")
glib::ParamFlags::READWRITE, .blurb("Whether this stream is healthy")
), .default_value(false)
glib::ParamSpecBoolean::new( .read_only()
PROP_IS_HEALTHY, .build(),
"Stream Health",
"Whether this stream is healthy",
false,
glib::ParamFlags::READABLE,
),
] ]
}); });
@ -1073,54 +1068,44 @@ impl ObjectImpl for FallbackSwitch {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecObject::new( glib::ParamSpecObject::builder(PROP_ACTIVE_PAD, gst::Pad::static_type())
PROP_ACTIVE_PAD, .nick("Active Pad")
"Active Pad", .blurb("Currently active pad")
"Currently active pad", .mutable_playing()
gst::Pad::static_type(), .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, glib::ParamSpecUInt64::builder(PROP_TIMEOUT)
), .nick("Input timeout")
glib::ParamSpecUInt64::new( .blurb("Timeout on an input before switching to a lower priority input.")
PROP_TIMEOUT, .maximum(std::u64::MAX - 1)
"Input timeout", .default_value(Settings::default().timeout.nseconds())
"Timeout on an input before switching to a lower priority input.", .mutable_playing()
0, .build(),
std::u64::MAX - 1, glib::ParamSpecUInt64::builder(PROP_LATENCY)
Settings::default().timeout.nseconds(), .nick("Latency")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .blurb("Additional latency in live mode to allow upstream to take longer to produce buffers for the current position (in nanoseconds)")
), .maximum(std::u64::MAX - 1)
glib::ParamSpecUInt64::new( .default_value(Settings::default().latency.nseconds())
PROP_LATENCY, .mutable_ready()
"Latency", .build(),
"Additional latency in live mode to allow upstream to take longer to produce buffers for the current position (in nanoseconds)", glib::ParamSpecUInt64::builder(PROP_MIN_UPSTREAM_LATENCY)
0, .nick("Minimum Upstream Latency")
std::u64::MAX - 1, .blurb("When sources with a higher latency are expected to be plugged in dynamically after the fallbackswitch has started playing, this allows overriding the minimum latency reported by the initial source(s). This is only taken into account when larger than the actually reported minimum latency. (nanoseconds)")
Settings::default().latency.nseconds(), .maximum(std::u64::MAX - 1)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .default_value(Settings::default().min_upstream_latency.nseconds())
), .mutable_ready()
glib::ParamSpecUInt64::new( .build(),
PROP_MIN_UPSTREAM_LATENCY, glib::ParamSpecBoolean::builder(PROP_IMMEDIATE_FALLBACK)
"Minimum Upstream Latency", .nick("Immediate fallback")
"When sources with a higher latency are expected to be plugged in dynamically after the fallbackswitch has started playing, this allows overriding the minimum latency reported by the initial source(s). This is only taken into account when larger than the actually reported minimum latency. (nanoseconds)", .blurb("Forward lower-priority streams immediately at startup, when the stream with priority 0 is slow to start up and immediate output is required")
0, .default_value(Settings::default().immediate_fallback)
std::u64::MAX - 1, .mutable_ready()
Settings::default().min_upstream_latency.nseconds(), .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecBoolean::builder(PROP_AUTO_SWITCH)
), .nick("Automatically switch pads")
glib::ParamSpecBoolean::new( .blurb("Automatically switch pads (If true, use the priority pad property, otherwise manual selection via the active-pad property)")
PROP_IMMEDIATE_FALLBACK, .default_value(Settings::default().auto_switch)
"Immediate fallback", .mutable_ready()
"Forward lower-priority streams immediately at startup, when the stream with priority 0 is slow to start up and immediate output is required", .build(),
Settings::default().immediate_fallback,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecBoolean::new(
PROP_AUTO_SWITCH,
"Automatically switch pads",
"Automatically switch pads (If true, use the priority pad property, otherwise manual selection via the active-pad property)",
Settings::default().auto_switch,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -1813,27 +1813,24 @@ impl ObjectImpl for ToggleRecord {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecBoolean::new( glib::ParamSpecBoolean::builder("record")
"record", .nick("Record")
"Record", .blurb("Enable/disable recording")
"Enable/disable recording", .default_value(DEFAULT_RECORD)
DEFAULT_RECORD, .mutable_playing()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .build(),
), glib::ParamSpecBoolean::builder("recording")
glib::ParamSpecBoolean::new( .nick("Recording")
"recording", .blurb("Whether recording is currently taking place")
"Recording", .default_value(DEFAULT_RECORD)
"Whether recording is currently taking place", .read_only()
DEFAULT_RECORD, .build(),
glib::ParamFlags::READABLE, glib::ParamSpecBoolean::builder("is-live")
), .nick("Live mode")
glib::ParamSpecBoolean::new( .blurb("Live mode: no \"gap eating\", forward incoming segment")
"is-live", .default_value(DEFAULT_LIVE)
"Live mode", .mutable_ready()
"Live mode: no \"gap eating\", forward incoming segment", .build(),
DEFAULT_LIVE,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -737,40 +737,27 @@ impl ObjectImpl for UriPlaylistBin {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecBoxed::new( glib::ParamSpecBoxed::builder("uris", Vec::<String>::static_type())
"uris", .nick("URIs")
"URIs", .blurb("URIs of the medias to play")
"URIs of the medias to play", .mutable_ready()
Vec::<String>::static_type(), .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecUInt::builder("iterations")
), .nick("Iterations")
glib::ParamSpecUInt::new( .blurb("Number of time the playlist items should be played each (0 = unlimited)")
"iterations", .default_value(1)
"Iterations", .mutable_ready()
"Number of time the playlist items should be played each (0 = unlimited)", .build(),
0, glib::ParamSpecUInt::builder("current-iteration")
u32::MAX, .nick("Current iteration")
1, .blurb("The index of the current playlist iteration, or 0 if the iterations property is 0 (unlimited playlist)")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .read_only()
), .build(),
glib::ParamSpecUInt::new( glib::ParamSpecUInt64::builder("current-uri-index")
"current-iteration", .nick("Current URI")
"Current iteration", .blurb("The index from the uris property of the current URI being played")
"The index of the current playlist iteration, or 0 if the iterations property is 0 (unlimited playlist)", .read_only()
0, .build(),
u32::MAX,
0,
glib::ParamFlags::READABLE,
),
glib::ParamSpecUInt64::new(
"current-uri-index",
"Current URI",
"The index from the uris property of the current URI being played",
0,
u64::MAX,
0,
glib::ParamFlags::READABLE,
),
] ]
}); });

View file

@ -218,29 +218,25 @@ impl ObjectImpl for CCDetect {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecUInt64::new( glib::ParamSpecUInt64::builder("window")
"window", .nick("Window")
"Window", .blurb("Window of time (in ns) to determine if captions exist in the stream")
"Window of time (in ns) to determine if captions exist in the stream", .maximum(u64::MAX - 1)
0, .default_value(DEFAULT_WINDOW.nseconds())
u64::MAX - 1, .mutable_playing()
DEFAULT_WINDOW.nseconds(), .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, glib::ParamSpecBoolean::builder("cc608")
), .nick("cc608")
glib::ParamSpecBoolean::new( .blurb("Whether CEA608 captions (CC1/CC3) have been detected")
"cc608", .default_value(DEFAULT_CC608)
"cc608", .read_only()
"Whether CEA608 captions (CC1/CC3) have been detected", .build(),
DEFAULT_CC608, glib::ParamSpecBoolean::builder("cc708")
glib::ParamFlags::READABLE, .nick("cc608")
), .blurb("Whether CEA708 captions (cc_data) have been detected")
glib::ParamSpecBoolean::new( .default_value(DEFAULT_CC708)
"cc708", .read_only()
"cc608", .build(),
"Whether CEA708 captions (cc_data) have been detected",
DEFAULT_CC708,
glib::ParamFlags::READABLE,
),
] ]
}); });

View file

@ -618,31 +618,27 @@ impl ObjectImpl for Cea608Overlay {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecInt::new( glib::ParamSpecInt::builder("field")
"field", .nick("Field")
"Field", .blurb("The field to render the caption for when available, (-1=automatic)")
"The field to render the caption for when available, (-1=automatic)", .minimum(-1)
-1, .maximum(1)
1, .default_value(DEFAULT_FIELD)
DEFAULT_FIELD, .mutable_playing()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .build(),
), glib::ParamSpecBoolean::builder("black-background")
glib::ParamSpecBoolean::new( .nick("Black background")
"black-background", .blurb("Whether a black background should be drawn behind text")
"Black background", .default_value(DEFAULT_BLACK_BACKGROUND)
"Whether a black background should be drawn behind text", .mutable_playing()
DEFAULT_BLACK_BACKGROUND, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, glib::ParamSpecUInt64::builder("timeout")
), .nick("Timeout")
glib::ParamSpecUInt64::new( .blurb("Duration after which to erase overlay when no cc data has arrived for the selected field")
"timeout", .minimum(gst::ClockTime::from_seconds(16).nseconds())
"Timeout", .default_value(u64::MAX)
"Duration after which to erase overlay when no cc data has arrived for the selected field", .mutable_playing()
gst::ClockTime::from_seconds(16).nseconds(), .build(),
u64::MAX,
u64::MAX,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
] ]
}); });

View file

@ -1014,14 +1014,15 @@ impl ObjectImpl for Cea608ToJson {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecBoolean::new( vec![glib::ParamSpecBoolean::builder("unbuffered")
"unbuffered", .nick("Unbuffered")
"Unbuffered", .blurb(
"Whether captions should be output at display time, \ "Whether captions should be output at display time, \
instead of waiting to determine durations. Useful with live input", instead of waiting to determine durations. Useful with live input",
DEFAULT_UNBUFFERED, )
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .default_value(DEFAULT_UNBUFFERED)
)] .mutable_ready()
.build()]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -476,20 +476,16 @@ impl ObjectImpl for MccEnc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecString::new( glib::ParamSpecString::builder("uuid")
"uuid", .nick("UUID")
"UUID", .blurb("UUID for the output file")
"UUID for the output file", .mutable_ready()
None, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecBoxed::builder("creation-date", glib::DateTime::static_type())
), .nick("Creation Date")
glib::ParamSpecBoxed::new( .blurb("Creation date for the output file")
"creation-date", .mutable_ready()
"Creation Date", .build(),
"Creation date for the output file",
glib::DateTime::static_type(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -418,15 +418,16 @@ impl ObjectImpl for SccEnc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecBoolean::new( vec![glib::ParamSpecBoolean::builder("output-padding")
"output-padding", .nick("Output padding")
"Output padding", .blurb(
"Whether the encoder should output padding captions. \ "Whether the encoder should output padding captions. \
The element will never add padding, but will encode padding \ The element will never add padding, but will encode padding \
buffers it receives if this property is set to true.", buffers it receives if this property is set to true.",
DEFAULT_OUTPUT_PADDING, )
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .default_value(DEFAULT_OUTPUT_PADDING)
)] .mutable_ready()
.build()]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -597,64 +597,49 @@ impl ObjectImpl for TranscriberBin {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecBoolean::new( glib::ParamSpecBoolean::builder("passthrough")
"passthrough", .nick("Passthrough")
"Passthrough", .blurb("Whether transcription should occur")
"Whether transcription should occur", .default_value(DEFAULT_PASSTHROUGH)
DEFAULT_PASSTHROUGH, .mutable_playing()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .build(),
), glib::ParamSpecUInt::builder("latency")
glib::ParamSpecUInt::new( .nick("Latency")
"latency", .blurb("Amount of milliseconds to allow the transcriber")
"Latency", .default_value(DEFAULT_LATENCY.mseconds() as u32)
"Amount of milliseconds to allow the transcriber", .mutable_ready()
0u32, .build(),
std::u32::MAX, glib::ParamSpecUInt::builder("accumulate-time")
DEFAULT_LATENCY.mseconds() as u32, .nick("accumulate-time")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .blurb("Cut-off time for textwrap accumulation, in milliseconds (0=do not accumulate). \
), Set this to a non-default value if you plan to switch to pop-on mode")
glib::ParamSpecUInt::new( .default_value(DEFAULT_ACCUMULATE.mseconds() as u32)
"accumulate-time", .mutable_ready()
"accumulate-time", .build(),
"Cut-off time for textwrap accumulation, in milliseconds (0=do not accumulate). \ glib::ParamSpecEnum::builder("mode", Cea608Mode::static_type())
Set this to a non-default value if you plan to switch to pop-on mode", .nick("Mode")
0, .blurb("Which closed caption mode to operate in")
u32::MAX, .default_value(DEFAULT_MODE as i32)
DEFAULT_ACCUMULATE.mseconds() as u32, .mutable_playing()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecBoxed::builder("cc-caps", gst::Caps::static_type())
glib::ParamSpecEnum::new( .nick("Closed Caption caps")
"mode", .blurb("The expected format of the closed captions")
"Mode", .mutable_ready()
"Which closed caption mode to operate in", .build(),
Cea608Mode::static_type(), glib::ParamSpecObject::builder("transcriber", gst::Element::static_type())
DEFAULT_MODE as i32, .nick("Transcriber")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .blurb("The transcriber element to use")
), .mutable_ready()
glib::ParamSpecBoxed::new( .build(),
"cc-caps", glib::ParamSpecEnum::builder("caption-source", CaptionSource::static_type())
"Closed Caption caps", .nick("Caption source")
"The expected format of the closed captions", .blurb("Caption source to use. \
gst::Caps::static_type(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecObject::new(
"transcriber",
"Transcriber",
"The transcriber element to use",
gst::Element::static_type(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecEnum::new(
"caption-source",
"Caption source",
"Caption source to use. \
If \"Transcription\" or \"Inband\" is selected, the caption meta \ If \"Transcription\" or \"Inband\" is selected, the caption meta \
of the other source will be dropped by transcriberbin", of the other source will be dropped by transcriberbin")
CaptionSource::static_type(), .default_value(DEFAULT_CAPTION_SOURCE as i32)
DEFAULT_CAPTION_SOURCE as i32, .mutable_playing()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .build(),
),
] ]
}); });

View file

@ -1061,41 +1061,33 @@ impl ObjectImpl for TtToCea608 {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecEnum::new( glib::ParamSpecEnum::builder("mode", Cea608Mode::static_type())
"mode", .nick("Mode")
"Mode", .blurb("Which mode to operate in")
"Which mode to operate in", .default_value(DEFAULT_MODE as i32)
Cea608Mode::static_type(), .mutable_playing()
DEFAULT_MODE as i32, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, glib::ParamSpecInt::builder("origin-row")
), .nick("Origin row")
glib::ParamSpecInt::new( .blurb("Origin row, (-1=automatic)")
"origin-row", .minimum(-1)
"Origin row", .maximum(14)
"Origin row, (-1=automatic)", .default_value(DEFAULT_ORIGIN_ROW)
-1, .mutable_playing()
14, .build(),
DEFAULT_ORIGIN_ROW, glib::ParamSpecUInt::builder("origin-column")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .nick("Origin column")
), .blurb("Origin column")
glib::ParamSpecUInt::new( .maximum(31)
"origin-column", .default_value(DEFAULT_ORIGIN_COLUMN)
"Origin column", .mutable_playing()
"Origin column", .build(),
0, glib::ParamSpecUInt64::builder("roll-up-timeout")
31, .nick("Roll-Up Timeout")
DEFAULT_ORIGIN_COLUMN, .blurb("Duration after which to erase display memory in roll-up mode")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .default_value(u64::MAX)
), .mutable_playing()
glib::ParamSpecUInt64::new( .build(),
"roll-up-timeout",
"Roll-Up Timeout",
"Duration after which to erase display memory in roll-up mode",
0,
u64::MAX,
u64::MAX,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
] ]
}); });

View file

@ -223,14 +223,14 @@ impl ObjectSubclass for TtToJson {
impl ObjectImpl for TtToJson { impl ObjectImpl for TtToJson {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecEnum::new( vec![
"mode", glib::ParamSpecEnum::builder("mode", Cea608Mode::static_type())
"Mode", .nick("Mode")
"Which mode to operate in", .blurb("Which mode to operate in")
Cea608Mode::static_type(), .default_value(DEFAULT_MODE as i32)
DEFAULT_MODE as i32, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
)] ]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -496,24 +496,20 @@ impl ObjectImpl for Dav1dDec {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecUInt::new( glib::ParamSpecUInt::builder("n-threads")
"n-threads", .nick("Number of threads")
"Number of threads", .blurb("Number of threads to use while decoding (set to 0 to use number of logical cores)")
"Number of threads to use while decoding (set to 0 to use number of logical cores)", .default_value(DEFAULT_N_THREADS)
0, .mutable_ready()
std::u32::MAX, .build(),
DEFAULT_N_THREADS, glib::ParamSpecInt64::builder("max-frame-delay")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .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)")
glib::ParamSpecInt64::new( .minimum(-1)
"max-frame-delay", .maximum(std::u32::MAX.into())
"Maximum frame delay", .default_value(DEFAULT_MAX_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)", .mutable_ready()
-1, .build(),
std::u32::MAX.into(),
DEFAULT_MAX_FRAME_DELAY,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -146,24 +146,22 @@ impl ObjectImpl for GifEnc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecInt::new( glib::ParamSpecInt::builder("repeat")
"repeat", .nick("Repeat")
"Repeat", .blurb("Repeat (-1 to loop forever, 0 .. n finite repetitions)")
"Repeat (-1 to loop forever, 0 .. n finite repetitions)", .minimum(-1)
-1, .maximum(std::u16::MAX as i32)
std::u16::MAX as i32, .default_value(DEFAULT_REPEAT)
DEFAULT_REPEAT, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecInt::builder("speed")
glib::ParamSpecInt::new( .nick("Speed")
"speed", .blurb("Speed (1 .. 30; higher value yields faster encoding)")
"Speed", .minimum(1)
"Speed (1 .. 30; higher value yields faster encoding)", .maximum(30)
1, .default_value(DEFAULT_SPEED)
30, .mutable_ready()
DEFAULT_SPEED, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -68,13 +68,13 @@ impl ObjectSubclass for PaintableSink {
impl ObjectImpl for PaintableSink { impl ObjectImpl for PaintableSink {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecObject::new( vec![
"paintable", glib::ParamSpecObject::builder("paintable", gtk::gdk::Paintable::static_type())
"Paintable", .nick("Paintable")
"The Paintable the sink renders to", .blurb("The Paintable the sink renders to")
gtk::gdk::Paintable::static_type(), .read_only()
glib::ParamFlags::READABLE, .build(),
)] ]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -163,60 +163,52 @@ impl ObjectImpl for HsvDetector {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecFloat::new( glib::ParamSpecFloat::builder("hue-ref")
"hue-ref", .nick("Hue reference")
"Hue reference", .blurb("Hue reference in degrees")
"Hue reference in degrees", .default_value(DEFAULT_HUE_REF)
f32::MIN, .mutable_playing()
f32::MAX, .build(),
DEFAULT_HUE_REF, glib::ParamSpecFloat::builder("hue-var")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .nick("Hue variation")
), .blurb("Allowed hue variation from the reference hue angle, in degrees")
glib::ParamSpecFloat::new( .minimum(0.0)
"hue-var", .maximum(180.0)
"Hue variation", .default_value(DEFAULT_HUE_VAR)
"Allowed hue variation from the reference hue angle, in degrees", .mutable_playing()
0.0, .build(),
180.0, glib::ParamSpecFloat::builder("saturation-ref")
DEFAULT_HUE_VAR, .nick("Saturation reference")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .blurb("Reference saturation value")
), .minimum(0.0)
glib::ParamSpecFloat::new( .maximum(1.0)
"saturation-ref", .default_value(DEFAULT_SATURATION_REF)
"Saturation reference", .mutable_playing()
"Reference saturation value", .build(),
0.0, glib::ParamSpecFloat::builder("saturation-var")
1.0, .nick("Saturation variation")
DEFAULT_SATURATION_REF, .blurb("Allowed saturation variation from the reference value")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .minimum(0.0)
), .maximum(1.0)
glib::ParamSpecFloat::new( .default_value(DEFAULT_SATURATION_VAR)
"saturation-var", .mutable_playing()
"Saturation variation", .build(),
"Allowed saturation variation from the reference value", glib::ParamSpecFloat::builder("value-ref")
0.0, .nick("Value reference")
1.0, .blurb("Reference value value")
DEFAULT_SATURATION_VAR, .minimum(0.0)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .maximum(1.0)
), .default_value(DEFAULT_VALUE_REF)
glib::ParamSpecFloat::new( .mutable_playing()
"value-ref", .build(),
"Value reference", glib::ParamSpecFloat::builder("value-var")
"Reference value value", .nick("Value variation")
0.0, .blurb("Allowed value variation from the reference value")
1.0, .minimum(0.0)
DEFAULT_VALUE_REF, .maximum(1.0)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .default_value(DEFAULT_VALUE_VAR)
), .mutable_playing()
glib::ParamSpecFloat::new( .build(),
"value-var",
"Value variation",
"Allowed value variation from the reference value",
0.0,
1.0,
DEFAULT_VALUE_VAR,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
] ]
}); });

View file

@ -123,51 +123,36 @@ impl ObjectImpl for HsvFilter {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecFloat::new( glib::ParamSpecFloat::builder("hue-shift")
"hue-shift", .nick("Hue shift")
"Hue shift", .blurb("Hue shifting in degrees")
"Hue shifting in degrees", .default_value(DEFAULT_HUE_SHIFT)
f32::MIN, .mutable_playing()
f32::MAX, .build(),
DEFAULT_HUE_SHIFT, glib::ParamSpecFloat::builder("saturation-mul")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .nick("Saturation multiplier")
), .blurb("Saturation multiplier to apply to the saturation value (before offset)")
glib::ParamSpecFloat::new( .default_value(DEFAULT_SATURATION_MUL)
"saturation-mul", .mutable_playing()
"Saturation multiplier", .build(),
"Saturation multiplier to apply to the saturation value (before offset)", glib::ParamSpecFloat::builder("saturation-off")
f32::MIN, .nick("Saturation offset")
f32::MAX, .blurb("Saturation offset to add to the saturation value (after multiplier)")
DEFAULT_SATURATION_MUL, .default_value(DEFAULT_SATURATION_OFF)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .mutable_playing()
), .build(),
glib::ParamSpecFloat::new( glib::ParamSpecFloat::builder("value-mul")
"saturation-off", .nick("Value multiplier")
"Saturation offset", .blurb("Value multiplier to apply to the value (before offset)")
"Saturation offset to add to the saturation value (after multiplier)", .default_value(DEFAULT_VALUE_MUL)
f32::MIN, .mutable_playing()
f32::MAX, .build(),
DEFAULT_SATURATION_OFF, glib::ParamSpecFloat::builder("value-off")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, .nick("Value offset")
), .blurb("Value offset to add to the value (after multiplier)")
glib::ParamSpecFloat::new( .default_value(DEFAULT_VALUE_OFF)
"value-mul", .mutable_playing()
"Value multiplier", .build(),
"Value multiplier to apply to the value (before offset)",
f32::MIN,
f32::MAX,
DEFAULT_VALUE_MUL,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpecFloat::new(
"value-off",
"Value offset",
"Value offset to add to the value (after multiplier)",
f32::MIN,
f32::MAX,
DEFAULT_VALUE_OFF,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
] ]
}); });

View file

@ -243,145 +243,106 @@ impl ObjectImpl for Rav1Enc {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecUInt::new( glib::ParamSpecUInt::builder("speed-preset")
"speed-preset", .nick("Speed Preset")
"Speed Preset", .blurb("Speed preset (10 fastest, 0 slowest)")
"Speed preset (10 fastest, 0 slowest)", .maximum(10)
0, .default_value(DEFAULT_SPEED_PRESET)
10, .mutable_ready()
DEFAULT_SPEED_PRESET, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecBoolean::builder("low-latency")
), .nick("Low Latency")
glib::ParamSpecBoolean::new( .blurb("Low Latency")
"low-latency", .default_value(DEFAULT_LOW_LATENCY)
"Low Latency", .mutable_ready()
"Low Latency", .build(),
DEFAULT_LOW_LATENCY, glib::ParamSpecUInt64::builder("min-key-frame-interval")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Min Key Frame Interval")
), .blurb("Min Key Frame Interval")
glib::ParamSpecUInt64::new( .default_value(DEFAULT_MIN_KEY_FRAME_INTERVAL)
"min-key-frame-interval", .mutable_ready()
"Min Key Frame Interval", .build(),
"Min Key Frame Interval", glib::ParamSpecUInt64::builder("max-key-frame-interval")
0, .nick("Max Key Frame Interval")
std::u64::MAX, .blurb("Max Key Frame Interval")
DEFAULT_MIN_KEY_FRAME_INTERVAL, .default_value(DEFAULT_MAX_KEY_FRAME_INTERVAL)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .mutable_ready()
), .build(),
glib::ParamSpecUInt64::new( glib::ParamSpecUInt64::builder("switch-frame-interval")
"max-key-frame-interval", .nick("Switch Frame Interval")
"Max Key Frame Interval", .blurb("Switch Frame Interval")
"Max Key Frame Interval", .default_value(DEFAULT_SWITCH_FRAME_INTERVAL)
0, .mutable_ready()
std::u64::MAX, .build(),
DEFAULT_MAX_KEY_FRAME_INTERVAL, glib::ParamSpecInt::builder("bitrate")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Bitrate")
), .blurb("Bitrate")
glib::ParamSpecUInt64::new( .minimum(0)
"switch-frame-interval", .default_value(DEFAULT_BITRATE)
"Switch Frame Interval", .mutable_ready()
"Switch Frame Interval", .build(),
0, glib::ParamSpecUInt::builder("quantizer")
std::u64::MAX, .nick("Quantizer")
DEFAULT_SWITCH_FRAME_INTERVAL, .blurb("Quantizer")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .default_value(DEFAULT_QUANTIZER as u32)
), .mutable_ready()
glib::ParamSpecInt::new( .build(),
"bitrate", glib::ParamSpecUInt::builder("min-quantizer")
"Bitrate", .nick("Min Quantizer")
"Bitrate", .blurb("Min Quantizer")
0, .maximum(std::u8::MAX as u32)
std::i32::MAX, .default_value(DEFAULT_MIN_QUANTIZER as u32)
DEFAULT_BITRATE, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecUInt::builder("tile-cols")
glib::ParamSpecUInt::new( .nick("Tile Cols")
"quantizer", .blurb("Tile Cols")
"Quantizer", .default_value(DEFAULT_TILE_COLS as u32)
"Quantizer", .mutable_ready()
0, .build(),
std::u32::MAX, glib::ParamSpecUInt::builder("tile-rows")
DEFAULT_QUANTIZER as u32, .nick("Tile Rows")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .blurb("Tile Rows")
), .default_value(DEFAULT_TILE_ROWS as u32)
glib::ParamSpecUInt::new( .mutable_ready()
"min-quantizer", .build(),
"Min Quantizer", glib::ParamSpecUInt::builder("tiles")
"Min Quantizer", .nick("Tiles")
0, .blurb("Tiles")
std::u8::MAX as u32, .default_value(DEFAULT_TILES as u32)
DEFAULT_MIN_QUANTIZER as u32, .mutable_ready()
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .build(),
), glib::ParamSpecInt::builder("rdo-lookahead-frames")
glib::ParamSpecUInt::new( .nick("RDO Lookahead Frames")
"tile-cols", .blurb("RDO Lookahead Frames")
"Tile Cols", .minimum(-1)
"Tile Cols", .default_value(DEFAULT_RDO_LOOKAHEAD_FRAMES)
0, .mutable_ready()
std::u32::MAX, .build(),
DEFAULT_TILE_COLS as u32, glib::ParamSpecEnum::builder("tune", Tune::static_type())
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Tune")
), .blurb("Tune")
glib::ParamSpecUInt::new( .default_value(DEFAULT_TUNE as i32)
"tile-rows", .mutable_ready()
"Tile Rows", .build(),
"Tile Rows", glib::ParamSpecInt::builder("reservoir-frame-delay")
0, .nick("Reservoir Frame Delay")
std::u32::MAX, .blurb("Reservoir Frame Delay")
DEFAULT_TILE_ROWS as u32, .default_value(DEFAULT_RESERVOIR_FRAME_DELAY)
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .mutable_ready()
), .build(),
glib::ParamSpecUInt::new( glib::ParamSpecBoolean::builder("error-resilient")
"tiles", .nick("Error Resilient")
"Tiles", .blurb("Error Resilient")
"Tiles", .default_value(DEFAULT_ERROR_RESILIENT)
0, .mutable_ready()
std::u32::MAX, .build(),
DEFAULT_TILES as u32, glib::ParamSpecUInt::builder("threads")
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, .nick("Threads")
), .blurb("Threads")
glib::ParamSpecInt::new( .default_value(DEFAULT_THREADS as u32)
"rdo-lookahead-frames", .mutable_ready()
"RDO Lookahead Frames", .build(),
"RDO Lookahead Frames",
-1,
std::i32::MAX,
DEFAULT_RDO_LOOKAHEAD_FRAMES,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecEnum::new(
"tune",
"Tune",
"Tune",
Tune::static_type(),
DEFAULT_TUNE as i32,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecInt::new(
"reservoir-frame-delay",
"Reservoir Frame Delay",
"Reservoir Frame Delay",
std::i32::MIN,
std::i32::MAX,
DEFAULT_RESERVOIR_FRAME_DELAY,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecBoolean::new(
"error-resilient",
"Error Resilient",
"Error Resilient",
DEFAULT_ERROR_RESILIENT,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecUInt::new(
"threads",
"Threads",
"Threads",
0,
std::u32::MAX,
DEFAULT_THREADS as u32,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -176,22 +176,18 @@ impl ObjectImpl for PngEncoder {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecEnum::new( glib::ParamSpecEnum::builder("compression-level", CompressionLevel::static_type())
"compression-level", .nick("Compression level")
"Compression level", .blurb("Selects the compression algorithm to use")
"Selects the compression algorithm to use", .default_value(DEFAULT_COMPRESSION_LEVEL as i32)
CompressionLevel::static_type(), .mutable_ready()
DEFAULT_COMPRESSION_LEVEL as i32, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY, glib::ParamSpecEnum::builder("filter", FilterType::static_type())
), .nick("Filter")
glib::ParamSpecEnum::new( .blurb("Selects the filter type to applied")
"filter", .default_value(DEFAULT_FILTER_TYPE as i32)
"Filter", .mutable_ready()
"Selects the filter type to applied", .build(),
FilterType::static_type(),
DEFAULT_FILTER_TYPE as i32,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
] ]
}); });

View file

@ -278,15 +278,12 @@ impl ObjectSubclass for RoundedCorners {
impl ObjectImpl for RoundedCorners { impl ObjectImpl for RoundedCorners {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecUInt::new( vec![glib::ParamSpecUInt::builder("border-radius-px")
"border-radius-px", .nick("Border radius in pixels")
"Border radius in pixels", .blurb("Draw rounded corners with given border radius")
"Draw rounded corners with given border radius", .default_value(DEFAULT_BORDER_RADIUS)
0, .mutable_playing()
u32::MAX, .build()]
DEFAULT_BORDER_RADIUS,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
)]
}); });
PROPERTIES.as_ref() PROPERTIES.as_ref()

View file

@ -136,24 +136,21 @@ impl ObjectImpl for ColorDetect {
fn properties() -> &'static [glib::ParamSpec] { fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| { static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![ vec![
glib::ParamSpecUInt::new( glib::ParamSpecUInt::builder("quality")
"quality", .nick("Quality of an output colors")
"Quality of an output colors", .blurb("A step in pixels to improve performance")
"A step in pixels to improve performance", .maximum(10)
0, .default_value(DEFAULT_QUALITY)
10, .mutable_playing()
DEFAULT_QUALITY, .build(),
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING, glib::ParamSpecUInt::builder("max-colors")
), .nick("Number of colors in the output palette")
glib::ParamSpecUInt::new( .blurb("Actual colors count can be lower depending on the image")
"max-colors", .minimum(2)
"Number of colors in the output palette", .maximum(255)
"Actual colors count can be lower depending on the image", .default_value(DEFAULT_MAX_COLORS)
2, .mutable_playing()
255, .build(),
DEFAULT_MAX_COLORS,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
] ]
}); });