SlideShare a Scribd company logo
WebKit, HTML5 media
and GStreamer on
multiple platforms
Spreading GStreamer
awesome in WebKit
Philippe Normand
Talk outline
About WebKit
HTML5 Media playback in WebKit with
GStreamer
WebKit/GStreamer: opening the door to more
platforms
End goal: spread the usage of GStreamer
on more and more WebKit-based
applications!
About WebKit
A content rendering/editing engine
Not a browser!
Highly standards-compliant
WebKit Ecosystem
Apple, Nokia, Google, RIM, Adobe, SonyEriccson
Samsung, Palm, Motorola, Electronic Arts, ...
=> lots of devices using WebKit in the market
=> wide range of applications using the
various WebKit ports
High level WebKit
Architecture
JavaScriptCore: Javascript engine and
platform-specific bits
WebCore: platform-independant blocks and
their counter part platform implementations
for:
parsing, layouting
network, painting
media playback
...
WebKit: platform-specific APIs => used by
application developers
Ports: GTK+, Qt, EFL, Chromium, Mac,
WinCairo, Apple Windows, ...
HTML5 Media
playback in WebKit
3 layers: DOM/HTML level
(HTMLMediaElement), WebCore/graphics
(MediaPlayer), platform-dependant
implementation (MediaPlayerPrivate)
Some MediaPlayerPrivate implementations:
GStreamer: GTK+ and EFL ports
Qt/Phonon: Qt port
Quicktime: Apple Mac/Win ports
GStreamer media
player
playbin2 of course!
Custom video sink and source elements
Basic trick-modes support
On-disk buffering
Fullscreen video display
The GStreamer player
in other WebKit ports?
GStreamer cross-platform already :)
the MediaPlayer layer allows multiple Private
instances
choice based on media mime-type and
codecs:

<video src=test.ogv type="video/ogg; codecs=&quot;theora,vorbis&
Targets: Mac and WinCairo ports
Porting check-list
GStreamer platform packages
GLib main context integration
webkit src element
webkit video sink
Fullscreen support
WebKit build :)
GStreamer platform
packages
on Windows: OSSBuild
on Mac OSX: OSSBuild too! soon!
For now on Mac: scripts developed based on
gtk-osx-build
GStreamer build on
Mac
jhbuild to the rescue
add -headerpad_max_install_names to
LDFLAGS
use install_name_tool to change the
shared library paths in the various .dylib files
absolute paths -> relative paths to
@loader_path
GLib main context
integration
GstBus signal watch used in the player =>
need periodic calls of
g_main_context_iteration()
on Mac: NSRunLoop observer triggering the
glib main context iterations
on Windows: integration in the message loop
WebKit src element
Based on appsrc, work by Sebastian Dröge!
using WebCore Resource loader (=> HTTP
session data: cookies, referer)
Contains some platform-specific code to
pause/resume data download
For now: #ifdefs :( Better approach: use
WebCore resource defersLoading API.
Video painting
video sink exports buffers to the player
("repaint-requested" signal)
ImageGStreamer: GstBuffer ->
WebCore::Image
actual painting deferred to the
ImageGStreamer implementations:
ImageGStreamerCairo: used by GTK+ and
WinCairo ports
ImageGStreamerCG: CoreGraphics
implementation for the Mac port
Fullscreen support
(Overview)
webkitEnterFullscreen() Video
Element DOM API
=> WebKit WebView private API
=> => FullscreenVideoController
enterFullscreen() hooks into
MediaPlayer::platformMedia()
MediaPlayerPrivate-specifics: to create a
widget where the video is painted
Controller gets the widget, adds controls,
goes fullscreen
Fullscreen support
(GStreamer side)
Our playbin2 video-sink is a bin!
fullscreen off:
tee name=t t. ! queue ! webkitvideosink
fullscreen on:
tee name=t t. ! queue ! webkitvideosink t. ! queue !
ffmpegcolorspace ! videoscale ! autovideosink
Fullscreen support
(Video overlay)
GstXOverlay
PlatformVideoWindow : window on which
autovideosink overlays the video
PlatformVideoWindowGtk
PlatformVideoWindowEFL
PlatformVideoWindowCocoa
...
WebKit build
modifications
(note: WTF here means Web Template
Framework, obviously!)
add JavaScriptCore/wtf/gobject/ in
your build
add
WebCore/platform/graphics/gstreamer/
in your build
enable WTF_USE_GSTREAMER and
ENABLE_GLIB_SUPPORT defines
port-specific FullscreenVideoController
adaptations
Implementation
status : Mac OSX
Most of the patches merged upstream
already, excepted:
XCode config additions
gst webkit src patch
PlatformVideoWindowCocoa
implementation
FullscreenVideoController patch
Packaging: WebKit-nightly DMG including
GStreamer and its dependencies.
Implementation
status : WinCairo
HTML5 media implemented from scratch for
WinCairo:
WinCairo still using Visual Studio 5 => big
blocker :(
Patches in a separate public git repository
Basic media controls
Fullscreen video
Recap!
1. GStreamer build
2. Periodic calls to
g_main_context_iteration()
3. Patching gst webkit src element and/or your
ResourceHandle implementation
4. ImageGStreamerMyPort implementation
5. PlatformVideoWindowMyPort
implementation
6. Patching your WebKit
FullscreenVideoController
7. Build WebKit!
Some bit of advice
Use playbin2 :-)
Facade design-pattern for your app platformspecific bits
Single build-system == less maintenance
burden (gyp, cmake, ...)
Continuous integration on multiple platforms:
BuildBot
Demo
WebM playback, in Safari! With GStreamer! :-)
Future plans
Finish upstream merge of the patches
WebKit/GStreamer build slaves
Fullscreen video improvements
WebKitGTK+ API to allow fine-grained control
on the player like:
per-webview volume control
codec installer
Luke, may the source
be with you
gst-mac and win-gst WebKit branches:
http://git.igalia.com/cgi-bin/gitweb.cgi?
p=webkit.git
http://trac.webkit.org/wiki/GStreamerOnMac
That would be all,
folks
Work sponsored by:
Igalia
R&D funds from Galicia government
a private Igalia client
Contact:
http://igalia.com
pnormand@igalia.com
IRC: philn-tp on #gstreamer, #webkit and
#webkit-gtk
Questions?

More Related Content

What's hot

Contributions to an open source project: Igalia and the Chromium project
Contributions to an open source project: Igalia and the Chromium projectContributions to an open source project: Igalia and the Chromium project
Contributions to an open source project: Igalia and the Chromium project
Igalia
 
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
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
 
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Igalia
 
WebKit for Wayland (Web Engines Hackfest 2014)
WebKit for Wayland (Web Engines Hackfest 2014)WebKit for Wayland (Web Engines Hackfest 2014)
WebKit for Wayland (Web Engines Hackfest 2014)
Igalia
 
Embedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAMEmbedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAM
Igalia
 
Chromium Ozone
Chromium OzoneChromium Ozone
Chromium Ozone
Igalia
 
WebKit2 And You (GUADEC 2013)
WebKit2 And You (GUADEC 2013)WebKit2 And You (GUADEC 2013)
WebKit2 And You (GUADEC 2013)
Igalia
 
Essential parts to implement own Ozone backend
Essential parts to implement own Ozone backendEssential parts to implement own Ozone backend
Essential parts to implement own Ozone backend
Igalia
 
WebKit and GStreamer
WebKit and GStreamerWebKit and GStreamer
WebKit and GStreamer
calvaris
 
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
Igalia
 
Introduction to QtWebKit
Introduction to QtWebKitIntroduction to QtWebKit
Introduction to QtWebKit
Ariya Hidayat
 
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 RevolutionWebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
juanjosanchezpenas
 
Hw accelerated webkitgtk+ on raspberry pi
Hw accelerated webkitgtk+ on raspberry piHw accelerated webkitgtk+ on raspberry pi
Hw accelerated webkitgtk+ on raspberry pi
gnomekr
 
Web MIDI API - the paster, the present, and the future -
Web MIDI API - the paster, the present, and the future -Web MIDI API - the paster, the present, and the future -
Web MIDI API - the paster, the present, and the future -
Takashi Toyoshima
 
Ewebkit basic (Web rendering enging of EFL)
Ewebkit basic (Web rendering enging of EFL)Ewebkit basic (Web rendering enging of EFL)
Ewebkit basic (Web rendering enging of EFL)
ryuan choi
 
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Igalia
 
Targeting Android with Qt
Targeting Android with QtTargeting Android with Qt
Targeting Android with Qt
Espen Riskedal
 
GStreamer-VAAPI: Hardware-accelerated encoding and decoding on Intel hardware...
GStreamer-VAAPI: Hardware-accelerated encoding and decoding on Intel hardware...GStreamer-VAAPI: Hardware-accelerated encoding and decoding on Intel hardware...
GStreamer-VAAPI: Hardware-accelerated encoding and decoding on Intel hardware...
Igalia
 

What's hot (19)

Contributions to an open source project: Igalia and the Chromium project
Contributions to an open source project: Igalia and the Chromium projectContributions to an open source project: Igalia and the Chromium project
Contributions to an open source project: Igalia and the Chromium project
 
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
 
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?
 
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
Pairing WebKit and Wayland for Linux-Based Embedded Web Content Presentation ...
 
WebKit for Wayland (Web Engines Hackfest 2014)
WebKit for Wayland (Web Engines Hackfest 2014)WebKit for Wayland (Web Engines Hackfest 2014)
WebKit for Wayland (Web Engines Hackfest 2014)
 
Embedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAMEmbedding Chromium into AGL demo platform with WAM
Embedding Chromium into AGL demo platform with WAM
 
Chromium Ozone
Chromium OzoneChromium Ozone
Chromium Ozone
 
WebKit2 And You (GUADEC 2013)
WebKit2 And You (GUADEC 2013)WebKit2 And You (GUADEC 2013)
WebKit2 And You (GUADEC 2013)
 
Essential parts to implement own Ozone backend
Essential parts to implement own Ozone backendEssential parts to implement own Ozone backend
Essential parts to implement own Ozone backend
 
WebKit and GStreamer
WebKit and GStreamerWebKit and GStreamer
WebKit and GStreamer
 
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
HTML5 Apps on AGL Platform with the Web Application Manager (Automotive Grade...
 
Introduction to QtWebKit
Introduction to QtWebKitIntroduction to QtWebKit
Introduction to QtWebKit
 
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 RevolutionWebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
WebKit and Blink: Bridging the Gap Between the Kernel and the HTML5 Revolution
 
Hw accelerated webkitgtk+ on raspberry pi
Hw accelerated webkitgtk+ on raspberry piHw accelerated webkitgtk+ on raspberry pi
Hw accelerated webkitgtk+ on raspberry pi
 
Web MIDI API - the paster, the present, and the future -
Web MIDI API - the paster, the present, and the future -Web MIDI API - the paster, the present, and the future -
Web MIDI API - the paster, the present, and the future -
 
Ewebkit basic (Web rendering enging of EFL)
Ewebkit basic (Web rendering enging of EFL)Ewebkit basic (Web rendering enging of EFL)
Ewebkit basic (Web rendering enging of EFL)
 
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
Overview of the open source Vulkan driver for Raspberry Pi 4 (XDC 2020)
 
Targeting Android with Qt
Targeting Android with QtTargeting Android with Qt
Targeting Android with Qt
 
GStreamer-VAAPI: Hardware-accelerated encoding and decoding on Intel hardware...
GStreamer-VAAPI: Hardware-accelerated encoding and decoding on Intel hardware...GStreamer-VAAPI: Hardware-accelerated encoding and decoding on Intel hardware...
GStreamer-VAAPI: Hardware-accelerated encoding and decoding on Intel hardware...
 

Similar to WebKit, HTML5 media and GStreamer on multiple platforms (GStreamer Conference 2010)

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
Igalia
 
WebKit and GStreamer (GStreamer Conference 2013)
WebKit and GStreamer (GStreamer Conference 2013)WebKit and GStreamer (GStreamer Conference 2013)
WebKit and GStreamer (GStreamer Conference 2013)
Igalia
 
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
 
The WebKit project
The WebKit projectThe WebKit project
The WebKit project
juanjosanchezpenas
 
DIY- computer vision with GWT
DIY- computer vision with GWTDIY- computer vision with GWT
DIY- computer vision with GWT
Francesca Tosi
 
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.
JooinK
 
Porting Tizen-IVI 3.0 to an ARM based SoC Platform
Porting Tizen-IVI 3.0 to an ARM based SoC PlatformPorting Tizen-IVI 3.0 to an ARM based SoC Platform
Porting Tizen-IVI 3.0 to an ARM based SoC Platform
Ryo Jin
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web Developers
Sascha Corti
 
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
Amir Zmora
 
The Android graphics path, in depth
The Android graphics path, in depthThe Android graphics path, in depth
The Android graphics path, in depth
Chris Simmonds
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
Giacomo Vacca
 
JooinK - DevFest Piemonte 2013
JooinK - DevFest Piemonte 2013JooinK - DevFest Piemonte 2013
JooinK - DevFest Piemonte 2013
JooinK
 
The WebKit project (LinuxCon North America 2012)
The WebKit project (LinuxCon North America 2012)The WebKit project (LinuxCon North America 2012)
The WebKit project (LinuxCon North America 2012)
Igalia
 
How Igalia Is Driving Innovation In Embedded Systems With Open Source Technol...
How Igalia Is Driving Innovation In Embedded Systems With Open Source Technol...How Igalia Is Driving Innovation In Embedded Systems With Open Source Technol...
How Igalia Is Driving Innovation In Embedded Systems With Open Source Technol...
Igalia
 
Android Meetup, Илья Лёвин
Android Meetup, Илья ЛёвинAndroid Meetup, Илья Лёвин
Android Meetup, Илья Лёвин
GDG Saint Petersburg
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5
soft-shake.ch
 
WebKit and Blink: Open Development Powering the HTML5 Revolution (LinuxCon No...
WebKit and Blink: Open Development Powering the HTML5 Revolution (LinuxCon No...WebKit and Blink: Open Development Powering the HTML5 Revolution (LinuxCon No...
WebKit and Blink: Open Development Powering the HTML5 Revolution (LinuxCon No...
Igalia
 
Meego Widget Development using Qt WRT @iRajLal
Meego Widget Development using Qt WRT @iRajLalMeego Widget Development using Qt WRT @iRajLal
Meego Widget Development using Qt WRT @iRajLal
Raj Lal
 
Html5 Game Development with Canvas
Html5 Game Development with CanvasHtml5 Game Development with Canvas
Html5 Game Development with Canvas
Pham Huy Tung
 
Android chromium web view
Android chromium web viewAndroid chromium web view
Android chromium web view
朋 王
 

Similar to WebKit, HTML5 media and GStreamer on multiple platforms (GStreamer Conference 2010) (20)

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
 
WebKit and GStreamer (GStreamer Conference 2013)
WebKit and GStreamer (GStreamer Conference 2013)WebKit and GStreamer (GStreamer Conference 2013)
WebKit and GStreamer (GStreamer Conference 2013)
 
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)
 
The WebKit project
The WebKit projectThe WebKit project
The WebKit project
 
DIY- computer vision with GWT
DIY- computer vision with GWTDIY- computer vision with GWT
DIY- computer vision with GWT
 
DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.DIY: Computer Vision with GWT.
DIY: Computer Vision with GWT.
 
Porting Tizen-IVI 3.0 to an ARM based SoC Platform
Porting Tizen-IVI 3.0 to an ARM based SoC PlatformPorting Tizen-IVI 3.0 to an ARM based SoC Platform
Porting Tizen-IVI 3.0 to an ARM based SoC Platform
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web Developers
 
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
WebRTC Standards & Implementation Q&A - getDisplayMedia 1.0
 
The Android graphics path, in depth
The Android graphics path, in depthThe Android graphics path, in depth
The Android graphics path, in depth
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
 
JooinK - DevFest Piemonte 2013
JooinK - DevFest Piemonte 2013JooinK - DevFest Piemonte 2013
JooinK - DevFest Piemonte 2013
 
The WebKit project (LinuxCon North America 2012)
The WebKit project (LinuxCon North America 2012)The WebKit project (LinuxCon North America 2012)
The WebKit project (LinuxCon North America 2012)
 
How Igalia Is Driving Innovation In Embedded Systems With Open Source Technol...
How Igalia Is Driving Innovation In Embedded Systems With Open Source Technol...How Igalia Is Driving Innovation In Embedded Systems With Open Source Technol...
How Igalia Is Driving Innovation In Embedded Systems With Open Source Technol...
 
Android Meetup, Илья Лёвин
Android Meetup, Илья ЛёвинAndroid Meetup, Илья Лёвин
Android Meetup, Илья Лёвин
 
soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5soft-shake.ch - Introduction to HTML5
soft-shake.ch - Introduction to HTML5
 
WebKit and Blink: Open Development Powering the HTML5 Revolution (LinuxCon No...
WebKit and Blink: Open Development Powering the HTML5 Revolution (LinuxCon No...WebKit and Blink: Open Development Powering the HTML5 Revolution (LinuxCon No...
WebKit and Blink: Open Development Powering the HTML5 Revolution (LinuxCon No...
 
Meego Widget Development using Qt WRT @iRajLal
Meego Widget Development using Qt WRT @iRajLalMeego Widget Development using Qt WRT @iRajLal
Meego Widget Development using Qt WRT @iRajLal
 
Html5 Game Development with Canvas
Html5 Game Development with CanvasHtml5 Game Development with Canvas
Html5 Game Development with Canvas
 
Android chromium web view
Android chromium web viewAndroid chromium web view
Android chromium web view
 

More from Igalia

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
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPE
Igalia
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Igalia
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded Devices
Igalia
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to Maintenance
Igalia
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdf
Igalia
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JIT
Igalia
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!
Igalia
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Igalia
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa
Igalia
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Igalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera Linux
Igalia
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVM
Igalia
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
Igalia
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devices
Igalia
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Igalia
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the web
Igalia
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shaders
Igalia
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...
Igalia
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on Raspberry
Igalia
 

More from Igalia (20)

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?
 
Building End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPEBuilding End-user Applications on Embedded Devices with WPE
Building End-user Applications on Embedded Devices with WPE
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Automated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded DevicesAutomated Testing for Web-based Systems on Embedded Devices
Automated Testing for Web-based Systems on Embedded Devices
 
Embedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to MaintenanceEmbedding WPE WebKit - from Bring-up to Maintenance
Embedding WPE WebKit - from Bring-up to Maintenance
 
Optimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdfOptimizing Scheduler for Linux Gaming.pdf
Optimizing Scheduler for Linux Gaming.pdf
 
Running JS via WASM faster with JIT
Running JS via WASM      faster with JITRunning JS via WASM      faster with JIT
Running JS via WASM faster with JIT
 
To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!To crash or not to crash: if you do, at least recover fast!
To crash or not to crash: if you do, at least recover fast!
 
Implementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamerImplementing a Vulkan Video Encoder From Mesa to GStreamer
Implementing a Vulkan Video Encoder From Mesa to GStreamer
 
8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa8 Years of Open Drivers, including the State of Vulkan in Mesa
8 Years of Open Drivers, including the State of Vulkan in Mesa
 
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por IgaliaIntroducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
Introducción a Mesa. Caso específico dos dispositivos Raspberry Pi por Igalia
 
2023 in Chimera Linux
2023 in Chimera                    Linux2023 in Chimera                    Linux
2023 in Chimera Linux
 
Building a Linux distro with LLVM
Building a Linux distro        with LLVMBuilding a Linux distro        with LLVM
Building a Linux distro with LLVM
 
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUsturnip: Update on Open Source Vulkan Driver for Adreno GPUs
turnip: Update on Open Source Vulkan Driver for Adreno GPUs
 
Graphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devicesGraphics stack updates for Raspberry Pi devices
Graphics stack updates for Raspberry Pi devices
 
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOSDelegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
Delegated Compositing - Utilizing Wayland Protocols for Chromium on ChromeOS
 
MessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the webMessageFormat: The future of i18n on the web
MessageFormat: The future of i18n on the web
 
Replacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shadersReplacing the geometry pipeline with mesh shaders
Replacing the geometry pipeline with mesh shaders
 
I'm not an AMD expert, but...
I'm not an AMD expert, but...I'm not an AMD expert, but...
I'm not an AMD expert, but...
 
Status of Vulkan on Raspberry
Status of Vulkan on RaspberryStatus of Vulkan on Raspberry
Status of Vulkan on Raspberry
 

Recently uploaded

Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 

Recently uploaded (20)

Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 

WebKit, HTML5 media and GStreamer on multiple platforms (GStreamer Conference 2010)

  • 1. WebKit, HTML5 media and GStreamer on multiple platforms Spreading GStreamer awesome in WebKit Philippe Normand
  • 2. Talk outline About WebKit HTML5 Media playback in WebKit with GStreamer WebKit/GStreamer: opening the door to more platforms End goal: spread the usage of GStreamer on more and more WebKit-based applications!
  • 3. About WebKit A content rendering/editing engine Not a browser! Highly standards-compliant
  • 4. WebKit Ecosystem Apple, Nokia, Google, RIM, Adobe, SonyEriccson Samsung, Palm, Motorola, Electronic Arts, ... => lots of devices using WebKit in the market => wide range of applications using the various WebKit ports
  • 5. High level WebKit Architecture JavaScriptCore: Javascript engine and platform-specific bits WebCore: platform-independant blocks and their counter part platform implementations for: parsing, layouting network, painting media playback ... WebKit: platform-specific APIs => used by application developers Ports: GTK+, Qt, EFL, Chromium, Mac, WinCairo, Apple Windows, ...
  • 6. HTML5 Media playback in WebKit 3 layers: DOM/HTML level (HTMLMediaElement), WebCore/graphics (MediaPlayer), platform-dependant implementation (MediaPlayerPrivate) Some MediaPlayerPrivate implementations: GStreamer: GTK+ and EFL ports Qt/Phonon: Qt port Quicktime: Apple Mac/Win ports
  • 7. GStreamer media player playbin2 of course! Custom video sink and source elements Basic trick-modes support On-disk buffering Fullscreen video display
  • 8. The GStreamer player in other WebKit ports? GStreamer cross-platform already :) the MediaPlayer layer allows multiple Private instances choice based on media mime-type and codecs: <video src=test.ogv type="video/ogg; codecs=&quot;theora,vorbis& Targets: Mac and WinCairo ports
  • 9. Porting check-list GStreamer platform packages GLib main context integration webkit src element webkit video sink Fullscreen support WebKit build :)
  • 10. GStreamer platform packages on Windows: OSSBuild on Mac OSX: OSSBuild too! soon! For now on Mac: scripts developed based on gtk-osx-build
  • 11. GStreamer build on Mac jhbuild to the rescue add -headerpad_max_install_names to LDFLAGS use install_name_tool to change the shared library paths in the various .dylib files absolute paths -> relative paths to @loader_path
  • 12. GLib main context integration GstBus signal watch used in the player => need periodic calls of g_main_context_iteration() on Mac: NSRunLoop observer triggering the glib main context iterations on Windows: integration in the message loop
  • 13. WebKit src element Based on appsrc, work by Sebastian Dröge! using WebCore Resource loader (=> HTTP session data: cookies, referer) Contains some platform-specific code to pause/resume data download For now: #ifdefs :( Better approach: use WebCore resource defersLoading API.
  • 14. Video painting video sink exports buffers to the player ("repaint-requested" signal) ImageGStreamer: GstBuffer -> WebCore::Image actual painting deferred to the ImageGStreamer implementations: ImageGStreamerCairo: used by GTK+ and WinCairo ports ImageGStreamerCG: CoreGraphics implementation for the Mac port
  • 15. Fullscreen support (Overview) webkitEnterFullscreen() Video Element DOM API => WebKit WebView private API => => FullscreenVideoController enterFullscreen() hooks into MediaPlayer::platformMedia() MediaPlayerPrivate-specifics: to create a widget where the video is painted Controller gets the widget, adds controls, goes fullscreen
  • 16. Fullscreen support (GStreamer side) Our playbin2 video-sink is a bin! fullscreen off: tee name=t t. ! queue ! webkitvideosink fullscreen on: tee name=t t. ! queue ! webkitvideosink t. ! queue ! ffmpegcolorspace ! videoscale ! autovideosink
  • 17. Fullscreen support (Video overlay) GstXOverlay PlatformVideoWindow : window on which autovideosink overlays the video PlatformVideoWindowGtk PlatformVideoWindowEFL PlatformVideoWindowCocoa ...
  • 18. WebKit build modifications (note: WTF here means Web Template Framework, obviously!) add JavaScriptCore/wtf/gobject/ in your build add WebCore/platform/graphics/gstreamer/ in your build enable WTF_USE_GSTREAMER and ENABLE_GLIB_SUPPORT defines port-specific FullscreenVideoController adaptations
  • 19. Implementation status : Mac OSX Most of the patches merged upstream already, excepted: XCode config additions gst webkit src patch PlatformVideoWindowCocoa implementation FullscreenVideoController patch Packaging: WebKit-nightly DMG including GStreamer and its dependencies.
  • 20. Implementation status : WinCairo HTML5 media implemented from scratch for WinCairo: WinCairo still using Visual Studio 5 => big blocker :( Patches in a separate public git repository Basic media controls Fullscreen video
  • 21. Recap! 1. GStreamer build 2. Periodic calls to g_main_context_iteration() 3. Patching gst webkit src element and/or your ResourceHandle implementation 4. ImageGStreamerMyPort implementation 5. PlatformVideoWindowMyPort implementation 6. Patching your WebKit FullscreenVideoController 7. Build WebKit!
  • 22. Some bit of advice Use playbin2 :-) Facade design-pattern for your app platformspecific bits Single build-system == less maintenance burden (gyp, cmake, ...) Continuous integration on multiple platforms: BuildBot
  • 23. Demo WebM playback, in Safari! With GStreamer! :-)
  • 24. Future plans Finish upstream merge of the patches WebKit/GStreamer build slaves Fullscreen video improvements WebKitGTK+ API to allow fine-grained control on the player like: per-webview volume control codec installer
  • 25. Luke, may the source be with you gst-mac and win-gst WebKit branches: http://git.igalia.com/cgi-bin/gitweb.cgi? p=webkit.git http://trac.webkit.org/wiki/GStreamerOnMac
  • 26. That would be all, folks Work sponsored by: Igalia R&D funds from Galicia government a private Igalia client Contact: http://igalia.com pnormand@igalia.com IRC: philn-tp on #gstreamer, #webkit and #webkit-gtk Questions?