1 #include "VideoSource_DV2.hh"
48 DV1394FD_ = open(device.c_str(),O_RDONLY);
50 BIASERR(
"Can not open file: "<<device);
51 perror(device.c_str());
115 int ReceiveNFrames = 1;
121 ioctl(
DV1394FD_, DV1394_RECEIVE_FRAMES,ReceiveNFrames);
124 NewBuffers = (
Status_.first_clear_frame+ReceiveNFrames)%
InitData_.n_frames;
125 BIASDOUT_CLEAN(D_DV2,
"First clear buffer: "<<
Status_.first_clear_frame)
126 BIASDOUT_CLEAN(D_DV2,
"N buffers: "<<NewBuffers);
129 gettimeofday(&time,NULL);
130 image.
SetTime(time.tv_sec,time.tv_usec);
146 ioctl(
DV1394FD_,DV1394_START_RECEIVE,NULL);
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.
DV, color model used for digital video cameras such as Mini-DV.
const char * DefaultDevice_
Device name.
BIAS::ImageBase::EColorModel ColorMode_
Color mode used by camera.
int DeviceChannel_
Device channel.
bool CompleteInitialized_
Complete_initialized_ is set when OpenDevice(), UseChannel() etc. are done.
int GrabSingle(BIAS::Camera< unsigned char > &image)
void SetDebugLevel(const long int lv)
virtual int PreGrab()
Do last preparations before grabbing (e.g. start ISO transfer)
int PreGrab()
Do last preparations before grabbing (e.g. start ISO transfer)
void InvalidateUID()
sets the image's uid to invalid
const StorageType * GetImageData() const
overloaded GetImageData() from ImageBase
virtual int PostGrab()
Stop anything started in PreGrab()
void SetTime(unsigned long long int sec, unsigned long long int usec)
Set time and ensure correct format (seconds and useconds after 'sec')
struct dv1394_status Status_