mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
rework kodi grabbing mode for all grabbers (#169)
* pull out setgrabbing mode from every grabber into parent class * implement optional kodi check for v4l * fix typo * fix dispmanx build
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include <utils/Image.h>
|
||||
#include <utils/ColorBgr.h>
|
||||
#include <utils/ColorRgb.h>
|
||||
#include <utils/GrabbingMode.h>
|
||||
#include <utils/VideoMode.h>
|
||||
#include <hyperion/GrabberWrapper.h>
|
||||
|
||||
@@ -43,12 +42,6 @@ public slots:
|
||||
///
|
||||
virtual void action();
|
||||
|
||||
///
|
||||
/// Set the grabbing mode
|
||||
/// @param[in] mode The new grabbing mode
|
||||
///
|
||||
void setGrabbingMode(const GrabbingMode mode);
|
||||
|
||||
///
|
||||
/// Set the video mode (2D/3D)
|
||||
/// @param[in] mode The new video mode
|
||||
|
@@ -45,11 +45,8 @@ public slots:
|
||||
void setCropping(const unsigned cropLeft, const unsigned cropRight,
|
||||
const unsigned cropTop, const unsigned cropBottom);
|
||||
|
||||
///
|
||||
/// Set the grabbing mode
|
||||
/// @param[in] mode The new grabbing mode
|
||||
///
|
||||
void setGrabbingMode(const GrabbingMode mode);
|
||||
virtual void kodiPlay();
|
||||
virtual void kodiPause();
|
||||
|
||||
///
|
||||
/// Set the video mode (2D/3D)
|
||||
|
@@ -41,12 +41,6 @@ public slots:
|
||||
///
|
||||
virtual void action();
|
||||
|
||||
///
|
||||
/// Set the grabbing mode
|
||||
/// @param[in] mode The new grabbing mode
|
||||
///
|
||||
void setGrabbingMode(const GrabbingMode mode);
|
||||
|
||||
///
|
||||
/// Set the video mode (2D/3D)
|
||||
/// @param[in] mode The new video mode
|
||||
|
@@ -43,12 +43,6 @@ public slots:
|
||||
///
|
||||
virtual void action();
|
||||
|
||||
///
|
||||
/// Set the grabbing mode
|
||||
/// @param[in] mode The new grabbing mode
|
||||
///
|
||||
void setGrabbingMode(const GrabbingMode mode);
|
||||
|
||||
///
|
||||
/// Set the video mode (2D/3D)
|
||||
/// @param[in] mode The new video mode
|
||||
|
@@ -32,10 +32,7 @@ public slots:
|
||||
|
||||
void stop();
|
||||
|
||||
void setCropping(int cropLeft,
|
||||
int cropRight,
|
||||
int cropTop,
|
||||
int cropBottom);
|
||||
void setCropping(int cropLeft, int cropRight, int cropTop, int cropBottom);
|
||||
|
||||
void set3D(VideoMode mode);
|
||||
|
||||
|
@@ -3,7 +3,6 @@
|
||||
// Utils includes
|
||||
#include <utils/Image.h>
|
||||
#include <utils/ColorRgb.h>
|
||||
#include <utils/GrabbingMode.h>
|
||||
#include <utils/VideoMode.h>
|
||||
#include <hyperion/GrabberWrapper.h>
|
||||
|
||||
@@ -46,12 +45,6 @@ public slots:
|
||||
///
|
||||
virtual void action();
|
||||
|
||||
///
|
||||
/// Set the grabbing mode
|
||||
/// @param[in] mode The new grabbing mode
|
||||
///
|
||||
void setGrabbingMode(const GrabbingMode mode);
|
||||
|
||||
///
|
||||
/// Set the video mode (2D/3D)
|
||||
/// @param[in] mode The new video mode
|
||||
|
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <utils/Logger.h>
|
||||
#include <utils/Components.h>
|
||||
#include <utils/GrabbingMode.h>
|
||||
#include <hyperion/Hyperion.h>
|
||||
|
||||
class ImageProcessor;
|
||||
@@ -18,17 +19,39 @@ public:
|
||||
|
||||
virtual ~GrabberWrapper();
|
||||
|
||||
///
|
||||
/// Starts the grabber wich produces led values with the specified update rate
|
||||
///
|
||||
virtual bool start();
|
||||
|
||||
///
|
||||
/// Stop grabber
|
||||
///
|
||||
virtual void stop();
|
||||
|
||||
public slots:
|
||||
void componentStateChanged(const hyperion::Components component, bool enable);
|
||||
|
||||
///
|
||||
/// virtual method, should perform single frame grab and computes the led-colors
|
||||
///
|
||||
virtual void action() = 0;
|
||||
|
||||
///
|
||||
/// Set the grabbing mode
|
||||
/// @param[in] mode The new grabbing mode
|
||||
///
|
||||
void setGrabbingMode(const GrabbingMode mode);
|
||||
|
||||
signals:
|
||||
void emitImage(int priority, const Image<ColorRgb> & image, const int timeout_ms);
|
||||
|
||||
protected:
|
||||
|
||||
virtual void kodiPlay();
|
||||
virtual void kodiOff();
|
||||
virtual void kodiPause();
|
||||
|
||||
std::string _grabberName;
|
||||
|
||||
/// Pointer to Hyperion for writing led values
|
||||
|
Reference in New Issue
Block a user