xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Functions | Variables
input_v4l2.c File Reference
#include <xine/input_plugin.h>
#include <xine/xine_plugin.h>
#include <xine/xine_internal.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <linux/videodev2.h>
#include <sys/mman.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <sys/ioctl.h>

Data Structures

struct  buffer_data
 
struct  resolution_t
 
struct  v4l2_video_t
 
struct  v4l2_radio_t
 
struct  v4l2_input_plugin_t
 

Macros

#define LOG_MODULE   "v4l2"
 
#define v4l2_open(f, d)   open(f,d)
 
#define v4l2_ioctl(f, c, a)   ioctl(f,c,a)
 
#define v4l2_mmap(p, l, d, m, f, o)   mmap(p,l,d,m,f,o)
 
#define v4l2_munmap(s, l)   munmap(s,l)
 
#define v4l2_close(f)   close(f)
 

Functions

static int v4l2_input_enqueue_video_buffer (v4l2_input_plugin_t *this, int idx)
 
static int v4l2_input_dequeue_video_buffer (v4l2_input_plugin_t *this, buf_element_t *input)
 
static int v4l2_input_setup_video_streaming (v4l2_input_plugin_t *this)
 
static int v4l2_input_open (input_plugin_t *this_gen)
 
static buf_element_tv4l2_input_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, off_t len)
 
static uint32_t v4l2_input_blocksize (input_plugin_t *this_gen)
 
static void v4l2_input_dispose (input_plugin_t *this_gen)
 
static off_t v4l2_input_read (input_plugin_t *this_gen, void *buf, off_t nlen)
 
static uint32_t v4l2_input_get_capabilities (input_plugin_t *this_gen)
 
static const char * v4l2_input_get_mrl (input_plugin_t *this_gen)
 
static int v4l2_input_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
 
static off_t v4l2_input_seek (input_plugin_t *this_gen, off_t offset, int origin)
 
static off_t v4l2_input_pos (input_plugin_t *this_gen)
 
static off_t v4l2_input_length (input_plugin_t *this_gen)
 
static input_plugin_tv4l2_class_get_instance (input_class_t *gen_cls, xine_stream_t *stream, const char *mrl)
 
static void * v4l2_init_class (xine_t *xine, const void *data)
 

Variables

const input_info_t input_info_v4l2
 
const plugin_info_t xine_plugin_info[] EXPORTED
 

Macro Definition Documentation

◆ LOG_MODULE

#define LOG_MODULE   "v4l2"

◆ v4l2_close

#define v4l2_close ( f)    close(f)

Referenced by v4l2_input_dispose().

◆ v4l2_ioctl

#define v4l2_ioctl ( f,
c,
a )   ioctl(f,c,a)

◆ v4l2_mmap

#define v4l2_mmap ( p,
l,
d,
m,
f,
o )   mmap(p,l,d,m,f,o)

◆ v4l2_munmap

#define v4l2_munmap ( s,
l )   munmap(s,l)

◆ v4l2_open

#define v4l2_open ( f,
d )   open(f,d)

Referenced by v4l2_input_open().

Function Documentation

◆ v4l2_class_get_instance()

static input_plugin_t * v4l2_class_get_instance ( input_class_t * gen_cls,
xine_stream_t * stream,
const char * mrl )
static

◆ v4l2_init_class()

static void * v4l2_init_class ( xine_t * xine,
const void * data )
static

◆ v4l2_input_blocksize()

static uint32_t v4l2_input_blocksize ( input_plugin_t * this_gen)
static

References lprintf.

Referenced by v4l2_class_get_instance().

◆ v4l2_input_dequeue_video_buffer()

static int v4l2_input_dequeue_video_buffer ( v4l2_input_plugin_t * this,
buf_element_t * input )
static

◆ v4l2_input_dispose()

static void v4l2_input_dispose ( input_plugin_t * this_gen)
static

◆ v4l2_input_enqueue_video_buffer()

static int v4l2_input_enqueue_video_buffer ( v4l2_input_plugin_t * this,
int idx )
static

◆ v4l2_input_get_capabilities()

static uint32_t v4l2_input_get_capabilities ( input_plugin_t * this_gen)
static

References INPUT_CAP_BLOCK.

Referenced by v4l2_class_get_instance().

◆ v4l2_input_get_mrl()

static const char * v4l2_input_get_mrl ( input_plugin_t * this_gen)
static

Referenced by v4l2_class_get_instance().

◆ v4l2_input_get_optional_data()

static int v4l2_input_get_optional_data ( input_plugin_t * this_gen,
void * data,
int data_type )
static

◆ v4l2_input_length()

static off_t v4l2_input_length ( input_plugin_t * this_gen)
static

Referenced by v4l2_class_get_instance().

◆ v4l2_input_open()

static int v4l2_input_open ( input_plugin_t * this_gen)
static

◆ v4l2_input_pos()

static off_t v4l2_input_pos ( input_plugin_t * this_gen)
static

Referenced by v4l2_class_get_instance().

◆ v4l2_input_read()

static off_t v4l2_input_read ( input_plugin_t * this_gen,
void * buf,
off_t nlen )
static

Referenced by v4l2_class_get_instance().

◆ v4l2_input_read_block()

static buf_element_t * v4l2_input_read_block ( input_plugin_t * this_gen,
fifo_buffer_t * fifo,
off_t len )
static

◆ v4l2_input_seek()

static off_t v4l2_input_seek ( input_plugin_t * this_gen,
off_t offset,
int origin )
static

Referenced by v4l2_class_get_instance().

◆ v4l2_input_setup_video_streaming()

static int v4l2_input_setup_video_streaming ( v4l2_input_plugin_t * this)
static

Variable Documentation

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
const input_info_t input_info_v4l2
Definition input_v4l2.c:457
static void * v4l2_init_class(xine_t *xine, const void *data)
Definition input_v4l2.c:441
#define XINE_VERSION_CODE
Definition xine_internal.h:57
NULL
Definition xine_plugin.c:78
#define PLUGIN_NONE
Definition xine_plugin.h:29
#define PLUGIN_INPUT
Definition xine_plugin.h:30

◆ input_info_v4l2

const input_info_t input_info_v4l2
Initial value:
= {
4000
}