2015-01-24 23:42:22 +01:00
|
|
|
#pragma once
|
|
|
|
|
2016-08-11 07:13:55 +02:00
|
|
|
#include <hyperion/GrabberWrapper.h>
|
2017-08-12 07:55:32 +02:00
|
|
|
#include <grabber/OsxFrameGrabber.h>
|
2015-01-24 23:42:22 +01:00
|
|
|
|
|
|
|
///
|
|
|
|
/// The OsxWrapper uses an instance of the OsxFrameGrabber to obtain ImageRgb's from the
|
|
|
|
/// displayed content. This ImageRgb is processed to a ColorRgb for each led and commmited to the
|
|
|
|
/// attached Hyperion.
|
|
|
|
///
|
2016-08-11 07:13:55 +02:00
|
|
|
class OsxWrapper: public GrabberWrapper
|
2015-01-24 23:42:22 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
/// Constructs the osx frame grabber with a specified grab size and update rate.
|
|
|
|
///
|
|
|
|
/// @param[in] display Index of the display to grab
|
|
|
|
/// @param[in] grabWidth The width of the grabbed image [pixels]
|
|
|
|
/// @param[in] grabHeight The height of the grabbed images [pixels]
|
|
|
|
/// @param[in] updateRate_Hz The image grab rate [Hz]
|
|
|
|
///
|
2018-12-27 23:11:32 +01:00
|
|
|
OsxWrapper(const unsigned display, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
|
2015-01-24 23:42:22 +01:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
///
|
|
|
|
/// Performs a single frame grab and computes the led-colors
|
|
|
|
///
|
2016-08-11 07:13:55 +02:00
|
|
|
virtual void action();
|
2015-01-24 23:42:22 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
/// The actual grabber
|
2017-08-12 07:55:32 +02:00
|
|
|
OsxFrameGrabber _grabber;
|
2015-01-24 23:42:22 +01:00
|
|
|
};
|