gst-plugins-rs/net/webrtc/protocol
Piotr Brzeziński 1e243add0c webrtc: Make older peers less likely to crash when webrtcsrc is used
Commit abf97ba2 introduced an API break by adding a new Consumer peer
role and adding a new field to the existing List message.
This caused older clients to crash as soon as a 'new' webrtcsrc
registered due to their inability to parse the new role.

This fix consists of two parts:
- makes webrtcsrc only register as a Consumer when it's actually waiting
for a producer session request, instead of doing that in all cases
- Reverts the List message to the old version, and instead adds a
ListConsumers message for the purpose of retrieving the list of
'awaiting' consumers

This is still technically an API break, and older clients will *still*
crash if a webrtcsrc registers as a Consumer. However, if ran the 'old'
way - either with a peer ID set or with connect-to-first-producer=true -
it won't do that anymore.

It's a band-aid fix to not break too many things while GStreamer 1.26
still follows the main branch here. After gst-plugins-rs 0.14 branches
away we'll be able to do a proper API break, aimed at making similar
changes possible in the future without causing old clients to crash.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/2259>
2025-05-27 11:38:47 +00:00
..
src webrtc: Make older peers less likely to crash when webrtcsrc is used 2025-05-27 11:38:47 +00:00
Cargo.toml Use workspace features for crates metadata/deps 2024-02-05 15:34:31 +01:00