From 64056c55270aafacadc48bad5fbebbc6bbfc5d7b Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Fri, 9 Jun 2023 01:06:36 +0200 Subject: [PATCH] net/webrtc: improve documentation layout Part-of: --- net/webrtc/src/lib.rs | 4 +++- net/webrtc/src/signaller/mod.rs | 6 ++++++ net/webrtc/src/webrtcsink/mod.rs | 29 +++++++++++++++++++++++++++-- net/webrtc/src/webrtcsrc/mod.rs | 4 +++- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/net/webrtc/src/lib.rs b/net/webrtc/src/lib.rs index ba5f924c..d17b825b 100644 --- a/net/webrtc/src/lib.rs +++ b/net/webrtc/src/lib.rs @@ -3,8 +3,10 @@ /** * plugin-rswebrtc: + * @title: Rust WebRTC elements + * @short_description: A collection of high level WebRTC elements wrapping webrtcbin * - * This plugin implements a high level WebRTC sink and source. + * {{ net/webrtc/README.md[2:233] }} * * Since: plugins-rs-0.9 */ diff --git a/net/webrtc/src/signaller/mod.rs b/net/webrtc/src/signaller/mod.rs index bece3016..c4992a14 100644 --- a/net/webrtc/src/signaller/mod.rs +++ b/net/webrtc/src/signaller/mod.rs @@ -2,6 +2,12 @@ mod iface; mod imp; use gst::glib; +/** + * GstRSWebRTCSignallableIface: + * @title: Interface for WebRTC signalling protocols + * + * Interface that WebRTC elements can implement their own protocol with. + */ use once_cell::sync::Lazy; // Expose traits and objects from the module itself so it exactly looks like // generated bindings diff --git a/net/webrtc/src/webrtcsink/mod.rs b/net/webrtc/src/webrtcsink/mod.rs index 9a659773..976e28de 100644 --- a/net/webrtc/src/webrtcsink/mod.rs +++ b/net/webrtc/src/webrtcsink/mod.rs @@ -1,11 +1,36 @@ // SPDX-License-Identifier: MPL-2.0 use crate::signaller::Signallable; + /** - * element-webrtcsink: + * SECTION:element-webrtcsink + * @symbols: + * - GstBaseWebRTCSink + * - GstRSWebRTCSignallableIface * - * {{ net/webrtc/README.md[2:190] }} + * `webrtcsink` is an element that can be used to serve media streams + * to multiple consumers through WebRTC. * + * It uses a signaller that implements the protocol supported by the default + * signalling server we additionally provide, take a look at the subclasses of + * #GstBaseWebRTCSink for other supported protocols, or implement your own. + * + * See the [documentation of the plugin](plugin-rswebrtc) for more information + * on features and usage. + */ + +/** + * GstBaseWebRTCSink: + * @title: Base class for WebRTC producers + * + * Base class for WebRTC sinks to implement and provide their own protocol for. + */ + +/** + * GstRSWebRTCSignallableIface: + * @title: Interface for WebRTC signalling protocols + * + * Interface that WebRTC elements can implement their own protocol with. */ use gst::glib; use gst::prelude::*; diff --git a/net/webrtc/src/webrtcsrc/mod.rs b/net/webrtc/src/webrtcsrc/mod.rs index 955b2201..5bb09769 100644 --- a/net/webrtc/src/webrtcsrc/mod.rs +++ b/net/webrtc/src/webrtcsrc/mod.rs @@ -1,6 +1,8 @@ // SPDX-License-Identifier: MPL-2.0 /** - * element-webrtcsrc: + * SECTION:element-webrtcsrc + * @symbols: + * - GstWebRTCSrcPad * * `webrtcsrc` is the source counterpart of the #webrtcsink element and can be * used to receive streams from it, it can also be used to easily playback WebRTC