整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
73
video/v4l2/Access.h
Executable file
73
video/v4l2/Access.h
Executable file
|
|
@ -0,0 +1,73 @@
|
|||
#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;
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue