/*
** Video 4 Linux 2 input
**
** This file is part of MPlayer, see http://mplayerhq.hu/ for info.
**
** (c) 2003 Martin Olschewski <olschewski@zpr.uni-koeln.de>
** (c) 2003 Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>
**
** File licensed under the GPL, see http://www.fsf.org/ for more info.
**
** Some ideas are based on works from
** Alex Beregszaszi <alex@naxine.org>
** Gerd Knorr <kraxel@bytesex.org>
**
** CODE IS UNDER DEVELOPMENT, NO FEATURE REQUESTS PLEASE!
*/
/*
known issues:
- norm setting isn't consistent with tvi_v4l
- the same for volume/bass/treble/balance
*/
#include "config.h"
#if defined(USE_TV) && defined(HAVE_TV_V4L2)
#include <errno.h>
#include <fcntl.h>
#include <pthread.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#ifdef HAVE_SYS_SYSINFO_H
#include <sys/sysinfo.h>
#endif
#include "videodev2.h"
#include "../mp_msg.h"
#include "../libvo/img_format.h"
#include "../libao2/afmt.h"
#include "tv.h"
#include "audio_in.h"
/* information about this file */
static tvi_info_t info = {
"Video 4 Linux 2 input",
"v4l2",
"Martin Olschewski <olschewski@zpr.uni-koeln.de>",
"first try, more to come ;-)"
};
struct map {
struct v4l2_buffer buf;
void *addr;
size_t len;
};
#define BUFFER_COUNT 6
/* private data */
typedef struct {
/* video */
char *video_dev;
int video_fd;
int mp_format;
struct v4l2_capability capability;
struct v4l2_input input;
struct v4l2_format format;
struct v4l2_standard standard;
struct v4l2_tuner tuner;
struct map *map;
int mapcount;
int frames;
volatile long long f
|