implement set videomode via json api (#457)

* implement set videomode via json api

* refactor grabbers:
- new base class
- move shared code to base class

* fix osx

* rework all cmakelist files with auto file collection. except leddevices (need further restructuring)

* store current video and grabbing mode

* add json stuff

* remove grabbingmode - we do not want to expose it
This commit is contained in:
redPanther
2017-08-04 23:08:15 +02:00
committed by GitHub
parent 3612ccda75
commit 569e59110e
54 changed files with 375 additions and 659 deletions

View File

@@ -10,12 +10,9 @@
#include <QRectF>
// util includes
#include <utils/Image.h>
#include <utils/ColorRgb.h>
#include <utils/PixelFormat.h>
#include <utils/VideoMode.h>
#include <utils/ImageResampler.h>
#include <utils/Logger.h>
#include <hyperion/Grabber.h>
// grabber includes
#include <grabber/VideoStandard.h>
@@ -23,7 +20,7 @@
/// Capture class for V4L2 devices
///
/// @see http://linuxtv.org/downloads/v4l-dvb-apis/capture-example.html
class V4L2Grabber : public QObject
class V4L2Grabber : public Grabber
{
Q_OBJECT
@@ -48,8 +45,6 @@ public slots:
int cropTop,
int cropBottom);
void set3D(VideoMode mode);
void setSignalThreshold(
double redSignalThreshold,
double greenSignalThreshold,
@@ -124,18 +119,16 @@ private:
private:
QString _deviceName;
std::map<QString,QString> _v4lDevices;
int _input;
VideoStandard _videoStandard;
io_method _ioMethod;
int _fileDescriptor;
int _input;
VideoStandard _videoStandard;
io_method _ioMethod;
int _fileDescriptor;
std::vector<buffer> _buffers;
PixelFormat _pixelFormat;
int _width;
int _height;
int _lineLength;
int _frameByteSize;
int _frameDecimation;
int _lineLength;
int _frameByteSize;
int _frameDecimation;
// signal detection
int _noSignalCounterThreshold;
@@ -151,11 +144,6 @@ private:
QSocketNotifier * _streamNotifier;
ImageResampler _imageResampler;
Logger * _log;
bool _initialized;
bool _deviceAutoDiscoverEnabled;
};