SlideShare a Scribd company logo
1 of 25
Gstreamer Plugin Development
Session VII
Element
• Core of Gstreamer
• Object derived from GstElement
• Source elements provides data to stream
• Filter elements acts on a data in stream
• Sink elements consumes data of stream
Plugin
• Loadable block of code
• Usually shared object or a dynamically linked
library
• Contains implementation of many elements or
just a single one
• Very basic functions reside in the core library
• All other are implemented as plugins
• Are only loaded when their provided elements
are requested
Pads
• Negotiate links and data flows between elements
• Is an port of an element – Output or Input Port
• Specific data handling capabilities
• Can restrict the data that flows through it.
• Links are allowed between two pads when data
types of two pads compatible
• Is similar to plug or jack of a physical device
Pads
• Source Pads
– Data flows out of one element through one or
more source pads
• Sink Pads
– Accepts incoming data flow through one or more
sink pads
GstMiniObject
• Stream of data are chopped up into chunks
that are passed from a source pad on one
element to a sink pad on another element
• Structure used to hold these chunks of data
• Exact type indicating what type of data
• GstMiniObject Types
– Events ( Control )
– Buffers ( Control )
GstBuffer
• Contains any sort of data that two linked pads
know how to handle
• Contains some sort of audio or video data that
flows from one element to another.
• Metadata describing the buffer’s contents
– Pointers to one or more GstMemory Objects
– Ref Counted objects the encapsulate a region of
memory
– Timestamp indicating the preferred display timestamp
of the content in the buffer.
Buffer Allocation
• Able to store chunks of memory of several
different types
• Most generic type of buffer contains memory
allocated by malloc
– Very convenient
– Not always fast, since data often needs to be
copied
Specialized Buffers
• Many specialized elements create buffers that
point to special memory.
– filesrc element maps a file into address space of
application ( using mmap() )
– Creates buffers that point into that address range
– Created by filesrc act like generic buffers, except
that are read only
• Buffer freeing code automatically freed by the
correct method of freeing
GstBufferPool
• Element might get specialized buffers is to request them
from a downstream peer through a GstBufferPool
• Downstream able to provide these objects, upstream can
use them to allocate buffers.
• Accelerated methods for copying data to hardware or
direct access to hardware
• These elements able to create a GstBufferPool for their
upstream peers.
• Example Ximagesink
– Create a buffer that contain Ximages
– Upstream peer copies the data into the buffer, it is copying
directly into the Ximage
– Enables Ximagesink draws the image directly without copy
GstEvent
• Information on the state of the stream flowing
between two linked pads
• Will only be sent if element explicitly support
them, else core will try to handle
automatically
• Events used to indicate ( for example )
– A media type
– End of media stream
– Cache should be flushed
Events
• Subtype indicating the type of contained
event
• Other contents of event depend on the
specific event type
Media Types & Properties
• Uses type system to ensure that the data passed
between the elements in recognized format.
• Type system is important for ensuring that the
parameters required to fully specify the format
match up correctly when linking pads between
elements.
• Each link is made between elements has a
specified type and optionally a set of properties.
• Capabilities Negotiation.
Basic Types
S.No Media Type Description Property Description
1 audio/* All audio types rate Sample Rate
2 channels integer Greater than 0 No of channels
3 audio/x-raw raw integer
audio
Format String
4 audio/mpeg MPEG Audio
encoding
mpegversion Integer
5 framed boolean 0 or 1 True => Frame
available,
false => no frame
6 layer Integer 1,2 or 3 Compression
layer
7 bitrate integer Greater than 0
8 audio/x-vorbis Vorbis audio
data
Building a plugin
• Example file element
– Single input and single output pad
– Simply pass Media Data and Event data from its
sink pad to its source pad without modification.
• Including properties
• Including signal handling
• Examples/pwg/examplefilter
Plugin Template
• To check out gst template,
– git clone git://anongit.freedesktop.org/gstreamer/gst-
template.git
– cd gst-template/gst-plugin/src
– ../tools/make_element MyFilter
– Creates two files
• gstmyfilter.c
• gstmyfilter.h
– autogen.sh
– make && sudo make install
Examing Code
• Basic code structure
• Element metadata
• GstStaticPad
• Constructor
• Plugin_init
• Specifying the pads
Plugin Header
#include <gst/gst.h>
/* Definition of structure storing data for this element. */
typedef struct _GstMyFilter {
GstElement element;
GstPad *sinkpad, *srcpad;
gboolean silent;
} GstMyFilter;
/* Standard definition defining a class for this element. */
typedef struct _GstMyFilterClass {
GstElementClass parent_class;
} GstMyFilterClass;
/* Standard macros for defining types for this element. */
#define GST_TYPE_MY_FILTER (gst_my_filter_get_type())
#define GST_MY_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MY_FILTER,GstMyFilter))
#define GST_MY_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MY_FILTER,GstMyFilterClass))
#define GST_IS_MY_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MY_FILTER))
#define GST_IS_MY_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MY_FILTER))
/* Standard function returning type information. */
GType gst_my_filter_get_type (void);
Setup Object
#include "filter.h"
G_DEFINE_TYPE (GstMyFilter, gst_my_filter,
GST_TYPE_ELEMENT);
Element Meta data
gst_element_class_set_static_metadata (klass,
"An example plugin",
"Example/FirstExample",
"Shows the basic structure of a plugin",
"your name <your.name@your.isp>");
static void gst_my_filter_class_init (GstMyFilterClass * klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
[..]
gst_element_class_set_static_metadata (element_klass,
"An example plugin",
"Example/FirstExample",
"Shows the basic structure of a plugin",
"your name <your.name@your.isp>");
}
Pad Template
static GstStaticPadTemplate sink_factory =
GST_STATIC_PAD_TEMPLATE (
"sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS ("ANY")
);
Plugin init
static gbooleanplugin_init (GstPlugin *plugin)
{
return gst_element_register (plugin, "my_filter", GST_RANK_NONE, GST_TYPE_MY_FILTER);
}
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
my_filter,
"My filter plugin",
plugin_init,
VERSION,
"LGPL",
"GStreamer",
"http://gstreamer.net/"
)
Specifying Pads
static voidgst_my_filter_init (GstMyFilter *filter)
{
/* pad through which data comes in to the element */
filter->sinkpad = gst_pad_new_from_static_template (&sink_template,
"sink");
/* pads are configured here with gst_pad_set_*_function () */
gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
/* pad through which data goes out of the element */
filter->srcpad = gst_pad_new_from_static_template (&src_template,
"src");
/* pads are configured here with gst_pad_set_*_function () */
gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
/* properties initial value */
filter->silent = FALSE;
}
Chain Function
• The function in which all data processing takes
place
• In simple filter, mostly linear functions for
each incoming buffers, one buffer will go out.
Simple Chain Implementation
static GstFlowReturn gst_my_filter_chain (GstPad *pad, GstObject *parent, GstBuffer *buf);
static void gst_my_filter_init (GstMyFilter * filter)
{
/* configure chain function on the pad before adding the pad to the element */
gst_pad_set_chain_function (filter->sinkpad, gst_my_filter_chain);
}
static GstFlowReturn gst_my_filter_chain (GstPad *pad, GstObject *parent, GstBuffer *buf)
{
GstMyFilter *filter = GST_MY_FILTER (parent);
if (!filter->silent)
g_print ("Have data of size %" G_GSIZE_FORMAT" bytes!n",
gst_buffer_get_size (buf));
return gst_pad_push (filter->srcpad, buf);
}

More Related Content

What's hot

Programming with Python and PostgreSQL
Programming with Python and PostgreSQLProgramming with Python and PostgreSQL
Programming with Python and PostgreSQLPeter Eisentraut
 
스프링 부트와 로깅
스프링 부트와 로깅스프링 부트와 로깅
스프링 부트와 로깅Keesun Baik
 
Java Deserialization Vulnerabilities - The Forgotten Bug Class (DeepSec Edition)
Java Deserialization Vulnerabilities - The Forgotten Bug Class (DeepSec Edition)Java Deserialization Vulnerabilities - The Forgotten Bug Class (DeepSec Edition)
Java Deserialization Vulnerabilities - The Forgotten Bug Class (DeepSec Edition)CODE WHITE GmbH
 
아라한사의 스프링 시큐리티 정리
아라한사의 스프링 시큐리티 정리아라한사의 스프링 시큐리티 정리
아라한사의 스프링 시큐리티 정리라한사 아
 
[수정본] 우아한 객체지향
[수정본] 우아한 객체지향[수정본] 우아한 객체지향
[수정본] 우아한 객체지향Young-Ho Cho
 
Guide to GStreamer Application Development Manual: CH1 to CH10
Guide to GStreamer Application Development Manual: CH1 to CH10Guide to GStreamer Application Development Manual: CH1 to CH10
Guide to GStreamer Application Development Manual: CH1 to CH10Wen Liao
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events WebStackAcademy
 
Spring Framework - Spring Security
Spring Framework - Spring SecuritySpring Framework - Spring Security
Spring Framework - Spring SecurityDzmitry Naskou
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursJ V
 
Introduction to Gstreamer
Introduction to GstreamerIntroduction to Gstreamer
Introduction to GstreamerRand Graham
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScriptShahDhruv21
 
프론트엔드 코딩 컨벤션 자동화 도구
프론트엔드 코딩 컨벤션 자동화 도구프론트엔드 코딩 컨벤션 자동화 도구
프론트엔드 코딩 컨벤션 자동화 도구Taegon Kim
 
Networking in Java with NIO and Netty
Networking in Java with NIO and NettyNetworking in Java with NIO and Netty
Networking in Java with NIO and NettyConstantine Slisenka
 
Janus workshop @ RTC2019 Beijing
Janus workshop @ RTC2019 BeijingJanus workshop @ RTC2019 Beijing
Janus workshop @ RTC2019 BeijingLorenzo Miniero
 
4. Programación con arrays, funciones, y objetos definidos por el usuario
4. Programación con arrays, funciones, y objetos definidos por el usuario4. Programación con arrays, funciones, y objetos definidos por el usuario
4. Programación con arrays, funciones, y objetos definidos por el usuarioLaura Folgado Galache
 
Coding with golang
Coding with golangCoding with golang
Coding with golangHannahMoss14
 

What's hot (20)

Programming with Python and PostgreSQL
Programming with Python and PostgreSQLProgramming with Python and PostgreSQL
Programming with Python and PostgreSQL
 
스프링 부트와 로깅
스프링 부트와 로깅스프링 부트와 로깅
스프링 부트와 로깅
 
gRPC in Go
gRPC in GogRPC in Go
gRPC in Go
 
Functions in javascript
Functions in javascriptFunctions in javascript
Functions in javascript
 
Java Deserialization Vulnerabilities - The Forgotten Bug Class (DeepSec Edition)
Java Deserialization Vulnerabilities - The Forgotten Bug Class (DeepSec Edition)Java Deserialization Vulnerabilities - The Forgotten Bug Class (DeepSec Edition)
Java Deserialization Vulnerabilities - The Forgotten Bug Class (DeepSec Edition)
 
아라한사의 스프링 시큐리티 정리
아라한사의 스프링 시큐리티 정리아라한사의 스프링 시큐리티 정리
아라한사의 스프링 시큐리티 정리
 
[수정본] 우아한 객체지향
[수정본] 우아한 객체지향[수정본] 우아한 객체지향
[수정본] 우아한 객체지향
 
Guide to GStreamer Application Development Manual: CH1 to CH10
Guide to GStreamer Application Development Manual: CH1 to CH10Guide to GStreamer Application Development Manual: CH1 to CH10
Guide to GStreamer Application Development Manual: CH1 to CH10
 
XML DTD and Schema
XML DTD and SchemaXML DTD and Schema
XML DTD and Schema
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
 
Spring Framework - Spring Security
Spring Framework - Spring SecuritySpring Framework - Spring Security
Spring Framework - Spring Security
 
Alfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy BehavioursAlfresco Content Modelling and Policy Behaviours
Alfresco Content Modelling and Policy Behaviours
 
Introduction to Gstreamer
Introduction to GstreamerIntroduction to Gstreamer
Introduction to Gstreamer
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
 
프론트엔드 코딩 컨벤션 자동화 도구
프론트엔드 코딩 컨벤션 자동화 도구프론트엔드 코딩 컨벤션 자동화 도구
프론트엔드 코딩 컨벤션 자동화 도구
 
Networking in Java with NIO and Netty
Networking in Java with NIO and NettyNetworking in Java with NIO and Netty
Networking in Java with NIO and Netty
 
Janus workshop @ RTC2019 Beijing
Janus workshop @ RTC2019 BeijingJanus workshop @ RTC2019 Beijing
Janus workshop @ RTC2019 Beijing
 
Alfresco tuning part1
Alfresco tuning part1Alfresco tuning part1
Alfresco tuning part1
 
4. Programación con arrays, funciones, y objetos definidos por el usuario
4. Programación con arrays, funciones, y objetos definidos por el usuario4. Programación con arrays, funciones, y objetos definidos por el usuario
4. Programación con arrays, funciones, y objetos definidos por el usuario
 
Coding with golang
Coding with golangCoding with golang
Coding with golang
 

Viewers also liked

About GStreamer 1.0 application development for beginners
About GStreamer 1.0 application development for beginnersAbout GStreamer 1.0 application development for beginners
About GStreamer 1.0 application development for beginnersShota TAMURA
 
UDPSRC GStreamer Plugin Session VIII
UDPSRC GStreamer Plugin Session VIIIUDPSRC GStreamer Plugin Session VIII
UDPSRC GStreamer Plugin Session VIIINEEVEE Technologies
 
Gstreamer: an Overview
Gstreamer: an OverviewGstreamer: an Overview
Gstreamer: an OverviewRodrigo Costa
 
Introduction to Graphics - Session
Introduction to Graphics - SessionIntroduction to Graphics - Session
Introduction to Graphics - SessionNEEVEE Technologies
 
GStreamer 101
GStreamer 101GStreamer 101
GStreamer 101yuvipanda
 
TMS20DM8148 Embedded Linux Session II
TMS20DM8148 Embedded Linux Session IITMS20DM8148 Embedded Linux Session II
TMS20DM8148 Embedded Linux Session IINEEVEE Technologies
 
Open GL Programming Training Session I
Open GL Programming Training Session IOpen GL Programming Training Session I
Open GL Programming Training Session INEEVEE Technologies
 
オープンセミナー2013@広島
オープンセミナー2013@広島オープンセミナー2013@広島
オープンセミナー2013@広島Masahiko Tani
 
Video streaming on e-lab
Video streaming on e-labVideo streaming on e-lab
Video streaming on e-labrneto11
 
半透明は飾りです 偉い人にはそれがわからんのですよ
半透明は飾りです偉い人にはそれがわからんのですよ半透明は飾りです偉い人にはそれがわからんのですよ
半透明は飾りです 偉い人にはそれがわからんのですよYuya Yamaki
 
MIPI DevCon 2016: Accelerating Software Development for MIPI CSI-2 Cameras
MIPI DevCon 2016: Accelerating Software Development for MIPI CSI-2 CamerasMIPI DevCon 2016: Accelerating Software Development for MIPI CSI-2 Cameras
MIPI DevCon 2016: Accelerating Software Development for MIPI CSI-2 CamerasMIPI Alliance
 
Visual Studio 2012のDirect3Dアプリ開発者向け新機能を知ろう
Visual Studio 2012のDirect3Dアプリ開発者向け新機能を知ろうVisual Studio 2012のDirect3Dアプリ開発者向け新機能を知ろう
Visual Studio 2012のDirect3Dアプリ開発者向け新機能を知ろうMasafumi Takahashi
 
документ Microsoft word (2)
документ Microsoft word (2)документ Microsoft word (2)
документ Microsoft word (2)Oleg777
 
Mind Mapping та його використання
Mind Mapping та його використанняMind Mapping та його використання
Mind Mapping та його використанняAlexander Babich
 

Viewers also liked (17)

About GStreamer 1.0 application development for beginners
About GStreamer 1.0 application development for beginnersAbout GStreamer 1.0 application development for beginners
About GStreamer 1.0 application development for beginners
 
UDPSRC GStreamer Plugin Session VIII
UDPSRC GStreamer Plugin Session VIIIUDPSRC GStreamer Plugin Session VIII
UDPSRC GStreamer Plugin Session VIII
 
Gstreamer: an Overview
Gstreamer: an OverviewGstreamer: an Overview
Gstreamer: an Overview
 
Introduction to Graphics - Session
Introduction to Graphics - SessionIntroduction to Graphics - Session
Introduction to Graphics - Session
 
GStreamer Instruments
GStreamer InstrumentsGStreamer Instruments
GStreamer Instruments
 
Building Digital TV Support in Linux
Building Digital TV Support in LinuxBuilding Digital TV Support in Linux
Building Digital TV Support in Linux
 
GStreamer 101
GStreamer 101GStreamer 101
GStreamer 101
 
TMS20DM8148 Embedded Linux Session II
TMS20DM8148 Embedded Linux Session IITMS20DM8148 Embedded Linux Session II
TMS20DM8148 Embedded Linux Session II
 
TMS320DM8148 Embedded Linux
TMS320DM8148 Embedded LinuxTMS320DM8148 Embedded Linux
TMS320DM8148 Embedded Linux
 
Open GL Programming Training Session I
Open GL Programming Training Session IOpen GL Programming Training Session I
Open GL Programming Training Session I
 
オープンセミナー2013@広島
オープンセミナー2013@広島オープンセミナー2013@広島
オープンセミナー2013@広島
 
Video streaming on e-lab
Video streaming on e-labVideo streaming on e-lab
Video streaming on e-lab
 
半透明は飾りです 偉い人にはそれがわからんのですよ
半透明は飾りです偉い人にはそれがわからんのですよ半透明は飾りです偉い人にはそれがわからんのですよ
半透明は飾りです 偉い人にはそれがわからんのですよ
 
MIPI DevCon 2016: Accelerating Software Development for MIPI CSI-2 Cameras
MIPI DevCon 2016: Accelerating Software Development for MIPI CSI-2 CamerasMIPI DevCon 2016: Accelerating Software Development for MIPI CSI-2 Cameras
MIPI DevCon 2016: Accelerating Software Development for MIPI CSI-2 Cameras
 
Visual Studio 2012のDirect3Dアプリ開発者向け新機能を知ろう
Visual Studio 2012のDirect3Dアプリ開発者向け新機能を知ろうVisual Studio 2012のDirect3Dアプリ開発者向け新機能を知ろう
Visual Studio 2012のDirect3Dアプリ開発者向け新機能を知ろう
 
документ Microsoft word (2)
документ Microsoft word (2)документ Microsoft word (2)
документ Microsoft word (2)
 
Mind Mapping та його використання
Mind Mapping та його використанняMind Mapping та його використання
Mind Mapping та його використання
 

Similar to Gstreamer plugin development

Elk presentation 2#3
Elk presentation 2#3Elk presentation 2#3
Elk presentation 2#3uzzal basak
 
Unit 2 Principles of Programming Languages
Unit 2 Principles of Programming LanguagesUnit 2 Principles of Programming Languages
Unit 2 Principles of Programming LanguagesVasavi College of Engg
 
[Distributed System] ch4. interprocess communication
[Distributed System] ch4. interprocess communication[Distributed System] ch4. interprocess communication
[Distributed System] ch4. interprocess communicationGyuhyeon Nam
 
Elements for an iOS Backend
Elements for an iOS BackendElements for an iOS Backend
Elements for an iOS BackendLaurent Cerveau
 
Skillwise - Enhancing dotnet app
Skillwise - Enhancing dotnet appSkillwise - Enhancing dotnet app
Skillwise - Enhancing dotnet appSkillwise Group
 
GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay
GDC 2010 - A Dynamic Component Architecture for High Performance GameplayGDC 2010 - A Dynamic Component Architecture for High Performance Gameplay
GDC 2010 - A Dynamic Component Architecture for High Performance GameplayTerrance Cohen
 
"Einstürzenden Neudaten: Building an Analytics Engine from Scratch", Tobias J...
"Einstürzenden Neudaten: Building an Analytics Engine from Scratch", Tobias J..."Einstürzenden Neudaten: Building an Analytics Engine from Scratch", Tobias J...
"Einstürzenden Neudaten: Building an Analytics Engine from Scratch", Tobias J...Dataconomy Media
 
static members in object oriented program.pptx
static members in object oriented program.pptxstatic members in object oriented program.pptx
static members in object oriented program.pptxurvashipundir04
 
(ATS3-PLAT07) Pipeline Pilot Protocol Tips, Tricks, and Challenges
(ATS3-PLAT07) Pipeline Pilot Protocol Tips, Tricks, and Challenges(ATS3-PLAT07) Pipeline Pilot Protocol Tips, Tricks, and Challenges
(ATS3-PLAT07) Pipeline Pilot Protocol Tips, Tricks, and ChallengesBIOVIA
 
Tool Development 05 - XML Schema, INI, JSON, YAML
Tool Development 05 - XML Schema, INI, JSON, YAMLTool Development 05 - XML Schema, INI, JSON, YAML
Tool Development 05 - XML Schema, INI, JSON, YAMLNick Pruehs
 
Data Onboarding Breakout Session
Data Onboarding Breakout SessionData Onboarding Breakout Session
Data Onboarding Breakout SessionSplunk
 
Yihan Lian & Zhibin Hu - Smarter Peach: Add Eyes to Peach Fuzzer [rooted2017]
Yihan Lian &  Zhibin Hu - Smarter Peach: Add Eyes to Peach Fuzzer [rooted2017]Yihan Lian &  Zhibin Hu - Smarter Peach: Add Eyes to Peach Fuzzer [rooted2017]
Yihan Lian & Zhibin Hu - Smarter Peach: Add Eyes to Peach Fuzzer [rooted2017]RootedCON
 
WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011
WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011
WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011Engineering Software Lab
 
Introduction to Design Patterns in Javascript
Introduction to Design Patterns in JavascriptIntroduction to Design Patterns in Javascript
Introduction to Design Patterns in JavascriptSanthosh Kumar Srinivasan
 

Similar to Gstreamer plugin development (20)

Elk presentation 2#3
Elk presentation 2#3Elk presentation 2#3
Elk presentation 2#3
 
Automation using Puppet 3
Automation using Puppet 3 Automation using Puppet 3
Automation using Puppet 3
 
2CPP17 - File IO
2CPP17 - File IO2CPP17 - File IO
2CPP17 - File IO
 
Unit 2 Principles of Programming Languages
Unit 2 Principles of Programming LanguagesUnit 2 Principles of Programming Languages
Unit 2 Principles of Programming Languages
 
[Distributed System] ch4. interprocess communication
[Distributed System] ch4. interprocess communication[Distributed System] ch4. interprocess communication
[Distributed System] ch4. interprocess communication
 
Elements for an iOS Backend
Elements for an iOS BackendElements for an iOS Backend
Elements for an iOS Backend
 
Skillwise - Enhancing dotnet app
Skillwise - Enhancing dotnet appSkillwise - Enhancing dotnet app
Skillwise - Enhancing dotnet app
 
098ca session7 c++
098ca session7 c++098ca session7 c++
098ca session7 c++
 
VB.net&OOP.pptx
VB.net&OOP.pptxVB.net&OOP.pptx
VB.net&OOP.pptx
 
GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay
GDC 2010 - A Dynamic Component Architecture for High Performance GameplayGDC 2010 - A Dynamic Component Architecture for High Performance Gameplay
GDC 2010 - A Dynamic Component Architecture for High Performance Gameplay
 
Struts2
Struts2Struts2
Struts2
 
"Einstürzenden Neudaten: Building an Analytics Engine from Scratch", Tobias J...
"Einstürzenden Neudaten: Building an Analytics Engine from Scratch", Tobias J..."Einstürzenden Neudaten: Building an Analytics Engine from Scratch", Tobias J...
"Einstürzenden Neudaten: Building an Analytics Engine from Scratch", Tobias J...
 
static members in object oriented program.pptx
static members in object oriented program.pptxstatic members in object oriented program.pptx
static members in object oriented program.pptx
 
L04 base patterns
L04 base patternsL04 base patterns
L04 base patterns
 
(ATS3-PLAT07) Pipeline Pilot Protocol Tips, Tricks, and Challenges
(ATS3-PLAT07) Pipeline Pilot Protocol Tips, Tricks, and Challenges(ATS3-PLAT07) Pipeline Pilot Protocol Tips, Tricks, and Challenges
(ATS3-PLAT07) Pipeline Pilot Protocol Tips, Tricks, and Challenges
 
Tool Development 05 - XML Schema, INI, JSON, YAML
Tool Development 05 - XML Schema, INI, JSON, YAMLTool Development 05 - XML Schema, INI, JSON, YAML
Tool Development 05 - XML Schema, INI, JSON, YAML
 
Data Onboarding Breakout Session
Data Onboarding Breakout SessionData Onboarding Breakout Session
Data Onboarding Breakout Session
 
Yihan Lian & Zhibin Hu - Smarter Peach: Add Eyes to Peach Fuzzer [rooted2017]
Yihan Lian &  Zhibin Hu - Smarter Peach: Add Eyes to Peach Fuzzer [rooted2017]Yihan Lian &  Zhibin Hu - Smarter Peach: Add Eyes to Peach Fuzzer [rooted2017]
Yihan Lian & Zhibin Hu - Smarter Peach: Add Eyes to Peach Fuzzer [rooted2017]
 
WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011
WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011
WPF/ XamDataGrid Performance, Infragistics Seminar, Israel , November 2011
 
Introduction to Design Patterns in Javascript
Introduction to Design Patterns in JavascriptIntroduction to Design Patterns in Javascript
Introduction to Design Patterns in Javascript
 

More from NEEVEE Technologies

C Language Programming - Program Outline / Schedule
C Language Programming - Program Outline / ScheduleC Language Programming - Program Outline / Schedule
C Language Programming - Program Outline / ScheduleNEEVEE Technologies
 
Python programming for Beginners - II
Python programming for Beginners - IIPython programming for Beginners - II
Python programming for Beginners - IINEEVEE Technologies
 
Python programming for Beginners - I
Python programming for Beginners - IPython programming for Beginners - I
Python programming for Beginners - INEEVEE Technologies
 
Engineering College - Internship proposal
Engineering College - Internship proposalEngineering College - Internship proposal
Engineering College - Internship proposalNEEVEE Technologies
 
NVDK-ESP32 WiFi Station / Access Point
NVDK-ESP32 WiFi Station / Access PointNVDK-ESP32 WiFi Station / Access Point
NVDK-ESP32 WiFi Station / Access PointNEEVEE Technologies
 
General Purpose Input Output - Brief Introduction
General Purpose Input Output - Brief IntroductionGeneral Purpose Input Output - Brief Introduction
General Purpose Input Output - Brief IntroductionNEEVEE Technologies
 
Yocto BSP Layer for UDOO NEO Board
Yocto BSP Layer for UDOO NEO BoardYocto BSP Layer for UDOO NEO Board
Yocto BSP Layer for UDOO NEO BoardNEEVEE Technologies
 
Open Computer Vision Based Image Processing
Open Computer Vision Based Image ProcessingOpen Computer Vision Based Image Processing
Open Computer Vision Based Image ProcessingNEEVEE Technologies
 
Introduction to Machine learning
Introduction to Machine learningIntroduction to Machine learning
Introduction to Machine learningNEEVEE Technologies
 
Introduction Linux Device Drivers
Introduction Linux Device DriversIntroduction Linux Device Drivers
Introduction Linux Device DriversNEEVEE Technologies
 
Introduction about Apache MYNEWT RTOS
Introduction about Apache MYNEWT RTOSIntroduction about Apache MYNEWT RTOS
Introduction about Apache MYNEWT RTOSNEEVEE Technologies
 
Introduction to Bluetooth Low Energy
Introduction to Bluetooth Low EnergyIntroduction to Bluetooth Low Energy
Introduction to Bluetooth Low EnergyNEEVEE Technologies
 
NXP i.MX6 Multi Media Processor & Peripherals
NXP i.MX6 Multi Media Processor & PeripheralsNXP i.MX6 Multi Media Processor & Peripherals
NXP i.MX6 Multi Media Processor & PeripheralsNEEVEE Technologies
 
Introduction to Bluetooth low energy
Introduction to Bluetooth low energyIntroduction to Bluetooth low energy
Introduction to Bluetooth low energyNEEVEE Technologies
 
Arduino Programming - Brief Introduction
Arduino Programming - Brief IntroductionArduino Programming - Brief Introduction
Arduino Programming - Brief IntroductionNEEVEE Technologies
 
NXP IMX6 Processor - Embedded Linux
NXP IMX6 Processor - Embedded LinuxNXP IMX6 Processor - Embedded Linux
NXP IMX6 Processor - Embedded LinuxNEEVEE Technologies
 
Introduction to Hardware Design Using KiCAD
Introduction to Hardware Design Using KiCADIntroduction to Hardware Design Using KiCAD
Introduction to Hardware Design Using KiCADNEEVEE Technologies
 

More from NEEVEE Technologies (20)

C Language Programming - Program Outline / Schedule
C Language Programming - Program Outline / ScheduleC Language Programming - Program Outline / Schedule
C Language Programming - Program Outline / Schedule
 
Python programming for Beginners - II
Python programming for Beginners - IIPython programming for Beginners - II
Python programming for Beginners - II
 
Python programming for Beginners - I
Python programming for Beginners - IPython programming for Beginners - I
Python programming for Beginners - I
 
Engineering College - Internship proposal
Engineering College - Internship proposalEngineering College - Internship proposal
Engineering College - Internship proposal
 
NVDK-ESP32 WiFi Station / Access Point
NVDK-ESP32 WiFi Station / Access PointNVDK-ESP32 WiFi Station / Access Point
NVDK-ESP32 WiFi Station / Access Point
 
NVDK-ESP32 Quick Start Guide
NVDK-ESP32 Quick Start GuideNVDK-ESP32 Quick Start Guide
NVDK-ESP32 Quick Start Guide
 
General Purpose Input Output - Brief Introduction
General Purpose Input Output - Brief IntroductionGeneral Purpose Input Output - Brief Introduction
General Purpose Input Output - Brief Introduction
 
Yocto BSP Layer for UDOO NEO Board
Yocto BSP Layer for UDOO NEO BoardYocto BSP Layer for UDOO NEO Board
Yocto BSP Layer for UDOO NEO Board
 
Building Embedded Linux UDOONEO
Building Embedded Linux UDOONEOBuilding Embedded Linux UDOONEO
Building Embedded Linux UDOONEO
 
Open Computer Vision Based Image Processing
Open Computer Vision Based Image ProcessingOpen Computer Vision Based Image Processing
Open Computer Vision Based Image Processing
 
Introduction to Machine learning
Introduction to Machine learningIntroduction to Machine learning
Introduction to Machine learning
 
Introduction Linux Device Drivers
Introduction Linux Device DriversIntroduction Linux Device Drivers
Introduction Linux Device Drivers
 
Introduction about Apache MYNEWT RTOS
Introduction about Apache MYNEWT RTOSIntroduction about Apache MYNEWT RTOS
Introduction about Apache MYNEWT RTOS
 
Introduction to Bluetooth Low Energy
Introduction to Bluetooth Low EnergyIntroduction to Bluetooth Low Energy
Introduction to Bluetooth Low Energy
 
NXP i.MX6 Multi Media Processor & Peripherals
NXP i.MX6 Multi Media Processor & PeripheralsNXP i.MX6 Multi Media Processor & Peripherals
NXP i.MX6 Multi Media Processor & Peripherals
 
Introduction to Bluetooth low energy
Introduction to Bluetooth low energyIntroduction to Bluetooth low energy
Introduction to Bluetooth low energy
 
Arduino Programming - Brief Introduction
Arduino Programming - Brief IntroductionArduino Programming - Brief Introduction
Arduino Programming - Brief Introduction
 
MarsBoard - NXP IMX6 Processor
MarsBoard - NXP IMX6 ProcessorMarsBoard - NXP IMX6 Processor
MarsBoard - NXP IMX6 Processor
 
NXP IMX6 Processor - Embedded Linux
NXP IMX6 Processor - Embedded LinuxNXP IMX6 Processor - Embedded Linux
NXP IMX6 Processor - Embedded Linux
 
Introduction to Hardware Design Using KiCAD
Introduction to Hardware Design Using KiCADIntroduction to Hardware Design Using KiCAD
Introduction to Hardware Design Using KiCAD
 

Recently uploaded

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 

Recently uploaded (20)

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 

Gstreamer plugin development

  • 2. Element • Core of Gstreamer • Object derived from GstElement • Source elements provides data to stream • Filter elements acts on a data in stream • Sink elements consumes data of stream
  • 3. Plugin • Loadable block of code • Usually shared object or a dynamically linked library • Contains implementation of many elements or just a single one • Very basic functions reside in the core library • All other are implemented as plugins • Are only loaded when their provided elements are requested
  • 4. Pads • Negotiate links and data flows between elements • Is an port of an element – Output or Input Port • Specific data handling capabilities • Can restrict the data that flows through it. • Links are allowed between two pads when data types of two pads compatible • Is similar to plug or jack of a physical device
  • 5. Pads • Source Pads – Data flows out of one element through one or more source pads • Sink Pads – Accepts incoming data flow through one or more sink pads
  • 6. GstMiniObject • Stream of data are chopped up into chunks that are passed from a source pad on one element to a sink pad on another element • Structure used to hold these chunks of data • Exact type indicating what type of data • GstMiniObject Types – Events ( Control ) – Buffers ( Control )
  • 7. GstBuffer • Contains any sort of data that two linked pads know how to handle • Contains some sort of audio or video data that flows from one element to another. • Metadata describing the buffer’s contents – Pointers to one or more GstMemory Objects – Ref Counted objects the encapsulate a region of memory – Timestamp indicating the preferred display timestamp of the content in the buffer.
  • 8. Buffer Allocation • Able to store chunks of memory of several different types • Most generic type of buffer contains memory allocated by malloc – Very convenient – Not always fast, since data often needs to be copied
  • 9. Specialized Buffers • Many specialized elements create buffers that point to special memory. – filesrc element maps a file into address space of application ( using mmap() ) – Creates buffers that point into that address range – Created by filesrc act like generic buffers, except that are read only • Buffer freeing code automatically freed by the correct method of freeing
  • 10. GstBufferPool • Element might get specialized buffers is to request them from a downstream peer through a GstBufferPool • Downstream able to provide these objects, upstream can use them to allocate buffers. • Accelerated methods for copying data to hardware or direct access to hardware • These elements able to create a GstBufferPool for their upstream peers. • Example Ximagesink – Create a buffer that contain Ximages – Upstream peer copies the data into the buffer, it is copying directly into the Ximage – Enables Ximagesink draws the image directly without copy
  • 11. GstEvent • Information on the state of the stream flowing between two linked pads • Will only be sent if element explicitly support them, else core will try to handle automatically • Events used to indicate ( for example ) – A media type – End of media stream – Cache should be flushed
  • 12. Events • Subtype indicating the type of contained event • Other contents of event depend on the specific event type
  • 13. Media Types & Properties • Uses type system to ensure that the data passed between the elements in recognized format. • Type system is important for ensuring that the parameters required to fully specify the format match up correctly when linking pads between elements. • Each link is made between elements has a specified type and optionally a set of properties. • Capabilities Negotiation.
  • 14. Basic Types S.No Media Type Description Property Description 1 audio/* All audio types rate Sample Rate 2 channels integer Greater than 0 No of channels 3 audio/x-raw raw integer audio Format String 4 audio/mpeg MPEG Audio encoding mpegversion Integer 5 framed boolean 0 or 1 True => Frame available, false => no frame 6 layer Integer 1,2 or 3 Compression layer 7 bitrate integer Greater than 0 8 audio/x-vorbis Vorbis audio data
  • 15. Building a plugin • Example file element – Single input and single output pad – Simply pass Media Data and Event data from its sink pad to its source pad without modification. • Including properties • Including signal handling • Examples/pwg/examplefilter
  • 16. Plugin Template • To check out gst template, – git clone git://anongit.freedesktop.org/gstreamer/gst- template.git – cd gst-template/gst-plugin/src – ../tools/make_element MyFilter – Creates two files • gstmyfilter.c • gstmyfilter.h – autogen.sh – make && sudo make install
  • 17. Examing Code • Basic code structure • Element metadata • GstStaticPad • Constructor • Plugin_init • Specifying the pads
  • 18. Plugin Header #include <gst/gst.h> /* Definition of structure storing data for this element. */ typedef struct _GstMyFilter { GstElement element; GstPad *sinkpad, *srcpad; gboolean silent; } GstMyFilter; /* Standard definition defining a class for this element. */ typedef struct _GstMyFilterClass { GstElementClass parent_class; } GstMyFilterClass; /* Standard macros for defining types for this element. */ #define GST_TYPE_MY_FILTER (gst_my_filter_get_type()) #define GST_MY_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_MY_FILTER,GstMyFilter)) #define GST_MY_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_MY_FILTER,GstMyFilterClass)) #define GST_IS_MY_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_MY_FILTER)) #define GST_IS_MY_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_MY_FILTER)) /* Standard function returning type information. */ GType gst_my_filter_get_type (void);
  • 19. Setup Object #include "filter.h" G_DEFINE_TYPE (GstMyFilter, gst_my_filter, GST_TYPE_ELEMENT);
  • 20. Element Meta data gst_element_class_set_static_metadata (klass, "An example plugin", "Example/FirstExample", "Shows the basic structure of a plugin", "your name <your.name@your.isp>"); static void gst_my_filter_class_init (GstMyFilterClass * klass) { GstElementClass *element_class = GST_ELEMENT_CLASS (klass); [..] gst_element_class_set_static_metadata (element_klass, "An example plugin", "Example/FirstExample", "Shows the basic structure of a plugin", "your name <your.name@your.isp>"); }
  • 21. Pad Template static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ( "sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("ANY") );
  • 22. Plugin init static gbooleanplugin_init (GstPlugin *plugin) { return gst_element_register (plugin, "my_filter", GST_RANK_NONE, GST_TYPE_MY_FILTER); } GST_PLUGIN_DEFINE ( GST_VERSION_MAJOR, GST_VERSION_MINOR, my_filter, "My filter plugin", plugin_init, VERSION, "LGPL", "GStreamer", "http://gstreamer.net/" )
  • 23. Specifying Pads static voidgst_my_filter_init (GstMyFilter *filter) { /* pad through which data comes in to the element */ filter->sinkpad = gst_pad_new_from_static_template (&sink_template, "sink"); /* pads are configured here with gst_pad_set_*_function () */ gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad); /* pad through which data goes out of the element */ filter->srcpad = gst_pad_new_from_static_template (&src_template, "src"); /* pads are configured here with gst_pad_set_*_function () */ gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad); /* properties initial value */ filter->silent = FALSE; }
  • 24. Chain Function • The function in which all data processing takes place • In simple filter, mostly linear functions for each incoming buffers, one buffer will go out.
  • 25. Simple Chain Implementation static GstFlowReturn gst_my_filter_chain (GstPad *pad, GstObject *parent, GstBuffer *buf); static void gst_my_filter_init (GstMyFilter * filter) { /* configure chain function on the pad before adding the pad to the element */ gst_pad_set_chain_function (filter->sinkpad, gst_my_filter_chain); } static GstFlowReturn gst_my_filter_chain (GstPad *pad, GstObject *parent, GstBuffer *buf) { GstMyFilter *filter = GST_MY_FILTER (parent); if (!filter->silent) g_print ("Have data of size %" G_GSIZE_FORMAT" bytes!n", gst_buffer_get_size (buf)); return gst_pad_push (filter->srcpad, buf); }