libcvd
Public Member Functions | List of all members
CVD::DC::RawDCVideo Class Reference

Internal (non type-safe) class used by DVBuffer2 to do the actual interfacing with the Firewire (IEE 1394) video hardware. More...

#include <dvbuffer.h>

Inheritance diagram for CVD::DC::RawDCVideo:
Inheritance graph
[legend]

Public Member Functions

 RawDCVideo (int camera_no, int num_dma_buffers, int bright, int exposure, int mode, double frame_rate)
 Construct a video buffer. More...
 
ImageRef size ()
 The size of the VideoFrames returned by this buffer.
 
VideoFrame< byte > * get_frame ()
 Returns the next frame from the buffer. This function blocks until a frame is ready.
 
void put_frame (VideoFrame< byte > *f)
 Tell the buffer that you are finished with this frame. More...
 
bool frame_pending ()
 Is there a frame waiting in the buffer? This function does not block.
 
void set_shutter (unsigned int s)
 Set the camera shutter speed. More...
 
unsigned int get_shutter ()
 Get the camera shutter speed.
 
void set_iris (unsigned int i)
 Set the camera iris. More...
 
unsigned int get_iris ()
 Get the camera iris.
 
void set_sharpness (unsigned int s)
 Set the camera sharpness. More...
 
unsigned int get_sharpness ()
 Get the camera sharpness.
 
void set_gain (unsigned int g)
 Set the camera gain. More...
 
unsigned int get_gain ()
 Get the camera gain.
 
void set_exposure (unsigned int e)
 Set the camera exposure. More...
 
unsigned int get_exposure ()
 Get the camera exposure.
 
void set_brightness (unsigned int b)
 Set the camera brightness. More...
 
unsigned int get_brightness ()
 Get the camera brightness.
 
void set_feature_value (unsigned int feature, unsigned int value)
 Set any DC1394 camera feature value. More...
 
unsigned int get_feature_value (unsigned int feature)
 Get any DC1394 camera feature value. More...
 
std::pair< unsigned int, unsigned int > get_feature_min_max (unsigned int feature)
 Get the min and max value of any camera feature. More...
 
void auto_on_off (unsigned int feature, unsigned int auto_value)
 Toggle auto on or off. More...
 
double frame_rate ()
 Get the camera frame rate.
 
raw1394handle_t & handle ()
 What is the handle for this device?
 
nodeid_t & node ()
 Which node is this device on?
 

Detailed Description

Internal (non type-safe) class used by DVBuffer2 to do the actual interfacing with the Firewire (IEE 1394) video hardware.

A wrapper for the libdc1394 library, it assumes that the firewire device is on /dev/video1394/0. Use DVBuffer2 if you want 8-bit greyscale or 24-bit colour.

Constructor & Destructor Documentation

◆ RawDCVideo()

CVD::DC::RawDCVideo::RawDCVideo ( int  camera_no,
int  num_dma_buffers,
int  bright,
int  exposure,
int  mode,
double  frame_rate 
)

Construct a video buffer.

Parameters
camera_noThe camera number (the first camera is 0)
num_dma_buffersThe number of DMA buffers to use (at least 3 is recommended)
brightThe brightness correction
exposureThe exposure correction
modeThe required mode
frame_rateThe number of frames per second

Member Function Documentation

◆ auto_on_off()

void CVD::DC::RawDCVideo::auto_on_off ( unsigned int  feature,
unsigned int  auto_value 
)

Toggle auto on or off.

Parameters
featureThe feature to be toggled
auto_value- 0 for auto off, nonzero for auto on

◆ get_feature_min_max()

std::pair< unsigned int, unsigned int > CVD::DC::RawDCVideo::get_feature_min_max ( unsigned int  feature)

Get the min and max value of any camera feature.

Parameters
featureThe feature to be queried - c.f. dc1394_control.h

◆ get_feature_value()

unsigned int CVD::DC::RawDCVideo::get_feature_value ( unsigned int  feature)

Get any DC1394 camera feature value.

Parameters
featureThe feature to be queried - c.f. dc1394_control.h

◆ put_frame()

void CVD::DC::RawDCVideo::put_frame ( VideoFrame< byte > *  f)

Tell the buffer that you are finished with this frame.

Parameters
fThe frame that you are finished with.

◆ set_brightness()

void CVD::DC::RawDCVideo::set_brightness ( unsigned int  b)

Set the camera brightness.

Parameters
bThe requested brightness

◆ set_exposure()

void CVD::DC::RawDCVideo::set_exposure ( unsigned int  e)

Set the camera exposure.

Parameters
eThe requested exposure

◆ set_feature_value()

void CVD::DC::RawDCVideo::set_feature_value ( unsigned int  feature,
unsigned int  value 
)

Set any DC1394 camera feature value.

Parameters
featureThe feature to be set - c.f. dc1394_control.h
valueRequested feature value

◆ set_gain()

void CVD::DC::RawDCVideo::set_gain ( unsigned int  g)

Set the camera gain.

Parameters
gThe requested gain

◆ set_iris()

void CVD::DC::RawDCVideo::set_iris ( unsigned int  i)

Set the camera iris.

Parameters
iThe requested iris

◆ set_sharpness()

void CVD::DC::RawDCVideo::set_sharpness ( unsigned int  s)

Set the camera sharpness.

Parameters
sThe requested sharpness

◆ set_shutter()

void CVD::DC::RawDCVideo::set_shutter ( unsigned int  s)

Set the camera shutter speed.

Parameters
sThe requested speed

The documentation for this class was generated from the following files: