diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-07-30 03:00:10 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-07-30 12:21:51 +0200 |
commit | 3f17e216c9c75c667ab501a59bcb96be62e3afa1 (patch) | |
tree | 7e20d31bae96154abd2b10e43fdfbc4f0d284c77 /src/plugins/directshow | |
parent | 3f12e848168f61f986f2809cd7f8dac75408548f (diff) | |
parent | dbdcc1b099dc25ffb707a2441191463de33c51f3 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I329eeefafed87ff7467d21d5d099cf9897660167
Diffstat (limited to 'src/plugins/directshow')
6 files changed, 21 insertions, 20 deletions
diff --git a/src/plugins/directshow/camera/directshowcameraglobal.h b/src/plugins/directshow/camera/directshowcameraglobal.h index 8df387b4a..917ae2dc7 100644 --- a/src/plugins/directshow/camera/directshowcameraglobal.h +++ b/src/plugins/directshow/camera/directshowcameraglobal.h @@ -65,7 +65,7 @@ extern const CLSID CLSID_VideoInputDeviceCategory; extern const CLSID CLSID_SampleGrabber; extern const CLSID CLSID_CaptureGraphBuilder2; -#define SAFE_RELEASE(x) { if(x) x->Release(); x = NULL; } +#define SAFE_RELEASE(x) { if (x) x->Release(); x = nullptr; } typedef struct IFileSinkFilter *LPFILESINKFILTER; typedef struct IAMCopyCaptureFileProgress *LPAMCOPYCAPTUREFILEPROGRESS; diff --git a/src/plugins/directshow/camera/dscamerasession.cpp b/src/plugins/directshow/camera/dscamerasession.cpp index 27cdd84db..a0c120816 100644 --- a/src/plugins/directshow/camera/dscamerasession.cpp +++ b/src/plugins/directshow/camera/dscamerasession.cpp @@ -59,8 +59,8 @@ QT_BEGIN_NAMESPACE DSCameraSession::DSCameraSession(QObject *parent) : QObject(parent) { - connect(this, SIGNAL(statusChanged(QCamera::Status)), - this, SLOT(updateReadyForCapture())); + connect(this, &DSCameraSession::statusChanged, + this, &DSCameraSession::updateReadyForCapture); m_deviceLostEventTimer.setSingleShot(true); connect(&m_deviceLostEventTimer, &QTimer::timeout, [&]() { @@ -690,7 +690,7 @@ bool DSCameraSession::createFilterGraph() IEnumMoniker* pEnum = nullptr; // Create the filter graph - hr = CoCreateInstance(CLSID_FilterGraph,nullptr,CLSCTX_INPROC, + hr = CoCreateInstance(CLSID_FilterGraph, nullptr, CLSCTX_INPROC, IID_IGraphBuilder, reinterpret_cast<void**>(&m_filterGraph)); if (FAILED(hr)) { errorString = tr("Failed to create filter graph"); diff --git a/src/plugins/directshow/camera/dsimagecapturecontrol.cpp b/src/plugins/directshow/camera/dsimagecapturecontrol.cpp index 2a6a794d5..e4d2eee30 100644 --- a/src/plugins/directshow/camera/dsimagecapturecontrol.cpp +++ b/src/plugins/directshow/camera/dsimagecapturecontrol.cpp @@ -47,16 +47,16 @@ DSImageCaptureControl::DSImageCaptureControl(DSCameraSession *session) : QCameraImageCaptureControl(session) , m_session(session) { - connect(m_session, SIGNAL(imageExposed(int)), - this, SIGNAL(imageExposed(int))); - connect(m_session, SIGNAL(imageCaptured(int,QImage)), - this, SIGNAL(imageCaptured(int,QImage))); - connect(m_session, SIGNAL(imageSaved(int,QString)), - this, SIGNAL(imageSaved(int,QString))); - connect(m_session, SIGNAL(readyForCaptureChanged(bool)), - this, SIGNAL(readyForCaptureChanged(bool))); - connect(m_session, SIGNAL(captureError(int,int,QString)), - this, SIGNAL(error(int,int,QString))); + connect(m_session, &DSCameraSession::imageExposed, + this, &DSImageCaptureControl::imageExposed); + connect(m_session, &DSCameraSession::imageCaptured, + this, &DSImageCaptureControl::imageCaptured); + connect(m_session, &DSCameraSession::imageSaved, + this, &DSImageCaptureControl::imageSaved); + connect(m_session, &DSCameraSession::readyForCaptureChanged, + this, &DSImageCaptureControl::readyForCaptureChanged); + connect(m_session, &DSCameraSession::captureError, + this, &DSImageCaptureControl::error); connect(m_session, &DSCameraSession::imageAvailable, this, &DSImageCaptureControl::imageAvailable); } diff --git a/src/plugins/directshow/common/directshoweventloop.cpp b/src/plugins/directshow/common/directshoweventloop.cpp index a38c26ef4..692c873cf 100644 --- a/src/plugins/directshow/common/directshoweventloop.cpp +++ b/src/plugins/directshow/common/directshoweventloop.cpp @@ -66,8 +66,8 @@ public: DirectShowEventLoop::DirectShowEventLoop(QObject *parent) : QObject(parent) - , m_eventHandle(::CreateEvent(nullptr, 0, 0, nullptr)) - , m_waitHandle(::CreateEvent(nullptr, 0, 0, nullptr)) + , m_eventHandle(::CreateEvent(nullptr, FALSE, FALSE, nullptr)) + , m_waitHandle(::CreateEvent(nullptr, FALSE, FALSE, nullptr)) { } diff --git a/src/plugins/directshow/player/directshowioreader.cpp b/src/plugins/directshow/player/directshowioreader.cpp index b903038ea..ced10ea10 100644 --- a/src/plugins/directshow/player/directshowioreader.cpp +++ b/src/plugins/directshow/player/directshowioreader.cpp @@ -82,7 +82,7 @@ DirectShowIOReader::DirectShowIOReader( { moveToThread(device->thread()); - connect(device, SIGNAL(readyRead()), this, SLOT(readyRead())); + connect(device, &QIODevice::readyRead, this, &DirectShowIOReader::readyRead); } DirectShowIOReader::~DirectShowIOReader() diff --git a/src/plugins/directshow/player/directshowplayerservice.cpp b/src/plugins/directshow/player/directshowplayerservice.cpp index 56a428028..cf0b5f84d 100644 --- a/src/plugins/directshow/player/directshowplayerservice.cpp +++ b/src/plugins/directshow/player/directshowplayerservice.cpp @@ -124,7 +124,7 @@ private: DirectShowPlayerService::DirectShowPlayerService(QObject *parent) : QMediaService(parent) , m_loop(qt_directShowEventLoop()) - , m_taskHandle(::CreateEvent(nullptr, 0, 0, nullptr)) + , m_taskHandle(::CreateEvent(nullptr, FALSE, FALSE, nullptr)) { m_playerControl = new DirectShowPlayerControl(this); m_metaDataControl = new DirectShowMetaDataControl(this); @@ -181,8 +181,8 @@ QMediaControl *DirectShowPlayerService::requestControl(const char *name) if (!m_videoRendererControl && !m_videoWindowControl) { m_videoRendererControl = new DirectShowVideoRendererControl(m_loop); - connect(m_videoRendererControl, SIGNAL(filterChanged()), - this, SLOT(videoOutputChanged())); + connect(m_videoRendererControl, &DirectShowVideoRendererControl::filterChanged, + this, &DirectShowPlayerService::videoOutputChanged); return m_videoRendererControl; } @@ -275,6 +275,7 @@ void DirectShowPlayerService::load(const QMediaContent &media, QIODevice *stream releaseGraph(); m_url = media.request().url(); + m_stream = stream; m_error = QMediaPlayer::NoError; m_errorString = QString(); |