SlideShare a Scribd company logo
1 of 22
GStreamer: An overview
Rodrigo Costa
Pontifical Catholic University of Rio de Janeiro
TeleM´ıdia Lab.
rodrigocosta@telemidia.puc-rio.br
April 16, 2015
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 1 / 22
Overview
1 GStreamer
Overview
Pipelines
Basic Concepts
Synchronization
Examples
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 2 / 22
What is GStreamer?
A framework for multimedia applications
Linux, Windows, OS X, ...
10+ years old project
Similar to DirectShow, QuickTime, etc.
Designed to make it easy to write applications that handle audiovisual
contents
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 3 / 22
GStreamer overview
What GStreamer NOT is?
A codec implementation
An application itself
Features
Fully extensible by plugins
Flexible
Low and high level API
Often wraps other libraries (decoders, encoders, filters, etc.)
Integration with other frameworks and projects
WebKit, Firefox, Gnome, Android, iOS, ...
Pipeline-based
Bindings to multiple languages
C/C++, Python, Java, Ruby, Pearl, etc.
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 4 / 22
GStreamer overview
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 5 / 22
Design
The fundamental design comes from the video pipeline at Oregon
Graduate Institute: Infopipes
Infopipes (2001)
High-level abstraction for building blocks that handle information
flows
Goal: simplify the task of building distributed streaming
applications by providing basic elements such as pipes, filters, buffers,
and pumps
Motivated by the lack of support of RPC-like technologies to develop
streaming and processing of distributed information
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 6 / 22
Infopipes
Infopipe example:
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 7 / 22
GStreamer pipeline
GStreamer pipeline example:
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 8 / 22
Basic Concepts
Elements
The most important class of objects in GStreamer
Each one has a specific function: read a file, receive data from
network, decode, multiplex, present the data, ...
A chain of elements is created and linked together for the data to
flow through it
GStreamer ships with a large set of elements
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 9 / 22
Basic Concepts
Elements (cont)
Source
Filters, converters, demuxers, muxers, codecs
Sink
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 10 / 22
Basic Concepts
Pads
Connection points between elements
Source pads produce data
Sink pads consume data
Data always flows from src to sink pads
Can operate in pull or push mode
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 11 / 22
Basic Concepts
Pads (cont)
Each pad have a predefined set of properties called Capabilities or
Caps
Caps are used to validate the communication between elements (caps
restrict the type of data that flows through it)
A source pad can only be linked to a sink pad if their allowed data
types are compatible
For instance, a source pad that produces a video stream cannot be
linked to a sink pad that consumes audio streams
Elements can negotiate with each other on format to use (caps
negotiation)
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 12 / 22
Basic Concepts
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 13 / 22
Basic Concepts
Bins
Elements can be grouped into a container called bin
It can be manipulated as it were an element
It also manages the state of its children elements
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 14 / 22
Basic Concepts
Pipeline
A pipeline is a top-level bin
It provides a bus for communication purposes
It manages the playout synchronization
It runs in a separate thread
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 15 / 22
Basic Concepts
Communication:
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 16 / 22
Synchronization
GstClock objects provide clock time
GstClock always returns the absolute-time
The pipeline maintains a GstClock object and a base-time (time when
it goes to PLAYING state)
running-time = absolute-time - base-time
Sink elements are responsible for present the buffers in their
respective presentation time
If a buffer is delayed, the sink drops it
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 17 / 22
Pipeline Example
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 18 / 22
Example 1
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 19 / 22
Example 2
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 20 / 22
Example 3
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 21 / 22
Example 4
Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 22 / 22

More Related Content

Similar to gstreamerv2-150416084351-conversion-gate02.pptx

FOSDEM 2016 - Creating rich WebRTC Applications with Kurento
FOSDEM 2016 - Creating rich WebRTC Applications with KurentoFOSDEM 2016 - Creating rich WebRTC Applications with Kurento
FOSDEM 2016 - Creating rich WebRTC Applications with Kurento
Luis Lopez
 

Similar to gstreamerv2-150416084351-conversion-gate02.pptx (20)

Ontology of citizen science @ Siena 2016 11 24
Ontology of citizen science @ Siena 2016 11 24Ontology of citizen science @ Siena 2016 11 24
Ontology of citizen science @ Siena 2016 11 24
 
Tpdl2015 kochw
Tpdl2015 kochwTpdl2015 kochw
Tpdl2015 kochw
 
Fast App development with SwellRT
Fast App development  with SwellRTFast App development  with SwellRT
Fast App development with SwellRT
 
2010 Future of Advanced Computing
2010 Future of Advanced Computing2010 Future of Advanced Computing
2010 Future of Advanced Computing
 
OpenTelemetry For Architects
OpenTelemetry For ArchitectsOpenTelemetry For Architects
OpenTelemetry For Architects
 
Ceilometer presentation ODS Grizzly.pdf
Ceilometer presentation ODS Grizzly.pdfCeilometer presentation ODS Grizzly.pdf
Ceilometer presentation ODS Grizzly.pdf
 
Making an OpenSource Automotive IVI Media Manager
Making an OpenSource Automotive IVI Media ManagerMaking an OpenSource Automotive IVI Media Manager
Making an OpenSource Automotive IVI Media Manager
 
NYC Titanium User's Group - tiConf US Revisited
NYC Titanium User's Group - tiConf US RevisitedNYC Titanium User's Group - tiConf US Revisited
NYC Titanium User's Group - tiConf US Revisited
 
Android overview
Android overviewAndroid overview
Android overview
 
Introduction to Big Data Analytics: Batch, Real-Time, and the Best of Both Wo...
Introduction to Big Data Analytics: Batch, Real-Time, and the Best of Both Wo...Introduction to Big Data Analytics: Batch, Real-Time, and the Best of Both Wo...
Introduction to Big Data Analytics: Batch, Real-Time, and the Best of Both Wo...
 
Ontology Summit - Track D Standards Summary & Provocative Use Cases
Ontology Summit - Track D Standards Summary & Provocative Use CasesOntology Summit - Track D Standards Summary & Provocative Use Cases
Ontology Summit - Track D Standards Summary & Provocative Use Cases
 
Nubomedia IETF96 hackthon - Kurento
Nubomedia IETF96 hackthon - KurentoNubomedia IETF96 hackthon - Kurento
Nubomedia IETF96 hackthon - Kurento
 
Samsung SDS OpeniT - The possibility of Python
Samsung SDS OpeniT - The possibility of PythonSamsung SDS OpeniT - The possibility of Python
Samsung SDS OpeniT - The possibility of Python
 
NASA Web World Wind: welcome to the new era of virtual globes
NASA Web World Wind: welcome to the new era of virtual globes NASA Web World Wind: welcome to the new era of virtual globes
NASA Web World Wind: welcome to the new era of virtual globes
 
FOSDEM 2016 - Creating rich WebRTC Applications with Kurento
FOSDEM 2016 - Creating rich WebRTC Applications with KurentoFOSDEM 2016 - Creating rich WebRTC Applications with Kurento
FOSDEM 2016 - Creating rich WebRTC Applications with Kurento
 
Open source IoT
Open source IoTOpen source IoT
Open source IoT
 
La préservation des logiciels: défis et opportunités pour la reproductibilité...
La préservation des logiciels: défis et opportunités pour la reproductibilité...La préservation des logiciels: défis et opportunités pour la reproductibilité...
La préservation des logiciels: défis et opportunités pour la reproductibilité...
 
Prashant Resume
Prashant ResumePrashant Resume
Prashant Resume
 
How to Gain Visibility into Containers, VM’s and Multi-Cloud Environments Usi...
How to Gain Visibility into Containers, VM’s and Multi-Cloud Environments Usi...How to Gain Visibility into Containers, VM’s and Multi-Cloud Environments Usi...
How to Gain Visibility into Containers, VM’s and Multi-Cloud Environments Usi...
 
R. Di Cosmo - Software Heritage
R. Di Cosmo - Software HeritageR. Di Cosmo - Software Heritage
R. Di Cosmo - Software Heritage
 

Recently uploaded

"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
mphochane1998
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
hublikarsn
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
meharikiros2
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 

Recently uploaded (20)

Path loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata ModelPath loss model, OKUMURA Model, Hata Model
Path loss model, OKUMURA Model, Hata Model
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
Introduction to Geographic Information Systems
Introduction to Geographic Information SystemsIntroduction to Geographic Information Systems
Introduction to Geographic Information Systems
 
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments""Lesotho Leaps Forward: A Chronicle of Transformative Developments"
"Lesotho Leaps Forward: A Chronicle of Transformative Developments"
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
Introduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptxIntroduction to Robotics in Mechanical Engineering.pptx
Introduction to Robotics in Mechanical Engineering.pptx
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
Convergence of Robotics and Gen AI offers excellent opportunities for Entrepr...
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Worksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptxWorksharing and 3D Modeling with Revit.pptx
Worksharing and 3D Modeling with Revit.pptx
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
Electromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptxElectromagnetic relays used for power system .pptx
Electromagnetic relays used for power system .pptx
 
Query optimization and processing for advanced database systems
Query optimization and processing for advanced database systemsQuery optimization and processing for advanced database systems
Query optimization and processing for advanced database systems
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 

gstreamerv2-150416084351-conversion-gate02.pptx

  • 1. GStreamer: An overview Rodrigo Costa Pontifical Catholic University of Rio de Janeiro TeleM´ıdia Lab. rodrigocosta@telemidia.puc-rio.br April 16, 2015 Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 1 / 22
  • 2. Overview 1 GStreamer Overview Pipelines Basic Concepts Synchronization Examples Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 2 / 22
  • 3. What is GStreamer? A framework for multimedia applications Linux, Windows, OS X, ... 10+ years old project Similar to DirectShow, QuickTime, etc. Designed to make it easy to write applications that handle audiovisual contents Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 3 / 22
  • 4. GStreamer overview What GStreamer NOT is? A codec implementation An application itself Features Fully extensible by plugins Flexible Low and high level API Often wraps other libraries (decoders, encoders, filters, etc.) Integration with other frameworks and projects WebKit, Firefox, Gnome, Android, iOS, ... Pipeline-based Bindings to multiple languages C/C++, Python, Java, Ruby, Pearl, etc. Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 4 / 22
  • 5. GStreamer overview Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 5 / 22
  • 6. Design The fundamental design comes from the video pipeline at Oregon Graduate Institute: Infopipes Infopipes (2001) High-level abstraction for building blocks that handle information flows Goal: simplify the task of building distributed streaming applications by providing basic elements such as pipes, filters, buffers, and pumps Motivated by the lack of support of RPC-like technologies to develop streaming and processing of distributed information Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 6 / 22
  • 7. Infopipes Infopipe example: Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 7 / 22
  • 8. GStreamer pipeline GStreamer pipeline example: Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 8 / 22
  • 9. Basic Concepts Elements The most important class of objects in GStreamer Each one has a specific function: read a file, receive data from network, decode, multiplex, present the data, ... A chain of elements is created and linked together for the data to flow through it GStreamer ships with a large set of elements Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 9 / 22
  • 10. Basic Concepts Elements (cont) Source Filters, converters, demuxers, muxers, codecs Sink Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 10 / 22
  • 11. Basic Concepts Pads Connection points between elements Source pads produce data Sink pads consume data Data always flows from src to sink pads Can operate in pull or push mode Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 11 / 22
  • 12. Basic Concepts Pads (cont) Each pad have a predefined set of properties called Capabilities or Caps Caps are used to validate the communication between elements (caps restrict the type of data that flows through it) A source pad can only be linked to a sink pad if their allowed data types are compatible For instance, a source pad that produces a video stream cannot be linked to a sink pad that consumes audio streams Elements can negotiate with each other on format to use (caps negotiation) Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 12 / 22
  • 13. Basic Concepts Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 13 / 22
  • 14. Basic Concepts Bins Elements can be grouped into a container called bin It can be manipulated as it were an element It also manages the state of its children elements Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 14 / 22
  • 15. Basic Concepts Pipeline A pipeline is a top-level bin It provides a bus for communication purposes It manages the playout synchronization It runs in a separate thread Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 15 / 22
  • 16. Basic Concepts Communication: Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 16 / 22
  • 17. Synchronization GstClock objects provide clock time GstClock always returns the absolute-time The pipeline maintains a GstClock object and a base-time (time when it goes to PLAYING state) running-time = absolute-time - base-time Sink elements are responsible for present the buffers in their respective presentation time If a buffer is delayed, the sink drops it Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 17 / 22
  • 18. Pipeline Example Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 18 / 22
  • 19. Example 1 Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 19 / 22
  • 20. Example 2 Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 20 / 22
  • 21. Example 3 Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 21 / 22
  • 22. Example 4 Rodrigo Costa (TeleM´ıdia Lab.) GStreamer April 16, 2015 22 / 22