#ifndef V4L2_DEVICEDESCRIPTOR_H_
#define V4L2_DEVICEDESCRIPTOR_H_
#include <string>
#include "DeviceDescriptor.h"
#define DRIVER_IVTV "ivtv"
namespace avcap
{
class CaptureDevice;
class V4L2_Device;
class V4L2_DeviceDescriptor : public DeviceDescriptor
{
private:
std::string mName;
std::string mDriver;
std::string mCard;
std::string mInfo;
std::string mVersionString;
int mVersion;
int mCapabilities;
DEV_HANDLE_T mHandle;
bool mValid;
V4L2_Device* mDevice;
public:
V4L2_DeviceDescriptor(const std::string &name);
virtual ~V4L2_DeviceDescriptor();
virtual CaptureDevice* getDevice();
int open();
int close();
virtual const std::string& getName() const;
inline const std::string& getDriver() const
{ return mDriver; }
inline const std::string& getCard() const
{ return mCard; }
inline const std::string& getInfo() const
{ return mInfo; }
inline int getVersion() const
{ return mVersion; }
const std::string& getVersionString() const;
inline const DEV_HANDLE_T getHandle() const
{ return mHandle; }
bool isAVDev() const;
bool isVideoCaptureDev() const;
bool isVBIDev() const;
bool isTuner() const;
bool isAudioDev() const;
bool isRadioDev() const;
bool isOverlayDev() const;
bool isRWDev () const;
bool isAsyncIODev() const;
bool isStreamingDev() const;
private:
bool queryCapabilities();
};
}
#endif