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

gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2021-01-31 15:44:45 +0300
committerSebastian Dröge <sebastian@centricular.com>2021-01-31 16:43:00 +0300
commitb649e9b07674f563c8b4b44fde1076606b93e996 (patch)
tree703c3feb9988a2e53df3583feb6b47e3633902ee /tutorial/src
parent1a826caf75ac9e0e959d7fadde3c24a99f57a655 (diff)
Use gst::PARAM_FLAG_MUTABLE_PLAYING and others consistently everywhere
Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/139
Diffstat (limited to 'tutorial/src')
-rw-r--r--tutorial/src/progressbin/imp.rs6
-rw-r--r--tutorial/src/rgb2gray/imp.rs4
-rw-r--r--tutorial/src/sinesrc/imp.rs10
3 files changed, 10 insertions, 10 deletions
diff --git a/tutorial/src/progressbin/imp.rs b/tutorial/src/progressbin/imp.rs
index 7410bc2b3..e00d6c0a3 100644
--- a/tutorial/src/progressbin/imp.rs
+++ b/tutorial/src/progressbin/imp.rs
@@ -94,7 +94,7 @@ impl ObjectImpl for ProgressBin {
"Defines the output type of the progressbin",
ProgressBinOutput::static_type(),
DEFAULT_OUTPUT_TYPE as i32,
- glib::ParamFlags::READWRITE,
+ glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
)]
});
@@ -237,8 +237,8 @@ impl BinImpl for ProgressBin {
{
let s = msg.get_structure().unwrap();
if let Ok(percent) = s.get_some::<f64>("percent-double") {
- let output_type = self.output_type.lock().unwrap();
- match *output_type {
+ let output_type = *self.output_type.lock().unwrap();
+ match output_type {
ProgressBinOutput::Println => println!("progress: {:5.1}%", percent),
ProgressBinOutput::DebugCategory => {
gst_info!(CAT, "progress: {:5.1}%", percent);
diff --git a/tutorial/src/rgb2gray/imp.rs b/tutorial/src/rgb2gray/imp.rs
index 019e48d33..4db88fd8b 100644
--- a/tutorial/src/rgb2gray/imp.rs
+++ b/tutorial/src/rgb2gray/imp.rs
@@ -122,7 +122,7 @@ impl ObjectImpl for Rgb2Gray {
"Invert",
"Invert grayscale output",
DEFAULT_INVERT,
- glib::ParamFlags::READWRITE,
+ glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::uint(
"shift",
@@ -131,7 +131,7 @@ impl ObjectImpl for Rgb2Gray {
0,
255,
DEFAULT_SHIFT,
- glib::ParamFlags::READWRITE,
+ glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
]
});
diff --git a/tutorial/src/sinesrc/imp.rs b/tutorial/src/sinesrc/imp.rs
index 558aaf58a..e18c5a023 100644
--- a/tutorial/src/sinesrc/imp.rs
+++ b/tutorial/src/sinesrc/imp.rs
@@ -182,7 +182,7 @@ impl ObjectImpl for SineSrc {
1,
u32::MAX,
DEFAULT_SAMPLES_PER_BUFFER,
- glib::ParamFlags::READWRITE,
+ glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
glib::ParamSpec::uint(
"freq",
@@ -191,7 +191,7 @@ impl ObjectImpl for SineSrc {
1,
u32::MAX,
DEFAULT_FREQ,
- glib::ParamFlags::READWRITE,
+ glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::double(
"volume",
@@ -200,21 +200,21 @@ impl ObjectImpl for SineSrc {
0.0,
10.0,
DEFAULT_VOLUME,
- glib::ParamFlags::READWRITE,
+ glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::boolean(
"mute",
"Mute",
"Mute",
DEFAULT_MUTE,
- glib::ParamFlags::READWRITE,
+ glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_PLAYING,
),
glib::ParamSpec::boolean(
"is-live",
"Is Live",
"(Pseudo) live output",
DEFAULT_IS_LIVE,
- glib::ParamFlags::READWRITE,
+ glib::ParamFlags::READWRITE | gst::PARAM_FLAG_MUTABLE_READY,
),
]
});