plugin writing: base class for format conversion

Michael Gruner michael.gruner at ridgerun.com
Sat Jul 17 15:37:21 UTC 2021


Hi Guennadi

The videoconvert element can already handle this conversion for you:

gst-launch-1.0 v4l2src ! videoconvert ! video/x-raw,format=RGB ! …

If you, for other reason, need to write your own element, you probably want to use the videofilter base class. It’s a specialization of the basetransform class for video. The important virtual method for you to implement is “transform_caps”, that will allow you to specify the input and output caps respectively. 

Michael

> On 17 Jul 2021, at 05:05, Guennadi Liakhovetski via gstreamer-devel <gstreamer-devel at lists.freedesktop.org> wrote:
> 
> Hi,
> 
> I'm trying to write a plugin to convert data from a thermal camera. It
> should take data from the v4l2src source in GRAY16_BE format and convert
> it to an RGB video output. I'm looking at gst-element-maker but I'm not
> finding any suitable base class that would take video/x-raw as input and
> generate the same as output and would convert between format. Do I have to
> write a plugin from scratch? Or should I use basetransform? Any tutorials
> for that?
> 
> Thanks
> Guennadi
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


More information about the gstreamer-devel mailing list