gst-plugins-rs/net
François Laignel e1b8b8befd webrtcsink: don't panic if input CAPS are not supported
If a user constrained the supported CAPS, for instance using `video-caps`:

```shell
gst-launch-1.0 videotestsrc ! video/x-raw,format=I420 ! x264enc \
    ! webrtcsink video-caps=video/x-vp8
```

... a panic would occur which was internally caught without the user being
informed except for the following message which was written to stderr:

> thread 'tokio-runtime-worker' panicked at net/webrtc/src/webrtcsink/imp.rs:3533:22:
>   expected audio or video raw caps: video/x-h264, [...] <br>
> note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The pipeline kept running.

This commit converts the panic into an `Error` which bubbles up as an element
`StreamError::CodecNotFound` which can be handled by the application.
With the above `gst-launch`, this terminates the pipeline with:

> [...] ERROR  webrtcsink net/webrtc/src/webrtcsink/imp.rs:3771:gstrswebrtc::
>   webrtcsink:👿:BaseWebRTCSink::start_stream_discovery_if_needed::{{closure}}:<webrtcsink0>
> Error running discovery: Unsupported caps: video/x-h264, [...] <br>
> ERROR: from element /GstPipeline:pipeline0/GstWebRTCSink:webrtcsink0:
>   There is no codec present that can handle the stream's type. <br>
> Additional debug info: <br>
> net/webrtc/src/webrtcsink/imp.rs(3772): gstrswebrtc::webrtcsink:👿:BaseWebRTCSink::
> start_stream_discovery_if_needed::{{closure}} (): /GstPipeline:pipeline0/GstWebRTCSink:webrtcsink0:
> Failed to look up output caps: Unsupported caps: video/x-h264, [...] <br>
> Execution ended after 0:00:00.055716661 <br>
> Setting pipeline to NULL ...

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1556>
2024-04-29 11:50:12 +03:00
..
aws aws: Introduce a property to use path-style addressing 2024-04-29 11:49:04 +03:00
hlssink3 Use workspace features for crates metadata/deps 2024-02-05 15:34:31 +01:00
ndi Fix a couple of compiler/clippy warnings with --no-default-features 2024-02-08 13:02:55 +02:00
onvif onvifmetadataparse: Reset state in PAUSED->READY after pad deactivation 2024-04-08 15:19:21 +03:00
raptorq Use workspace features for crates metadata/deps 2024-02-05 15:34:31 +01:00
reqwest reqwest: Update to reqwest 0.12 2024-04-08 15:17:31 +03:00
rtp gccbwe: don't log an error when handling a buffer list while stopping 2024-04-29 11:49:21 +03:00
rtsp Fix clippy warnings after upgrade to Rust 1.77 2024-04-08 15:15:26 +03:00
webrtc webrtcsink: don't panic if input CAPS are not supported 2024-04-29 11:50:12 +03:00
webrtchttp webrtchttp: Update to reqwest 0.12 2024-04-08 15:19:45 +03:00