Python implementation of the gstreamer signalling protocol
Project description
gst-signalling-py: Gstreamer WebRTC signalling in Python
This repository provides a Python implementation of the Gstreamer WebRTC signalling protocol.
It provides an API close to the gstreamer API with a producer and a consumer. This allows to simply write producer/consumer examples using gstreamer signalling. It works with single producer and multiple consumers for exchanging data. See the data producer example for more details.
It also provides tools to list and monitor the peers connected to a signalling server.
Note that there is no example of audiovideo streaming. Gstreamer provides rust plugins that directly communicate with a signalling server
Installation
Simply install the package using pip:
pip install -e .
Usage
See the examples for more details.
Protocol
Roles
Gstreamer signalling defines 3 roles (so the WebRTC peers are not symmetrical)
- producer (produces data, video or audio streams)
- consumer (access to a producer stream, can access all or a subset of its streams)
- listener (gets notified by the server of new producers status)
Protocol sequence diagram
sequenceDiagram
Server-->>Producer: Welcome (PeerId)
Server-->>Consumer: Welcome (PeerId)
Producer->>Server: PeerStatusChanged # declare yourself as producer
Consumer->>Server: StartSession # with producer PeerId
Server-->>Producer: StartSession (SessionId)
Server-->>Consumer: SessionStarted (SessionId)
Producer->>Server: Peer (offer sdp)
Server-->>Consumer: Peer (offer sdp)
Consumer->>Server: Peer (answer sdp)
Server-->>Producer: Peer (answer sdp)
See this page for more details.
Contribute
Please refer to our template repository for guidlines and coding style.
Development tools can be installed with
pip install -e .[dev]
Unit tests
The gstreamer signalling server is required to run on the localhost. Then run
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file gst_signalling-1.1.0.tar.gz
.
File metadata
- Download URL: gst_signalling-1.1.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ccbfed03a6e491a66f449d95d4b1bacf56a5e8a610b4de654c0d4d6f2235374 |
|
MD5 | 36d46af2788fb93a027a6a2ae177d697 |
|
BLAKE2b-256 | dc21ba2fb9b9acaf8e10f89cec517c843e5080824234048314c5406fa0e35c00 |
File details
Details for the file gst_signalling-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: gst_signalling-1.1.0-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3096d8ecea8440e3b08b5b238d68b0dc850692476d179f20625c982670fd33f |
|
MD5 | 3b69e5fd58313767782d372bb94fad77 |
|
BLAKE2b-256 | 5266e9e0bce9e693ec27379e882d0d9fd43f5ff1fcf7f8ed248f137a09fb0442 |