SlideShare a Scribd company 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

More Related Content

What's hot

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
 

What's hot (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...
 

Viewers also liked

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
 

Viewers also liked (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
 

Similar to 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
 

Similar to 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)
 

Recently uploaded

Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
Quickdice ERP
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
YousufSait3
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
VALiNTRY360
 
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
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
dakas1
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
GohKiangHock
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
kalichargn70th171
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
Remote DBA Services
 
Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
Massimo Artizzu
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
Rakesh Kumar R
 

Recently uploaded (20)

Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesE-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian Companies
 
zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfTop Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdf
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理一比一原版(USF毕业证)旧金山大学毕业证如何办理
一比一原版(USF毕业证)旧金山大学毕业证如何办理
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf8 Best Automated Android App Testing Tool and Framework in 2024.pdf
8 Best Automated Android App Testing Tool and Framework in 2024.pdf
 
Oracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptxOracle 23c New Features For DBAs and Developers.pptx
Oracle 23c New Features For DBAs and Developers.pptx
 
Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
 

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