mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 11:30:59 +00:00
webrtcsink: improve debug
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1239>
This commit is contained in:
parent
64056c5527
commit
1200ae0ee6
1 changed files with 15 additions and 2 deletions
|
@ -1401,12 +1401,14 @@ impl BaseWebRTCSink {
|
||||||
handle.abort();
|
handle.abort();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gst::debug!(CAT, obj: element, "Waiting for codec discoveries to finish");
|
||||||
let codecs_done_receiver = std::mem::take(&mut state.codecs_done_receivers);
|
let codecs_done_receiver = std::mem::take(&mut state.codecs_done_receivers);
|
||||||
codecs_done_receiver.into_iter().for_each(|receiver| {
|
codecs_done_receiver.into_iter().for_each(|receiver| {
|
||||||
RUNTIME.block_on(async {
|
RUNTIME.block_on(async {
|
||||||
let _ = receiver.await;
|
let _ = receiver.await;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
gst::debug!(CAT, obj: element, "No codec discovery is running anymore");
|
||||||
|
|
||||||
state.codec_discovery_done = false;
|
state.codec_discovery_done = false;
|
||||||
state.codecs = BTreeMap::new();
|
state.codecs = BTreeMap::new();
|
||||||
|
@ -1417,13 +1419,16 @@ impl BaseWebRTCSink {
|
||||||
}
|
}
|
||||||
|
|
||||||
drop(state);
|
drop(state);
|
||||||
|
gst::debug!(CAT, obj: element, "Ending sessions");
|
||||||
for session in sessions {
|
for session in sessions {
|
||||||
signaller.end_session(&session.id);
|
signaller.end_session(&session.id);
|
||||||
}
|
}
|
||||||
|
gst::debug!(CAT, obj: element, "All sessions have started finalizing");
|
||||||
|
|
||||||
if signaller_state == SignallerState::Started {
|
if signaller_state == SignallerState::Started {
|
||||||
|
gst::info!(CAT, obj: element, "Stopping signaller");
|
||||||
signaller.stop();
|
signaller.stop();
|
||||||
gst::info!(CAT, "Stopped signaller");
|
gst::info!(CAT, obj: element, "Stopped signaller");
|
||||||
}
|
}
|
||||||
|
|
||||||
let finalizing_sessions = self.state.lock().unwrap().finalizing_sessions.clone();
|
let finalizing_sessions = self.state.lock().unwrap().finalizing_sessions.clone();
|
||||||
|
@ -1434,6 +1439,8 @@ impl BaseWebRTCSink {
|
||||||
sessions = cvar.wait(sessions).unwrap();
|
sessions = cvar.wait(sessions).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst::debug!(CAT, obj: element, "All sessions are done finalizing");
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2971,7 +2978,13 @@ impl BaseWebRTCSink {
|
||||||
// Nothing changed
|
// Nothing changed
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
gst::error!(CAT, obj: pad, "Renegotiation is not supported");
|
gst::error!(
|
||||||
|
CAT,
|
||||||
|
obj: pad,
|
||||||
|
"Renegotiation is not supported (old: {}, new: {})",
|
||||||
|
caps,
|
||||||
|
e.caps()
|
||||||
|
);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue