+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
+
2008-01-21 Stefan Kost <ensonic@users.sf.net>
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
AC_MSG_CHECKING([Checking for uptodate v4l2 installation])
AC_TRY_COMPILE([
#include <sys/types.h>
+#ifdef __sun /* Solaris */
+#include <sys/types.h>
+#include <sys/videodev2.h>
+#else /* Linux */
#include <linux/types.h>
#define _LINUX_TIME_H
#define __user
#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
], [
HAVE_GST_V4L2="no"
AC_MSG_RESULT(no)
- AC_CHECK_HEADER(linux/videodev2.h,
+
+ HAVE_VIDEODEV=no
+ AC_CHECK_HEADER(linux/videodev2.h, [ HAVE_VIDEODEV=yes ],
[
+ AC_CHECK_HEADER(sys/videodev2.h, [ HAVE_VIDEODEV=yes ])
+ ])
+
+ if test "x$HAVE_VIDEODEV" = "xyes"; then
AC_MSG_WARN([video4linux2 headers were found, but they're old.])
AC_MSG_WARN([Please update v4l2 to compile the v4l2 plugins])
- ], [
+ else
AC_MSG_WARN([video4linux2 was not found])
- ])
+ fi
])
if [ test x$HAVE_GST_V4L2 = xyes ]; then
AC_MSG_CHECKING(struct v4l2_buffer declaration)
AC_TRY_COMPILE([
#include <sys/types.h>
+#ifdef __sun /* Solaris */
+#include <sys/types.h>
+#include <sys/videodev2.h>
+#else /* Linux */
#include <linux/types.h>
#define _LINUX_TIME_H
#define __user
#include <linux/videodev2.h>
+#endif
],[
struct v4l2_buffer buf;
buf.index = 0;
gint value) \
{ \
Type *this = (Type*) balance; \
- return gst_v4l2_color_balance_set_value(this->v4l2object, channel, value); \
+ gst_v4l2_color_balance_set_value(this->v4l2object, channel, value); \
} \
\
static gint \
* errors here, check your linux/time.h && sys/time.h header setup.
*/
#include <sys/types.h>
+#ifndef __sun
#include <linux/types.h>
#define _LINUX_TIME_H
#define __user
#include <linux/videodev2.h>
+#else
+#include <sys/videodev2.h>
+#endif
#include <gst/gst.h>
#include <gst/base/gstpushsrc.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
+#ifdef __sun
+/* Needed on older Solaris Nevada builds (72 at least) */
+#include <stropts.h>
+#include <sys/ioccom.h>
+#endif
#include "v4l2_calls.h"
#include "gstv4l2tuner.h"
#include "gstv4l2xoverlay.h"
#include "v4l2src_calls.h"
#include <sys/time.h>
#include <unistd.h>
+#ifdef __sun
+/* Needed on older Solaris Nevada builds (72 at least) */
+#include <stropts.h>
+#include <sys/ioccom.h>
+#endif
#include "gstv4l2tuner.h"
if (!resuscitated) {
GST_LOG ("buffer %p not recovered, unmapping", buffer);
gst_mini_object_unref (GST_MINI_OBJECT (pool));
- munmap (GST_BUFFER_DATA (buffer), buffer->vbuffer.length);
+ munmap ((void *) GST_BUFFER_DATA (buffer), buffer->vbuffer.length);
}
}
GST_LOG (" length: %u", ret->vbuffer.length);
GST_LOG (" input: %u", ret->vbuffer.input);
- data = mmap (0, ret->vbuffer.length,
+ data = (guint8 *) mmap (0, ret->vbuffer.length,
PROT_READ | PROT_WRITE, MAP_SHARED, pool->video_fd,
ret->vbuffer.m.offset);