mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2025-02-16 21:05:15 +00:00
webrtcsink: README: add documentation for custom signaller
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1340>
This commit is contained in:
parent
a9719cada2
commit
e4096b5157
3 changed files with 31 additions and 3 deletions
|
@ -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 /
|
||||
|
|
|
@ -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.
|
||||
|
|
23
net/webrtc/examples/webrtcsink-custom-signaller/README.md
Normal file
23
net/webrtc/examples/webrtcsink-custom-signaller/README.md
Normal file
|
@ -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!
|
Loading…
Reference in a new issue