summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2008-01-21 19:35:58 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2008-01-21 19:35:58 +0000
commita973a4f154d9e17ed6551f3511f6a2bdc38f580f (patch)
tree0e1598d718fe32873217e9cd94a475b0d3cd4b23 /sys
parent612cbd9b47c82f2f18109d915cd38efdc73d7bc9 (diff)
configure.ac: Detect video4linux headers on Solaris too.
Original commit message from CVS: * 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
Diffstat (limited to 'sys')
-rw-r--r--sys/v4l2/gstv4l2colorbalance.h2
-rw-r--r--sys/v4l2/gstv4l2object.h4
-rw-r--r--sys/v4l2/v4l2_calls.c5
-rw-r--r--sys/v4l2/v4l2src_calls.c9
4 files changed, 17 insertions, 3 deletions
diff --git a/sys/v4l2/gstv4l2colorbalance.h b/sys/v4l2/gstv4l2colorbalance.h
index ecd0111d..e2519275 100644
--- a/sys/v4l2/gstv4l2colorbalance.h
+++ b/sys/v4l2/gstv4l2colorbalance.h
@@ -79,7 +79,7 @@ interface_as_function ## _color_balance_set_value (GstColorBalance * balance,
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 \
diff --git a/sys/v4l2/gstv4l2object.h b/sys/v4l2/gstv4l2object.h
index f309bc7d..d08d2743 100644
--- a/sys/v4l2/gstv4l2object.h
+++ b/sys/v4l2/gstv4l2object.h
@@ -37,10 +37,14 @@
* 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>
diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c
index 1d005913..616f659f 100644
--- a/sys/v4l2/v4l2_calls.c
+++ b/sys/v4l2/v4l2_calls.c
@@ -33,6 +33,11 @@
#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"
diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c
index dc6a23b2..4ecedf37 100644
--- a/sys/v4l2/v4l2src_calls.c
+++ b/sys/v4l2/v4l2src_calls.c
@@ -36,6 +36,11 @@
#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"
@@ -98,7 +103,7 @@ gst_v4l2_buffer_finalize (GstV4l2Buffer * buffer)
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);
}
}
@@ -173,7 +178,7 @@ gst_v4l2_buffer_new (GstV4l2BufferPool * pool, guint index, GstCaps * caps)
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);