avcap::AVC_DeviceDescriptor Class Reference

#include <avcap/linux/AVC_DeviceDescriptor.h>

Inheritance diagram for avcap::AVC_DeviceDescriptor:

Inheritance graph
[legend]

Detailed Description

This class implements a descriptor for a IEEE 1394 AV/C capture device under linux (e.g. a DV-Camera).


Public Member Functions

 AVC_DeviceDescriptor (const octlet_t guid)
 This constructor uses a numerical global unique identifier to represent a IEEE 1394 capture device (e.g. a firewire DV-Cam).
virtual ~AVC_DeviceDescriptor ()
 The destructor */.
int open ()
 Open the underlying device.
int close ()
 Close the underlying device.
const std::string & getName () const
 Returns the unique identifier of the device. AV/C-devices get the name.
virtual const std::string & getInfo () const
 Returns a textual description of the device.
virtual const std::string & getDriver () const
 Returns the name of the driver.
virtual const std::string & getCard () const
 Returns the name of the device.
const DEV_HANDLE_T getHandle () const
 There is no handle associated with a AV/C-device. So this method always returns -1.
bool isAVDev () const
 Device is an audio/video device. Always returns true.
bool isVideoCaptureDev () const
 Device is capable to capture some data. Always returns true.
octlet_t & getGUID ()
virtual CaptureDevicegetDevice ()
 Factory-method to create a API-dependent CaptureDevice-object.


Constructor & Destructor Documentation

avcap::AVC_DeviceDescriptor::AVC_DeviceDescriptor ( const octlet_t  guid  ) 

This constructor uses a numerical global unique identifier to represent a IEEE 1394 capture device (e.g. a firewire DV-Cam).

Parameters:
guid The unique identifier of device.

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

The destructor */.


Member Function Documentation

int avcap::AVC_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.

int avcap::AVC_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.

const std::string& avcap::AVC_DeviceDescriptor::getName (  )  const [inline, virtual]

Returns the unique identifier of the device. AV/C-devices get the name.

"AV/C_n", where n is the number of the device in the system starting with 1. So the 3rd device found has the name AV/C_3.

Returns:
unique identifier of device

Implements avcap::DeviceDescriptor.

virtual const std::string& avcap::AVC_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.

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

Returns the name of the driver.

The default implementation returns an empty string.

Returns:
driver

Reimplemented from avcap::DeviceDescriptor.

virtual const std::string& avcap::AVC_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 DEV_HANDLE_T avcap::AVC_DeviceDescriptor::getHandle (  )  const [inline, virtual]

There is no handle associated with a AV/C-device. So this method always returns -1.

Implements avcap::DeviceDescriptor.

bool avcap::AVC_DeviceDescriptor::isAVDev (  )  const [inline, virtual]

Device is an audio/video device. Always returns true.

Reimplemented from avcap::DeviceDescriptor.

bool avcap::AVC_DeviceDescriptor::isVideoCaptureDev (  )  const [inline, virtual]

Device is capable to capture some data. Always returns true.

Reimplemented from avcap::DeviceDescriptor.

octlet_t& avcap::AVC_DeviceDescriptor::getGUID (  )  [inline]

virtual CaptureDevice* avcap::AVC_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.


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