#ifndef V4L1_DEVICEDESCRIPTOR_H_
#define V4L1_DEVICEDESCRIPTOR_H_
#include <iostream>
#include "DeviceDescriptor.h"
namespace avcap
{
class CaptureDevice;
class V4L1_Device;
class V4L1_DeviceDescriptor : public DeviceDescriptor
{
public:
struct bounds {
unsigned int minwidth, minheight, maxwidth, maxheight;
};
private:
std::string mName;
std::string mDriver;
std::string mCard;
std::string mInfo;
std::string mVersionString;
int mVersion;
DEV_HANDLE_T mHandle;
bool mValid;
int mType;
bounds mBounds;
int mAudios;
int mChannels;
bool mIsStreamingDev;
V4L1_Device* mDevice;
public:
V4L1_DeviceDescriptor(const std::string &name);
virtual ~V4L1_DeviceDescriptor();
virtual CaptureDevice* getDevice();
virtual int open();
virtual 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;
inline int getChannels() const
{ return mChannels; }
inline int getAudios() const
{ return mAudios; }
inline bounds& getBounds()
{ return mBounds; }
private:
bool queryCapabilities();
};
};
#endif