Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sdroege/gst-plugin-rs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksym Khomenko <maksym.khomenko@skelia.partners>2023-09-28 18:19:50 +0300
committerMaksym Khomenko <maksym.khomenko@skelia.partners>2023-10-06 12:58:04 +0300
commite4096b5157f53a04cb18d640c87faae706cd64f0 (patch)
treecda7b302f3f9e2ff6da5b6e1b4598168b4acfd3f
parenta9719cada25170461bfd20fec079a4aa61dc8804 (diff)
webrtcsink: README: add documentation for custom signaller
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1340>
-rw-r--r--net/webrtc/README.md4
-rw-r--r--net/webrtc/examples/README.md7
-rw-r--r--net/webrtc/examples/webrtcsink-custom-signaller/README.md23
3 files changed, 31 insertions, 3 deletions
diff --git a/net/webrtc/README.md b/net/webrtc/README.md
index f10806ef..97c5e597 100644
--- a/net/webrtc/README.md
+++ b/net/webrtc/README.md
@@ -28,10 +28,10 @@ set of streams to any number of consumers, `webrtcsink` (which wraps
* Application-provided signalling: `webrtcsink` can be instantiated by an
application with a custom signaller. That signaller must be a GObject, and
must implement the `Signallable` interface as defined
- [here](src/webrtcsink/mod.rs). The [default signaller](src/signaller/mod.rs)
+ [here](src/signaller/mod.rs). The [default signaller](src/signaller/imp.rs)
can be used as an example.
- An [example project] is also available to use as a boilerplate for
+ An [example](examples/webrtcsink-custom-signaller/README.md) is also available to use as a boilerplate for
implementing and using a custom signaller.
* Sandboxed consumers: when a consumer is added, its encoder / payloader /
diff --git a/net/webrtc/examples/README.md b/net/webrtc/examples/README.md
index 7b402e69..a2a9ce9e 100644
--- a/net/webrtc/examples/README.md
+++ b/net/webrtc/examples/README.md
@@ -1,6 +1,6 @@
# webrtcsink examples
-Collection (1-sized for now) of webrtcsink examples
+Collection of webrtcsink examples
## webrtcsink-stats-server
@@ -16,3 +16,8 @@ cargo run --example webrtcsink-stats-server
Once it is running, follow the instruction in the webrtcsink-stats folder to
run an example client.
+
+## webrtcsink-custom-signaller
+
+An example of custom signaller implementation, see the corresponding
+[README](webrtcsink-custom-signaller/README.md) for more details on code and usage.
diff --git a/net/webrtc/examples/webrtcsink-custom-signaller/README.md b/net/webrtc/examples/webrtcsink-custom-signaller/README.md
new file mode 100644
index 00000000..f47fee27
--- /dev/null
+++ b/net/webrtc/examples/webrtcsink-custom-signaller/README.md
@@ -0,0 +1,23 @@
+# WebRTCSink custom signaller
+
+A simple application that consist of two parts:
+
+* main executable, which demonstrates how to instantiate WebRTCSink with a custom signaller
+* `signaller` module, which provides all the required boilerplate code
+ and stub implementations needed to create a custom signaller
+
+Run with:
+
+``` shell
+cargo run --example webrtcsink-custom-signaller
+```
+
+The expected output is a not-implemented panic (from `imp::Signaller::start` function):
+
+```text
+thread 'tokio-runtime-worker' panicked at 'not implemented', net/webrtc/examples/webrtcsink-custom-signaller/signaller/imp.rs:14:9
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+```
+
+Simply implement the methods in [imp.rs](signaller/imp.rs) and you should be good
+to go!