Farsight2Design

Goals

The goals of Farsight 2 is to do everything that the current Farsight does and:

Core design ideas

The cores design ideas of Farsight 2 are the following:

There will be four core concepts:

Farsight Conference

A conference represents one high-level conference which may include multiple synchronized audio/video/text RTP sessions. It was a Session in Farsight 1.

Farsight Session

A Farsight session corresponds to one RTP session (and in Farsight 1 was a stream). It is defined by having one media type and and one "sink pad" (one local microphone or camera for example). We can receive data from multiple sources (one per participant).

Farsight Participant

A Farsight participant represents one physical person (or something similar like a bot).

Farsight Stream

This is the link between a session and a participant. It is linked to candidates and hold SRTP information and state.

API

The API documentation can be found at http://farsight.freedesktop.org/apidoc/farsight2

The following graph shows are the different objects are to be linked together:

farsight2-references.png

Transmitters

In the previous diagram, we can see transmitter, they abstract the network layer. Different transmitter could be multicast UDP, unicast UDP, ICE UDP, HTTP tunelling, etc. The transmitter is selected by the client when it creates the Stream (so different stream could use different transmitters).

Transmitters implement two objects, the FsTransmitter, which has one instance per FsSession (there could be multiple FsTransmitter objects for a single FsSession, one per type). This object provides a GStreamer source and sink. From this object, the FsSession function that creates the Stream will make a FsStreamTransmitter object, this one is used by the Stream to communicate various per-stream data with the transmitter (mostly candidates).

RTP Implementation

The first implementation will be for RTP, as it is the most commonly used protocol and streaming. We will implement a FsRTPConference that is derived from FsBaseConference that is derived from GstBin. The FsBaseConference implements the FsConference Interface.

Transmitters are really RTP specific, they will be implemented as RTP elements, probably implementing another GInterface which should probably resemble the current one, but will also need to be able to understand the concept of multiple participants (since one ICE transmitter may have to actually contain multiple sub-transmitters to initiate ICE sessions with each one).

To do a mixer, you just have to add one adder to all sink ports of the same type, then a tee to that. On the tee, one branch goes to the audio sink and the other is added to the local input... which is sent back into the sink.

The following drawing shows the proposed design for FsRTPConference, This drawing shows only 2 FsSession with 2 SSRCs, more can be added. All pads on the FsConference element are sometimes pads that are created when either data arrives for sources or when they are requested through the Interface for sink pads.

farsight2rtp.png

Different types of conferences

There are many different types of conferences that we hope Farsight to support:

Distributed media (unicast), focused signaling

http://farsight.freedesktop.org/rtpdesign/conf-type-1.png

Distributed media (multicast), focused signaling

http://farsight.freedesktop.org/rtpdesign/conf-type-3.png

Centralized media (unicast), focused signaling

http://farsight.freedesktop.org/rtpdesign/conf-type-2.png

Distributed media (unicast), distributed signaling

http://farsight.freedesktop.org/rtpdesign/conf-type-4.png

Distributed-centralized media (unicast), distributed-focused signaling

http://farsight.freedesktop.org/rtpdesign/conf-type-5.png

Multiple mixers and signaling focuses distributed along network. Basically mixers and focuses are supernodes in the network.