Webrtcbin SDP Renegotation (1.18): Not in the correct state (stable) for setting remote answer description

Trey Hutcheson trey.hutcheson at gmail.com
Fri Dec 4 20:02:36 UTC 2020


I know SDP renegotiation is something that saw lots of improvements from
1.16->1.18, but I'm currently stuck.

Here's my workflow:
* create webrtcbin instance for peer 1. Initialize with one audio source.
Create offer (sdp contains one audio m= line), set-local-description, send
to remote peer. Remote peer responds with answer, then
set-remote-description.
* Create another webrtcbin instance for peer 2. Same workflow. Exchange
sdp, with webrtcbin generating the offer.
* Media (audio) flows from remote peer 2. Dynamically connect audio (opus,
opusdepay then opuspay  to re-payload the rtp) from webrtcbin2 to
webrtcbin1.
* Ask webrtcbin1 to create a new offer, then set-local-description. Offer
now has two audio m= lines. Send offer to remote peer, peer responds with
new answer (with two m= lines). set-remote-description on webrtcbin1

When I call set-remote-description with the updated answer, webrtcbin
complains:

ERROR              webrtcbin
gstwebrtcbin.c:4320:_set_description_task:<webrtcbin> Not in the correct
state (stable) for setting remote answer description

And that's because sdp was previously negotiated, and the signalling state
had achieved stable. But I want to re-negotiate, and I assumed invoking
create-offer a second time (after connecting a new sink pad and verifying
caps) would change the signalling state?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20201204/d7226951/attachment.htm>


More information about the gstreamer-devel mailing list