summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2017-07-24 16:45:40 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2017-07-24 16:45:40 -0400
commit5a6fe4ed29737aa9d9c3c18fb35d0058468c5c1d (patch)
treefa127422d727026427f31104d2c0e715d14be388 /sys
parent2ee90e2b39953bfabaae9631376049a688843465 (diff)
v4l2: Fix compilation without libv4l2
Diffstat (limited to 'sys')
-rw-r--r--sys/v4l2/gstv4l2allocator.c1
-rw-r--r--sys/v4l2/gstv4l2bufferpool.c4
-rw-r--r--sys/v4l2/gstv4l2object.h16
3 files changed, 11 insertions, 10 deletions
diff --git a/sys/v4l2/gstv4l2allocator.c b/sys/v4l2/gstv4l2allocator.c
index cb488efd0..24bdc0f9c 100644
--- a/sys/v4l2/gstv4l2allocator.c
+++ b/sys/v4l2/gstv4l2allocator.c
@@ -37,6 +37,7 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/mman.h>
+#include <unistd.h>
#define GST_V4L2_MEMORY_TYPE "V4l2Memory"
diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c
index d51c5c771..cf8c29e07 100644
--- a/sys/v4l2/gstv4l2bufferpool.c
+++ b/sys/v4l2/gstv4l2bufferpool.c
@@ -1517,7 +1517,7 @@ gst_v4l2_buffer_pool_finalize (GObject * object)
GstV4l2BufferPool *pool = GST_V4L2_BUFFER_POOL (object);
if (pool->video_fd >= 0)
- v4l2_close (pool->video_fd);
+ pool->obj->close (pool->video_fd);
gst_poll_free (pool->poll);
@@ -1581,7 +1581,7 @@ gst_v4l2_buffer_pool_new (GstV4l2Object * obj, GstCaps * caps)
gchar *name, *parent_name;
gint fd;
- fd = v4l2_dup (obj->video_fd);
+ fd = obj->dup (obj->video_fd);
if (fd < 0)
goto dup_failed;
diff --git a/sys/v4l2/gstv4l2object.h b/sys/v4l2/gstv4l2object.h
index ed38dbf44..7f46f8d80 100644
--- a/sys/v4l2/gstv4l2object.h
+++ b/sys/v4l2/gstv4l2object.h
@@ -187,14 +187,14 @@ struct _GstV4l2Object {
GstV4l2UpdateFpsFunction update_fps_func;
/* syscalls */
- int (*fd_open) (int fd, int v4l2_flags);
- int (*close) (int fd);
- int (*dup) (int fd);
- int (*ioctl) (int fd, unsigned long int request, ...);
- ssize_t (*read) (int fd, void *buffer, size_t n);
- void * (*mmap) (void *start, size_t length, int prot, int flags,
- int fd, int64_t offset);
- int (*munmap) (void *_start, size_t length);
+ gint (*fd_open) (gint fd, gint v4l2_flags);
+ gint (*close) (gint fd);
+ gint (*dup) (gint fd);
+ gint (*ioctl) (gint fd, gulong request, ...);
+ gssize (*read) (gint fd, gpointer buffer, gsize n);
+ gpointer (*mmap) (gpointer start, gsize length, gint prot, gint flags,
+ gint fd, gint64 offset);
+ gint (*munmap) (gpointer _start, gsize length);
/* Quirks */
/* Skips interlacing probes */