net/webrtc/whip_signaller: implement WHIP server
-
Extract
BaseWebRTCSrc
- Define a Base for all the webrtcsrc type elements so they can all be derived from it. Similar to base element defined for webrtcsink type elements
-
To reduce the confusion between implementations of WHIP client and WHIP server
- Rename the existing impl
Signaller
toWhipClient
- Rename the existing struct
WhipSignaller
toWhipClientSignaller
- Rename the existing impl
-
Rename the name
consumer-added
towebrtcbin-ready
on the Signallable iface- This will make it more meaningful as this signal is used by the elements to tweak the
webrtcbin
once it is created
- This will make it more meaningful as this signal is used by the elements to tweak the
-
For the WHIP server implementation
-
new signaller
WhipServerSignaller
- an http server using 'warp'
- handlers for the POST, OPTIONS, PATCH and DELETE
- fixed path
/whip/endpoint
as the URI - fixed value 'whip-client' as the producer peer id
-
Derive
whipserversrc
element fromBaseWebRTCSrc
- implement
constructed
method forObjectImpl
to set non-default signaller, i.e.,WhipServerSignaller
- implement
notify
method forObjectImpl
; the properties likestun-server
andturn-servers
will be set on the Signaller when they are set on the element
- implement
-
-
Connect to 'webrtcbin-ready' signal in the constructor of WhipServerSignaller
- it will be emitted by the webrtcsrc when the webrtcbin element is ready
- the closure for this signal will in turn connect to webrtcbin's ice-gathering-state and perform send with the answer sdp via the channel
- the WhipServer will hold its HTTP response in POST handler until this signal is received or timeout which happens early
Edited by Taruntej Kanakamalla