Overview
--- ...
| | - DBus object : : - other object
--- '''
-------------------- --------------
|Connection Manager| |StreamEngine|
-------------------- --------------
| |
---------------------- .........
|StreamedMediaChannel| :Channel:
---------------------- '''''''''
| |
---------------- ......... .................
|SessionHandler| <---> :Session:---:FarsightSession:
---------------- ''''''''' '''''''''''''''''
| |
--------------- ........ ................
|StreamHandler| <---> :Stream:---:FarsightStream:
--------------- '''''''' ''''''''''''''''
Stream Engine
Stream Engine effectively exports Farsight to D-Bus. When it's told to handle a particular streamed media channel, it creates sessions and streams that mirror the channels's session handlers and stream handlers. Singals raised and methods called by the connection manager are translated to Farsight and vice versa.
Stream Engine implements two D-Bus interfaces:
org.freedesktop.Telepathy.ChannelHandler
HandleChannel (s: bus_name, o: connection, s: channel_type, o: channel, u: handle_type, u: handle) -> nothing
org.freedesktop.Telepathy.StreamEngine
SetOutputVolume (o: channel_path, u: stream_id, u: volume) -> nothing
MuteInput (o: channel_path, u: stream_id, b: mute_state) -> nothing
MuteOutput (o: channel_path, u: stream_id, b: mute_state) -> nothing
SetOutputWindow (o: channel_path, u: stream_id, u: window) -> nothing
AddPreviewWindow (u: window) -> nothing
RemovePreviewWindow (u: window) -> nothing
Shutdown () -> nothing
Receiving (o: channel_path, u: stream_id, b: state)
Process
New StreamedMediaChannel gets created.
For outgoing calls, a client will have called RequestChannel to cause this to happen.
Mission control, or the channel handler, will start stream-engine and call HandleChannel on it
stream-engine calls GetSessionHandlers on the channel
stream-engine binds to NewMediaSessionHandler signal on channel
GetSessionHandlers returns:
- stream-engine creates corresponding sessions
stream-engine binds to NewMediaStreamHandler
NewMediaSessionHandler raised:
- stream-engine creates corresponding session
stream-engine binds to NewMediaStreamHandler
- stream-engine session created: calls Ready on the corresponding session handler, passing a list of local codecs
local codecs can also be passed in after the Ready call using the SetLocalCodecs method

