6 #include <cvd/colourspaces.h> 7 #include <cvd/exceptions.h> 9 #include <cvd/videobuffer.h> 10 #include <libdc1394/dc1394_control.h> 11 #include <libraw1394/raw1394.h> 89 #ifndef DOXYGEN_IGNORE_INTERNAL 93 static const int mode = C::Error__type_not_valid_for_camera___Use_byte_or_yuv411_or_rgb_of_byte;
95 static const double fps;
101 static const int mode = MODE_640x480_YUV411;
102 static const double fps;
108 static const int mode = MODE_640x480_MONO;
109 static const double fps;
115 static const int mode = MODE_640x480_RGB;
116 static const double fps;
141 RawDCVideo(
int camera_no,
int num_dma_buffers,
int bright,
int exposure,
int mode,
double frame_rate);
152 bool frame_pending();
156 void set_shutter(
unsigned int s);
158 unsigned int get_shutter();
162 void set_iris(
unsigned int i);
164 unsigned int get_iris();
168 void set_sharpness(
unsigned int s);
170 unsigned int get_sharpness();
174 void set_gain(
unsigned int g);
176 unsigned int get_gain();
180 void set_exposure(
unsigned int e);
182 unsigned int get_exposure();
186 void set_brightness(
unsigned int b);
188 unsigned int get_brightness();
193 void set_feature_value(
unsigned int feature,
unsigned int value);
197 unsigned int get_feature_value(
unsigned int feature);
201 std::pair<unsigned int, unsigned int> get_feature_min_max(
unsigned int feature);
206 void auto_on_off(
unsigned int feature,
unsigned int auto_value);
212 raw1394handle_t& handle();
219 unsigned char* my_ring_buffer;
224 raw1394handle_t my_handle;
225 nodeid_t* my_camera_nodes;
229 std::vector<int> my_frame_sequence;
231 int my_last_in_sequence;
255 , RawDCVideo(cam_no, num_dma_buffers, bright, exposure, DC::cam_type<T>::mode, fps)
267 return RawDCVideo::frame_rate();
272 return RawDCVideo::size();
277 return reinterpret_cast<VideoFrame<T>*
>(RawDCVideo::get_frame());
287 return RawDCVideo::frame_pending();
Error in a put_frame() call.
Definition: dvbuffer.h:73
virtual bool frame_pending()
Is there a frame waiting in the buffer? This function does not block.
Definition: dvbuffer.h:285
A video buffer from a Firewire (IEEE 1394) camera.
Definition: dvbuffer.h:244
Error doing some later setup action.
Definition: dvbuffer.h:67
Internal (non type-safe) class used by DVBuffer2 to do the actual interfacing with the Firewire (IEE ...
Definition: dvbuffer.h:131
A colour consisting of red, green and blue components.
Definition: rgb.h:25
All classes and functions are within the CVD namespace.
Definition: argb.h:6
A datatype to represent yuv411 (uyyvyy) data, typically from firewire cameras.
Definition: colourspaces.h:176
Bad camera selection.
Definition: dvbuffer.h:47
Base class for objects which provide a typed video stream.
Definition: videobuffer.h:88
virtual void seek_to(double)
Go to a particular point in the video buffer (only implemented in buffers of recorded video) ...
Definition: dvbuffer.h:290
Error opening the device.
Definition: dvbuffer.h:61
Definition: dvbuffer.h:91
The semsntics of the videobuffer. See VideoFrame::type()
Definition: videobuffer.h:12
Error in a get_frame() call.
Definition: dvbuffer.h:79
DVBuffer2(int cam_no, int num_dma_buffers, int bright=-1, int exposure=-1, double fps=DC::cam_type< T >::fps)
Construct a video buffer.
Definition: dvbuffer.h:253
virtual void put_frame(VideoFrame< T > *f)
Tell the buffer that you are finished with this frame.
Definition: dvbuffer.h:280
double frame_rate()
What is the (expected) frame rate of this video buffer, in frames per second?
Definition: dvbuffer.h:265
Base class for all V4L2 exceptions.
Definition: dvbuffer.h:27
Definition: image_ref.h:29
unsigned char byte
An 8-bit datatype.
Definition: byte.h:8
Base class for all VideoBuffer exceptions.
Definition: videobuffer.h:153
Bus reset needed.
Definition: dvbuffer.h:54
virtual VideoFrame< T > * get_frame()
Returns the next frame from the buffer. This function blocks until a frame is ready.
Definition: dvbuffer.h:275
Error with RAW1394 setup.
Definition: dvbuffer.h:33
Definition: dvbuffer.h:119
Error with DC1394 setup.
Definition: dvbuffer.h:40
virtual ImageRef size()
The size of the VideoFrames returned by this buffer.
Definition: dvbuffer.h:270
DVBuffer2< byte > DVBuffer
An 8-bit greyscale video buffer from a Firewire (IEEE 1394) camera.
Definition: dvbuffer.h:296