diff --git a/src/qtwrapper/videomanager_wrap.cpp b/src/qtwrapper/videomanager_wrap.cpp index aede8dcb3e173323fc774118e98aa2d50145e927..bde73ca2f3d6ad610fc149fbe61d4b47b747e8a7 100644 --- a/src/qtwrapper/videomanager_wrap.cpp +++ b/src/qtwrapper/videomanager_wrap.cpp @@ -55,7 +55,7 @@ VideoManagerInterface::~VideoManagerInterface() } VideoManagerSignalProxy::VideoManagerSignalProxy(VideoManagerInterface* parent) : QObject(parent), -m_pParent(parent), m_pSem(new QSemaphore(3)) +m_pParent(parent) {} void VideoManagerSignalProxy::slotDeviceEvent() @@ -68,21 +68,13 @@ void VideoManagerSignalProxy::slotDeviceEvent() void VideoManagerSignalProxy::slotStartedDecoding(const QString &id, const QString &shmPath, int width, int height, bool isMixer) { QTimer::singleShot(0, [=] { - if(m_pSem->available() == 3) - emit m_pParent->startedDecoding(id,shmPath,width,height,isMixer); - else { - QTimer::singleShot(0, [=] { - slotStartedDecoding(id,shmPath,width,height,isMixer); - }); - } + emit m_pParent->startedDecoding(id,shmPath,width,height,isMixer); }); } void VideoManagerSignalProxy::slotStoppedDecoding(const QString &id, const QString &shmPath, bool isMixer) { - m_pSem->acquire(1); QTimer::singleShot(0, [=] { emit m_pParent->stoppedDecoding(id,shmPath,isMixer); - m_pSem->release(1); }); } diff --git a/src/qtwrapper/videomanager_wrap.h b/src/qtwrapper/videomanager_wrap.h index 1c00aee321150a3e034701a0e65fcd1dae9d70b7..beeb720c26c2addf7bb62b82aac6961e439af2c3 100644 --- a/src/qtwrapper/videomanager_wrap.h +++ b/src/qtwrapper/videomanager_wrap.h @@ -28,7 +28,6 @@ #include <QtCore/QThread> #include <QtCore/QList> #include <QtCore/QMap> -#include <QtCore/QSemaphore> #include <QtCore/QString> #include <QtCore/QStringList> #include <QtCore/QVariant> @@ -41,7 +40,6 @@ #include "conversions_wrap.hpp" class VideoManagerInterface; -class QSemaphore; class VideoManagerSignalProxy : public QObject { @@ -56,7 +54,6 @@ public Q_SLOTS: private: VideoManagerInterface* m_pParent; - QSemaphore* m_pSem; }; class VideoManagerProxySender : public QObject