Files
vimix/DeviceSource.h
brunoherbelin b7d54dfadf Creation of the base class StreamSource. It is intended to become the
base class for all gstreamer pipeline. DeviceSource and PatternSource
inherit from it. A generic stream source class is created for
development tests and hack.
2020-09-22 22:58:37 +02:00

37 lines
557 B
C++

#ifndef DEVICESOURCE_H
#define DEVICESOURCE_H
#include "StreamSource.h"
class Device : public Stream
{
public:
Device();
void open( uint deviceid );
glm::ivec2 resolution();
private:
uint device_;
};
class DeviceSource : public StreamSource
{
public:
DeviceSource();
// Source interface
void accept (Visitor& v) override;
// StreamSource interface
Stream *stream() const override { return stream_; }
// specific interface
Device *device() const;
void setDevice(int id);
};
#endif // DEVICESOURCE_H