diff --git a/CMakeLists.txt b/CMakeLists.txt index 59bac3fc..6615eee7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/include/grabber/V4L2Grabber.h b/include/grabber/V4L2Grabber.h index b4026131..0d9409a3 100644 --- a/include/grabber/V4L2Grabber.h +++ b/include/grabber/V4L2Grabber.h @@ -14,8 +14,6 @@ #include #include -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; }; diff --git a/libsrc/grabber/v4l2/V4L2Grabber.cpp b/libsrc/grabber/v4l2/V4L2Grabber.cpp index d788e779..dd5b120e 100644 --- a/libsrc/grabber/v4l2/V4L2Grabber.cpp +++ b/libsrc/grabber/v4l2/V4L2Grabber.cpp @@ -18,7 +18,6 @@ #include #include -#include #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