Adapt to glib::Continue rename

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1268>
This commit is contained in:
Bilal Elmoussaoui 2023-07-06 15:27:28 +02:00 committed by Sebastian Dröge
parent 64151790d0
commit 2cc98bf410
13 changed files with 123 additions and 123 deletions

View file

@ -211,7 +211,7 @@ fn main() {
_ => (),
};
glib::Continue(true)
glib::ControlFlow::Continue
})
.expect("Failed to add bus watch");

View file

@ -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");

View file

@ -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");

View file

@ -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();

View file

@ -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");

View file

@ -134,7 +134,7 @@ fn create_window(app: &gtk::Application) {
_ => (),
};
glib::Continue(true)
glib::ControlFlow::Continue
})
.unwrap()
};

View file

@ -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");

View file

@ -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");

View file

@ -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)
),
);