kn::DVCam Class Reference

Class for DV cameras managing. More...

#include <LIN_DVCam.hpp>

Inherits kn::CameraController.

Collaboration diagram for kn::DVCam:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 DVCam (void)
 Default constructor for a DVCam.
 ~DVCam (void)
 Destructor.
void openDevice (const DVCamParams &params)
 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.


Detailed Description

Class for DV cameras managing.

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 :

Author:
Frankoi

Definition at line 99 of file LIN_DVCam.hpp.


Constructor & Destructor Documentation

kn::DVCam::DVCam ( void   )  [inline]

Default constructor for a DVCam.

Author:
Frankoi

Definition at line 201 of file LIN_DVCam.hpp.

kn::DVCam::~DVCam ( void   )  [inline]

Destructor.

The destructor also closes the device

Author:
Frankoi

Definition at line 224 of file LIN_DVCam.hpp.


Member Function Documentation

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.

See also:
openDevice
Author:
Frankoi

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.

Returns:
pointer to an array of RGB24 data
Author:
Frankoi

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.

Returns:
height
Author:
Frankoi

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.

Returns:
true if the device is opened
Author:
Frankoi

Definition at line 330 of file LIN_DVCam.hpp.

bool kn::DVCam::isStarted ( void   )  const [inline]

Returns if camera have been started.

Returns:
true if the camera has the start flag
Author:
Frankoi

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...

Parameters:
params DVCam parameters
See also:
closeDevice
Author:
Frankoi

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.

See also:
stop
Author:
Frankoi

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.

See also:
start
Author:
Frankoi

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.

Returns:
width
Author:
Frankoi

Implements kn::CameraController.

Definition at line 304 of file LIN_DVCam.hpp.


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

Generated on Thu Nov 12 16:06:36 2009 for OpenKraken-controller by  doxygen 1.5.8