00001 #ifndef __xvbt8x8_h
00002 #define __xvbt8x8_h
00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015
00016
00017 #include <sys/types.h>
00018 #include <asm/spinlock.h>
00019 #include <linux/videodev.h>
00020 #include <bttv.h>
00021 #include "Video.h"
00022
00023 #define DEVICE_NAME "/dev/video"
00024 #define BT_DEF_NUMFRAMES 4
00025 #define BT_DEF_INPUT 0
00026 #define BT_DEF_NORM NORM_NTSC
00027
00028 enum{Composite1=1,SVIDEO};
00029
00030 struct STRTAB {
00031 long nr;
00032 char *str;
00033 };
00034
00035 template <class PIXTYPE>
00036 class Bt8x8:public Video<PIXTYPE>
00037 {
00038 int fd;
00039 struct video_capability capability;
00040 struct video_channel *channels;
00041 struct STRTAB *inputs;
00042 struct video_audio audio;
00043 struct video_tuner *tuner;
00044 struct video_picture pict;
00045 struct video_mbuf gb_buffers;
00046 PIXTYPE *mm_buf[MAX_GBUFFERS];
00047 struct video_mmap *frames;
00048 int set_input(int norm,int channel);
00049 public:
00050 Bt8x8(const char *dev_name=DEVICE_NAME,
00051 const char *parm_string=NULL);
00052 virtual ~Bt8x8();
00053
00054 int open(const char *dev_name,const char *parm_string=NULL);
00055 void close(void);
00056 int set_params(char *param_string);
00057 int initiate_acquire(int frame);
00058 int wait_for_completion(int frame);
00059 };
00060
00061 #endif