mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-26 05:21:00 +00:00
webrtcsink: improve debug
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/972>
This commit is contained in:
parent
4d310434ab
commit
66e7b314f7
1 changed files with 17 additions and 1 deletions
|
@ -2066,7 +2066,7 @@ impl WebRTCSink {
|
|||
}
|
||||
|
||||
async fn run_discovery_pipeline(
|
||||
_element: &super::WebRTCSink,
|
||||
element: &super::WebRTCSink,
|
||||
codec: &Codec,
|
||||
caps: &gst::Caps,
|
||||
) -> Result<gst::Structure, Error> {
|
||||
|
@ -2083,6 +2083,12 @@ impl WebRTCSink {
|
|||
elements.push(make_converter_for_video_caps(caps)?);
|
||||
}
|
||||
|
||||
gst::debug!(
|
||||
CAT,
|
||||
obj: element,
|
||||
"Running discovery pipeline for caps {caps} with codec {codec:?}"
|
||||
);
|
||||
|
||||
let capsfilter = make_element("capsfilter", None)?;
|
||||
elements.push(capsfilter.clone());
|
||||
let elements_slice = &elements.iter().collect::<Vec<_>>();
|
||||
|
@ -2109,6 +2115,8 @@ impl WebRTCSink {
|
|||
.set_state(gst::State::Playing)
|
||||
.with_context(|| format!("Running discovery pipeline for caps {}", caps))?;
|
||||
|
||||
let in_caps = caps;
|
||||
|
||||
while let Some(msg) = stream.next().await {
|
||||
match msg.view() {
|
||||
gst::MessageView::Error(err) => {
|
||||
|
@ -2136,6 +2144,11 @@ impl WebRTCSink {
|
|||
"a-framerate",
|
||||
]);
|
||||
s.set("payload", codec.payload);
|
||||
gst::debug!(
|
||||
CAT,
|
||||
obj: element,
|
||||
"Codec discovery pipeline for caps {in_caps} with codec {codec:?} succeeded: {s}"
|
||||
);
|
||||
return Ok(s);
|
||||
} else {
|
||||
return Err(anyhow!("Discovered empty caps"));
|
||||
|
@ -2196,6 +2209,9 @@ impl WebRTCSink {
|
|||
|
||||
async fn lookup_streams_caps(&self, element: &super::WebRTCSink) -> Result<(), Error> {
|
||||
let codecs = self.lookup_codecs();
|
||||
|
||||
gst::debug!(CAT, obj: element, "Looked up codecs {codecs:?}");
|
||||
|
||||
let futs: Vec<_> = self
|
||||
.state
|
||||
.lock()
|
||||
|
|
Loading…
Reference in a new issue