SlideShare ist ein Scribd-Unternehmen logo
gtkgst: Video in Your Widgets!
https://github.com/ystreet/gst-plugins-bad/tree/gtk
Matthew Waters (ystreet00)
GNOME Asia 2015
9 May 2015
Who Am I
● Australian
● GStreamer
● OpenGL
What is GStreamer?
● Pipeline-based media framework
● Basic building blocks: elements connected via pads
● Set of libraries with abstract API
● Plugins for specific features
– Often wrapping other libraries, e.g. libav/ffmpeg, OpenCV,
various codec libraries
What is GStreamer?
● Should have gone to Nirbheek's talk yesterday!
What is Gtk+?
● Cross-platform GUI widget toolkit
– OS X, Windows, Linux (X11 + Wayland)
– Input (Keyboard, Touch, Mouse)
– Standard widgets (Buttons, Text, Containers)
– Custom widgets
Computer Video
● Colour spaces/gamut
● Chroma sampling
● Scaling
● Splitting/Cutting/Editing
● Effects
● Generation
Video in GUI Toolkits
● Embed a 'window' into another window
● Watch out for threads!
● App has to know about the window system in use
GstVideoOverlay/GstNavigation
● Provide a window handle to render video into
● Notify the video sink of size changes
● Push key and mouse events into GStreamer
GstVideoOverlay
GstElement *playbin = gst_element_factory_make (“playbin”, NULL);
g_object_set (playbin, “uri”, “file:///path/to/file.mp4”, NULL);
GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
GtkWidget *video_window = gtk_drawing_area_new ();
gtk_container_add (GTK_CONTAINER (window), video_window);
gtk_widget_show_all (window);
GdkWindow *video_window_xwindow = gtk_widget_get_window
(video_window);
gulong embed_xid = gtk_window_get_xid (video_window_xwindow);
gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (playbin),
embed_xid);
gst_element_set_state (playbin, GST_STATE_PLAYING);
GstVideoOverlay - demo
Alternative - gtkgst
● Renders your video into a GtkWidget provided by
the GStreamer sink
● Software implementation uses cairo into a
GtkDrawingArea
● Place the provided GtkWidget wherever in the
widget hierarchy
gtkgst - GL
● Gtk 3.16 has new GL support
● GStreamer 1.4 has GL support
● Why don't we try integrating them?
What is OpenGL?
● Low level 3D graphics API
● Been around since the 1990's
● Uses dedicated hardware
● Cross-platform
OpenGL in GStreamer
● Contained in the libgstgl library
● GstGLDisplay, GstGLContext are your two main
objects. Analogous to GdkDisplay and
GdkGLContext
● Element base classes, color conversion, uploaders,
GL version/extension checking
● Also contains various elements – gltestsrc,
glvideomixer, glimagesink, gleffects, etc
Demo
videotestsrc ! glfiltercube ! gtkglsink
Implementation - gtkgst
● ~1000 lines of code
● Relies heavily on the GStreamer GL library and the
GL implementation
● Similar in style and scope to
avsamplebuffersink/caopengllayersink
gtkgst - GL
● Currently a proof of concept
● Currently X11 only
● System load causes frame jitter
● Uses Gtk+'s GL context
● Wayland might not be needed due to
efficient/correct subsurfaces
Uses
● Anytime you want to display video from GStreamer
into a Gtk+ application
– e.g. Videos/Totem
Future
● Other window systems planned (wayland, OS X,
Windows)
● GSK
Thanks!
● https://github.com/ystreet/gst-plugins-bad/tree/gtk
● ystreet00 on #gstreamer on freenode

Weitere ähnliche Inhalte

Was ist angesagt?

Android Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveAndroid Lollipop: The developer's perspective
Android Lollipop: The developer's perspective
Sebastian Vieira
 
了解 Qt
了解 Qt了解 Qt
了解 Qt
Chi Zhang
 
GitBucket: Git Centric Software Development Platform by Scala
GitBucket:  Git Centric Software Development Platform by ScalaGitBucket:  Git Centric Software Development Platform by Scala
GitBucket: Git Centric Software Development Platform by Scala
takezoe
 
Go dla elektronika
Go dla elektronikaGo dla elektronika
Go dla elektronika
Sebastian Pożoga
 
NODE JS OC Meetup 1
NODE JS OC Meetup 1NODE JS OC Meetup 1
NODE JS OC Meetup 1
eddify
 
qt-project.org and Qt 5
qt-project.org and Qt 5qt-project.org and Qt 5
qt-project.org and Qt 5
thiagomacieira
 
How to keep maintainability of long life Scala applications
How to keep maintainability of long life Scala applicationsHow to keep maintainability of long life Scala applications
How to keep maintainability of long life Scala applications
takezoe
 
Qt Tutorial - Part 1
Qt Tutorial - Part 1Qt Tutorial - Part 1
Qt Tutorial - Part 1
rmitc
 
Towards shipping Ozone/Wayland (BlinkOn 10)
Towards shipping Ozone/Wayland (BlinkOn 10)Towards shipping Ozone/Wayland (BlinkOn 10)
Towards shipping Ozone/Wayland (BlinkOn 10)
Igalia
 
Node.js Test
Node.js TestNode.js Test
Node.js Test
Maksym Kovalko
 
Building Multi-platform Video Games for the Cloud
Building Multi-platform Video Games for the CloudBuilding Multi-platform Video Games for the Cloud
Building Multi-platform Video Games for the Cloud
Chris Schalk
 
Development with Qt for Windows CE
Development with Qt for Windows CEDevelopment with Qt for Windows CE
Development with Qt for Windows CE
account inactive
 
The State of CI/CD Tooling in 2019
The State of CI/CD Tooling in 2019The State of CI/CD Tooling in 2019
The State of CI/CD Tooling in 2019
CloudOps2005
 
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
 
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
Igalia
 
Chromium on Wayland Desktop (BlinkOn 7)
Chromium on Wayland Desktop (BlinkOn 7)Chromium on Wayland Desktop (BlinkOn 7)
Chromium on Wayland Desktop (BlinkOn 7)
Igalia
 
Qt quick (qml)
Qt quick (qml)Qt quick (qml)
Qt quick (qml)
Elena Kotina
 
Mastering the pipeline
Mastering the pipelineMastering the pipeline
Mastering the pipeline
Jorrit Salverda
 
Docker build, test and deploy saa s applications
Docker  build, test and deploy saa s applicationsDocker  build, test and deploy saa s applications
Docker build, test and deploy saa s applications
william_greenly
 
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
 

Was ist angesagt? (20)

Android Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveAndroid Lollipop: The developer's perspective
Android Lollipop: The developer's perspective
 
了解 Qt
了解 Qt了解 Qt
了解 Qt
 
GitBucket: Git Centric Software Development Platform by Scala
GitBucket:  Git Centric Software Development Platform by ScalaGitBucket:  Git Centric Software Development Platform by Scala
GitBucket: Git Centric Software Development Platform by Scala
 
Go dla elektronika
Go dla elektronikaGo dla elektronika
Go dla elektronika
 
NODE JS OC Meetup 1
NODE JS OC Meetup 1NODE JS OC Meetup 1
NODE JS OC Meetup 1
 
qt-project.org and Qt 5
qt-project.org and Qt 5qt-project.org and Qt 5
qt-project.org and Qt 5
 
How to keep maintainability of long life Scala applications
How to keep maintainability of long life Scala applicationsHow to keep maintainability of long life Scala applications
How to keep maintainability of long life Scala applications
 
Qt Tutorial - Part 1
Qt Tutorial - Part 1Qt Tutorial - Part 1
Qt Tutorial - Part 1
 
Towards shipping Ozone/Wayland (BlinkOn 10)
Towards shipping Ozone/Wayland (BlinkOn 10)Towards shipping Ozone/Wayland (BlinkOn 10)
Towards shipping Ozone/Wayland (BlinkOn 10)
 
Node.js Test
Node.js TestNode.js Test
Node.js Test
 
Building Multi-platform Video Games for the Cloud
Building Multi-platform Video Games for the CloudBuilding Multi-platform Video Games for the Cloud
Building Multi-platform Video Games for the Cloud
 
Development with Qt for Windows CE
Development with Qt for Windows CEDevelopment with Qt for Windows CE
Development with Qt for Windows CE
 
The State of CI/CD Tooling in 2019
The State of CI/CD Tooling in 2019The State of CI/CD Tooling in 2019
The State of CI/CD Tooling in 2019
 
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?
 
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
WebKit Clutter Port Present and Future; WebKitGtk Status and Roadmap to WebKi...
 
Chromium on Wayland Desktop (BlinkOn 7)
Chromium on Wayland Desktop (BlinkOn 7)Chromium on Wayland Desktop (BlinkOn 7)
Chromium on Wayland Desktop (BlinkOn 7)
 
Qt quick (qml)
Qt quick (qml)Qt quick (qml)
Qt quick (qml)
 
Mastering the pipeline
Mastering the pipelineMastering the pipeline
Mastering the pipeline
 
Docker build, test and deploy saa s applications
Docker  build, test and deploy saa s applicationsDocker  build, test and deploy saa s applications
Docker build, test and deploy saa s applications
 
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...
 

Andere mochten auch

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
 
Notes2StudyGST-160511
Notes2StudyGST-160511Notes2StudyGST-160511
Notes2StudyGST-160511
xiaozhong hua
 
Haskell Accelerate
Haskell  AccelerateHaskell  Accelerate
Haskell Accelerate
Steve Severance
 
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
npinto
 
GPU Computing
GPU ComputingGPU Computing
GPU Computing
Christian Kehl
 
WebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open webWebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open web
pjcozzi
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and More
Mark Kilgard
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL Functionality
Mark Kilgard
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUs
Mark Kilgard
 

Andere mochten auch (9)

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...
 
Notes2StudyGST-160511
Notes2StudyGST-160511Notes2StudyGST-160511
Notes2StudyGST-160511
 
Haskell Accelerate
Haskell  AccelerateHaskell  Accelerate
Haskell Accelerate
 
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
[Harvard CS264] 03 - Introduction to GPU Computing, CUDA Basics
 
GPU Computing
GPU ComputingGPU Computing
GPU Computing
 
WebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open webWebGL: GPU acceleration for the open web
WebGL: GPU acceleration for the open web
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and More
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL Functionality
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUs
 

Ähnlich wie gtkgst video in your widgets!

نگاهی به Gtk3
نگاهی به Gtk3نگاهی به Gtk3
نگاهی به Gtk3
Ali Vakilzade
 
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
 
OpenGL Introduction.
OpenGL Introduction.OpenGL Introduction.
OpenGL Introduction.
Girish Ghate
 
Inject the Web into your GStreamer pipeline with WPE using a GStreamer/WebKit...
Inject the Web into your GStreamer pipeline with WPE using a GStreamer/WebKit...Inject the Web into your GStreamer pipeline with WPE using a GStreamer/WebKit...
Inject the Web into your GStreamer pipeline with WPE using a GStreamer/WebKit...
Igalia
 
Javascript in linux desktop (ICOS ver.)
Javascript in linux desktop (ICOS ver.)Javascript in linux desktop (ICOS ver.)
Javascript in linux desktop (ICOS ver.)
Yuren Ju
 
Tech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: Multi-language Programming with GPRbuildTech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: Multi-language Programming with GPRbuild
AdaCore
 
Basics of gtk_ilugc
Basics of gtk_ilugcBasics of gtk_ilugc
Basics of gtk_ilugc
ilugc
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learned
basisspace
 
Graphics Programming in C under GNU Linux (Ubuntu distribution)
Graphics Programming in C under GNU Linux (Ubuntu distribution)Graphics Programming in C under GNU Linux (Ubuntu distribution)
Graphics Programming in C under GNU Linux (Ubuntu distribution)
Tushar B Kute
 
Gomobile: gophers in the land of Android
Gomobile: gophers in the land of AndroidGomobile: gophers in the land of Android
Gomobile: gophers in the land of Android
Jovica Popovic
 
GitBucket: Open source self-hosting Git server built by Scala
GitBucket: Open source self-hosting Git server built by ScalaGitBucket: Open source self-hosting Git server built by Scala
GitBucket: Open source self-hosting Git server built by Scala
takezoe
 
Pygtk
PygtkPygtk
Programming with OpenGL
Programming with OpenGLProgramming with OpenGL
Programming with OpenGL
Syed Zaid Irshad
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWT
Manuel Carrasco Moñino
 
Opensource Software usability
Opensource Software usabilityOpensource Software usability
Opensource Software usability
Giacomo Antonino Fazio
 
Castle Game Engine and the joy of making and using a custom game engine
Castle Game Engine and the joy  of making and using a custom game engineCastle Game Engine and the joy  of making and using a custom game engine
Castle Game Engine and the joy of making and using a custom game engine
Michalis Kamburelis
 
Update on the open source browser space (16th GENIVI AMM)
Update on the open source browser space (16th GENIVI AMM)Update on the open source browser space (16th GENIVI AMM)
Update on the open source browser space (16th GENIVI AMM)
Igalia
 
SqueakGTK
SqueakGTKSqueakGTK
SqueakGTK
ESUG
 
WPE, a New WebKit Port Optimised for Embedded (IBC 2017)
WPE, a New WebKit Port Optimised for Embedded (IBC 2017)WPE, a New WebKit Port Optimised for Embedded (IBC 2017)
WPE, a New WebKit Port Optimised for Embedded (IBC 2017)
Igalia
 

Ähnlich wie gtkgst video in your widgets! (20)

نگاهی به Gtk3
نگاهی به Gtk3نگاهی به Gtk3
نگاهی به Gtk3
 
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...
 
OpenGL Introduction.
OpenGL Introduction.OpenGL Introduction.
OpenGL Introduction.
 
Inject the Web into your GStreamer pipeline with WPE using a GStreamer/WebKit...
Inject the Web into your GStreamer pipeline with WPE using a GStreamer/WebKit...Inject the Web into your GStreamer pipeline with WPE using a GStreamer/WebKit...
Inject the Web into your GStreamer pipeline with WPE using a GStreamer/WebKit...
 
Javascript in linux desktop (ICOS ver.)
Javascript in linux desktop (ICOS ver.)Javascript in linux desktop (ICOS ver.)
Javascript in linux desktop (ICOS ver.)
 
Tech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: Multi-language Programming with GPRbuildTech Days 2015: Multi-language Programming with GPRbuild
Tech Days 2015: Multi-language Programming with GPRbuild
 
Basics of gtk_ilugc
Basics of gtk_ilugcBasics of gtk_ilugc
Basics of gtk_ilugc
 
Porting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons LearnedPorting the Source Engine to Linux: Valve's Lessons Learned
Porting the Source Engine to Linux: Valve's Lessons Learned
 
Graphics Programming in C under GNU Linux (Ubuntu distribution)
Graphics Programming in C under GNU Linux (Ubuntu distribution)Graphics Programming in C under GNU Linux (Ubuntu distribution)
Graphics Programming in C under GNU Linux (Ubuntu distribution)
 
Gomobile: gophers in the land of Android
Gomobile: gophers in the land of AndroidGomobile: gophers in the land of Android
Gomobile: gophers in the land of Android
 
GitBucket: Open source self-hosting Git server built by Scala
GitBucket: Open source self-hosting Git server built by ScalaGitBucket: Open source self-hosting Git server built by Scala
GitBucket: Open source self-hosting Git server built by Scala
 
Pygtk
PygtkPygtk
Pygtk
 
Programming with OpenGL
Programming with OpenGLProgramming with OpenGL
Programming with OpenGL
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWT
 
Opensource Software usability
Opensource Software usabilityOpensource Software usability
Opensource Software usability
 
Castle Game Engine and the joy of making and using a custom game engine
Castle Game Engine and the joy  of making and using a custom game engineCastle Game Engine and the joy  of making and using a custom game engine
Castle Game Engine and the joy of making and using a custom game engine
 
Update on the open source browser space (16th GENIVI AMM)
Update on the open source browser space (16th GENIVI AMM)Update on the open source browser space (16th GENIVI AMM)
Update on the open source browser space (16th GENIVI AMM)
 
SqueakGTK
SqueakGTKSqueakGTK
SqueakGTK
 
WPE, a New WebKit Port Optimised for Embedded (IBC 2017)
WPE, a New WebKit Port Optimised for Embedded (IBC 2017)WPE, a New WebKit Port Optimised for Embedded (IBC 2017)
WPE, a New WebKit Port Optimised for Embedded (IBC 2017)
 

Kürzlich hochgeladen

openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
ISH Technologies
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
Deuglo Infosystem Pvt Ltd
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
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
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
Drona Infotech
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdfCodeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Semiosis Software Private Limited
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 

Kürzlich hochgeladen (20)

openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Preparing Non - Technical Founders for Engaging a Tech Agency
Preparing Non - Technical Founders for Engaging  a  Tech AgencyPreparing Non - Technical Founders for Engaging  a  Tech Agency
Preparing Non - Technical Founders for Engaging a Tech Agency
 
Empowering Growth with Best Software Development Company in Noida - Deuglo
Empowering Growth with Best Software  Development Company in Noida - DeugloEmpowering Growth with Best Software  Development Company in Noida - Deuglo
Empowering Growth with Best Software Development Company in Noida - Deuglo
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
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
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Mobile app Development Services | Drona Infotech
Mobile app Development Services  | Drona InfotechMobile app Development Services  | Drona Infotech
Mobile app Development Services | Drona Infotech
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Codeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdfCodeigniter VS Cakephp Which is Better for Web Development.pdf
Codeigniter VS Cakephp Which is Better for Web Development.pdf
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 

gtkgst video in your widgets!

  • 1. gtkgst: Video in Your Widgets! https://github.com/ystreet/gst-plugins-bad/tree/gtk Matthew Waters (ystreet00) GNOME Asia 2015 9 May 2015
  • 2. Who Am I ● Australian ● GStreamer ● OpenGL
  • 3. What is GStreamer? ● Pipeline-based media framework ● Basic building blocks: elements connected via pads ● Set of libraries with abstract API ● Plugins for specific features – Often wrapping other libraries, e.g. libav/ffmpeg, OpenCV, various codec libraries
  • 4. What is GStreamer? ● Should have gone to Nirbheek's talk yesterday!
  • 5. What is Gtk+? ● Cross-platform GUI widget toolkit – OS X, Windows, Linux (X11 + Wayland) – Input (Keyboard, Touch, Mouse) – Standard widgets (Buttons, Text, Containers) – Custom widgets
  • 6. Computer Video ● Colour spaces/gamut ● Chroma sampling ● Scaling ● Splitting/Cutting/Editing ● Effects ● Generation
  • 7. Video in GUI Toolkits ● Embed a 'window' into another window ● Watch out for threads! ● App has to know about the window system in use
  • 8. GstVideoOverlay/GstNavigation ● Provide a window handle to render video into ● Notify the video sink of size changes ● Push key and mouse events into GStreamer
  • 9. GstVideoOverlay GstElement *playbin = gst_element_factory_make (“playbin”, NULL); g_object_set (playbin, “uri”, “file:///path/to/file.mp4”, NULL); GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL); GtkWidget *video_window = gtk_drawing_area_new (); gtk_container_add (GTK_CONTAINER (window), video_window); gtk_widget_show_all (window); GdkWindow *video_window_xwindow = gtk_widget_get_window (video_window); gulong embed_xid = gtk_window_get_xid (video_window_xwindow); gst_video_overlay_set_window_handle (GST_VIDEO_OVERLAY (playbin), embed_xid); gst_element_set_state (playbin, GST_STATE_PLAYING);
  • 11. Alternative - gtkgst ● Renders your video into a GtkWidget provided by the GStreamer sink ● Software implementation uses cairo into a GtkDrawingArea ● Place the provided GtkWidget wherever in the widget hierarchy
  • 12. gtkgst - GL ● Gtk 3.16 has new GL support ● GStreamer 1.4 has GL support ● Why don't we try integrating them?
  • 13. What is OpenGL? ● Low level 3D graphics API ● Been around since the 1990's ● Uses dedicated hardware ● Cross-platform
  • 14. OpenGL in GStreamer ● Contained in the libgstgl library ● GstGLDisplay, GstGLContext are your two main objects. Analogous to GdkDisplay and GdkGLContext ● Element base classes, color conversion, uploaders, GL version/extension checking ● Also contains various elements – gltestsrc, glvideomixer, glimagesink, gleffects, etc
  • 16. Implementation - gtkgst ● ~1000 lines of code ● Relies heavily on the GStreamer GL library and the GL implementation ● Similar in style and scope to avsamplebuffersink/caopengllayersink
  • 17. gtkgst - GL ● Currently a proof of concept ● Currently X11 only ● System load causes frame jitter ● Uses Gtk+'s GL context ● Wayland might not be needed due to efficient/correct subsurfaces
  • 18. Uses ● Anytime you want to display video from GStreamer into a Gtk+ application – e.g. Videos/Totem
  • 19. Future ● Other window systems planned (wayland, OS X, Windows) ● GSK