mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
v4l2: Fix compilation without libv4l2
This commit is contained in:
parent
2ee90e2b39
commit
5a6fe4ed29
3 changed files with 11 additions and 10 deletions
|
@ -37,6 +37,7 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#define GST_V4L2_MEMORY_TYPE "V4l2Memory"
|
#define GST_V4L2_MEMORY_TYPE "V4l2Memory"
|
||||||
|
|
||||||
|
|
|
@ -1517,7 +1517,7 @@ gst_v4l2_buffer_pool_finalize (GObject * object)
|
||||||
GstV4l2BufferPool *pool = GST_V4L2_BUFFER_POOL (object);
|
GstV4l2BufferPool *pool = GST_V4L2_BUFFER_POOL (object);
|
||||||
|
|
||||||
if (pool->video_fd >= 0)
|
if (pool->video_fd >= 0)
|
||||||
v4l2_close (pool->video_fd);
|
pool->obj->close (pool->video_fd);
|
||||||
|
|
||||||
gst_poll_free (pool->poll);
|
gst_poll_free (pool->poll);
|
||||||
|
|
||||||
|
@ -1581,7 +1581,7 @@ gst_v4l2_buffer_pool_new (GstV4l2Object * obj, GstCaps * caps)
|
||||||
gchar *name, *parent_name;
|
gchar *name, *parent_name;
|
||||||
gint fd;
|
gint fd;
|
||||||
|
|
||||||
fd = v4l2_dup (obj->video_fd);
|
fd = obj->dup (obj->video_fd);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
goto dup_failed;
|
goto dup_failed;
|
||||||
|
|
||||||
|
|
|
@ -187,14 +187,14 @@ struct _GstV4l2Object {
|
||||||
GstV4l2UpdateFpsFunction update_fps_func;
|
GstV4l2UpdateFpsFunction update_fps_func;
|
||||||
|
|
||||||
/* syscalls */
|
/* syscalls */
|
||||||
int (*fd_open) (int fd, int v4l2_flags);
|
gint (*fd_open) (gint fd, gint v4l2_flags);
|
||||||
int (*close) (int fd);
|
gint (*close) (gint fd);
|
||||||
int (*dup) (int fd);
|
gint (*dup) (gint fd);
|
||||||
int (*ioctl) (int fd, unsigned long int request, ...);
|
gint (*ioctl) (gint fd, gulong request, ...);
|
||||||
ssize_t (*read) (int fd, void *buffer, size_t n);
|
gssize (*read) (gint fd, gpointer buffer, gsize n);
|
||||||
void * (*mmap) (void *start, size_t length, int prot, int flags,
|
gpointer (*mmap) (gpointer start, gsize length, gint prot, gint flags,
|
||||||
int fd, int64_t offset);
|
gint fd, gint64 offset);
|
||||||
int (*munmap) (void *_start, size_t length);
|
gint (*munmap) (gpointer _start, gsize length);
|
||||||
|
|
||||||
/* Quirks */
|
/* Quirks */
|
||||||
/* Skips interlacing probes */
|
/* Skips interlacing probes */
|
||||||
|
|
Loading…
Reference in a new issue