2's complement conversion filter

elellilrah alinsdau at yahoo.com
Tue May 1 16:02:43 PDT 2012


Hello,
I need to develop a plugin filter to convert my video stream from 2's
complement (14 bit) to regular RGB data (16 bit, 3 color).  First, does
anyone know of a plugin that will do this?  The video data generated by the
camera comes in 2's complement and was a design decision long ago that I
cannot change.

That said, I have embarked on developing a plugin for it.  I've begun with
the "gstreamer plugin writers guide.pdf" and have done the following:
Downloaded the plugin developer, section 3.1
cd'd to /gst-template/gst-plugin/src and ran ../tools/make_element MyPlugin
And adjusted the /src/Makefile.am file to look like this (the guide isn't
exact about this)

#######################################################################
# TODO: change libgstplugin.la to something else, e.g. libmysomething.la    
#
######################################################################
plugin_LTLIBRARIES = libgstmyplugin.la

######################################################################
# TODO: for the next set of variables, name the prefix if you named the .la,
#
#  e.g. libmysomething.la => libmysomething_la_SOURCES                      
#
#                            libmysomething_la_CFLAGS                       
#
#                            libmysomething_la_LIBADD                       
#
#                            libmysomething_la_LDFLAGS                      
#
#####################################################################

# compiler and linker flags used to compile this plugin, set in configure.ac
libgstplugin_la_LIBTOOLFLAGS = --tag=disable-static

# sources used to compile this plug-in
libgstmyplugin_la_SOURCES = gstmyplugin.c gstmyplugin.h
libgstmyplugin_la_CFLAGS = $(GST_CFLAGS)
libgstmyplugin_la_LIBADD = $(GST_LIBS)
libgstmyplugin_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)

# headers we need but don't want installed
noinst_HEADERS = gstplugin.h gstmyplugin.h

I then cd'd to /gst-tempplate/gst-plugin and ran ./autogen.sh
and received an error about the #include in gstmyplugin.c
and found the autogenerator made a mistake in the naming:
#include "gstmymyplugin.h"
so I removed the extra my to have:
#include "gstmyplugin.h"
Then ./autogen.sh worked without errors!  That was good.
So then I ran make && sudo make install
and watched things fly by.  

But now to the next question - how to I find my plugin name and how do I get
it registered so it works from gst-launch?  I'm going through the guide and
haven't figured this out yet.  Any guidance is greatly appreciated!


--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/2-s-complement-conversion-filter-tp4601954.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list