mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Added image handler to v4l2 grabber to send colors to Hyperion
Former-commit-id: be6fb4dd8080b3325ba6161f48c093f8a145786d
This commit is contained in:
@@ -73,7 +73,7 @@ private:
|
||||
const int _updateInterval_ms;
|
||||
/// The timeout of the led colors [ms]
|
||||
const int _timeout_ms;
|
||||
/// The priority of the led colors [ms]
|
||||
/// The priority of the led colors
|
||||
const int _priority;
|
||||
|
||||
/// The timer for generating events with the specified update rate
|
||||
|
59
include/grabber/V4L2Wrapper.h
Normal file
59
include/grabber/V4L2Wrapper.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#pragma once
|
||||
|
||||
// Hyperion includes
|
||||
#include <hyperion/Hyperion.h>
|
||||
#include <hyperion/ImageProcessor.h>
|
||||
|
||||
// Grabber includes
|
||||
#include <grabber/V4L2Grabber.h>
|
||||
|
||||
class V4L2Wrapper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
V4L2Wrapper(const std::string & device,
|
||||
int input,
|
||||
VideoStandard videoStandard,
|
||||
int width,
|
||||
int height,
|
||||
int frameDecimation,
|
||||
int pixelDecimation,
|
||||
Hyperion * hyperion,
|
||||
int hyperionPriority);
|
||||
virtual ~V4L2Wrapper();
|
||||
|
||||
public slots:
|
||||
void start();
|
||||
|
||||
void stop();
|
||||
|
||||
void setCropping(int cropLeft,
|
||||
int cropRight,
|
||||
int cropTop,
|
||||
int cropBottom);
|
||||
|
||||
void set3D(VideoMode mode);
|
||||
|
||||
private slots:
|
||||
void newFrame(const Image<ColorRgb> & image);
|
||||
|
||||
private:
|
||||
/// The timeout of the led colors [ms]
|
||||
const int _timeout_ms;
|
||||
|
||||
/// The priority of the led colors
|
||||
const int _priority;
|
||||
|
||||
/// The V4L2 grabber
|
||||
V4L2Grabber _grabber;
|
||||
|
||||
/// The processor for transforming images to led colors
|
||||
ImageProcessor * _processor;
|
||||
|
||||
/// The Hyperion instance
|
||||
Hyperion * _hyperion;
|
||||
|
||||
/// The list with computed led colors
|
||||
std::vector<ColorRgb> _ledColors;
|
||||
};
|
Reference in New Issue
Block a user