GNOME Bugzilla – Bug 510505
changes to make v4l plugin build on solaris
Last modified: 2008-01-21 19:37:20 UTC
The attached patch is needed to make the v4l2 plugin to build on Solaris. Note that the main difference is that the videodev2 header file is in a different location and you need a few more #includes. Also note the change to gstv4l2colorbalance.h file. This is needed because void functions can't return values. Can these changes go upstream. Note to build v4l2 on Solaris, the configure.ac script needs to be hacked since it currently tries to compile code that includes "linux/types.h" and "linux/videodev2.h". On Solaris you do not need to include "linux/types.h" and you include "sys/videodev2.h" instead of "linux/videodev2.h". I'm not sure the best way to hack the configure.ac script to make it work on Solaris. Any ideas? Perhaps it might be easiest to just make it look like this: AG_GST_CHECK_FEATURE(GST_V4L2, [Video 4 Linux 2], v4l2src, [ AC_MSG_CHECKING([Checking for uptodate v4l2 installation]) AC_TRY_COMPILE([ #include <sys/types.h> #ifndef __sun #include <linux/types.h> #endif #define _LINUX_TIME_H #define __user #ifdef __sun #include <sys/videodev2.h> #else #include <linux/videodev2.h> #endif #if defined(V4L2_MAJOR_VERSION) || defined(V4L2_MINOR_VERSION) #error too early v4l2 version or no v4l2 at all #endif What do you think? I can provide a patch to do this, or you can just make the minor change yourself. Note that the check for linux/videodev2.h is done in 3 places in configure.ac.
Created attachment 103170 [details] [review] patch fixing problem
Also, I notice the v4l2 plugin is considered experiemntal. You need to call configure with --enable-experimental to build it. Any information why this plugin is in the good module but still considered experimental?
Fixed in CVS: 2008-01-21 Jan Schmidt <Jan.Schmidt@sun.com> * configure.ac: Detect video4linux headers on Solaris too. * sys/v4l2/gstv4l2colorbalance.h: * sys/v4l2/gstv4l2object.h: * sys/v4l2/v4l2_calls.c: * sys/v4l2/v4l2src_calls.c: (gst_v4l2_buffer_finalize), (gst_v4l2_buffer_new): Make v4l2 build on Solaris. Patch by: Brian Cameron <brian.cameron at sun dot com> Fixes: #510505