mirror of
https://github.com/mpromonet/v4l2rtspserver
synced 2024-11-13 13:10:31 +00:00
38 lines
1.4 KiB
C++
Executable File
38 lines
1.4 KiB
C++
Executable File
/* ---------------------------------------------------------------------------
|
|
** 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;
|
|
};
|