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

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

00001 #ifndef __xvdv1394_h
00002 #define __xvdv1394_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 Support for DV avi formats 
00017 It is based on dvgrab from Arnie Schirmacher
00018 */
00019 
00020 #include <sys/types.h>
00021 #include <asm/spinlock.h>
00022 #include <linux/videodev.h>
00023 #include "DVFrame.h"
00024 #include "Video.h"
00025 extern "C"
00026 {
00027 #include <libraw1394/raw1394.h>
00028 #include <libraw1394/csr.h>
00029 #include <libdv/bitstream.h>
00030 #include <libdv/dct.h>
00031 #include <libdv/idct_248.h>
00032 #include <libdv/quant.h>
00033 #include <libdv/weighting.h>
00034 #include <libdv/vlc.h>
00035 #include <libdv/parse.h>
00036 #include <libdv/place.h>
00037 #include <libdv/ycrcb_to_rgb32.h>
00038 }
00039 
00040 
00041 #define DV_DEVICE_NAME   "/dev/raw1394"
00042 #define DV_DEF_NUMFRAMES 4
00043 #define DV_DEF_INPUT     0
00044 #define DV_PORT_SIZE     16
00045 
00046 template <class PIXTYPE>
00047 class DV1394:public Video<PIXTYPE>
00048 {
00049    struct raw1394_portinfo    portinfo[DV_PORT_SIZE];
00050    int                   card;
00051    int                   numcards;
00052    int                   channel;
00053    DVFrame               *frame_ring[DV_DEF_NUMFRAMES];
00054    void                  decode_frame(DVFrame *frame,
00055                                    int dest_image_index);
00056   public:
00057           DV1394(const char *dev_name=DV_DEVICE_NAME,
00058                 const char *parm_string=NULL);
00059    virtual     ~DV1394();
00060    // Video_h compatibility functions
00061    int          open(const char *dev_name);
00062    void        close(void);
00063    int         set_params(char *param_string);
00064    int         initiate_acquire(int frame);
00065    int         wait_for_completion(int frame);
00066 };
00067 
00068 #endif

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