73 lines
1.2 KiB
C++
Executable file
73 lines
1.2 KiB
C++
Executable file
#pragma once
|
|
#include "Device.h"
|
|
|
|
namespace Video
|
|
{
|
|
namespace V4L2
|
|
{
|
|
class Access
|
|
{
|
|
public:
|
|
explicit Access(Device* device);
|
|
virtual ~Access();
|
|
|
|
int getFd()
|
|
{
|
|
return m_device->getFd();
|
|
}
|
|
unsigned int getBufferSize()
|
|
{
|
|
return m_device->getBufferSize();
|
|
}
|
|
unsigned int getFormat()
|
|
{
|
|
return m_device->getFormat();
|
|
}
|
|
unsigned int getWidth()
|
|
{
|
|
return m_device->getWidth();
|
|
}
|
|
unsigned int getHeight()
|
|
{
|
|
return m_device->getHeight();
|
|
}
|
|
const std::string getName()
|
|
{
|
|
return m_device->getName();
|
|
}
|
|
|
|
void queryFormat()
|
|
{
|
|
m_device->queryFormat();
|
|
}
|
|
int setFormat(unsigned int format, unsigned int width, unsigned int height)
|
|
{
|
|
return m_device->setFormat(format, width, height);
|
|
}
|
|
int setFps(int fps)
|
|
{
|
|
return m_device->setFps(fps);
|
|
}
|
|
|
|
int isReady()
|
|
{
|
|
return m_device->isReady();
|
|
}
|
|
int start()
|
|
{
|
|
return m_device->start();
|
|
}
|
|
int stop()
|
|
{
|
|
return m_device->stop();
|
|
}
|
|
|
|
private:
|
|
Access(const Access&);
|
|
Access& operator=(const Access&);
|
|
|
|
protected:
|
|
Device* m_device;
|
|
};
|
|
}
|
|
}
|