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.1.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.1-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gst_signalling-1.1.1.tar.gz
Algorithm Hash digest
SHA256 6a343fdd520ca410634976122a310127c515cfe92ff6d2b9ba55dcb8aebf4b9a
MD5 42339f756f38bc7582784a6bb2634c16
BLAKE2b-256 7c914a6d93e168a33d261c3b7e4b20aff04c8e774b8f11d284b2f0b1c7ad9d98

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gst_signalling-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cce268b70d284826b6811a37407be5a24ca65e7279b44a71a30db70cba578934
MD5 a36dcd2ffa8ec9f05bdc207872c4112e
BLAKE2b-256 5b6cecb0ceeaf62c813b29b6dfdc0cbc0565437ab1787a41704edc9e196f864e

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