You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.4 KiB
C
38 lines
1.4 KiB
C
3 years ago
|
/* ---------------------------------------------------------------------------
|
||
|
** This software is in the public domain, furnished "as is", without technical
|
||
|
** support, and with no warranty, express or implied, as to its usefulness for
|
||
|
** any purpose.
|
||
|
**
|
||
|
** DeviceSource.h
|
||
|
**
|
||
|
** live555 source
|
||
|
**
|
||
|
** -------------------------------------------------------------------------*/
|
||
|
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
|
||
|
#include "DeviceInterface.h"
|
||
|
#include "V4l2Capture.h"
|
||
|
|
||
|
// -----------------------------------------
|
||
|
// Video Device Capture Interface
|
||
|
// -----------------------------------------
|
||
|
class VideoCaptureAccess : public DeviceInterface
|
||
|
{
|
||
|
public:
|
||
|
VideoCaptureAccess(V4l2Capture* device) : m_device(device) {}
|
||
|
virtual ~VideoCaptureAccess() { delete m_device; }
|
||
|
|
||
|
virtual size_t read(char* buffer, size_t bufferSize) { return m_device->read(buffer, bufferSize); }
|
||
|
virtual int getFd() { return m_device->getFd(); }
|
||
|
virtual unsigned long getBufferSize() { return m_device->getBufferSize(); }
|
||
|
virtual int getWidth() { return m_device->getWidth(); }
|
||
|
virtual int getHeight() { return m_device->getHeight(); }
|
||
|
virtual int getVideoFormat() { return m_device->getFormat(); }
|
||
|
|
||
|
protected:
|
||
|
V4l2Capture* m_device;
|
||
|
};
|