From 43ee6bfc1c991b8fd8117d7f57df2c39f0f9377c Mon Sep 17 00:00:00 2001 From: Taruntej Kanakamalla Date: Wed, 19 Jul 2023 10:35:33 +0530 Subject: net/webrtc: add whipserversrc Implement 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 - fixed resource url `/whip/resource/whip-client` Derive whipserversrc element from BaseWebRTCSrc - implement constructed method for ObjectImpl to set non-default signaller, i.e., WhipServerSignaller - bind the properties stun-server and turn-servers to those on the Signaller 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 Part-of: --- docs/plugins/gst_plugins_cache.json | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'docs') diff --git a/docs/plugins/gst_plugins_cache.json b/docs/plugins/gst_plugins_cache.json index 1539cec57..fc7ebb5df 100644 --- a/docs/plugins/gst_plugins_cache.json +++ b/docs/plugins/gst_plugins_cache.json @@ -6499,6 +6499,38 @@ } }, "rank": "none" + }, + "whipserversrc": { + "author": "Taruntej Kanakamalla ", + "description": "WebRTC source element using WHIP Server as the signaller", + "hierarchy": [ + "GstWhipServerSrc", + "GstBaseWebRTCSrc", + "GstBin", + "GstElement", + "GstObject", + "GInitiallyUnowned", + "GObject" + ], + "interfaces": [ + "GstChildProxy" + ], + "klass": "Source/Network/WebRTC", + "pad-templates": { + "audio_%%u": { + "caps": "audio/x-raw(ANY):\napplication/x-rtp:\naudio/x-opus:\n", + "direction": "src", + "presence": "sometimes", + "type": "GstWebRTCSrcPad" + }, + "video_%%u": { + "caps": "video/x-raw(ANY):\napplication/x-rtp:\nvideo/x-vp8:\nvideo/x-h264:\nvideo/x-vp9:\nvideo/x-h265:\n", + "direction": "src", + "presence": "sometimes", + "type": "GstWebRTCSrcPad" + } + }, + "rank": "primary" } }, "filename": "gstrswebrtc", -- cgit v1.2.3