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(
|
async fn run_discovery_pipeline(
|
||||||
_element: &super::WebRTCSink,
|
element: &super::WebRTCSink,
|
||||||
codec: &Codec,
|
codec: &Codec,
|
||||||
caps: &gst::Caps,
|
caps: &gst::Caps,
|
||||||
) -> Result<gst::Structure, Error> {
|
) -> Result<gst::Structure, Error> {
|
||||||
|
@ -2083,6 +2083,12 @@ impl WebRTCSink {
|
||||||
elements.push(make_converter_for_video_caps(caps)?);
|
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)?;
|
let capsfilter = make_element("capsfilter", None)?;
|
||||||
elements.push(capsfilter.clone());
|
elements.push(capsfilter.clone());
|
||||||
let elements_slice = &elements.iter().collect::<Vec<_>>();
|
let elements_slice = &elements.iter().collect::<Vec<_>>();
|
||||||
|
@ -2109,6 +2115,8 @@ impl WebRTCSink {
|
||||||
.set_state(gst::State::Playing)
|
.set_state(gst::State::Playing)
|
||||||
.with_context(|| format!("Running discovery pipeline for caps {}", caps))?;
|
.with_context(|| format!("Running discovery pipeline for caps {}", caps))?;
|
||||||
|
|
||||||
|
let in_caps = caps;
|
||||||
|
|
||||||
while let Some(msg) = stream.next().await {
|
while let Some(msg) = stream.next().await {
|
||||||
match msg.view() {
|
match msg.view() {
|
||||||
gst::MessageView::Error(err) => {
|
gst::MessageView::Error(err) => {
|
||||||
|
@ -2136,6 +2144,11 @@ impl WebRTCSink {
|
||||||
"a-framerate",
|
"a-framerate",
|
||||||
]);
|
]);
|
||||||
s.set("payload", codec.payload);
|
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);
|
return Ok(s);
|
||||||
} else {
|
} else {
|
||||||
return Err(anyhow!("Discovered empty caps"));
|
return Err(anyhow!("Discovered empty caps"));
|
||||||
|
@ -2196,6 +2209,9 @@ impl WebRTCSink {
|
||||||
|
|
||||||
async fn lookup_streams_caps(&self, element: &super::WebRTCSink) -> Result<(), Error> {
|
async fn lookup_streams_caps(&self, element: &super::WebRTCSink) -> Result<(), Error> {
|
||||||
let codecs = self.lookup_codecs();
|
let codecs = self.lookup_codecs();
|
||||||
|
|
||||||
|
gst::debug!(CAT, obj: element, "Looked up codecs {codecs:?}");
|
||||||
|
|
||||||
let futs: Vec<_> = self
|
let futs: Vec<_> = self
|
||||||
.state
|
.state
|
||||||
.lock()
|
.lock()
|
||||||
|
|
Loading…
Reference in a new issue