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:
authorBilal Elmoussaoui <belmouss@redhat.com>2023-07-06 16:27:28 +0300
committerSebastian Dröge <sebastian@centricular.com>2023-07-06 17:50:49 +0300
commit2cc98bf410f687a1779edb86dd259f377cca1c7b (patch)
treedf2485024782e1ad972415a5ae43d807132fa8fe
parent64151790d0a8b1d0594b6740ff43bf85504c32aa (diff)
Adapt to glib::Continue rename
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1268>
-rw-r--r--audio/audiofx/src/audioloudnorm/imp.rs122
-rw-r--r--generic/threadshare/examples/benchmark.rs2
-rw-r--r--generic/threadshare/examples/standalone/main.rs10
-rw-r--r--generic/threadshare/examples/udpsrc_benchmark_sender.rs6
-rw-r--r--generic/threadshare/tests/pipeline.rs16
-rw-r--r--net/aws/src/s3hlssink/imp.rs14
-rw-r--r--net/onvif/src/onvifmetadataparse/imp.rs12
-rw-r--r--utils/fallbackswitch/examples/gtk_fallbackswitch.rs8
-rw-r--r--utils/livesync/examples/gtk_livesync.rs2
-rw-r--r--utils/togglerecord/examples/gtk_recording.rs10
-rw-r--r--utils/togglerecord/src/togglerecord/imp.rs28
-rw-r--r--video/gtk4/examples/gtksink.rs8
-rw-r--r--video/gtk4/src/sink/imp.rs8
13 files changed, 123 insertions, 123 deletions
diff --git a/audio/audiofx/src/audioloudnorm/imp.rs b/audio/audiofx/src/audioloudnorm/imp.rs
index afffeb30f..5ba17ad5e 100644
--- a/audio/audiofx/src/audioloudnorm/imp.rs
+++ b/audio/audiofx/src/audioloudnorm/imp.rs
@@ -855,15 +855,15 @@ impl State {
smp_cnt += LIMITER_LOOKAHEAD + peak_delta - LIMITER_ATTACK_WINDOW;
gst::debug!(
- CAT,
- imp: imp,
- "Found peak {} at sample {}, going to attack state at sample {} (gain reduction {}-{})",
- peak_value,
- smp_cnt + LIMITER_ATTACK_WINDOW,
- smp_cnt,
- self.gain_reduction[0],
- self.gain_reduction[1]
- );
+ CAT,
+ imp: imp,
+ "Found peak {} at sample {}, going to attack state at sample {} (gain reduction {}-{})",
+ peak_value,
+ smp_cnt + LIMITER_ATTACK_WINDOW,
+ smp_cnt,
+ self.gain_reduction[0],
+ self.gain_reduction[1]
+ );
} else {
// Process all samples, no peak found
smp_cnt = nb_samples;
@@ -992,15 +992,15 @@ impl State {
self.sustain_cnt = None;
gst::debug!(
- CAT,
- imp: imp,
- "Found new peak {} at sample {}, restarting attack state at sample {} (gain reduction {}-{})",
- peak_value,
- smp_cnt + LIMITER_ATTACK_WINDOW,
- smp_cnt,
- self.gain_reduction[0],
- self.gain_reduction[1],
- );
+ CAT,
+ imp: imp,
+ "Found new peak {} at sample {}, restarting attack state at sample {} (gain reduction {}-{})",
+ peak_value,
+ smp_cnt + LIMITER_ATTACK_WINDOW,
+ smp_cnt,
+ self.gain_reduction[0],
+ self.gain_reduction[1],
+ );
} else {
// If the slope is lower we can't simply reduce the slope as we would
// then have a lower gain reduction than needed at the previous peak.
@@ -1041,15 +1041,15 @@ impl State {
self.sustain_cnt = Some(self.env_cnt);
gst::debug!(
- CAT,
- imp: imp,
- "Found new peak {} at sample {}, adjusting attack state at sample {} (gain reduction {}-{})",
- peak_value,
- smp_cnt + LIMITER_ATTACK_WINDOW,
- smp_cnt,
- self.gain_reduction[0],
- self.gain_reduction[1],
- );
+ CAT,
+ imp: imp,
+ "Found new peak {} at sample {}, adjusting attack state at sample {} (gain reduction {}-{})",
+ peak_value,
+ smp_cnt + LIMITER_ATTACK_WINDOW,
+ smp_cnt,
+ self.gain_reduction[0],
+ self.gain_reduction[1],
+ );
}
return smp_cnt;
} else {
@@ -1151,25 +1151,25 @@ impl State {
self.gain_reduction[1] = gain_reduction;
gst::debug!(
- CAT,
- imp: imp,
- "Found new peak {} at sample {}, going back to attack state at sample {} (gain reduction {}-{})",
- peak_value,
- smp_cnt + LIMITER_ATTACK_WINDOW,
- smp_cnt,
- self.gain_reduction[0],
- self.gain_reduction[1],
- );
+ CAT,
+ imp: imp,
+ "Found new peak {} at sample {}, going back to attack state at sample {} (gain reduction {}-{})",
+ peak_value,
+ smp_cnt + LIMITER_ATTACK_WINDOW,
+ smp_cnt,
+ self.gain_reduction[0],
+ self.gain_reduction[1],
+ );
} else {
gst::debug!(
- CAT,
- imp: imp,
- "Found new peak {} at sample {}, going sustain further at sample {} (gain reduction {})",
- peak_value,
- smp_cnt + LIMITER_ATTACK_WINDOW,
- smp_cnt,
- self.gain_reduction[1],
- );
+ CAT,
+ imp: imp,
+ "Found new peak {} at sample {}, going sustain further at sample {} (gain reduction {})",
+ peak_value,
+ smp_cnt + LIMITER_ATTACK_WINDOW,
+ smp_cnt,
+ self.gain_reduction[1],
+ );
// We need to sustain until the peak at least
self.sustain_cnt = Some(LIMITER_LOOKAHEAD);
}
@@ -1259,26 +1259,26 @@ impl State {
self.gain_reduction[1] = gain_reduction;
gst::debug!(
- CAT,
- imp: imp,
- "Found new peak {} at sample {}, going back to attack state at sample {} (gain reduction {}-{})",
- peak_value,
- smp_cnt + LIMITER_ATTACK_WINDOW,
- smp_cnt,
- self.gain_reduction[0],
- self.gain_reduction[1],
- );
+ CAT,
+ imp: imp,
+ "Found new peak {} at sample {}, going back to attack state at sample {} (gain reduction {}-{})",
+ peak_value,
+ smp_cnt + LIMITER_ATTACK_WINDOW,
+ smp_cnt,
+ self.gain_reduction[0],
+ self.gain_reduction[1],
+ );
} else {
self.gain_reduction[1] = current_gain_reduction;
gst::debug!(
- CAT,
- imp: imp,
- "Going from release to sustain state at sample {} because of low peak {} at sample {} (gain reduction {})",
- smp_cnt,
- peak_value,
- smp_cnt + LIMITER_ATTACK_WINDOW,
- self.gain_reduction[1]
- );
+ CAT,
+ imp: imp,
+ "Going from release to sustain state at sample {} because of low peak {} at sample {} (gain reduction {})",
+ smp_cnt,
+ peak_value,
+ smp_cnt + LIMITER_ATTACK_WINDOW,
+ self.gain_reduction[1]
+ );
self.limiter_state = LimiterState::Sustain;
}
diff --git a/generic/threadshare/examples/benchmark.rs b/generic/threadshare/examples/benchmark.rs
index 3d8a893ce..7f75c6e9f 100644
--- a/generic/threadshare/examples/benchmark.rs
+++ b/generic/threadshare/examples/benchmark.rs
@@ -211,7 +211,7 @@ fn main() {
_ => (),
};
- glib::Continue(true)
+ glib::ControlFlow::Continue
})
.expect("Failed to add bus watch");
diff --git a/generic/threadshare/examples/standalone/main.rs b/generic/threadshare/examples/standalone/main.rs
index 7498b6536..1cc43e298 100644
--- a/generic/threadshare/examples/standalone/main.rs
+++ b/generic/threadshare/examples/standalone/main.rs
@@ -116,7 +116,7 @@ fn main() {
gst::info!(CAT, "Received eos");
l_clone.quit();
- glib::Continue(false)
+ glib::ControlFlow::Break
}
MessageView::Error(msg) => {
if let gst::MessageView::Error(msg) = msg.message().view() {
@@ -125,9 +125,9 @@ fn main() {
gst::info!(CAT, "Received all shutdown requests");
l_clone.quit();
- return glib::Continue(false);
+ return glib::ControlFlow::Break;
} else {
- return glib::Continue(true);
+ return glib::ControlFlow::Continue;
}
}
}
@@ -141,9 +141,9 @@ fn main() {
);
l_clone.quit();
- glib::Continue(false)
+ glib::ControlFlow::Break
}
- _ => glib::Continue(true),
+ _ => glib::ControlFlow::Continue,
}
})
.expect("Failed to add bus watch");
diff --git a/generic/threadshare/examples/udpsrc_benchmark_sender.rs b/generic/threadshare/examples/udpsrc_benchmark_sender.rs
index bb7ce23fb..42130ba47 100644
--- a/generic/threadshare/examples/udpsrc_benchmark_sender.rs
+++ b/generic/threadshare/examples/udpsrc_benchmark_sender.rs
@@ -178,7 +178,7 @@ fn run(pipeline: gst::Pipeline) {
gst::info!(CAT, "Received eos");
l_clone.quit();
- glib::Continue(false)
+ glib::ControlFlow::Break
}
MessageView::Error(msg) => {
gst::error!(
@@ -190,9 +190,9 @@ fn run(pipeline: gst::Pipeline) {
);
l_clone.quit();
- glib::Continue(false)
+ glib::ControlFlow::Break
}
- _ => glib::Continue(true),
+ _ => glib::ControlFlow::Continue,
}
})
.expect("Failed to add bus watch");
diff --git a/generic/threadshare/tests/pipeline.rs b/generic/threadshare/tests/pipeline.rs
index d27eef6e9..5e12d6b38 100644
--- a/generic/threadshare/tests/pipeline.rs
+++ b/generic/threadshare/tests/pipeline.rs
@@ -165,7 +165,7 @@ fn multiple_contexts_queue() {
_ => (),
};
- glib::Continue(true)
+ glib::ControlFlow::Continue
})
.unwrap();
@@ -312,7 +312,7 @@ fn multiple_contexts_proxy() {
_ => (),
};
- glib::Continue(true)
+ glib::ControlFlow::Continue
})
.unwrap();
@@ -417,7 +417,7 @@ fn eos() {
MessageView::StateChanged(state_changed) => {
if let Some(source) = state_changed.src() {
if source.type_() != gst::Pipeline::static_type() {
- return glib::Continue(true);
+ return glib::ControlFlow::Continue;
}
if state_changed.old() == gst::State::Paused
&& state_changed.current() == gst::State::Playing
@@ -441,7 +441,7 @@ fn eos() {
_ => (),
};
- glib::Continue(true)
+ glib::ControlFlow::Continue
})
.unwrap();
@@ -573,7 +573,7 @@ fn premature_shutdown() {
MessageView::StateChanged(state_changed) => {
if let Some(source) = state_changed.src() {
if source.type_() != gst::Pipeline::static_type() {
- return glib::Continue(true);
+ return glib::ControlFlow::Continue;
}
if state_changed.old() == gst::State::Paused
&& state_changed.current() == gst::State::Playing
@@ -597,7 +597,7 @@ fn premature_shutdown() {
_ => (),
};
- glib::Continue(true)
+ glib::ControlFlow::Continue
})
.unwrap();
@@ -669,7 +669,7 @@ fn socket_play_null_play() {
MessageView::StateChanged(state_changed) => {
if let Some(source) = state_changed.src() {
if source.type_() != gst::Pipeline::static_type() {
- return glib::Continue(true);
+ return glib::ControlFlow::Continue;
}
if state_changed.old() == gst::State::Paused
&& state_changed.current() == gst::State::Playing
@@ -694,7 +694,7 @@ fn socket_play_null_play() {
_ => (),
};
- glib::Continue(true)
+ glib::ControlFlow::Continue
})
.unwrap();
diff --git a/net/aws/src/s3hlssink/imp.rs b/net/aws/src/s3hlssink/imp.rs
index 1c53189a0..ac4b46014 100644
--- a/net/aws/src/s3hlssink/imp.rs
+++ b/net/aws/src/s3hlssink/imp.rs
@@ -274,13 +274,13 @@ impl S3HlsSink {
match result {
Err(err) => {
gst::error!(
- CAT,
- imp: self,
- "Put object request for S3 key {} of data length {} failed with error {:?}",
- s3_key,
- s3_data_len,
- err,
- );
+ CAT,
+ imp: self,
+ "Put object request for S3 key {} of data length {} failed with error {:?}",
+ s3_key,
+ s3_data_len,
+ err,
+ );
element_imp_error!(
self,
gst::ResourceError::Write,
diff --git a/net/onvif/src/onvifmetadataparse/imp.rs b/net/onvif/src/onvifmetadataparse/imp.rs
index f1464e416..057878ccb 100644
--- a/net/onvif/src/onvifmetadataparse/imp.rs
+++ b/net/onvif/src/onvifmetadataparse/imp.rs
@@ -219,12 +219,12 @@ impl OnvifMetadataParse {
Some(diff) => diff,
None => {
gst::error!(
- CAT,
- obj: pad,
- "Too big running time difference between initial running time {:?} and current running time {:?}",
- initial_running_time,
- running_time,
- );
+ CAT,
+ obj: pad,
+ "Too big running time difference between initial running time {:?} and current running time {:?}",
+ initial_running_time,
+ running_time,
+ );
return Err(gst::FlowError::Error);
}
};
diff --git a/utils/fallbackswitch/examples/gtk_fallbackswitch.rs b/utils/fallbackswitch/examples/gtk_fallbackswitch.rs
index 4aaf78dde..f3bd64b6f 100644
--- a/utils/fallbackswitch/examples/gtk_fallbackswitch.rs
+++ b/utils/fallbackswitch/examples/gtk_fallbackswitch.rs
@@ -110,7 +110,7 @@ fn create_ui(app: &gtk::Application) {
let timeout_id = glib::timeout_add_local(std::time::Duration::from_millis(100), move || {
let video_sink = match video_sink_weak.upgrade() {
Some(video_sink) => video_sink,
- None => return glib::Continue(true),
+ None => return glib::ControlFlow::Continue,
};
let position = video_sink
@@ -118,7 +118,7 @@ fn create_ui(app: &gtk::Application) {
.unwrap_or(gst::ClockTime::ZERO);
position_label.set_text(&format!("Position: {position:.1}"));
- glib::Continue(true)
+ glib::ControlFlow::Continue
});
let video_src_pad_weak = video_src_pad.downgrade();
@@ -160,7 +160,7 @@ fn create_ui(app: &gtk::Application) {
let app = match app_weak.upgrade() {
Some(app) => app,
- None => return glib::Continue(false),
+ None => return glib::ControlFlow::Break,
};
match msg.view() {
@@ -177,7 +177,7 @@ fn create_ui(app: &gtk::Application) {
_ => (),
};
- glib::Continue(true)
+ glib::ControlFlow::Continue
})
.expect("Failed to add bus watch");
diff --git a/utils/livesync/examples/gtk_livesync.rs b/utils/livesync/examples/gtk_livesync.rs
index 19836cd3b..40e09cf6e 100644
--- a/utils/livesync/examples/gtk_livesync.rs
+++ b/utils/livesync/examples/gtk_livesync.rs
@@ -134,7 +134,7 @@ fn create_window(app: &gtk::Application) {
_ => (),
};
- glib::Continue(true)
+ glib::ControlFlow::Continue
})
.unwrap()
};
diff --git a/utils/togglerecord/examples/gtk_recording.rs b/utils/togglerecord/examples/gtk_recording.rs
index 272a2d370..5b2a8d88c 100644
--- a/utils/togglerecord/examples/gtk_recording.rs
+++ b/utils/togglerecord/examples/gtk_recording.rs
@@ -221,12 +221,12 @@ fn create_ui(app: &gtk::Application) {
let timeout_id = glib::timeout_add_local(std::time::Duration::from_millis(100), move || {
let video_sink = match video_sink_weak.upgrade() {
Some(video_sink) => video_sink,
- None => return glib::Continue(true),
+ None => return glib::ControlFlow::Continue,
};
let togglerecord = match togglerecord_weak.upgrade() {
Some(togglerecord) => togglerecord,
- None => return glib::Continue(true),
+ None => return glib::ControlFlow::Continue,
};
let position = video_sink
@@ -241,7 +241,7 @@ fn create_ui(app: &gtk::Application) {
.unwrap_or(gst::ClockTime::ZERO);
recorded_duration_label.set_text(&format!("Recorded: {recording_duration:.1}"));
- glib::Continue(true)
+ glib::ControlFlow::Continue
});
let togglerecord_weak = togglerecord.downgrade();
@@ -290,7 +290,7 @@ fn create_ui(app: &gtk::Application) {
let app = match app_weak.upgrade() {
Some(app) => app,
- None => return glib::Continue(false),
+ None => return glib::ControlFlow::Break,
};
match msg.view() {
@@ -307,7 +307,7 @@ fn create_ui(app: &gtk::Application) {
_ => (),
};
- glib::Continue(true)
+ glib::ControlFlow::Continue
})
.expect("Failed to add bus watch");
diff --git a/utils/togglerecord/src/togglerecord/imp.rs b/utils/togglerecord/src/togglerecord/imp.rs
index 9b66cc153..adbed4b2d 100644
--- a/utils/togglerecord/src/togglerecord/imp.rs
+++ b/utils/togglerecord/src/togglerecord/imp.rs
@@ -856,13 +856,13 @@ impl ToggleRecord {
// Otherwise if we're before the recording start but the end of the buffer is after
// the start and we can clip, clip the buffer and pass it onwards.
gst::debug!(
- CAT,
- obj: pad,
- "Main stream EOS and we're not EOS yet (overlapping recording start, {} < {} < {})",
- current_running_time.display(),
- last_recording_start,
- current_running_time_end.display(),
- );
+ CAT,
+ obj: pad,
+ "Main stream EOS and we're not EOS yet (overlapping recording start, {} < {} < {})",
+ current_running_time.display(),
+ last_recording_start,
+ current_running_time_end.display(),
+ );
let mut clip_start = state
.in_segment
@@ -914,13 +914,13 @@ impl ToggleRecord {
// Similarly if the end is after the recording stop but the start is before and we
// can clip, clip the buffer and pass it through.
gst::debug!(
- CAT,
- obj: pad,
- "Main stream EOS and we're not EOS yet (overlapping recording end, {} < {} < {})",
- current_running_time.display(),
- rec_state.last_recording_stop.display(),
- current_running_time_end.display(),
- );
+ CAT,
+ obj: pad,
+ "Main stream EOS and we're not EOS yet (overlapping recording end, {} < {} < {})",
+ current_running_time.display(),
+ rec_state.last_recording_stop.display(),
+ current_running_time_end.display(),
+ );
let mut clip_start = state
.in_segment
diff --git a/video/gtk4/examples/gtksink.rs b/video/gtk4/examples/gtksink.rs
index 2346a8cd3..aadc9205c 100644
--- a/video/gtk4/examples/gtksink.rs
+++ b/video/gtk4/examples/gtksink.rs
@@ -77,12 +77,12 @@ fn create_ui(app: &gtk::Application) {
let timeout_id = glib::timeout_add_local(std::time::Duration::from_millis(500), move || {
let pipeline = match pipeline_weak.upgrade() {
Some(pipeline) => pipeline,
- None => return glib::Continue(true),
+ None => return glib::ControlFlow::Continue,
};
let position = pipeline.query_position::<gst::ClockTime>();
label.set_text(&format!("Position: {:.0}", position.display()));
- glib::Continue(true)
+ glib::ControlFlow::Continue
});
let bus = pipeline.bus().unwrap();
@@ -98,7 +98,7 @@ fn create_ui(app: &gtk::Application) {
let app = match app_weak.upgrade() {
Some(app) => app,
- None => return glib::Continue(false),
+ None => return glib::ControlFlow::Break,
};
match msg.view() {
@@ -115,7 +115,7 @@ fn create_ui(app: &gtk::Application) {
_ => (),
};
- glib::Continue(true)
+ glib::ControlFlow::Continue
})
.expect("Failed to add bus watch");
diff --git a/video/gtk4/src/sink/imp.rs b/video/gtk4/src/sink/imp.rs
index 4d66d4a47..b74b8d7e5 100644
--- a/video/gtk4/src/sink/imp.rs
+++ b/video/gtk4/src/sink/imp.rs
@@ -452,11 +452,11 @@ impl PaintableSink {
self.pending_frame.lock().unwrap().take()
}
- fn do_action(&self, action: SinkEvent) -> glib::Continue {
+ fn do_action(&self, action: SinkEvent) -> glib::ControlFlow {
let paintable = self.paintable.lock().unwrap();
let paintable = match &*paintable {
Some(paintable) => paintable,
- None => return glib::Continue(false),
+ None => return glib::ControlFlow::Break,
};
match action {
@@ -468,7 +468,7 @@ impl PaintableSink {
}
}
- glib::Continue(true)
+ glib::ControlFlow::Continue
}
fn configure_caps(&self) {
@@ -519,7 +519,7 @@ impl PaintableSink {
receiver.attach(
Some(&glib::MainContext::default()),
glib::clone!(
- @weak self_ => @default-return glib::Continue(false),
+ @weak self_ => @default-return glib::ControlFlow::Break,
move |action| self_.do_action(action)
),
);