mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
2aa4df92a9
* - grabber auto off when not set as active prio - join aml and fb - on aml platform both grabbers are needed, so they joind in one module and share one prio. user don't the the nasty magic behind - aml: preparation for direct ge2d access * just save it, in the middle of ge2d impl * fix compile issues * now grabbing works basicly * add 3d support for ge2d * next step, we got some video from aml * switch back to rgba * remove unfinished ge2d stuff * commit missing changes * some urgent fixes, needs some beautifying, but it works now * fixes and refctoring
61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <cstdint>
|
|
|
|
#include <utils/ColorRgb.h>
|
|
#include <utils/Image.h>
|
|
#include <utils/VideoMode.h>
|
|
#include <utils/GrabbingMode.h>
|
|
#include <utils/ImageResampler.h>
|
|
#include <utils/Logger.h>
|
|
|
|
|
|
class Grabber : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Grabber(QString grabberName, int width=0, int height=0, int cropLeft=0, int cropRight=0, int cropTop=0, int cropBottom=0);
|
|
virtual ~Grabber();
|
|
|
|
///
|
|
/// Set the video mode (2D/3D)
|
|
/// @param[in] mode The new video mode
|
|
///
|
|
virtual void setVideoMode(VideoMode mode);
|
|
|
|
virtual void setCropping(unsigned cropLeft, unsigned cropRight, unsigned cropTop, unsigned cropBottom);
|
|
|
|
/// gets resulting height of image
|
|
virtual const int getImageWidth() { return _width; };
|
|
|
|
/// gets resulting width of image
|
|
virtual const int getImageHeight() { return _height; };
|
|
|
|
void setEnabled(bool enable);
|
|
|
|
protected:
|
|
ImageResampler _imageResampler;
|
|
|
|
bool _useImageResampler;
|
|
|
|
/// the selected VideoMode
|
|
VideoMode _videoMode;
|
|
|
|
/// With of the captured snapshot [pixels]
|
|
int _width;
|
|
|
|
/// Height of the captured snapshot [pixels]
|
|
int _height;
|
|
|
|
// number of pixels to crop after capturing
|
|
int _cropLeft, _cropRight, _cropTop, _cropBottom;
|
|
|
|
bool _enabled;
|
|
|
|
/// logger instance
|
|
Logger * _log;
|
|
|
|
};
|