#include <dvbuffer.h>
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.
Definition at line 129 of file dvbuffer.h.
Public Member Functions | |
RawDCVideo (int camera_no, int num_dma_buffers, int bright, int exposure, int mode, double frame_rate) | |
ImageRef | size () |
VideoFrame< byte > * | get_frame () |
void | put_frame (VideoFrame< byte > *f) |
bool | frame_pending () |
void | set_shutter (unsigned int s) |
unsigned int | get_shutter () |
void | set_iris (unsigned int i) |
unsigned int | get_iris () |
void | set_sharpness (unsigned int s) |
unsigned int | get_sharpness () |
void | set_gain (unsigned int g) |
unsigned int | get_gain () |
void | set_exposure (unsigned int e) |
unsigned int | get_exposure () |
void | set_brightness (unsigned int b) |
unsigned int | get_brightness () |
void | set_feature_value (unsigned int feature, unsigned int value) |
unsigned int | get_feature_value (unsigned int feature) |
std::pair< unsigned int, unsigned int > | get_feature_min_max (unsigned int feature) |
void | auto_on_off (unsigned int feature, unsigned int auto_value) |
double | frame_rate () |
raw1394handle_t & | handle () |
nodeid_t & | node () |
CVD::DC::RawDCVideo::RawDCVideo | ( | int | camera_no, | |
int | num_dma_buffers, | |||
int | bright, | |||
int | exposure, | |||
int | mode, | |||
double | frame_rate | |||
) |
Construct a video buffer.
camera_no | The camera number (the first camera is 0) | |
num_dma_buffers | The number of DMA buffers to use (at least 3 is recommended) | |
bright | The brightness correction | |
exposure | The exposure correction | |
mode | The required mode | |
frame_rate | The number of frames per second |
ImageRef CVD::DC::RawDCVideo::size | ( | ) |
VideoFrame<byte>* CVD::DC::RawDCVideo::get_frame | ( | ) |
Returns the next frame from the buffer. This function blocks until a frame is ready.
Reimplemented in CVD::DVBuffer2< T >.
void CVD::DC::RawDCVideo::put_frame | ( | VideoFrame< byte > * | f | ) |
Tell the buffer that you are finished with this frame.
f | The frame that you are finished with. |
bool CVD::DC::RawDCVideo::frame_pending | ( | ) |
Is there a frame waiting in the buffer? This function does not block.
Reimplemented in CVD::DVBuffer2< T >.
void CVD::DC::RawDCVideo::set_shutter | ( | unsigned int | s | ) |
Set the camera shutter speed.
s | The requested speed |
unsigned int CVD::DC::RawDCVideo::get_shutter | ( | ) |
Get the camera shutter speed.
void CVD::DC::RawDCVideo::set_iris | ( | unsigned int | i | ) |
Set the camera iris.
i | The requested iris |
unsigned int CVD::DC::RawDCVideo::get_iris | ( | ) |
Get the camera iris.
void CVD::DC::RawDCVideo::set_sharpness | ( | unsigned int | s | ) |
Set the camera sharpness.
s | The requested sharpness |
unsigned int CVD::DC::RawDCVideo::get_sharpness | ( | ) |
Get the camera sharpness.
void CVD::DC::RawDCVideo::set_gain | ( | unsigned int | g | ) |
Set the camera gain.
g | The requested gain |
unsigned int CVD::DC::RawDCVideo::get_gain | ( | ) |
Get the camera gain.
void CVD::DC::RawDCVideo::set_exposure | ( | unsigned int | e | ) |
Set the camera exposure.
e | The requested exposure |
unsigned int CVD::DC::RawDCVideo::get_exposure | ( | ) |
Get the camera exposure.
void CVD::DC::RawDCVideo::set_brightness | ( | unsigned int | b | ) |
Set the camera brightness.
b | The requested brightness |
unsigned int CVD::DC::RawDCVideo::get_brightness | ( | ) |
Get the camera brightness.
void CVD::DC::RawDCVideo::set_feature_value | ( | unsigned int | feature, | |
unsigned int | value | |||
) |
Set any DC1394 camera feature value.
feature | The feature to be set - c.f. dc1394_control.h | |
value | Requested feature value |
unsigned int CVD::DC::RawDCVideo::get_feature_value | ( | unsigned int | feature | ) |
Get any DC1394 camera feature value.
feature | The feature to be queried - c.f. dc1394_control.h |
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.
feature | The feature to be queried - c.f. dc1394_control.h |
void CVD::DC::RawDCVideo::auto_on_off | ( | unsigned int | feature, | |
unsigned int | auto_value | |||
) |
Toggle auto on or off.
feature | The feature to be toggled | |
auto_value | - 0 for auto off, nonzero for auto on |
double CVD::DC::RawDCVideo::frame_rate | ( | ) |
raw1394handle_t& CVD::DC::RawDCVideo::handle | ( | ) |
What is the handle for this device?
nodeid_t& CVD::DC::RawDCVideo::node | ( | ) |
Which node is this device on?