mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-25 21:11:00 +00:00
webrtcsink: improve error when no discovery pipeline runs
If for instance no encoder was found or the RTP plugin was missing, it is possible that no discovery pipeline will run for a given stream. Provide a more helpful error message for that case. Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/534 Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1560>
This commit is contained in:
parent
2bfb6ee016
commit
8861fc493b
1 changed files with 9 additions and 0 deletions
|
@ -3527,6 +3527,15 @@ impl BaseWebRTCSink {
|
||||||
} else {
|
} else {
|
||||||
let sink_caps = discovery_info.caps.clone();
|
let sink_caps = discovery_info.caps.clone();
|
||||||
|
|
||||||
|
if codecs.is_empty() {
|
||||||
|
return Err(anyhow!(
|
||||||
|
"No codec available for encoding stream {}, \
|
||||||
|
check the webrtcsink logs and verify that \
|
||||||
|
the rtp plugin is available",
|
||||||
|
name
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
let is_video = match sink_caps.structure(0).unwrap().name().as_str() {
|
let is_video = match sink_caps.structure(0).unwrap().name().as_str() {
|
||||||
"video/x-raw" => true,
|
"video/x-raw" => true,
|
||||||
"audio/x-raw" => false,
|
"audio/x-raw" => false,
|
||||||
|
|
Loading…
Reference in a new issue