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

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

00001 #ifndef __xvdig1394_h
00002 #define __xvdig1394_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 <video1394.h>
00019 #include <libraw1394/raw1394.h>
00020 #include "dc1394_control.h"
00021 #include "Video.h"
00022 #include "Dig1394.h"
00023 
00024 #define DC_DEVICE_NAME   "/dev/video1394"
00025 #define DIG_DEF_NUMFRAMES 4
00026 #define DIG_DEF_INPUT     0
00027 
00028 template <class PIXTYPE>
00029 class Dig1394:public Video<PIXTYPE>
00030 {
00031    int               fd;
00032    int               raw_fd;
00033    int               node_id;
00034    int               scale;
00035    int               raw_rgb;
00036    raw1394handle_t   handle;
00037    struct video1394_mmap v_mmap;
00038    unsigned char     *mm_buf[DIG_DEF_NUMFRAMES];
00039    const char                  *device_name;
00040    dc1394_cameracapture camera;
00041    nodeid_t * camera_nodes;
00042    int         yuv422torgb (unsigned char *YUV, XVImageRGB<PIXTYPE> &targ,
00043                                    int NumPixels);
00044    int         rawtorgb (unsigned char *YUV, XVImageRGB<PIXTYPE> &targ,
00045                                    int NumPixels);
00046   public:
00047           Dig1394(const char *dev_name=DC_DEVICE_NAME,
00048                 const char *parm_string=NULL);
00049    virtual     ~Dig1394();
00050    // Video_h compatibility functions
00051    int          open(const char *dev_name);
00052    void        close(void);
00053    int         set_params(char *param_string);
00054    int         initiate_acquire(int frame);
00055    int         wait_for_completion(int frame);
00056 };
00057 
00058 #endif

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