summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2017-02-03 12:38:05 +0100
committerYoann Lopes <yoann.lopes@qt.io>2017-02-06 14:51:56 +0000
commit5e01869d61ded981d5e3e4d955ddbc3c4c6fb201 (patch)
tree23f31396b97fed8042da08b091ca1e5cbf8732d1 /src/plugins
parent1761e088b6f5a6b1c76556f2d3a697fc12abd168 (diff)
downloadqtmultimedia-5e01869d61ded981d5e3e4d955ddbc3c4c6fb201.tar.gz
DirectShow: Fix warnings of MinGW/gcc 5.3v5.9.0-alpha1
helpers\directshowmediatype.h:70:58: note: in expansion of macro 'Q_DECL_NOTHROW' inline const AM_MEDIA_TYPE *const operator &() const Q_DECL_NOTHROW { return &mediaType; } qtbase/src/corelib/global/qcompilerdetection.h:1143:26: warning: type qualifiers ignored on function return type [-Wignored-qualifiers] # define Q_DECL_NOEXCEPT noexcept ^ qtbase/src/corelib/global/qcompilerdetection.h:1153:25: note: in expansion of macro 'Q_DECL_NOEXCEPT' # define Q_DECL_NOTHROW Q_DECL_NOEXCEPT ^ helpers\directshowmediatype.h:71:59: note: in expansion of macro 'Q_DECL_NOTHROW' inline const AM_MEDIA_TYPE *const operator ->() const Q_DECL_NOTHROW { return &mediaType; } ^ camera\dscamerasession.cpp:604:24: warning: unused variable 'cLSID_SampleGrabber' [-Wunused-variable] static const CLSID cLSID_SampleGrabber = { 0xC1F400A0, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } }; camera\dscamerasession.cpp:603:22: warning: unused variable 'iID_ISampleGrabber' [-Wunused-variable] static const IID iID_ISampleGrabber = { 0x6B652FFF, 0x11FE, 0x4fce, { 0x92, 0xAD, 0x02, 0x66, 0xB5, 0xD7, 0xC7, 0x8F } }; ^ helpers\directshowmediatype.cpp: In constructor 'DirectShowMediaType::DirectShowMediaType()': helpers\directshowmediatype.cpp:79:57: warning: missing initializer for member '_AMMediaType::formattype' [-Wmissing-field-initializers] : mediaType({ GUID_NULL, GUID_NULL, TRUE, FALSE, 1 }) helpers\directshowmediatype.cpp:79:57: warning: missing initializer for member '_AMMediaType::pUnk' [-Wmissing-field-initializers] helpers\directshowmediatype.cpp:79:57: warning: missing initializer for member '_AMMediaType::cbFormat' [-Wmissing-field-initializers] helpers\directshowmediatype.cpp:79:57: warning: missing initializer for member '_AMMediaType::pbFormat' [-Wmissing-field-initializers] camera\dscamerasession.cpp:805:111: warning: missing initializer for member '_AMMediaType::pUnk' [-Wmissing-field-initializers] static const AM_MEDIA_TYPE grabberFormat { MEDIATYPE_Video, MEDIASUBTYPE_RGB32, 0, 0, 0, FORMAT_VideoInfo }; camera\dscamerasession.cpp:805:111: warning: missing initializer for member '_AMMediaType::cbFormat' [-Wmissing-field-initializers] camera\dscamerasession.cpp:805:111: warning: missing initializer for member '_AMMediaType::pbFormat' [-Wmissing-field-initializers] camera\dscamerasession.cpp: In member function 'void DSCameraSession::presentFrame()': camera\dscamerasession.cpp:585:52: warning: 'captureId' may be used uninitialized in this function [-Wmaybe-uninitialized] emit imageCaptured(captureId, captureImage); Change-Id: I2870c1489bd375d3d43a31742551dab220015660 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/directshow/camera/dscamerasession.cpp8
-rw-r--r--src/plugins/directshow/helpers/directshowmediatype.cpp2
-rw-r--r--src/plugins/directshow/helpers/directshowmediatype.h4
3 files changed, 5 insertions, 9 deletions
diff --git a/src/plugins/directshow/camera/dscamerasession.cpp b/src/plugins/directshow/camera/dscamerasession.cpp
index 2790ec284..40e54a94d 100644
--- a/src/plugins/directshow/camera/dscamerasession.cpp
+++ b/src/plugins/directshow/camera/dscamerasession.cpp
@@ -551,7 +551,7 @@ void DSCameraSession::presentFrame()
m_presentMutex.unlock();
QImage captureImage;
- int captureId;
+ const int captureId = m_currentImageId;
m_captureMutex.lock();
@@ -568,8 +568,6 @@ void DSCameraSession::presentFrame()
m_capturedFrame.unmap();
- captureId = m_currentImageId;
-
QtConcurrent::run(this, &DSCameraSession::saveCapturedImage,
m_currentImageId, captureImage, m_imageCaptureFileName);
@@ -600,8 +598,6 @@ void DSCameraSession::saveCapturedImage(int id, const QImage &image, const QStri
bool DSCameraSession::createFilterGraph()
{
// Previously containered in <qedit.h>.
- static const IID iID_ISampleGrabber = { 0x6B652FFF, 0x11FE, 0x4fce, { 0x92, 0xAD, 0x02, 0x66, 0xB5, 0xD7, 0xC7, 0x8F } };
- static const CLSID cLSID_SampleGrabber = { 0xC1F400A0, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
static const CLSID cLSID_NullRenderer = { 0xC1F400A4, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
HRESULT hr;
@@ -802,7 +798,7 @@ bool DSCameraSession::configurePreviewFormat()
}
// Set sample grabber format (always RGB32)
- static const AM_MEDIA_TYPE grabberFormat { MEDIATYPE_Video, MEDIASUBTYPE_RGB32, 0, 0, 0, FORMAT_VideoInfo };
+ static const AM_MEDIA_TYPE grabberFormat { MEDIATYPE_Video, MEDIASUBTYPE_RGB32, 0, 0, 0, FORMAT_VideoInfo, nullptr, 0, nullptr};
if (!m_previewSampleGrabber->setMediaType(&grabberFormat))
return false;
diff --git a/src/plugins/directshow/helpers/directshowmediatype.cpp b/src/plugins/directshow/helpers/directshowmediatype.cpp
index 586b6bd80..d9ddf8248 100644
--- a/src/plugins/directshow/helpers/directshowmediatype.cpp
+++ b/src/plugins/directshow/helpers/directshowmediatype.cpp
@@ -76,7 +76,7 @@ bool DirectShowMediaType::isPartiallySpecified(const AM_MEDIA_TYPE *mediaType)
}
DirectShowMediaType::DirectShowMediaType()
- : mediaType({ GUID_NULL, GUID_NULL, TRUE, FALSE, 1 })
+ : mediaType({ GUID_NULL, GUID_NULL, TRUE, FALSE, 1, GUID_NULL, nullptr, 0, nullptr})
{
}
diff --git a/src/plugins/directshow/helpers/directshowmediatype.h b/src/plugins/directshow/helpers/directshowmediatype.h
index b9aa989f0..7849ca9b0 100644
--- a/src/plugins/directshow/helpers/directshowmediatype.h
+++ b/src/plugins/directshow/helpers/directshowmediatype.h
@@ -67,8 +67,8 @@ public:
inline AM_MEDIA_TYPE *operator &() Q_DECL_NOTHROW { return &mediaType; }
inline AM_MEDIA_TYPE *operator ->() Q_DECL_NOTHROW { return &mediaType; }
- inline const AM_MEDIA_TYPE *const operator &() const Q_DECL_NOTHROW { return &mediaType; }
- inline const AM_MEDIA_TYPE *const operator ->() const Q_DECL_NOTHROW { return &mediaType; }
+ inline const AM_MEDIA_TYPE *operator &() const Q_DECL_NOTHROW { return &mediaType; }
+ inline const AM_MEDIA_TYPE *operator ->() const Q_DECL_NOTHROW { return &mediaType; }
static void init(AM_MEDIA_TYPE *type);
static void copy(AM_MEDIA_TYPE *target, const AM_MEDIA_TYPE *source);