After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 510505 - changes to make v4l plugin build on solaris
changes to make v4l plugin build on solaris
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other opensolaris
: Normal normal
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-01-18 22:30 UTC by Brian Cameron
Modified: 2008-01-21 19:37 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
patch fixing problem (1.95 KB, patch)
2008-01-18 22:30 UTC, Brian Cameron
none Details | Review

Description Brian Cameron 2008-01-18 22:30:12 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.
Comment 1 Brian Cameron 2008-01-18 22:30:33 UTC
Created attachment 103170 [details] [review]
patch fixing problem
Comment 2 Brian Cameron 2008-01-18 22:31:12 UTC
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?
Comment 3 Jan Schmidt 2008-01-21 19:37:20 UTC
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