SlideShare ist ein Scribd-Unternehmen logo
1 von 36
Downloaden Sie, um offline zu lesen
WebKit and GStreamer
Bringing lolcatz videos to your desktop
Xabier Rodríguez Calvar
Igalia
Who is this dude?
· Born in the Basque Country
· Grown and living in Galicia
- One of the seven Celtic Nations, like Scotland
· Studied Computer Science at Universidade da Coruña
· Partner and developer at Igalia
- Working in Multimedia and WebKit
From html5demos.com
Index
· Quick review of WebKit
· WebKit Multimedia
· Power features
- WebAudio
- Hardware acceleration
- Accelerated video compositing

5/36
Quick Review
WebKit
· Web content engine
· Processes and renders web content
· Started as a fork of KTHML and KJS
· Open source since 2005
· Goals: open source, compatibility, compliance, stability,
performance, security, portability, usability, hackability
· Non-goals: being a full web browser, being a science project,
having reusable components, unlimited scope
· Forked by Google as Blink
· Split into ports: GTK+, Qt, EFL, Mac, Chromium, Windows

7/36
Architecture

8/36
WebKitGTK+
· Each WebKit port is composed of
- Platform interfaces
- API layer
· WebKitGTK+ platform layer:
- libsoup for networking
- cairo for rasterization
- OpenGL for making the scene graph and WebGL
- GStreamer for media
- Various GTK+ APIs for talking with the system
· API layer is a GtkWidget and a set of GObject APIs
· WebKitGTK+ is used by Epiphany, Midori, yelp, devhelp

9/36
WebKit2
· Give the web rendering parts of WebKit their own process
· Page crashes don't crash the browser
· Can put vulnerable data into a separate address space
· Sandbox web rendering
· Prevent pages from accessing the disk and operating system
interface

10/36
WebKit2 Architecture

11/36
The Near Future

12/36
WebKit Multimedia
WebKit Multimedia
· Mac port: QuickTime, QtKit, AVFoundations
· Apple Win port: QuickTime
· GTK+ and EFL ports: GStreamer 1.0 backend
· Blackberry port: Bridges over to its own Media playback framework
· Chromium: bridges over to WebKit/Chromium backend which
relays to FFMPeg implementations
· Qt port: GStreamer on Linux, QtKit on Mac, QuickTime on
Windows

14/36
15/36

remaertSG
mroftalP
- - - - - - - - - - - reyalPaideM

eroCbeW
tiKbeW
WebKit Multimedia Architecture
GStreamer MediaPlayer - Overview
· Mainly developed and tested on Linux platform
· Successfully ported to MacOS/Win platfoms (not fully upstream
yet though)
· Playbin-based: the best GStreamer element for playback usecases
- Playbin2 with GStreamer 0.10
· MediaPlayer registers and uses two WebKit-specific GStreamer
elements: webkitwebsrc and a video-sink

16/36
GStreamer MediaPlayer - Main Features
· On-disk-buffering
· Frame-accurate seeking
· Basic metrics reporting
· Trick-modes
· WebAudio
· Hardware decoding support with VA-API (gst 1.2.x)
· Video accelerated compositing
· Codec installer support

17/36
WebKit and GStreamer Architecture

MediaPlayerClient

-eiPaeCin
mdalyrlet

+lyakhne(
pabcCagd)
+ouehne(
vlmCagd)

HTMLMediaElement

-eiPae
mdalyr

+ly)
pa(
+lyakhne(
pabcCagd)
+eVlm(nvlm:la)
stouei ouefot
+ouehne(
vlmCagd)

-_rvt
mpiae

MediaPlayer
+ly)
pa(
+eVlm(nvlm:la)
stouei ouefot

MediaPlayerPrivateInterface
+ly)
pa(
+eVlm(nvlm:la)
stouei ouefot

MediaPlayerPrivateGStreamerBase
+eVlm(nvlm:la)
stouei ouefot

HTMLVideoElement

HTMLAudioElement

GstPlaybin

-lyi
pabn

MediaPlayerPrivateGStreamer
+ly)
pa(

18/36
GStreamer MediaPlayer - HTTP source element
· a GStreamer bin implementing the URI handler interface for
http(s):// and blob:// uris.
· A single source pad provides raw data access to downstream
elements.
· appsrc is used internally to interface with the WebCore
SubResourceLoader object
· Element is registered with high rank in the GStreamer registry so
playbin is more prone to pick it up to read http:// URIs.

19/36
GStreamer MediaPlayer - Video rendering
· Element inheriting from GstVideoSink
- In practical sense, it is a GstAppSink with video capabilities
negotiation
· Takes video GstBuffers as input
· Pass those to the MediaPlayerPrivateGStreamer via a signal

20/36
GStreamer MediaPlayer - Audio rendering
· Use autoaudiosink
· Check for pulseaudio for playback request messages
· Pitch preservation
· Preserve audio passthrough when possible
· Volume managed by the sink

21/36
GStreamer MediaPlayer - Next steps
· Improvements and bug fixes in the player:
- Store on-disk buffered media in WebCore's cache directory
- Make the webkitwebsrc element private to WebKit
· MediaStream (getUserMedia) and WebRTC spec implementation
· MediaSource adaptive streaming API spec implementation
· Integration of WebAudio with media elements and mediastream
stack
· Finish porting to 1.2
· Remove GStreamer 0.10 code path

22/36
WebKit Multimedia Power Features
WebAudio
· A JavaScript API allowing to create a new generation of Web
games and applications
· Effects, convolution engine for room simulation, etc
· Realtime analysis, playback and visualization
· W3C spec driven and implemented mainly by Chromium and
Firefox
· In WebKit, currently implemented for:
- Mac
- Chromium
- GStreamer based Ports: GTK+, EFL, Qt

24/36
WebAudio GStreamer - Reading Audio
· Spec allows two ways to read audio data:
- from memory: we can use giostreamsrc GStreamer element
- from a file path: we can use the filesrc GStremer element
· Pipeline: src ! decodebin2 ! audioconvert ! audioresample !
capsfilter ! deinterleave ! queue ! appsink
· deinterleave separates multi-channel audio to n audio mono
channels (Pipeline above can contain multiple queue ! appsink
chains)
· appsink used to collect mono audio buffers, store them in a list and
convert data to floating point values
· Data is stored in a WebCore::AudioBus, containing one or multiple
channel Float arrays

25/36
WebAudio GStreamer - Playing Audio
· The WebAudio stack processed or generated some audio data to be
sent to the sound card
· Similarly to the "Reading Data" step, a WebCore::AudioBus is used
to store the data
· Custom GStreamer element to convert an AudioBus to an
interleaved audio data flow: webkitwebaudiosrc
· webkitwebaudiosrc: a bin with n internal pads pushing to an
interleave element. Source pad outputs a single, interleave, wavencoded data flow
· Pipeline: webkitwebaudiosrc ! wavparse ! audioconvert !
autoaudiosink

26/36
WebAudio GStreamer - Work in Progress
· Some layout tests don't pass yet
· Not yet enabled by default in release builds
· Support for stereo+ streams in the reader side. Playback side
already handles those.
· Integration with <video> and <audio> elements: WebAudio
MediaElementSourceNode

27/36
Hardware Accelerated Video
· We use GStreamer VA-API. (1.2.x)
· That's it! Hardcore comes when compositing that.

28/36
Accelerated Video Compositing - Acceleration in
WebKit

From Joone Hur
29/36
Accelerated Video Compositing
· Element inheriting from GstVideoSink
- In practical sense, it is a GstAppSink with video capabilities
negotiation
· Takes video GstBuffers as input.
· Video frame is transferred to the MediaPlayerPrivateGStreamer via
a GLib signal.
· MediaPlayerPrivateGStreamer uploads it to a GL texture and
renders it asynchronously in the WebKit context.

30/36
Accelerated Video Compositing - Architecture
TextureMapperPlatformLayer

MediaPlayerPrivateInterface

+an(
pit)

MediaPlayerPrivateGStreamerBase
+an(
pit)

GstPlaybin

-lyi
pabn

MediaPlayerPrivateGStreamer

*

GstElement

...

WebKitVideoSink

<cets>
<rae>

31/36
Accelerated Video Compositing - Rendering paths
· Software rendering path
- It uses Cairo
· Accelerated compositing paths
- TextureMapperLayer:
- Light-weight implementation of a scene-graph
- The TextureMapperLayer tree is equivalent to the
GraphicsLayer tree.
- TextureMapperGL
- Provides a GPU accelerated implementation of the
drawing primitives, using shaders compatible with GL/ES
2.0

32/36
Accelerated Video Compositing - Next steps
· More video decoders with GstVideoGLTextureUploadMeta support
· Support EGLImage in WebKit as video frames handlers
- And video decoders that deliver this kind of capabilities.
· Handle the vertical blank interval in WebKit
- GTK+ 3.8 seems to fix this issue.

33/36
From html5demos.com
From html5demos.com

35/36
Thank You!
(q&a)
twitter @calvaris
www blogs.igalia.com/xrcalvar

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to linux containers
Introduction to linux containersIntroduction to linux containers
Introduction to linux containersGoogle
 
Fluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshellFluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshellN Masahiro
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker, Inc.
 
Gstreamer Basics
Gstreamer BasicsGstreamer Basics
Gstreamer Basicsidrajeev
 
How to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux DevicesHow to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux DevicesLeon Anavi
 
Containerization & Docker - Under the Hood
Containerization & Docker - Under the HoodContainerization & Docker - Under the Hood
Containerization & Docker - Under the HoodImesha Sudasingha
 
Kubernetes introduction
Kubernetes introductionKubernetes introduction
Kubernetes introductionDongwon Kim
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusGrafana Labs
 
Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introductionrajdeep
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architectureSHAJANA BASHEER
 
Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM ShapeBlue
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker ComposeAjeet Singh Raina
 

Was ist angesagt? (20)

Introduction to linux containers
Introduction to linux containersIntroduction to linux containers
Introduction to linux containers
 
Fluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshellFluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshell
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0
 
Gstreamer Basics
Gstreamer BasicsGstreamer Basics
Gstreamer Basics
 
How to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux DevicesHow to Choose a Software Update Mechanism for Embedded Linux Devices
How to Choose a Software Update Mechanism for Embedded Linux Devices
 
Elk
Elk Elk
Elk
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Containerization & Docker - Under the Hood
Containerization & Docker - Under the HoodContainerization & Docker - Under the Hood
Containerization & Docker - Under the Hood
 
Kubernetes introduction
Kubernetes introductionKubernetes introduction
Kubernetes introduction
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
 
Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)Embedded Android : System Development - Part II (HAL)
Embedded Android : System Development - Part II (HAL)
 
Docker Swarm Introduction
Docker Swarm IntroductionDocker Swarm Introduction
Docker Swarm Introduction
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
Jenkins
JenkinsJenkins
Jenkins
 
Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVM
 
Monitoring With Prometheus
Monitoring With PrometheusMonitoring With Prometheus
Monitoring With Prometheus
 
Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)
 
ELK Stack
ELK StackELK Stack
ELK Stack
 
File System Modules
File System ModulesFile System Modules
File System Modules
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
 

Ähnlich wie WebKit and GStreamer

Multimedia in WebKitGtk+, past/present/future
Multimedia in WebKitGtk+, past/present/futureMultimedia in WebKitGtk+, past/present/future
Multimedia in WebKitGtk+, past/present/futurephiln2
 
Add the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKitAdd the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKitIgalia
 
Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...
Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...
Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...Igalia
 
GStreamer support in WebKit. what’s new?
GStreamer support in WebKit. what’s new?GStreamer support in WebKit. what’s new?
GStreamer support in WebKit. what’s new?philn2
 
GStreamer support in WebKit. What's new? (GStreamer Conference 2015)
GStreamer support in WebKit. What's new? (GStreamer Conference 2015)GStreamer support in WebKit. What's new? (GStreamer Conference 2015)
GStreamer support in WebKit. What's new? (GStreamer Conference 2015)Igalia
 
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...Igalia
 
WPEWebKit, the WebKit port for embedded platforms (Linaro Connect San Diego 2...
WPEWebKit, the WebKit port for embedded platforms (Linaro Connect San Diego 2...WPEWebKit, the WebKit port for embedded platforms (Linaro Connect San Diego 2...
WPEWebKit, the WebKit port for embedded platforms (Linaro Connect San Diego 2...Igalia
 
Multimedia in WebKitGTK+ (FOSDEM 2010)
Multimedia in WebKitGTK+ (FOSDEM 2010)Multimedia in WebKitGTK+ (FOSDEM 2010)
Multimedia in WebKitGTK+ (FOSDEM 2010)Igalia
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTCGiacomo Vacca
 
WebKit, HTML5 media and GStreamer on multiple platforms
WebKit, HTML5 media and GStreamer on multiple platforms WebKit, HTML5 media and GStreamer on multiple platforms
WebKit, HTML5 media and GStreamer on multiple platforms philn2
 
WebKit, HTML5 media and GStreamer on multiple platforms (GStreamer Conference...
WebKit, HTML5 media and GStreamer on multiple platforms (GStreamer Conference...WebKit, HTML5 media and GStreamer on multiple platforms (GStreamer Conference...
WebKit, HTML5 media and GStreamer on multiple platforms (GStreamer Conference...Igalia
 
WebKit2 And You (GUADEC 2013)
WebKit2 And You (GUADEC 2013)WebKit2 And You (GUADEC 2013)
WebKit2 And You (GUADEC 2013)Igalia
 
Wayland support in WebKit2GTK+ (GUADEC 2014)
Wayland support in WebKit2GTK+ (GUADEC 2014)Wayland support in WebKit2GTK+ (GUADEC 2014)
Wayland support in WebKit2GTK+ (GUADEC 2014)Igalia
 
Reaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkitReaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkitIgalia
 
Igalia and WebKit: Status update and plans
Igalia and WebKit: Status update and plansIgalia and WebKit: Status update and plans
Igalia and WebKit: Status update and plansIgalia
 
WebRTC in WPE/GTK Ports: Current status and challenges
WebRTC in WPE/GTK Ports: Current status and challengesWebRTC in WPE/GTK Ports: Current status and challenges
WebRTC in WPE/GTK Ports: Current status and challengesIgalia
 
JooinK - DevFest Piemonte 2013
JooinK - DevFest Piemonte 2013JooinK - DevFest Piemonte 2013
JooinK - DevFest Piemonte 2013JooinK
 
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...Amir Zmora
 
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...Igalia
 

Ähnlich wie WebKit and GStreamer (20)

Multimedia in WebKitGtk+, past/present/future
Multimedia in WebKitGtk+, past/present/futureMultimedia in WebKitGtk+, past/present/future
Multimedia in WebKitGtk+, past/present/future
 
Add the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKitAdd the power of the Web to your embedded devices with WPE WebKit
Add the power of the Web to your embedded devices with WPE WebKit
 
Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...
Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...
Efficient multimedia support in QtWebKit on Raspberry Pi (GStreamer Conferenc...
 
GStreamer support in WebKit. what’s new?
GStreamer support in WebKit. what’s new?GStreamer support in WebKit. what’s new?
GStreamer support in WebKit. what’s new?
 
GStreamer support in WebKit. What's new? (GStreamer Conference 2015)
GStreamer support in WebKit. What's new? (GStreamer Conference 2015)GStreamer support in WebKit. What's new? (GStreamer Conference 2015)
GStreamer support in WebKit. What's new? (GStreamer Conference 2015)
 
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
 
WPEWebKit, the WebKit port for embedded platforms (Linaro Connect San Diego 2...
WPEWebKit, the WebKit port for embedded platforms (Linaro Connect San Diego 2...WPEWebKit, the WebKit port for embedded platforms (Linaro Connect San Diego 2...
WPEWebKit, the WebKit port for embedded platforms (Linaro Connect San Diego 2...
 
Multimedia in WebKitGTK+ (FOSDEM 2010)
Multimedia in WebKitGTK+ (FOSDEM 2010)Multimedia in WebKitGTK+ (FOSDEM 2010)
Multimedia in WebKitGTK+ (FOSDEM 2010)
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
 
WebKit, HTML5 media and GStreamer on multiple platforms
WebKit, HTML5 media and GStreamer on multiple platforms WebKit, HTML5 media and GStreamer on multiple platforms
WebKit, HTML5 media and GStreamer on multiple platforms
 
WebKit, HTML5 media and GStreamer on multiple platforms (GStreamer Conference...
WebKit, HTML5 media and GStreamer on multiple platforms (GStreamer Conference...WebKit, HTML5 media and GStreamer on multiple platforms (GStreamer Conference...
WebKit, HTML5 media and GStreamer on multiple platforms (GStreamer Conference...
 
WebKit2 And You (GUADEC 2013)
WebKit2 And You (GUADEC 2013)WebKit2 And You (GUADEC 2013)
WebKit2 And You (GUADEC 2013)
 
The WebKit project
The WebKit projectThe WebKit project
The WebKit project
 
Wayland support in WebKit2GTK+ (GUADEC 2014)
Wayland support in WebKit2GTK+ (GUADEC 2014)Wayland support in WebKit2GTK+ (GUADEC 2014)
Wayland support in WebKit2GTK+ (GUADEC 2014)
 
Reaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkitReaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkit
 
Igalia and WebKit: Status update and plans
Igalia and WebKit: Status update and plansIgalia and WebKit: Status update and plans
Igalia and WebKit: Status update and plans
 
WebRTC in WPE/GTK Ports: Current status and challenges
WebRTC in WPE/GTK Ports: Current status and challengesWebRTC in WPE/GTK Ports: Current status and challenges
WebRTC in WPE/GTK Ports: Current status and challenges
 
JooinK - DevFest Piemonte 2013
JooinK - DevFest Piemonte 2013JooinK - DevFest Piemonte 2013
JooinK - DevFest Piemonte 2013
 
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
WebRTC Standards & Implementation Q&A - The Internals of WebRTC Browsers Impl...
 
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
A Browser for the Automotive: Introduction to WebKit for Wayland (Automotive ...
 

Kürzlich hochgeladen

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 

Kürzlich hochgeladen (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

WebKit and GStreamer

  • 1.
  • 2. WebKit and GStreamer Bringing lolcatz videos to your desktop Xabier Rodríguez Calvar Igalia
  • 3. Who is this dude? · Born in the Basque Country · Grown and living in Galicia - One of the seven Celtic Nations, like Scotland · Studied Computer Science at Universidade da Coruña · Partner and developer at Igalia - Working in Multimedia and WebKit
  • 5. Index · Quick review of WebKit · WebKit Multimedia · Power features - WebAudio - Hardware acceleration - Accelerated video compositing 5/36
  • 7. WebKit · Web content engine · Processes and renders web content · Started as a fork of KTHML and KJS · Open source since 2005 · Goals: open source, compatibility, compliance, stability, performance, security, portability, usability, hackability · Non-goals: being a full web browser, being a science project, having reusable components, unlimited scope · Forked by Google as Blink · Split into ports: GTK+, Qt, EFL, Mac, Chromium, Windows 7/36
  • 9. WebKitGTK+ · Each WebKit port is composed of - Platform interfaces - API layer · WebKitGTK+ platform layer: - libsoup for networking - cairo for rasterization - OpenGL for making the scene graph and WebGL - GStreamer for media - Various GTK+ APIs for talking with the system · API layer is a GtkWidget and a set of GObject APIs · WebKitGTK+ is used by Epiphany, Midori, yelp, devhelp 9/36
  • 10. WebKit2 · Give the web rendering parts of WebKit their own process · Page crashes don't crash the browser · Can put vulnerable data into a separate address space · Sandbox web rendering · Prevent pages from accessing the disk and operating system interface 10/36
  • 14. WebKit Multimedia · Mac port: QuickTime, QtKit, AVFoundations · Apple Win port: QuickTime · GTK+ and EFL ports: GStreamer 1.0 backend · Blackberry port: Bridges over to its own Media playback framework · Chromium: bridges over to WebKit/Chromium backend which relays to FFMPeg implementations · Qt port: GStreamer on Linux, QtKit on Mac, QuickTime on Windows 14/36
  • 15. 15/36 remaertSG mroftalP - - - - - - - - - - - reyalPaideM eroCbeW tiKbeW WebKit Multimedia Architecture
  • 16. GStreamer MediaPlayer - Overview · Mainly developed and tested on Linux platform · Successfully ported to MacOS/Win platfoms (not fully upstream yet though) · Playbin-based: the best GStreamer element for playback usecases - Playbin2 with GStreamer 0.10 · MediaPlayer registers and uses two WebKit-specific GStreamer elements: webkitwebsrc and a video-sink 16/36
  • 17. GStreamer MediaPlayer - Main Features · On-disk-buffering · Frame-accurate seeking · Basic metrics reporting · Trick-modes · WebAudio · Hardware decoding support with VA-API (gst 1.2.x) · Video accelerated compositing · Codec installer support 17/36
  • 18. WebKit and GStreamer Architecture MediaPlayerClient -eiPaeCin mdalyrlet +lyakhne( pabcCagd) +ouehne( vlmCagd) HTMLMediaElement -eiPae mdalyr +ly) pa( +lyakhne( pabcCagd) +eVlm(nvlm:la) stouei ouefot +ouehne( vlmCagd) -_rvt mpiae MediaPlayer +ly) pa( +eVlm(nvlm:la) stouei ouefot MediaPlayerPrivateInterface +ly) pa( +eVlm(nvlm:la) stouei ouefot MediaPlayerPrivateGStreamerBase +eVlm(nvlm:la) stouei ouefot HTMLVideoElement HTMLAudioElement GstPlaybin -lyi pabn MediaPlayerPrivateGStreamer +ly) pa( 18/36
  • 19. GStreamer MediaPlayer - HTTP source element · a GStreamer bin implementing the URI handler interface for http(s):// and blob:// uris. · A single source pad provides raw data access to downstream elements. · appsrc is used internally to interface with the WebCore SubResourceLoader object · Element is registered with high rank in the GStreamer registry so playbin is more prone to pick it up to read http:// URIs. 19/36
  • 20. GStreamer MediaPlayer - Video rendering · Element inheriting from GstVideoSink - In practical sense, it is a GstAppSink with video capabilities negotiation · Takes video GstBuffers as input · Pass those to the MediaPlayerPrivateGStreamer via a signal 20/36
  • 21. GStreamer MediaPlayer - Audio rendering · Use autoaudiosink · Check for pulseaudio for playback request messages · Pitch preservation · Preserve audio passthrough when possible · Volume managed by the sink 21/36
  • 22. GStreamer MediaPlayer - Next steps · Improvements and bug fixes in the player: - Store on-disk buffered media in WebCore's cache directory - Make the webkitwebsrc element private to WebKit · MediaStream (getUserMedia) and WebRTC spec implementation · MediaSource adaptive streaming API spec implementation · Integration of WebAudio with media elements and mediastream stack · Finish porting to 1.2 · Remove GStreamer 0.10 code path 22/36
  • 24. WebAudio · A JavaScript API allowing to create a new generation of Web games and applications · Effects, convolution engine for room simulation, etc · Realtime analysis, playback and visualization · W3C spec driven and implemented mainly by Chromium and Firefox · In WebKit, currently implemented for: - Mac - Chromium - GStreamer based Ports: GTK+, EFL, Qt 24/36
  • 25. WebAudio GStreamer - Reading Audio · Spec allows two ways to read audio data: - from memory: we can use giostreamsrc GStreamer element - from a file path: we can use the filesrc GStremer element · Pipeline: src ! decodebin2 ! audioconvert ! audioresample ! capsfilter ! deinterleave ! queue ! appsink · deinterleave separates multi-channel audio to n audio mono channels (Pipeline above can contain multiple queue ! appsink chains) · appsink used to collect mono audio buffers, store them in a list and convert data to floating point values · Data is stored in a WebCore::AudioBus, containing one or multiple channel Float arrays 25/36
  • 26. WebAudio GStreamer - Playing Audio · The WebAudio stack processed or generated some audio data to be sent to the sound card · Similarly to the "Reading Data" step, a WebCore::AudioBus is used to store the data · Custom GStreamer element to convert an AudioBus to an interleaved audio data flow: webkitwebaudiosrc · webkitwebaudiosrc: a bin with n internal pads pushing to an interleave element. Source pad outputs a single, interleave, wavencoded data flow · Pipeline: webkitwebaudiosrc ! wavparse ! audioconvert ! autoaudiosink 26/36
  • 27. WebAudio GStreamer - Work in Progress · Some layout tests don't pass yet · Not yet enabled by default in release builds · Support for stereo+ streams in the reader side. Playback side already handles those. · Integration with <video> and <audio> elements: WebAudio MediaElementSourceNode 27/36
  • 28. Hardware Accelerated Video · We use GStreamer VA-API. (1.2.x) · That's it! Hardcore comes when compositing that. 28/36
  • 29. Accelerated Video Compositing - Acceleration in WebKit From Joone Hur 29/36
  • 30. Accelerated Video Compositing · Element inheriting from GstVideoSink - In practical sense, it is a GstAppSink with video capabilities negotiation · Takes video GstBuffers as input. · Video frame is transferred to the MediaPlayerPrivateGStreamer via a GLib signal. · MediaPlayerPrivateGStreamer uploads it to a GL texture and renders it asynchronously in the WebKit context. 30/36
  • 31. Accelerated Video Compositing - Architecture TextureMapperPlatformLayer MediaPlayerPrivateInterface +an( pit) MediaPlayerPrivateGStreamerBase +an( pit) GstPlaybin -lyi pabn MediaPlayerPrivateGStreamer * GstElement ... WebKitVideoSink <cets> <rae> 31/36
  • 32. Accelerated Video Compositing - Rendering paths · Software rendering path - It uses Cairo · Accelerated compositing paths - TextureMapperLayer: - Light-weight implementation of a scene-graph - The TextureMapperLayer tree is equivalent to the GraphicsLayer tree. - TextureMapperGL - Provides a GPU accelerated implementation of the drawing primitives, using shaders compatible with GL/ES 2.0 32/36
  • 33. Accelerated Video Compositing - Next steps · More video decoders with GstVideoGLTextureUploadMeta support · Support EGLImage in WebKit as video frames handlers - And video decoders that deliver this kind of capabilities. · Handle the vertical blank interval in WebKit - GTK+ 3.8 seems to fix this issue. 33/36
  • 36. Thank You! (q&a) twitter @calvaris www blogs.igalia.com/xrcalvar