diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-07-23 10:33:51 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-07-23 10:33:51 +0200 |
commit | 14d6166b2790b37906fd76248d955659ff78622f (patch) | |
tree | f02ec37165b5ae47beb238aa23031e6e2106502f /src/plugins/directshow/player/videosurfacefilter.cpp | |
parent | e99a2e1701179d0d28ef1d1eac696d480894f4bb (diff) | |
parent | 2eb0a98f1de07782004a5a4261cb5d2c46ca6d15 (diff) |
Merge branch 'dev' of git://code.qt.io/qt/qtmultimedia into wip/qt6
Change-Id: I91e8d902cd916ee16a2495da9bf40a34c6bc05d2
Diffstat (limited to 'src/plugins/directshow/player/videosurfacefilter.cpp')
-rw-r--r-- | src/plugins/directshow/player/videosurfacefilter.cpp | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/src/plugins/directshow/player/videosurfacefilter.cpp b/src/plugins/directshow/player/videosurfacefilter.cpp index 74d59231c..8dd18dc1b 100644 --- a/src/plugins/directshow/player/videosurfacefilter.cpp +++ b/src/plugins/directshow/player/videosurfacefilter.cpp @@ -222,20 +222,10 @@ HRESULT VideoSurfaceInputPin::Receive(IMediaSample *pMediaSample) VideoSurfaceFilter::VideoSurfaceFilter(QAbstractVideoSurface *surface, DirectShowEventLoop *loop, QObject *parent) : QObject(parent) , m_loop(loop) - , m_pin(NULL) , m_surface(surface) - , m_bytesPerLine(0) - , m_surfaceStarted(false) , m_renderMutex(QMutex::Recursive) - , m_running(false) - , m_pendingSample(NULL) - , m_pendingSampleEndTime(0) - , m_renderEvent(CreateEvent(NULL, FALSE, FALSE, NULL)) - , m_flushEvent(CreateEvent(NULL, TRUE, FALSE, NULL)) - , m_adviseCookie(0) - , m_EOS(false) - , m_EOSDelivered(false) - , m_EOSTimer(0) + , m_renderEvent(CreateEvent(nullptr, FALSE, FALSE, nullptr)) + , m_flushEvent(CreateEvent(nullptr, TRUE, FALSE, nullptr)) { supportedFormatsChanged(); connect(surface, &QAbstractVideoSurface::supportedFormatsChanged, @@ -616,7 +606,7 @@ void VideoSurfaceFilter::clearPendingSample() if (m_pendingSample) { qCDebug(qLcRenderFilter, "clearPendingSample"); m_pendingSample->Release(); - m_pendingSample = NULL; + m_pendingSample = nullptr; } } @@ -713,11 +703,10 @@ bool VideoSurfaceFilter::startSurface() m_loop->postEvent(this, new QEvent(QEvent::Type(StartSurface))); m_waitSurface.wait(&m_mutex); return m_surfaceStarted; - } else { - m_surfaceStarted = m_surface->start(m_surfaceFormat); - qCDebug(qLcRenderFilter, "startSurface %s", m_surfaceStarted ? "succeeded" : "failed"); - return m_surfaceStarted; } + m_surfaceStarted = m_surface->start(m_surfaceFormat); + qCDebug(qLcRenderFilter, "startSurface %s", m_surfaceStarted ? "succeeded" : "failed"); + return m_surfaceStarted; } void VideoSurfaceFilter::stopSurface() @@ -741,12 +730,11 @@ bool VideoSurfaceFilter::restartSurface() m_loop->postEvent(this, new QEvent(QEvent::Type(RestartSurface))); m_waitSurface.wait(&m_mutex); return m_surfaceStarted; - } else { - m_surface->stop(); - m_surfaceStarted = m_surface->start(m_surfaceFormat); - qCDebug(qLcRenderFilter, "restartSurface %s", m_surfaceStarted ? "succeeded" : "failed"); - return m_surfaceStarted; } + m_surface->stop(); + m_surfaceStarted = m_surface->start(m_surfaceFormat); + qCDebug(qLcRenderFilter, "restartSurface %s", m_surfaceStarted ? "succeeded" : "failed"); + return m_surfaceStarted; } void VideoSurfaceFilter::flushSurface() |