SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Android Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveAndroid Lollipop: The developer's perspective
Android Lollipop: The developer's perspectiveSebastian Vieira
 
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 Scalatakezoe
 
NODE JS OC Meetup 1
NODE JS OC Meetup 1NODE JS OC Meetup 1
NODE JS OC Meetup 1eddify
 
qt-project.org and Qt 5
qt-project.org and Qt 5qt-project.org and Qt 5
qt-project.org and Qt 5thiagomacieira
 
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 applicationstakezoe
 
Qt Tutorial - Part 1
Qt Tutorial - Part 1Qt Tutorial - Part 1
Qt Tutorial - Part 1rmitc
 
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
 
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 CloudChris Schalk
 
Development with Qt for Windows CE
Development with Qt for Windows CEDevelopment with Qt for Windows CE
Development with Qt for Windows CEaccount 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 2019CloudOps2005
 
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
 
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 applicationswilliam_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
 

Tendances (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...
 

En vedette

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-160511xiaozhong hua
 
[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 Basicsnpinto
 
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 webpjcozzi
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and MoreMark Kilgard
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityMark 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 GPUsMark Kilgard
 

En vedette (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
 

Similaire à gtkgst video in your widgets!

نگاهی به Gtk3
نگاهی به Gtk3نگاهی به Gtk3
نگاهی به Gtk3Ali 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 GPRbuildAdaCore
 
Basics of gtk_ilugc
Basics of gtk_ilugcBasics of gtk_ilugc
Basics of gtk_ilugcilugc
 
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 Learnedbasisspace
 
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 AndroidJovica 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 Scalatakezoe
 
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 & GWTManuel Carrasco Moñino
 
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 engineMichalis 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
SqueakGTKESUG
 
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
 

Similaire à 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)
 

Dernier

A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 

Dernier (20)

A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 

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