Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

/home/slang/XVision2/src/Devices/Bt8x8.h

00001 #ifndef __xvbt8x8_h
00002 #define __xvbt8x8_h
00003 /*                                                      -*-c++-*-
00004     Copyright (C) 2000 Gregory D. Hager and Darius Burschka (JHU
00005     Lab for Computational Interaction with Physical Systems (CIPS))
00006 
00007 Permission is granted to any individual or institution to use, copy,
00008 modify, and distribute this software, provided that this complete
00009 copyright and permission notice is maintained, intact, in all copies and
00010 supporting documentation.  Authors of papers that describe software
00011 systems using this software package are asked to acknowledge such use by
00012 a brief statement in the paper.
00013 
00014 We provide this software "as is" without express or implied warranty.
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    // Video_h compatibility functions
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

Generated at Thu Mar 29 22:37:28 2001 for XVision by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000