Commit 7634e456 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Split V4L2 plug-in in multiple files

parent 67622e8d
...@@ -130,7 +130,7 @@ libaccess_shm_plugin_la_LIBADD = $(AM_LIBADD) ...@@ -130,7 +130,7 @@ libaccess_shm_plugin_la_LIBADD = $(AM_LIBADD)
libaccess_shm_plugin_la_DEPENDENCIES = libaccess_shm_plugin_la_DEPENDENCIES =
libvlc_LTLIBRARIES += $(LTLIBaccess_shm) libvlc_LTLIBRARIES += $(LTLIBaccess_shm)
libv4l2_plugin_la_SOURCES = v4l2.c libv4l2_plugin_la_SOURCES = v4l2/video.c v4l2/controls.c
libv4l2_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_v4L2) libv4l2_plugin_la_CFLAGS = $(AM_CFLAGS) $(CFLAGS_v4L2)
libv4l2_plugin_la_LIBADD = $(AM_LIBADD) $(LIBS_v4l2) $(LIBM) libv4l2_plugin_la_LIBADD = $(AM_LIBADD) $(LIBS_v4l2) $(LIBM)
libv4l2_plugin_la_DEPENDENCIES = libv4l2_plugin_la_DEPENDENCIES =
......
This diff is collapsed.
/*****************************************************************************
* v4l2.h : Video4Linux2 input module for vlc
*****************************************************************************
* Copyright (C) 2002-2011 the VideoLAN team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include <vlc_common.h>
#if defined(HAVE_LINUX_VIDEODEV2_H)
# include <linux/videodev2.h>
#elif defined(HAVE_SYS_VIDEOIO_H)
# include <sys/videoio.h>
#else
# error "No Video4Linux2 headers found."
#endif
#ifdef HAVE_LIBV4L2
# include <libv4l2.h>
#else
# define v4l2_close close
# define v4l2_dup dup
# define v4l2_ioctl ioctl
# define v4l2_read read
# define v4l2_mmap mmap
# define v4l2_munmap munmap
#endif
#define CFG_PREFIX "v4l2-"
int ControlList(vlc_object_t *, int fd, bool b_demux);
/* TODO: remove this, use callbacks */
typedef enum {
IO_METHOD_READ=1,
IO_METHOD_MMAP,
IO_METHOD_USERPTR,
} io_method;
/* TODO: move this to .c */
struct demux_sys_t
{
int i_fd;
/* Video */
io_method io;
unsigned i_selected_input;
unsigned i_codec;
struct v4l2_fmtdesc *p_codecs;
struct buffer_t *p_buffers;
unsigned int i_nbuffers;
int i_width;
int i_height;
unsigned int i_aspect;
int i_fourcc;
uint32_t i_block_flags;
es_out_id_t *p_es;
/* Audio */
uint32_t i_audio_input;
/* Tuner */
uint32_t i_tuner;
enum v4l2_tuner_type i_tuner_type;
int i_tuner_audio_mode;
#ifdef HAVE_LIBV4L2
bool b_libv4l2;
#endif
};
...@@ -259,7 +259,8 @@ modules/access/shm.c ...@@ -259,7 +259,8 @@ modules/access/shm.c
modules/access/smb.c modules/access/smb.c
modules/access/tcp.c modules/access/tcp.c
modules/access/udp.c modules/access/udp.c
modules/access/v4l2.c modules/access/v4l2/controls.c
modules/access/v4l2/video.c
modules/access/vcd/cdrom.c modules/access/vcd/cdrom.c
modules/access/vcd/cdrom.h modules/access/vcd/cdrom.h
modules/access/vcd/cdrom_internals.h modules/access/vcd/cdrom_internals.h
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment