#include <LIN_DVCam.hpp>
Inherits kn::CameraController.

Public Member Functions | |
| DVCam (void) | |
| Default constructor for a DVCam. | |
| ~DVCam (void) | |
| Destructor. | |
| void | openDevice (const DVCamParams ¶ms) |
| open a DV device according to a port number | |
| void | openDevice (void) |
| Activates the camera. | |
| void | closeDevice (void) |
| close a DV device | |
| void | start (void) |
| Start DV capture. | |
| void | stop () |
| Stop DV capture. | |
| unsigned char * | getImage (void) |
| Returns a pointer on the last image captured. | |
| size_t | width (void) const |
| Returns width of the images captured by the camera. | |
| size_t | height (void) const |
| Returns height of the images captured by the camera. | |
| bool | isStarted (void) const |
| Returns if camera have been started. | |
| bool | isOpen (void) const |
| Returns if the device have been opened. | |
Typical DV resolution is 720x576.
This class manages only video not sound
libiec61883 is used for firewire communication and libdv to decode a dv frame.
The DVcam manager uses a buffer of size 4 to store the grabbed images. This means that each fourth capture images will be replaced.
Special recommandations : If your program reports an error caused by the firewire port then you will have to check if files in /dev/dv1394/ and file /dev/raw1394 have permission level for everyone. Otherwise you will have to do :
The class have been tested with :
Definition at line 99 of file LIN_DVCam.hpp.
| kn::DVCam::DVCam | ( | void | ) | [inline] |
| kn::DVCam::~DVCam | ( | void | ) | [inline] |
| void kn::DVCam::closeDevice | ( | void | ) | [virtual] |
close a DV device
If the device hasn't be openened then nothing happened. The function stops the DV capture.
Implements kn::CameraController.
Definition at line 119 of file LIN_DVCam.cpp.
| unsigned char * kn::DVCam::getImage | ( | void | ) | [virtual] |
Returns a pointer on the last image captured.
Since it returns a pointer, this means that the dvcam manager can change the data without warnings. So if you want to use these data during a long time, tou will have to make a copy.
! Don't try to delete the returned pointer
It starts capture if necessary.
Implements kn::CameraController.
Definition at line 163 of file LIN_DVCam.cpp.
| size_t kn::DVCam::height | ( | void | ) | const [inline, virtual] |
Returns height of the images captured by the camera.
Should be 576.
Implements kn::CameraController.
Definition at line 314 of file LIN_DVCam.hpp.
| bool kn::DVCam::isOpen | ( | void | ) | const [inline] |
Returns if the device have been opened.
Definition at line 330 of file LIN_DVCam.hpp.
| bool kn::DVCam::isStarted | ( | void | ) | const [inline] |
Returns if camera have been started.
Definition at line 322 of file LIN_DVCam.hpp.
| void kn::DVCam::openDevice | ( | void | ) | [inline, virtual] |
Activates the camera.
Implements kn::CameraController.
Definition at line 249 of file LIN_DVCam.hpp.
| void kn::DVCam::openDevice | ( | const DVCamParams & | params | ) |
open a DV device according to a port number
Port for the first DVcam should be 0, then 1 for the second one, etc...
| params | DVCam parameters |
Definition at line 85 of file LIN_DVCam.cpp.
| void kn::DVCam::start | ( | void | ) | [virtual] |
Start DV capture.
Images grabbing starts until a call to stop or closeDevice methods.
Implements kn::CameraController.
Definition at line 132 of file LIN_DVCam.cpp.
| void kn::DVCam::stop | ( | void | ) | [virtual] |
Stop DV capture.
Images grabbing is stopped for the moment.
Implements kn::CameraController.
Definition at line 150 of file LIN_DVCam.cpp.
| size_t kn::DVCam::width | ( | void | ) | const [inline, virtual] |
Returns width of the images captured by the camera.
Should be 720.
Implements kn::CameraController.
Definition at line 304 of file LIN_DVCam.hpp.
1.5.8