SlideShare a Scribd company logo
Browsers and stack
implementation differences
Dr. Alex Gouaillard
Plan
• global architectures of browsers and stacks
• -- chrome / firefox / webkit
• -- webrtc stand alone, webrtc in chrome,
webrtc in firefox
• - how to trace the different browsers without
recompiling
WebRTC Arch
LibWEBRTC Variation
Chrome Variation
Chrome Variation
• Wait .. What? Chrome does not use libwebrtc?
Why?
Chrome Layers
Chrome Layers
Chrome Variation
• Wait .. What? Chrome does not use libwebrtc?
Why?
– Chrome layering
– Sandbox and per tab security
– Echo canceling
– Special capturers (screen/window/tab)
– Capturer access security
– Pretty much the same applies to all browsers
Chrome Variations
• OK, Chrome does not use libwebrtc? Why
should I Care?
• If you use the webrtc lib in your project, and
expect the same results as chrome, be ready
for big surprises!
– No Screen/windows/tab sharing
– Obsolete mac capturer
– No HTTP PROXY support
LibWEBRTC src Files layout
Libwebrtc src file layout
• base/
• common_audio/
• common_video/
• libjingle/
• modules/
• p2p/
• sound/
• system_wrappers/
• tools/
• video/
• video_engine/
• voice_engine/
• Too many to list
• Basic signal processing (FFT, window, transforms, …)
• Frame buffer, I420, libyuv, …
• Session management
• See next slide
• ICE Transports: TURN, STUN, DTLS, ….
• Platform specific sound system wrappers
• Platform specific low level wrappers (threads, timer, …)
• Poach and weaponize!!
• Video encoder/decoder/rec and send stream
• Capturer, Channel, Encoder, Sync, REMB, Send
• Channel, DTMF, …
Libwebrtc src file layout
• audio_coding/
• audio_conference_mixer/
• audio_device/
• audio_processing/
• bitrate_controller/
• desktop_capture/
• media_file/
• pacing/
• remote_bitrate_estimator/
• rtp_rtcp/
• utility/
• video_capture/
• video_coding/
• video_processing/
• video_render/
• ACM2, NACK, NETQ, DTMF tone gen., ….
• mixer
• Platform specific
• Noise, typing, gain detection, NS, Echo Cancellation, …
• Bandwidth estimation and bitrate controller
• Desktop capture (abstract only)
• Audio files reading/writing
• Paced sender
• Obvious
• RTP, RTCP, Payloads, FEC, …
• More Audio files utilities, rtp_dump, recorder, player
• Generic and platform dependent capturers (OLD)
• Codecs, encoders and decoders, send and rec, jitter, …
• Video processing and image enhancement
• Generic and platform dependent renderers (OLD)
Libwebrtc src file layout
• Why do I care?
– 1. you might need to go in the code
– 2. you need to know the layout for debugging:
chrome.exe --enable-logging --
vmodule=*/webrtc/*=2,*/libjingle/*=2,*=-2 --no-
sandbox
LibWEBRTC Class Arch
LibWEBRTC Arch
LibWEBRTC DEPS
• binutils
• Boringssl
• Colorama
• Drmemory
• Expat
• Icu
• instrumented_libraries
• Jsoncpp
• Libjpeg
• libjpeg_turbo
• Libsrtp
• libudev
• libvpx
• Libyuv
• llvm-build
• Nss
• Ocmock
• openmax_dl
• Opus
• Protobuf
• Sqlite
• Syzygy
• Usrsctp
• Yasm
• zlib
Webrtc.org
Chrome Specific Webrtc Bits
• //src/content/renderer/media/
• //src/third_party/WebKit/public/platform/
• //src/third_party/WebKit/Source/modules/mediastream
• //src/content/browser/media/
• //src/content/browser/media/capture/
• //src/media/capture/video/
• //src/content/browser/renderer_host/media/
• .
• .
• .
• .
• .
• .
• .
Chrome Specific Webrtc Bits
// MediaStreamManager is used to open/enumerate media capture devices (video
// supported now). Call flow:
// 1. GenerateStream is called when a render process wants to use a capture
// device.
// 2. MediaStreamManager will ask MediaStreamUIController for permission to
// use devices and for which device to use.
// 3. MediaStreamManager will request the corresponding media device manager(s)
// to enumerate available devices. The result will be given to
// MediaStreamUIController.
// 4. MediaStreamUIController will, by posting the request to UI, let the
// users to select which devices to use and send callback to
// MediaStreamManager with the result.
// 5. MediaStreamManager will call the proper media device manager to open the
// device and let the MediaStreamRequester know it has been done.
Chrome GUM example
capturers / frames / Encoding / ….
Chrome Specific Webrtc Bits
Media Stream Manager
(singleton@browser)GUM JS API
(tab/sandbox)
1. Send request
Chrome Specific Webrtc Bits
Media Stream Manager
(singleton@browser)GUM JS API
(tab/sandbox)
2. Check if MST is already available
Chrome Specific Webrtc Bits
Media Stream Manager
(singleton@browser)GUM JS API
(tab/sandbox)
Security Manager
(source, origin)
3. Check rights
2. Check if MST is already available - NO
Chrome Specific Webrtc Bits
Media Stream Manager
(singleton@browser)
Audio
Capturer
Video
Capturer
Security Manager
(source, origin)
GUM JS API
(tab/sandbox)
4. Ask Corresponding capturer
type to start capturing
3. Check rights - OK
Chrome Specific Webrtc Bits
Media Stream Manager
(singleton@browser)
Audio
Capturer
Video
Capturer
Security Manager
(source, origin)
A
GUM JS API
(tab/sandbox)
4. Ask Corresponding capturer
type to create one - OK
V
5. Store the MST
Chrome Specific Webrtc Bits
Media Stream Manager
(singleton@browser)
Audio
Capturer
Video
Capturer
Security Manager
(source, origin)
A
GUM JS API
(tab/sandbox)
V
6. Trigger callback
Keep feeding frames
Chrome Specific Webrtc Bits
Media Stream Manager
(singleton@browser)
Audio
Capturer
Video
Capturer
Security Manager
(source, origin)
A
GUM JS API
(tab/sandbox)
V
NOTE 1: second call for same device with same constraints will directly return the
MST, that allows to share streams across tabs without blocking
Chrome Specific Webrtc Bits
Media Stream Manager
(singleton@browser)
Audio
Capturer
Video
Capturer
Security Manager
(source, origin)
A
GUM JS API
(tab/sandbox)
V
NOTE 2: Recently, a second call for the same device but with different constraints
(think simulcast) will indeed return a different resolution. Before it would return the
first resolution asked.
Chrome Specific Webrtc Bits
Media Stream Manager
(singleton@browser)
Audio
Capturer
Video
Capturer
Security Manager
(source, origin)
A
GUM JS API
(tab/sandbox)
V
NOTE 3: Not only this allow to share cams across processes, it allows for global echo
cancellation (yes, including the key strokes). Before tabs could cross feed.
Chrome Screensharing 2 steps (1)
Media Stream Manager
(singleton@browser)
Screen/Windows/Tab
Capturer
Security Manager
(source, origin)
Screensharing
(extension)
1
2
3
4
S
5
Chrome Screensharing 2 steps (2)
Media Stream Manager
(singleton@browser)
Screen/Windows/Tab
Capturer
S
GUM JS API
(tab/sandbox)
With ID
Firefox Variation
Firefox Variation – Desktop 1process
Firefox Variation – B2G
FireFox Arch
• PeerConnection
– PeerConnection.js -- shim translation layer to let us do API adaptation to the C++
– PeerConnectionImpl -- C++ implementation of the PeerConnection interface.
– SIPCC -- handles SDP and media negotiation. Provided by Cisco but not a downstream.
• Media
– Webrtc.org/GIPS -- handles media encoding and decoding. Downstream from Google.
– MediaConduit -- Generic wrapper around Webrtc.org
– MediaPipeline -- Wrapper to hold the MediaConduit, mtransport subsystem, and the SRTP
contexts, as well as interface with MediaStreams.
• Transport
– mtransport -- generic transport subsystem with implementations for ICE, DTLS, etc.
– NSS -- new DTLS stack. Mentioned because we need to land the new version of NSS
– nICEr -- ICE stack; downstream from reSIProcate project
– nrappkit --portable runtime, utility library; downstream from nrappkit.sourceforge.net
• DataChannel
– DataChannel implementation in the DOM
– libsctp -- SCTP implementation; downstream from the BSD SCTP guys
Webkit (safari ?)
Current work:
- Implement datachannel for webkit (yin liu)
- Implement webrtc.org as a back end for
webkit (adam tiamou)
- Implement windows support for OWR
Webkit Arch
Webkit Arch
Webkit Webrtc Arch
Webkit Arch – Data Channel
Webkit Arch – Data Channel

More Related Content

What's hot (20)

PPTX
Ethernet
crisma baby mathew
 
PPTX
Link Aggregation Control Protocol
Kashif Latif
 
PDF
Comparison of SRv6 Extensions uSID, SRv6+, C-SRH
Kentaro Ebisawa
 
PPTX
Distributed Tracing in Practice
DevOps.com
 
PPT
Spanning Tree Protocol
Manoj Gharate
 
PPT
BGP protocol presentation
Gorantla Mohanavamsi
 
PDF
Overview of SCTP (Stream Control Transmission Protocol)
Peter R. Egli
 
PPT
Deploying Carrier Ethernet features on ASR 9000
Vinod Kumar Balasubramanyam
 
PPTX
OSPF
EFJJavier
 
PPTX
Apache Kafka at LinkedIn
Discover Pinterest
 
PPTX
TCP/IP and UDP protocols
Dawood Faheem Abbasi
 
PPTX
Simple Mail Transfer Protocol
Ujjayanta Bhaumik
 
PPTX
Application layer
anonymous
 
PDF
Implementing OpenAPI and GraphQL services with gRPC
Tim Burks
 
PPTX
NoSQL Architecture Overview
Christopher Foot
 
PPTX
HTTP/2 Prioritization
Patrick Meenan
 
PDF
Migrating Apache Hive Workload to Apache Spark: Bridge the Gap with Zhan Zhan...
Databricks
 
PDF
Multi-WAN on pfSense 2.3 - pfSense Hangout March 2016
Netgate
 
PPTX
Network Topologies, L1-L2 Basics, Networking Devices
Aalok Shah
 
PPT
02 protocols and tcp-ip
kashish0313
 
Link Aggregation Control Protocol
Kashif Latif
 
Comparison of SRv6 Extensions uSID, SRv6+, C-SRH
Kentaro Ebisawa
 
Distributed Tracing in Practice
DevOps.com
 
Spanning Tree Protocol
Manoj Gharate
 
BGP protocol presentation
Gorantla Mohanavamsi
 
Overview of SCTP (Stream Control Transmission Protocol)
Peter R. Egli
 
Deploying Carrier Ethernet features on ASR 9000
Vinod Kumar Balasubramanyam
 
OSPF
EFJJavier
 
Apache Kafka at LinkedIn
Discover Pinterest
 
TCP/IP and UDP protocols
Dawood Faheem Abbasi
 
Simple Mail Transfer Protocol
Ujjayanta Bhaumik
 
Application layer
anonymous
 
Implementing OpenAPI and GraphQL services with gRPC
Tim Burks
 
NoSQL Architecture Overview
Christopher Foot
 
HTTP/2 Prioritization
Patrick Meenan
 
Migrating Apache Hive Workload to Apache Spark: Bridge the Gap with Zhan Zhan...
Databricks
 
Multi-WAN on pfSense 2.3 - pfSense Hangout March 2016
Netgate
 
Network Topologies, L1-L2 Basics, Networking Devices
Aalok Shah
 
02 protocols and tcp-ip
kashish0313
 

Viewers also liked (20)

PPTX
2016 February - WebRTC Conference Japan - 日本語
Alexandre Gouaillard
 
PPTX
WebRTC Status Update - 2017Q2
Alexandre Gouaillard
 
PPTX
DYI - Starting your own webrtc project
Alexandre Gouaillard
 
PPTX
2016 February - WebRTC Conference japan - English
Alexandre Gouaillard
 
PDF
2015 Q4 webrtc standards update
Alexandre Gouaillard
 
PDF
Mobile Apps by Pure Go with Reverse Binding
Takuya Ueda
 
PDF
静的解析とUIの自動生成を駆使してモバイルアプリの運用コストを大幅に下げた話
Takuya Ueda
 
PDF
Go静的解析ハンズオン
Takuya Ueda
 
PPTX
うしちゃん WebRTC Chat on SkyWayの開発コードw
Kensaku Komatsu
 
PDF
粗探しをしてGoのコントリビューターになる方法
Takuya Ueda
 
PDF
Go1.8 for Google App Engine
Takuya Ueda
 
PDF
HTTP2 RFC 発行記念祝賀会
Jxck Jxck
 
PDF
Javaトラブルに備えよう #jjug_ccc #ccc_h2
Norito Agetsuma
 
PDF
Goにおける静的解析と製品開発への応用
Takuya Ueda
 
PDF
goパッケージで型情報を用いたソースコード検索を実現する
Takuya Ueda
 
PDF
GoによるiOSアプリの開発
Takuya Ueda
 
PDF
Static Analysis in Go
Takuya Ueda
 
PDF
Cloud Functionsの紹介
Takuya Ueda
 
PDF
Namespace API を用いたマルチテナント型 Web アプリの実践
Takuya Ueda
 
PDF
条件式評価器の実装による管理ツールの抽象化
Takuya Ueda
 
2016 February - WebRTC Conference Japan - 日本語
Alexandre Gouaillard
 
WebRTC Status Update - 2017Q2
Alexandre Gouaillard
 
DYI - Starting your own webrtc project
Alexandre Gouaillard
 
2016 February - WebRTC Conference japan - English
Alexandre Gouaillard
 
2015 Q4 webrtc standards update
Alexandre Gouaillard
 
Mobile Apps by Pure Go with Reverse Binding
Takuya Ueda
 
静的解析とUIの自動生成を駆使してモバイルアプリの運用コストを大幅に下げた話
Takuya Ueda
 
Go静的解析ハンズオン
Takuya Ueda
 
うしちゃん WebRTC Chat on SkyWayの開発コードw
Kensaku Komatsu
 
粗探しをしてGoのコントリビューターになる方法
Takuya Ueda
 
Go1.8 for Google App Engine
Takuya Ueda
 
HTTP2 RFC 発行記念祝賀会
Jxck Jxck
 
Javaトラブルに備えよう #jjug_ccc #ccc_h2
Norito Agetsuma
 
Goにおける静的解析と製品開発への応用
Takuya Ueda
 
goパッケージで型情報を用いたソースコード検索を実現する
Takuya Ueda
 
GoによるiOSアプリの開発
Takuya Ueda
 
Static Analysis in Go
Takuya Ueda
 
Cloud Functionsの紹介
Takuya Ueda
 
Namespace API を用いたマルチテナント型 Web アプリの実践
Takuya Ueda
 
条件式評価器の実装による管理ツールの抽象化
Takuya Ueda
 
Ad

Similar to WebRTC Browsers n Stacks Implementation differences (20)

PDF
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
Amir Zmora
 
PDF
WebRTC Live Q&A and Screen Capture session 3
Amir Zmora
 
PDF
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
Igalia
 
PDF
DevCon 5 (December 2013) - WebRTC & WebSockets
Crocodile WebRTC SDK and Cloud Signalling Network
 
PDF
WebRTC on Mobile
Buşra Deniz, CSM
 
PDF
Introduction to WebRTC
Arjun Varma
 
PDF
WebRTC standards update (Jul 2014)
Victor Pascual Ávila
 
PPTX
Plugin for other browsers - webRTC Conference and Expo June 2014 @ atlanta
Alexandre Gouaillard
 
PPTX
Webrtc plugins for Desktop Browsers
Alexandre Gouaillard
 
PDF
What is WebRTC? What can I do with it?
Dan Jenkins
 
PDF
WHIP WebRTC Broadcasting @ FOSDEM 2022
Lorenzo Miniero
 
PDF
WebRTC And FreeSWITCH – What This Combination Means?
MoonTechnolabsPvtLtd
 
PDF
The State of WebRTC
Robin Hawkes
 
PPTX
WebRTC Seminar Report
srinivasa teja
 
PDF
WebRTC: A front-end perspective
shwetank
 
PDF
WebRTC standards update - November 2014
Victor Pascual Ávila
 
PPTX
Html web rtc
AbhishekMondal42
 
PPTX
Upperside Webinar - WebRTC Standards Update
UppersideConferences
 
PDF
Kranky Geek WebRTC 2015 - What's next for WebRTC?
Kranky Geek
 
PDF
WebRTC Standards from Tim Panton
Alan Quayle
 
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
Amir Zmora
 
WebRTC Live Q&A and Screen Capture session 3
Amir Zmora
 
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
Igalia
 
DevCon 5 (December 2013) - WebRTC & WebSockets
Crocodile WebRTC SDK and Cloud Signalling Network
 
WebRTC on Mobile
Buşra Deniz, CSM
 
Introduction to WebRTC
Arjun Varma
 
WebRTC standards update (Jul 2014)
Victor Pascual Ávila
 
Plugin for other browsers - webRTC Conference and Expo June 2014 @ atlanta
Alexandre Gouaillard
 
Webrtc plugins for Desktop Browsers
Alexandre Gouaillard
 
What is WebRTC? What can I do with it?
Dan Jenkins
 
WHIP WebRTC Broadcasting @ FOSDEM 2022
Lorenzo Miniero
 
WebRTC And FreeSWITCH – What This Combination Means?
MoonTechnolabsPvtLtd
 
The State of WebRTC
Robin Hawkes
 
WebRTC Seminar Report
srinivasa teja
 
WebRTC: A front-end perspective
shwetank
 
WebRTC standards update - November 2014
Victor Pascual Ávila
 
Html web rtc
AbhishekMondal42
 
Upperside Webinar - WebRTC Standards Update
UppersideConferences
 
Kranky Geek WebRTC 2015 - What's next for WebRTC?
Kranky Geek
 
WebRTC Standards from Tim Panton
Alan Quayle
 
Ad

More from Alexandre Gouaillard (16)

PDF
Janus conf19: TUTORIAL: KITE with network-instrumentation
Alexandre Gouaillard
 
PDF
Janus conf'19: janus client side
Alexandre Gouaillard
 
PPTX
KITE Network Instrumentation: Advanced WebRTC Testing
Alexandre Gouaillard
 
PDF
Deploying WebRTC in a low-latency streaming service
Alexandre Gouaillard
 
PDF
Streaming Media West: Webrtc the future of low latency streaming
Alexandre Gouaillard
 
PDF
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
Alexandre Gouaillard
 
PPTX
Real-Time Communication Testing Evolution with WebRTC
Alexandre Gouaillard
 
PPTX
2014 Webrtc Summit & Cloud Expo, RealTime Interactions for IoT
Alexandre Gouaillard
 
PPTX
2016 Q1 - WebRTC testing State of The Art
Alexandre Gouaillard
 
PDF
WebRTC Object Model API - Transceivers
Alexandre Gouaillard
 
PPTX
overview-peerconnection-lifetime
Alexandre Gouaillard
 
PPTX
Testing and packaging WebRTC Stack
Alexandre Gouaillard
 
PPTX
Open Source Options for Building your WebRTC Solution, May 2015 @ WebRTC Conf...
Alexandre Gouaillard
 
PPTX
WebRTC Infrastructure scalability notes - Geek'n Kranky - June 2014 @ Google SF
Alexandre Gouaillard
 
PPTX
WebRTC status and what to expect in 2015
Alexandre Gouaillard
 
PPTX
Practical webRTC - from API to Solution - webRTC Summit 2014 @ NYC
Alexandre Gouaillard
 
Janus conf19: TUTORIAL: KITE with network-instrumentation
Alexandre Gouaillard
 
Janus conf'19: janus client side
Alexandre Gouaillard
 
KITE Network Instrumentation: Advanced WebRTC Testing
Alexandre Gouaillard
 
Deploying WebRTC in a low-latency streaming service
Alexandre Gouaillard
 
Streaming Media West: Webrtc the future of low latency streaming
Alexandre Gouaillard
 
IIT-RTC 2017 Qt WebRTC Tutorial (Qt Janus Client)
Alexandre Gouaillard
 
Real-Time Communication Testing Evolution with WebRTC
Alexandre Gouaillard
 
2014 Webrtc Summit & Cloud Expo, RealTime Interactions for IoT
Alexandre Gouaillard
 
2016 Q1 - WebRTC testing State of The Art
Alexandre Gouaillard
 
WebRTC Object Model API - Transceivers
Alexandre Gouaillard
 
overview-peerconnection-lifetime
Alexandre Gouaillard
 
Testing and packaging WebRTC Stack
Alexandre Gouaillard
 
Open Source Options for Building your WebRTC Solution, May 2015 @ WebRTC Conf...
Alexandre Gouaillard
 
WebRTC Infrastructure scalability notes - Geek'n Kranky - June 2014 @ Google SF
Alexandre Gouaillard
 
WebRTC status and what to expect in 2015
Alexandre Gouaillard
 
Practical webRTC - from API to Solution - webRTC Summit 2014 @ NYC
Alexandre Gouaillard
 

Recently uploaded (20)

PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Women in Automation Presents: Reinventing Yourself — Bold Career Pivots That ...
DianaGray10
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 

WebRTC Browsers n Stacks Implementation differences

  • 1. Browsers and stack implementation differences Dr. Alex Gouaillard
  • 2. Plan • global architectures of browsers and stacks • -- chrome / firefox / webkit • -- webrtc stand alone, webrtc in chrome, webrtc in firefox • - how to trace the different browsers without recompiling
  • 6. Chrome Variation • Wait .. What? Chrome does not use libwebrtc? Why?
  • 9. Chrome Variation • Wait .. What? Chrome does not use libwebrtc? Why? – Chrome layering – Sandbox and per tab security – Echo canceling – Special capturers (screen/window/tab) – Capturer access security – Pretty much the same applies to all browsers
  • 10. Chrome Variations • OK, Chrome does not use libwebrtc? Why should I Care? • If you use the webrtc lib in your project, and expect the same results as chrome, be ready for big surprises! – No Screen/windows/tab sharing – Obsolete mac capturer – No HTTP PROXY support
  • 12. Libwebrtc src file layout • base/ • common_audio/ • common_video/ • libjingle/ • modules/ • p2p/ • sound/ • system_wrappers/ • tools/ • video/ • video_engine/ • voice_engine/ • Too many to list • Basic signal processing (FFT, window, transforms, …) • Frame buffer, I420, libyuv, … • Session management • See next slide • ICE Transports: TURN, STUN, DTLS, …. • Platform specific sound system wrappers • Platform specific low level wrappers (threads, timer, …) • Poach and weaponize!! • Video encoder/decoder/rec and send stream • Capturer, Channel, Encoder, Sync, REMB, Send • Channel, DTMF, …
  • 13. Libwebrtc src file layout • audio_coding/ • audio_conference_mixer/ • audio_device/ • audio_processing/ • bitrate_controller/ • desktop_capture/ • media_file/ • pacing/ • remote_bitrate_estimator/ • rtp_rtcp/ • utility/ • video_capture/ • video_coding/ • video_processing/ • video_render/ • ACM2, NACK, NETQ, DTMF tone gen., …. • mixer • Platform specific • Noise, typing, gain detection, NS, Echo Cancellation, … • Bandwidth estimation and bitrate controller • Desktop capture (abstract only) • Audio files reading/writing • Paced sender • Obvious • RTP, RTCP, Payloads, FEC, … • More Audio files utilities, rtp_dump, recorder, player • Generic and platform dependent capturers (OLD) • Codecs, encoders and decoders, send and rec, jitter, … • Video processing and image enhancement • Generic and platform dependent renderers (OLD)
  • 14. Libwebrtc src file layout • Why do I care? – 1. you might need to go in the code – 2. you need to know the layout for debugging: chrome.exe --enable-logging -- vmodule=*/webrtc/*=2,*/libjingle/*=2,*=-2 --no- sandbox
  • 17. LibWEBRTC DEPS • binutils • Boringssl • Colorama • Drmemory • Expat • Icu • instrumented_libraries • Jsoncpp • Libjpeg • libjpeg_turbo • Libsrtp • libudev • libvpx • Libyuv • llvm-build • Nss • Ocmock • openmax_dl • Opus • Protobuf • Sqlite • Syzygy • Usrsctp • Yasm • zlib
  • 19. Chrome Specific Webrtc Bits • //src/content/renderer/media/ • //src/third_party/WebKit/public/platform/ • //src/third_party/WebKit/Source/modules/mediastream • //src/content/browser/media/ • //src/content/browser/media/capture/ • //src/media/capture/video/ • //src/content/browser/renderer_host/media/ • . • . • . • . • . • . • .
  • 20. Chrome Specific Webrtc Bits // MediaStreamManager is used to open/enumerate media capture devices (video // supported now). Call flow: // 1. GenerateStream is called when a render process wants to use a capture // device. // 2. MediaStreamManager will ask MediaStreamUIController for permission to // use devices and for which device to use. // 3. MediaStreamManager will request the corresponding media device manager(s) // to enumerate available devices. The result will be given to // MediaStreamUIController. // 4. MediaStreamUIController will, by posting the request to UI, let the // users to select which devices to use and send callback to // MediaStreamManager with the result. // 5. MediaStreamManager will call the proper media device manager to open the // device and let the MediaStreamRequester know it has been done.
  • 21. Chrome GUM example capturers / frames / Encoding / ….
  • 22. Chrome Specific Webrtc Bits Media Stream Manager (singleton@browser)GUM JS API (tab/sandbox) 1. Send request
  • 23. Chrome Specific Webrtc Bits Media Stream Manager (singleton@browser)GUM JS API (tab/sandbox) 2. Check if MST is already available
  • 24. Chrome Specific Webrtc Bits Media Stream Manager (singleton@browser)GUM JS API (tab/sandbox) Security Manager (source, origin) 3. Check rights 2. Check if MST is already available - NO
  • 25. Chrome Specific Webrtc Bits Media Stream Manager (singleton@browser) Audio Capturer Video Capturer Security Manager (source, origin) GUM JS API (tab/sandbox) 4. Ask Corresponding capturer type to start capturing 3. Check rights - OK
  • 26. Chrome Specific Webrtc Bits Media Stream Manager (singleton@browser) Audio Capturer Video Capturer Security Manager (source, origin) A GUM JS API (tab/sandbox) 4. Ask Corresponding capturer type to create one - OK V 5. Store the MST
  • 27. Chrome Specific Webrtc Bits Media Stream Manager (singleton@browser) Audio Capturer Video Capturer Security Manager (source, origin) A GUM JS API (tab/sandbox) V 6. Trigger callback Keep feeding frames
  • 28. Chrome Specific Webrtc Bits Media Stream Manager (singleton@browser) Audio Capturer Video Capturer Security Manager (source, origin) A GUM JS API (tab/sandbox) V NOTE 1: second call for same device with same constraints will directly return the MST, that allows to share streams across tabs without blocking
  • 29. Chrome Specific Webrtc Bits Media Stream Manager (singleton@browser) Audio Capturer Video Capturer Security Manager (source, origin) A GUM JS API (tab/sandbox) V NOTE 2: Recently, a second call for the same device but with different constraints (think simulcast) will indeed return a different resolution. Before it would return the first resolution asked.
  • 30. Chrome Specific Webrtc Bits Media Stream Manager (singleton@browser) Audio Capturer Video Capturer Security Manager (source, origin) A GUM JS API (tab/sandbox) V NOTE 3: Not only this allow to share cams across processes, it allows for global echo cancellation (yes, including the key strokes). Before tabs could cross feed.
  • 31. Chrome Screensharing 2 steps (1) Media Stream Manager (singleton@browser) Screen/Windows/Tab Capturer Security Manager (source, origin) Screensharing (extension) 1 2 3 4 S 5
  • 32. Chrome Screensharing 2 steps (2) Media Stream Manager (singleton@browser) Screen/Windows/Tab Capturer S GUM JS API (tab/sandbox) With ID
  • 34. Firefox Variation – Desktop 1process
  • 36. FireFox Arch • PeerConnection – PeerConnection.js -- shim translation layer to let us do API adaptation to the C++ – PeerConnectionImpl -- C++ implementation of the PeerConnection interface. – SIPCC -- handles SDP and media negotiation. Provided by Cisco but not a downstream. • Media – Webrtc.org/GIPS -- handles media encoding and decoding. Downstream from Google. – MediaConduit -- Generic wrapper around Webrtc.org – MediaPipeline -- Wrapper to hold the MediaConduit, mtransport subsystem, and the SRTP contexts, as well as interface with MediaStreams. • Transport – mtransport -- generic transport subsystem with implementations for ICE, DTLS, etc. – NSS -- new DTLS stack. Mentioned because we need to land the new version of NSS – nICEr -- ICE stack; downstream from reSIProcate project – nrappkit --portable runtime, utility library; downstream from nrappkit.sourceforge.net • DataChannel – DataChannel implementation in the DOM – libsctp -- SCTP implementation; downstream from the BSD SCTP guys
  • 37. Webkit (safari ?) Current work: - Implement datachannel for webkit (yin liu) - Implement webrtc.org as a back end for webkit (adam tiamou) - Implement windows support for OWR
  • 41. Webkit Arch – Data Channel
  • 42. Webkit Arch – Data Channel

Editor's Notes

  • #36: https://wiki.mozilla.org/Media/WebRTC/WebRTCE10S
  • #37: https://wiki.mozilla.org/Media/WebRTC/WebRTCE10S