Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2022-10-26 16:20:26 +0300
committerSebastian Dröge <sebastian@centricular.com>2022-10-27 15:34:52 +0300
commit790453364dd71ed7ac6f594fd9a13d97016c4bd2 (patch)
treea0ebdce14b9b837bd8193cc5a09ec1eeb2744506 /net
parent32d2372e90208a1dcad1a32a7e03f5e6f991e664 (diff)
whipsink: Add object to debug logs
Diffstat (limited to 'net')
-rw-r--r--net/webrtchttp/src/whipsink/imp.rs40
1 files changed, 30 insertions, 10 deletions
diff --git a/net/webrtchttp/src/whipsink/imp.rs b/net/webrtchttp/src/whipsink/imp.rs
index ac7a5ebc..7ad884d0 100644
--- a/net/webrtchttp/src/whipsink/imp.rs
+++ b/net/webrtchttp/src/whipsink/imp.rs
@@ -422,7 +422,12 @@ impl WhipSink {
match parse_redirect_location(resp.headers(), &endpoint) {
Ok(redirect_url) => {
- gst::debug!(CAT, "Redirecting endpoint to {}", redirect_url.as_str());
+ gst::debug!(
+ CAT,
+ imp: self,
+ "Redirecting endpoint to {}",
+ redirect_url.as_str()
+ );
self.lookup_ice_servers(redirect_url)
}
Err(e) => Err(e),
@@ -456,7 +461,7 @@ impl WhipSink {
let item_map = parse_link_header::parse_with_rel(link);
if let Err(e) = item_map {
- gst::error!(CAT, "set_ice_servers {} - Error {:?}", link, e);
+ gst::error!(CAT, imp: self, "set_ice_servers {} - Error {:?}", link, e);
continue;
}
@@ -504,7 +509,12 @@ impl WhipSink {
.expect("strip 'scheme:' from raw uri");
}
- gst::debug!(CAT, "Setting STUN/TURN server {}", ice_server_url);
+ gst::debug!(
+ CAT,
+ imp: self,
+ "Setting STUN/TURN server {}",
+ ice_server_url
+ );
// It's icer to not collapse the `else if` and its inner `if`
#[allow(clippy::collapsible_if)]
@@ -516,7 +526,12 @@ impl WhipSink {
.webrtcbin
.emit_by_name::<bool>("add-turn-server", &[&ice_server_url.as_str()])
{
- gst::error!(CAT, "Falied to set turn server {}", ice_server_url);
+ gst::error!(
+ CAT,
+ imp: self,
+ "Falied to set turn server {}",
+ ice_server_url
+ );
}
}
}
@@ -586,7 +601,7 @@ impl WhipSink {
let sdp = offer.sdp();
let body = sdp.as_text().unwrap();
- gst::debug!(CAT, "Using endpoint {}", endpoint.as_str());
+ gst::debug!(CAT, imp: self, "Using endpoint {}", endpoint.as_str());
let mut headermap = HeaderMap::new();
headermap.insert(
reqwest::header::CONTENT_TYPE,
@@ -669,7 +684,12 @@ impl WhipSink {
match parse_redirect_location(resp.headers(), &endpoint) {
Ok(redirect_url) => {
- gst::debug!(CAT, "Redirecting endpoint to {}", redirect_url.as_str());
+ gst::debug!(
+ CAT,
+ imp: self,
+ "Redirecting endpoint to {}",
+ redirect_url.as_str()
+ );
self.do_post(offer, redirect_url)
}
Err(e) => return Err(e),
@@ -717,7 +737,7 @@ impl WhipSink {
ref whip_resource_url,
} => whip_resource_url.clone(),
_ => {
- gst::error!(CAT, "Terminated in unexpected state");
+ gst::error!(CAT, imp: self, "Terminated in unexpected state");
return;
}
};
@@ -733,17 +753,17 @@ impl WhipSink {
);
}
- gst::debug!(CAT, "DELETE request on {}", resource_url);
+ gst::debug!(CAT, imp: self, "DELETE request on {}", resource_url);
let client = build_reqwest_client(reqwest::redirect::Policy::default());
let future = client.delete(resource_url).headers(headermap).send();
let res = self.wait(future);
match res {
Ok(r) => {
- gst::debug!(CAT, "Response to DELETE : {}", r.status());
+ gst::debug!(CAT, imp: self, "Response to DELETE : {}", r.status());
}
Err(e) => {
- gst::error!(CAT, "{}", e);
+ gst::error!(CAT, imp: self, "{}", e);
}
};
}