I am observing some unexpected behavior regarding datachannels and webrtcbin; this is gstreamer 1.18.2.
* 1 peer (webrtcbin) is initialized and a data channel is created, but no media (audio/video) is linked as an input. Webrtcbin can successfully create an offer, and I can successfully negotiate sdp with a remote peer (chrome). The data channel is opened, and I can send data to the browser.
*However*, if I later attach any media whatsoever and then try to create a new offer from the first peer, it dies horribly. The entire process crashes with the following messages:
So what I'm saying is this - if I create a data channel *first* and negotiate a stable signalling state, I can not then later add actual media and re-negotiate.
* Scenario 2:
I tried to reproduce this behavior in a separate repo with two separate gstreamer pipelines using webrtcbin (instead of a browser as the remote peer). In this case, I can create an offer from the first peer that only defines a data channel, and the second peer will respond with an answer, and both sides each swap ice candidates, but they never actually connect. But again, if I attach any input media first, then things connect and work just fine.
I'm still investigating to make sure I can add data channels *after* a successful initial negotiation with media and continue to renegotiate.