Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
VideoSource_DV2.hh
1 #ifndef __BIASVIDEOSOURCE_DV2_HH__
2 #define __BIASVIDEOSOURCE_DV2_HH__
3 
4 #include "VideoSource_Base.hh"
5 #include <sys/time.h>
6 #include "/usr/src/linux-2.6.16.13-4/drivers/ieee1394/dv1394.h"
7 
8 
9 
10 namespace BIAS{
11 /**
12  \class VideoSource_DV2
13  \ingroup g_videosource
14  \author evers
15  \brief This class extends VideoSource for the use of IEEE1394-connected DV-camcorders.
16  The low-level driver in DV2 is dv1394.o using DMA transfers.
17  Create device: /dev/dv1394 171 32+i
18 */
19  class VideoSource_DV2 : public VideoSource{
20 
21 
22  public:
25 
26  int OpenDevice();
27  int CloseDevice();
28 
29  int OpenDevice(const std::string &device);
30 
31  int UseChannel(int channel);
32 
34 
35  int PreGrab();
36 
37  int PostGrab();
38 
39 
40 
41  protected:
42  int DV1394FD_;
43 
44  struct dv1394_init InitData_;
45  struct dv1394_status Status_;
46 
47  enum pal_or_ntsc Format_;
48  unsigned int FrameSize_;
49 
50  unsigned char *Buffer_;
51  unsigned int BufferSize_;
52 
53 
54  };
55 
56 } // namespace MIP
57 #endif
Defines a common interface to different devices.
struct dv1394_init InitData_
int UseChannel(int channel)
int PostGrab()
Stop anything started in PreGrab()
int OpenDevice()
selects the first available device to open (e.g.
enum pal_or_ntsc Format_
int GrabSingle(BIAS::Camera< unsigned char > &image)
This class extends VideoSource for the use of IEEE1394-connected DV-camcorders. The low-level driver ...
int PreGrab()
Do last preparations before grabbing (e.g. start ISO transfer)
unsigned char * Buffer_
struct dv1394_status Status_