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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1014,14 +1014,15 @@ impl ObjectImpl for Cea608ToJson {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecBoolean::new(
"unbuffered",
"Unbuffered",
"Whether captions should be output at display time, \
vec![glib::ParamSpecBoolean::builder("unbuffered")
.nick("Unbuffered")
.blurb(
"Whether captions should be output at display time, \
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()

View file

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

View file

@ -418,15 +418,16 @@ impl ObjectImpl for SccEnc {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![glib::ParamSpecBoolean::new(
"output-padding",
"Output padding",
"Whether the encoder should output padding captions. \
vec![glib::ParamSpecBoolean::builder("output-padding")
.nick("Output padding")
.blurb(
"Whether the encoder should output padding captions. \
The element will never add padding, but will encode padding \
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()

View file

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

View file

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

View file

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

View file

@ -496,24 +496,20 @@ impl ObjectImpl for Dav1dDec {
fn properties() -> &'static [glib::ParamSpec] {
static PROPERTIES: Lazy<Vec<glib::ParamSpec>> = Lazy::new(|| {
vec![
glib::ParamSpecUInt::new(
"n-threads",
"Number of threads",
"Number of threads to use while decoding (set to 0 to use number of logical cores)",
0,
std::u32::MAX,
DEFAULT_N_THREADS,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecInt64::new(
"max-frame-delay",
"Maximum frame delay",
"Maximum delay in frames for the decoder (set to 1 for low latency, 0 to be equal to the number of logical cores. -1 to choose between these two based on pipeline liveness)",
-1,
std::u32::MAX.into(),
DEFAULT_MAX_FRAME_DELAY,
glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpecUInt::builder("n-threads")
.nick("Number of threads")
.blurb("Number of threads to use while decoding (set to 0 to use number of logical cores)")
.default_value(DEFAULT_N_THREADS)
.mutable_ready()
.build(),
glib::ParamSpecInt64::builder("max-frame-delay")
.nick("Maximum frame delay")
.blurb("Maximum delay in frames for the decoder (set to 1 for low latency, 0 to be equal to the number of logical cores. -1 to choose between these two based on pipeline liveness)")
.minimum(-1)
.maximum(std::u32::MAX.into())
.default_value(DEFAULT_MAX_FRAME_DELAY)
.mutable_ready()
.build(),
]
});

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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