avcap::V4L1_DeviceDescriptor Class Reference

#include <avcap/linux/V4L1_DeviceDescriptor.h>

Inheritance diagram for avcap::V4L1_DeviceDescriptor:

Inheritance graph
[legend]

Detailed Description

This class uniquely identifies a Video4Linux1 capture device.


Public Member Functions

 V4L1_DeviceDescriptor (const std::string &name)
virtual ~V4L1_DeviceDescriptor ()
virtual CaptureDevicegetDevice ()
 Factory-method to create a API-dependent CaptureDevice-object.
virtual int open ()
 Open the underlying device.
virtual int close ()
 Close the underlying device.
virtual const std::string & getName () const
 Returns the unique identifier of the device.
const std::string & getDriver () const
 Returns the name of the driver.
const std::string & getCard () const
 Returns the name of the device.
const std::string & getInfo () const
 Returns a textual description of the device.
int getVersion () const
 Returns the version number of the driver.
const std::string & getVersionString () const
 Returns the version number of the driver as string.
const DEV_HANDLE_T getHandle () const
 Returns the API-specific device handle used to reference the device.
bool isAVDev () const
 Device is an audio/video device. The default implementation returns false.
bool isVideoCaptureDev () const
 Device is capable to capture some data. The default implementation returns false.
bool isVBIDev () const
 Device is a VBI device. The default implementation returns false.
bool isTuner () const
 Device has a tuner. The default implementation returns false.
bool isAudioDev () const
 Device is an audio device. The default implementation returns false.
bool isRadioDev () const
 Device is a radio device. The default implementation returns false.
bool isOverlayDev () const
 Device supports video overlay. The default implementation returns false.
bool isRWDev () const
 Device supports read/write IO-methods (linux specific, see V4L2 API Docu for further details).
bool isAsyncIODev () const
 Device supports asynchroneous IO-methods (linux specific, see V4L2 API Docu for further details).
bool isStreamingDev () const
 Device supports memory mapping IO-methods (linux specific, see V4L2 API Docu for further details).
int getChannels () const
int getAudios () const
boundsgetBounds ()
 Returns a reference to the bounds of the video size.

Data Structures

struct  bounds


Constructor & Destructor Documentation

avcap::V4L1_DeviceDescriptor::V4L1_DeviceDescriptor ( const std::string &  name  ) 

virtual avcap::V4L1_DeviceDescriptor::~V4L1_DeviceDescriptor (  )  [virtual]


Member Function Documentation

virtual CaptureDevice* avcap::V4L1_DeviceDescriptor::getDevice (  )  [virtual]

Factory-method to create a API-dependent CaptureDevice-object.

Applications must not create their own instances of a CaptureDevice but use this method to access the proper API-dependent unique device-object. You can use this object anywhere between successive calls to open() and close(), i.e. it is not valid before open() and not after close(). The ownership of the object remains at the descriptor, so the caller must not delete the object after usage. Only one CaptureDevice-object will be created for each DeviceDescriptor, so multiple calls to getDevice() will always return the same object instance.

Returns:
the CaptureDevice-instance or 0, if not available.

Implements avcap::DeviceDescriptor.

virtual int avcap::V4L1_DeviceDescriptor::open (  )  [virtual]

Open the underlying device.

The CaptureDevice-Object returned by getDevice(), which is actually used to perform capturing is not valid before open() is called.

Returns:
0 success, -1 on failure, e.g. open() has been already called before

Implements avcap::DeviceDescriptor.

virtual int avcap::V4L1_DeviceDescriptor::close (  )  [virtual]

Close the underlying device.

The CaptureDevice-Object returned by getDevice(), which is actually used to perform capturing, is not valid after close() is called.

Returns:
0 success, -1 failure

Implements avcap::DeviceDescriptor.

virtual const std::string& avcap::V4L1_DeviceDescriptor::getName (  )  const [virtual]

Returns the unique identifier of the device.

Returns:
unique identifier of device

Implements avcap::DeviceDescriptor.

const std::string& avcap::V4L1_DeviceDescriptor::getDriver (  )  const [inline, virtual]

Returns the name of the driver.

The default implementation returns an empty string.

Returns:
driver

Reimplemented from avcap::DeviceDescriptor.

const std::string& avcap::V4L1_DeviceDescriptor::getCard (  )  const [inline, virtual]

Returns the name of the device.

The default implementation returns an empty string.

Returns:
name of the card

Reimplemented from avcap::DeviceDescriptor.

const std::string& avcap::V4L1_DeviceDescriptor::getInfo (  )  const [inline, virtual]

Returns a textual description of the device.

The default implementation returns an empty string.

Returns:
name

Reimplemented from avcap::DeviceDescriptor.

int avcap::V4L1_DeviceDescriptor::getVersion (  )  const [inline, virtual]

Returns the version number of the driver.

The default implementation returns 0.

Returns:
version.

Reimplemented from avcap::DeviceDescriptor.

const std::string& avcap::V4L1_DeviceDescriptor::getVersionString (  )  const [virtual]

Returns the version number of the driver as string.

The default implementation returns an empty string.

Returns:
version string.

Reimplemented from avcap::DeviceDescriptor.

const DEV_HANDLE_T avcap::V4L1_DeviceDescriptor::getHandle (  )  const [inline, virtual]

Returns the API-specific device handle used to reference the device.

Returns:
the device handle

Implements avcap::DeviceDescriptor.

bool avcap::V4L1_DeviceDescriptor::isAVDev (  )  const [virtual]

Device is an audio/video device. The default implementation returns false.

Reimplemented from avcap::DeviceDescriptor.

bool avcap::V4L1_DeviceDescriptor::isVideoCaptureDev (  )  const [virtual]

Device is capable to capture some data. The default implementation returns false.

Reimplemented from avcap::DeviceDescriptor.

bool avcap::V4L1_DeviceDescriptor::isVBIDev (  )  const [virtual]

Device is a VBI device. The default implementation returns false.

Reimplemented from avcap::DeviceDescriptor.

bool avcap::V4L1_DeviceDescriptor::isTuner (  )  const [virtual]

Device has a tuner. The default implementation returns false.

Reimplemented from avcap::DeviceDescriptor.

bool avcap::V4L1_DeviceDescriptor::isAudioDev (  )  const [virtual]

Device is an audio device. The default implementation returns false.

Reimplemented from avcap::DeviceDescriptor.

bool avcap::V4L1_DeviceDescriptor::isRadioDev (  )  const [virtual]

Device is a radio device. The default implementation returns false.

Reimplemented from avcap::DeviceDescriptor.

bool avcap::V4L1_DeviceDescriptor::isOverlayDev (  )  const [virtual]

Device supports video overlay. The default implementation returns false.

Reimplemented from avcap::DeviceDescriptor.

bool avcap::V4L1_DeviceDescriptor::isRWDev (  )  const [virtual]

Device supports read/write IO-methods (linux specific, see V4L2 API Docu for further details).

The default implementation returns false.

Reimplemented from avcap::DeviceDescriptor.

bool avcap::V4L1_DeviceDescriptor::isAsyncIODev (  )  const [virtual]

Device supports asynchroneous IO-methods (linux specific, see V4L2 API Docu for further details).

The default implementation returns false.

Reimplemented from avcap::DeviceDescriptor.

bool avcap::V4L1_DeviceDescriptor::isStreamingDev (  )  const [virtual]

Device supports memory mapping IO-methods (linux specific, see V4L2 API Docu for further details).

The default implementation returns false.

Reimplemented from avcap::DeviceDescriptor.

int avcap::V4L1_DeviceDescriptor::getChannels (  )  const [inline]

int avcap::V4L1_DeviceDescriptor::getAudios (  )  const [inline]

bounds& avcap::V4L1_DeviceDescriptor::getBounds (  )  [inline]

Returns a reference to the bounds of the video size.


The documentation for this class was generated from the following file:
Generated on Mon Nov 30 11:10:32 2009 for avcap-0.1 by  doxygen 1.5.1