CVD::DC::RawDCVideo Class Reference

#include <dvbuffer.h>

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

List of all members.

Public Member Functions

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

Private Attributes

nodeid_t * my_camera_nodes
int my_channel
int my_fd
std::vector< int > my_frame_sequence
int my_frame_size
raw1394handle_t my_handle
int my_last_in_sequence
int my_next_frame
nodeid_t my_node
int my_num_buffers
unsigned char * my_ring_buffer
ImageRef my_size
double true_fps

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.

Definition at line 129 of file dvbuffer.h.


Constructor & Destructor Documentation

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_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
CVD::DC::RawDCVideo::~RawDCVideo (  ) 

Member Function Documentation

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

Toggle auto on or off

Parameters:
feature The feature to be toggled
auto_value - 0 for auto off, nonzero for auto on
bool CVD::DC::RawDCVideo::frame_pending (  ) 

Is there a frame waiting in the buffer? This function does not block.

Reimplemented in CVD::DVBuffer2< T >.

double CVD::DC::RawDCVideo::frame_rate (  ) 

Get the camera frame rate.

Reimplemented in CVD::DVBuffer2< T >.

unsigned int CVD::DC::RawDCVideo::get_brightness (  ) 

Get the camera brightness.

unsigned int CVD::DC::RawDCVideo::get_exposure (  ) 

Get the camera exposure.

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:
feature The feature to be queried - c.f. dc1394_control.h
unsigned int CVD::DC::RawDCVideo::get_feature_value ( unsigned int  feature  ) 

Get any DC1394 camera feature value

Parameters:
feature The feature to be queried - c.f. dc1394_control.h
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 >.

unsigned int CVD::DC::RawDCVideo::get_gain (  ) 

Get the camera gain.

unsigned int CVD::DC::RawDCVideo::get_iris (  ) 

Get the camera iris.

unsigned int CVD::DC::RawDCVideo::get_sharpness (  ) 

Get the camera sharpness.

unsigned int CVD::DC::RawDCVideo::get_shutter (  ) 

Get the camera shutter speed.

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?

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

Tell the buffer that you are finished with this frame

Parameters:
f The frame that you are finished with.
void CVD::DC::RawDCVideo::set_brightness ( unsigned int  b  ) 

Set the camera brightness

Parameters:
b The requested brightness
void CVD::DC::RawDCVideo::set_exposure ( unsigned int  e  ) 

Set the camera exposure

Parameters:
e The requested exposure
void CVD::DC::RawDCVideo::set_feature_value ( unsigned int  feature,
unsigned int  value 
)

Set any DC1394 camera feature value

Parameters:
feature The feature to be set - c.f. dc1394_control.h
value Requested feature value
void CVD::DC::RawDCVideo::set_gain ( unsigned int  g  ) 

Set the camera gain

Parameters:
g The requested gain
void CVD::DC::RawDCVideo::set_iris ( unsigned int  i  ) 

Set the camera iris

Parameters:
i The requested iris
void CVD::DC::RawDCVideo::set_sharpness ( unsigned int  s  ) 

Set the camera sharpness

Parameters:
s The requested sharpness
void CVD::DC::RawDCVideo::set_shutter ( unsigned int  s  ) 

Set the camera shutter speed

Parameters:
s The requested speed
ImageRef CVD::DC::RawDCVideo::size (  ) 

The size of the VideoFrames returned by this buffer.

Reimplemented in CVD::DVBuffer2< T >.


Member Data Documentation

Definition at line 226 of file dvbuffer.h.

Definition at line 219 of file dvbuffer.h.

Definition at line 224 of file dvbuffer.h.

std::vector<int> CVD::DC::RawDCVideo::my_frame_sequence [private]

Definition at line 230 of file dvbuffer.h.

Definition at line 221 of file dvbuffer.h.

raw1394handle_t CVD::DC::RawDCVideo::my_handle [private]

Definition at line 225 of file dvbuffer.h.

Definition at line 232 of file dvbuffer.h.

Definition at line 231 of file dvbuffer.h.

nodeid_t CVD::DC::RawDCVideo::my_node [private]

Definition at line 227 of file dvbuffer.h.

Definition at line 222 of file dvbuffer.h.

unsigned char* CVD::DC::RawDCVideo::my_ring_buffer [private]

Definition at line 220 of file dvbuffer.h.

Definition at line 228 of file dvbuffer.h.

Definition at line 233 of file dvbuffer.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


libcvd
Author(s): Edward Rosten, Paul Smith, Tom Drummond, Gerhard Reitmayr, Ethan Eade, Timothy Gan, Chris Kemp, Georg Klein
autogenerated on Fri Jan 11 09:13:54 2013