remove Brindosch's V4L2 stream notifier adaption
avoid compilation 'note' on GCC 6 ARM
This commit is contained in:
Paulchen-Panther 2019-01-22 22:07:58 +01:00
parent 8c4b390e2f
commit 1f132bcfa9
3 changed files with 3 additions and 21 deletions

View File

@ -231,6 +231,9 @@ CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-psabi")
endif()
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)

View File

@ -14,8 +14,6 @@
#include <hyperion/Grabber.h>
#include <grabber/VideoStandard.h>
class QTimer;
/// Capture class for V4L2 devices
///
/// @see http://linuxtv.org/downloads/v4l-dvb-apis/capture-example.html
@ -87,11 +85,6 @@ signals:
private slots:
int read_frame();
///
/// @brief Is called whenever the _readFrameAdaptTimer emits to unlock read_frame() through _readFrame bool
///
void unlockReadFrame() { _readFrame = true; };
private:
void getV4Ldevices();
@ -167,6 +160,4 @@ private:
bool _initialized;
bool _deviceAutoDiscoverEnabled;
QTimer* _readFrameAdaptTimer;
bool _readFrame = false;
};

View File

@ -18,7 +18,6 @@
#include <QDirIterator>
#include <QFileInfo>
#include <QTimer>
#include "grabber/V4L2Grabber.h"
@ -52,12 +51,7 @@ V4L2Grabber::V4L2Grabber(const QString & device
, _streamNotifier(nullptr)
, _initialized(false)
, _deviceAutoDiscoverEnabled(false)
, _readFrameAdaptTimer(new QTimer(this))
{
// setup stream notify locker with 10hz
connect(_readFrameAdaptTimer, &QTimer::timeout, this, &V4L2Grabber::unlockReadFrame);
_readFrameAdaptTimer->setInterval(100);
setPixelDecimation(pixelDecimation);
getV4Ldevices();
@ -77,7 +71,6 @@ void V4L2Grabber::uninit()
{
Debug(_log,"uninit grabber: %s", QSTRING_CSTR(_deviceName));
_readFrameAdaptTimer->stop();
stop();
uninit_device();
close_device();
@ -146,7 +139,6 @@ bool V4L2Grabber::init()
opened = true;
init_device(_videoStandard, _input);
_initialized = true;
_readFrameAdaptTimer->start();
}
}
catch(std::exception& e)
@ -715,10 +707,6 @@ void V4L2Grabber::stop_capturing()
int V4L2Grabber::read_frame()
{
// read_frame() is called with 25Hz, adapt to 10Hz. In the end it's up to the stream notifier if we get calls or not
if(!_readFrame) return -1;
_readFrame = false;
bool rc = false;
try