Skip to main content

Python implementation of the gstreamer signalling protocol

Project description

gst-signalling-py: Gstreamer WebRTC signalling in Python

Code style: black linter pytest coverage

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gst_signalling-1.1.2.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gst_signalling-1.1.2-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file gst_signalling-1.1.2.tar.gz.

File metadata

  • Download URL: gst_signalling-1.1.2.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for gst_signalling-1.1.2.tar.gz
Algorithm Hash digest
SHA256 45c7bb3d6801b2704cd4c743130f60d2991b39aa91b6220873ef53ffe9910b98
MD5 f74556a09b2ddf086cefd497195d7f96
BLAKE2b-256 3f770c45062d07bb6ad8f940a8a8bc3acd7968cc145be354a566e897d4a6753c

See more details on using hashes here.

File details

Details for the file gst_signalling-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: gst_signalling-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for gst_signalling-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 39ebb6eac597933504334d4c1f835abd873cbd42fe31896515e3a0db368db78c
MD5 7964764c9091230a5dc3552dba9a6131
BLAKE2b-256 847a4ac380ce2e7e9ea1e055460648d6c562eb554cdc0dd9b6536b38934b9ef4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page