net/webrtc: rename whipwebrtcsink as whipclientsink

add a deprecation warning in whipsink to indicate it
should be used only for RTP content
add documentation in whipsink code regarding usage and
deprecation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1282>
This commit is contained in:
Taruntej Kanakamalla 2023-08-16 12:18:04 +05:30
parent 905da44958
commit de6d2e7f40
5 changed files with 26 additions and 6 deletions

View file

@ -6391,9 +6391,9 @@
}
}
},
"whipwebrtcsink": {
"whipclientsink": {
"author": "Taruntej Kanakamalla <taruntej@asymptotic.io>",
"description": "WebRTC sink with WHIP signaller",
"description": "WebRTC sink with WHIP client signaller",
"hierarchy": [
"GstWhipWebRTCSink",
"GstBaseWebRTCSink",
@ -8977,7 +8977,7 @@
},
"whipsink": {
"author": "Taruntej Kanakamalla <taruntej@asymptotic.io>",
"description": "A bin to stream media using the WebRTC HTTP Ingestion Protocol (WHIP)",
"description": "A bin to stream RTP media using the WebRTC HTTP Ingestion Protocol (WHIP)",
"hierarchy": [
"GstWhipSink",
"GstBin",

View file

@ -3887,7 +3887,7 @@ impl ElementImpl for WhipWebRTCSink {
gst::subclass::ElementMetadata::new(
"WhipWebRTCSink",
"Sink/Network/WebRTC",
"WebRTC sink with WHIP signaller",
"WebRTC sink with WHIP client signaller",
"Taruntej Kanakamalla <taruntej@asymptotic.io>",
)
});

View file

@ -136,7 +136,7 @@ pub fn register(plugin: &gst::Plugin) -> Result<(), glib::BoolError> {
)?;
gst::Element::register(
Some(plugin),
"whipwebrtcsink",
"whipclientsink",
gst::Rank::None,
WhipWebRTCSink::static_type(),
)?;

View file

@ -104,7 +104,7 @@ impl ElementImpl for WhipSink {
gst::subclass::ElementMetadata::new(
"WHIP Sink Bin",
"Sink/Network/WebRTC",
"A bin to stream media using the WebRTC HTTP Ingestion Protocol (WHIP)",
"A bin to stream RTP media using the WebRTC HTTP Ingestion Protocol (WHIP)",
"Taruntej Kanakamalla <taruntej@asymptotic.io>",
)
});
@ -343,6 +343,9 @@ impl ObjectImpl for WhipSink {
obj.set_suppressed_flags(gst::ElementFlags::SINK | gst::ElementFlags::SOURCE);
obj.set_element_flags(gst::ElementFlags::SINK);
gst::warning!(CAT, imp: self, "whipsink will be deprecated in the future, \
it is recommended that whipclientsink be used instead");
// The spec requires all m= lines to be bundled (section 4.2)
self.webrtcbin
.set_property("bundle-policy", gst_webrtc::WebRTCBundlePolicy::MaxBundle);

View file

@ -7,6 +7,23 @@
//
// SPDX-License-Identifier: MPL-2.0
/**
* SECTION:element-whipsink
*
* `whipsink` is an element that acts a WHIP Client to ingest RTP content to a media server
*
* ``` bash
* gst-launch-1.0 videotestsrc ! videoconvert ! openh264enc ! rtph264pay ! \
* 'application/x-rtp,media=video,encoding-name=H264,payload=97,clock-rate=90000' ! \
* whip.sink_0 audiotestsrc ! audioconvert ! opusenc ! rtpopuspay ! \
* 'application/x-rtp,media=audio,encoding-name=OPUS,payload=96,clock-rate=48000,encoding-params=(string)2' ! \
* whip.sink_1 whipsink name=whip auth-token=$WHIP_TOKEN whip-endpoint=$WHIP_ENDPOINT
* ```
*
* Note: whipsink will be deprecated in the future. It is replaced by whipclientsink,
* which provides more features such as managing encoding and performing bandwidth adaptation
*
*/
use gst::glib;
use gst::prelude::*;