Media/WebRTC/Architecture: Difference between revisions

From MozillaWiki
< Media‎ | WebRTC
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
</p><p><br />
</p><p><br />
</p>
</p>
At a high level, there are five major components we need to integrate to build a functional
WebRTC stack into Firefox.
* The MediaStream components that provide generic media support.
* The WebRTC.org contributed code that handles RTP and codecs.
* The SIPCC signaling stack.
* The DataChannel management code and the libsctp code that it drives.
* The transport stack (mtransport) stack which drives DTLS, ICE, etc.
These are managed/integrated by the PeerConnection code which provides the PeerConnection
API and maintains all the relevant state.
In addition, there is the GetUserMedia() [GUM] code which handles media acquisition. However,
the GUM code has no direct contact with the rest of the WebRTC stack, since the stack itself
solely manipulates MediaStreams and does not care how they were created.
<h2> Thread Diagram </h2>
<h2> Thread Diagram </h2>
<P>
<P>


=== Signaling System: CreateOffer ===
=== Signaling System: CreateOffer ===

Revision as of 01:58, 21 May 2012

Overall Architecture

architecture.png



At a high level, there are five major components we need to integrate to build a functional WebRTC stack into Firefox.

  • The MediaStream components that provide generic media support.
  • The WebRTC.org contributed code that handles RTP and codecs.
  • The SIPCC signaling stack.
  • The DataChannel management code and the libsctp code that it drives.
  • The transport stack (mtransport) stack which drives DTLS, ICE, etc.

These are managed/integrated by the PeerConnection code which provides the PeerConnection API and maintains all the relevant state.

In addition, there is the GetUserMedia() [GUM] code which handles media acquisition. However, the GUM code has no direct contact with the rest of the WebRTC stack, since the stack itself solely manipulates MediaStreams and does not care how they were created.


Thread Diagram

Signaling System: CreateOffer

http://www.websequencediagrams.com/?lz=dGl0bGUgU2lnbmFsaW5nIFRocmVhZHMgKENyZWF0ZU9mZmVyKQpwYXJ0aWNpcGFudCAiRE9NACAHIiBhcyBET00AEw1QQyBhcyBQQwAnDkNDQVBQX1Rhc2sAMAUACgUASg1TVFMgYXMgU1RTCgpET00gLT4gUEM6IERpc3BhdGNoAIECDlBDIC0-AD8GOiBGRUFUVVJFX0NSRUFURV9PRkZFUgAbB1BDOiAAgUMGIFRyYW5zcG9ydEZsb3dcbltEVExTLCBJQ0VdCgCBFwUAYBEAXg1ET00ACRIKbm90ZSBsZWZ0IG9mAB0GSlMgY2FsbGJhY2tcbndpdGggb2ZmZXIKClNUUwCBQhFJQ0UgY2FuZGlkYXRlcwBVFgAUEABPJUlDRQoKCg&s=default

Thread diagram for transport subsystem

http://www.websequencediagrams.com/?lz=dGl0bGUgVHJhbnNwb3J0IFRocmVhZHMKcGFydGljaXBhbnQgUEMgYXMgUEMACA1TVFMgYXMgU1RTAB8NIk1lZGlhIFN0cmVhbSIgYXMgTQAMFUluABcGSU4AKxRPdXQANgZPVVQKUEMgLT4gUEM6IEFzc2VtYmxlIHQAgScJc3RhY2sAGAtTdGFydCBJQ0UAMAdTVFM6IENyZWF0ZSBzb2NrZXRzClNUUwBKCExvY2FsIElDRSBjYW5kaWRhdGVzL0RUTFMgZnAANgxSZW1vdGUAJAVDAAwdAHYKAFsLADIFb21wbGV0ZQByDABkBQAJEACBLQVPblMAgSgFUmVhZHkoKQCBKwhNSU46IE0AgXUJOjpQYQAgBmNlaXZlZCgpCk1JTgAgCVZpZU5ldHdvcms6OgAbCFJUUAAuBgAdD1NvdXJjZQCDOAUAgzYGOjpBcHBlbmRUb1RyYWNrKCkKbm90ZSByaWdodCBvZgCBBAcAg2gFcGxheXMKTQCBHAZTAA8HAIN8Bkxpc3RlbmVyOjpOb3RpZnlPdXRwdQB3BQCBSgZPVVQ6IERpc3BhdGNoKC4uLikKTU9VVAASClZpZUV4dGVybmFsQ2FwdHVyZTo6SW5jb21pbmdGcmFtZSgAIhAAghMMU2VuZACBZgkAgTEPAHYFAII6BiBzZW50IHRvIG4AgikGCg&s=default