mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
base class for all gstreamer pipeline. DeviceSource and PatternSource inherit from it. A generic stream source class is created for development tests and hack.
37 lines
557 B
C++
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
|