webrtcsrc: Return bool en 'end-session' as required

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1172>
This commit is contained in:
Thibault Saunier 2023-04-11 15:33:16 -04:00 committed by GStreamer Marge Bot
parent 5dcdf645d6
commit 8f2273328b

View file

@ -577,16 +577,15 @@ impl WebRTCSrc {
session_ended: signaller.connect_closure( session_ended: signaller.connect_closure(
"session-ended", "session-ended",
false, false,
glib::closure!(@to-owned self as this => move | glib::closure!(@to-owned self as this => move |_signaler: glib::Object, _session_id: &str|{
_signaller: glib::Object, _peer_id: &str| {
gst::debug!(CAT, imp: this, "Session ended.");
this.state.lock().unwrap().session_id = None; this.state.lock().unwrap().session_id = None;
this.obj().iterate_src_pads().into_iter().for_each(|pad| this.obj().iterate_src_pads().into_iter().for_each(|pad|
{ if let Err(e) = pad.map(|pad| pad.push_event(gst::event::Eos::new())) { { if let Err(e) = pad.map(|pad| pad.push_event(gst::event::Eos::new())) {
gst::error!(CAT, "Could not send EOS: {e:?}"); gst::error!(CAT, "Could not send EOS: {e:?}");
}} }}
); );
false
}), }),
), ),