Choosing the right template when writing a plugin

Tim-Philipp Müller t.i.m at zen.co.uk
Tue Mar 12 07:57:30 PDT 2013


On Tue, 2013-03-12 at 13:20 +0100, Massimiliano Cialdi wrote:

> I have to write two audio plugins: the first is a simple processing 
> block (some filtering), and the second is a decoder (something like mp3 
> decoder)
> In the plugin template 
> (http://cgit.freedesktop.org/gstreamer/gst-template/commit/?id=afd75017e71129a200ca19ea68161f3526265e6a) 
> there are 3 template to start from:
> gstplugin.[ch], gsttransform.[ch] and gstaudiofilter.c.
> 
> I think that for my processing element I have to start from 
> gstaudiofilter.c, but what about .h?
> 
> for the decoder element, which template should I use?

For an audio filter that outputs the same audio format as it takes as
input, GstAudioFilter works. Otherwise GstBaseTransform.

For an audio decoder use the GstAudioDecoder base class.

I don't know if these examples work and/or have been ported yet. There's
also the element-maker tool in gst-plugins-bad, but I'm not sure if all
base classes work with it yet.

The best way might be to just copy an existing element that is similar
to what you want to do, and then search/replace the names and replace
the functionality with your own.

 Cheers
  -Tim



More information about the gstreamer-devel mailing list