Media/WebRTC/Architecture-2

From MozillaWiki
< Media‎ | WebRTC
Jump to: navigation, search

This wiki-page builds on the concepts from the WebRTC Architecture Page filling in the details as necessary. This page shall be used along with the original Architecture page@ https://wiki.mozilla.org/index.php?title=Media/WebRTC/Architecture.




Appendix 1. MediaStream and Graph Intro:

 MediaStream provides generic framework for passing in and out of media data between source and sinks. It provides abstraction from the actual mechanisms use to generate the media-data. A typical source and sink for video-data can be Camera and File respectively. 
  MediaStreams are maintained in MediaGraph, which provides for synchronous media data.

APIs Exposed

  Audio-Control Apis
      AddAudioOutput, SetAudioOutputVolume,RemoveAudioOutput  
  Video-Control Apis
     AddVideoOutput, RemoveVideoOutput
 State Apis
    Destroy, isFinished, ChangeExplicitBlockerCount,GetCurrentTime
 Listener Apis
   AddListener, RemoveListener

We need to also know about 2 important concepts related to MediaStream framework - SourceMediaStream and MediaStreamListener SourceMediaStream is type of media-stream to which a decoder can write audio and video into. We use this stream for rendering purposes. Following APIs are exposed in here - AddTrack, AppendToTrack, EndTrack, AdvanceKnownTrackTimes,Finish. Each such stream exposes following relevant information about itself - TrackID, TrackRate, StartTime, MediaData