From 471d8fd0826c09bbff3b19e477fadad4f5b55ed0 Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Wed, 31 Oct 2018 11:13:14 +0200 Subject: Add changes file for Qt 5.12.0 Change-Id: Ic3bc5e5bc49ebc034eef8d6b6edc78a2e33c8bca Reviewed-by: Christian Stromme --- dist/changes-5.12.0 | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 dist/changes-5.12.0 diff --git a/dist/changes-5.12.0 b/dist/changes-5.12.0 new file mode 100644 index 000000000..e775f1940 --- /dev/null +++ b/dist/changes-5.12.0 @@ -0,0 +1,59 @@ +Qt 5.12 introduces many new features and improvements as well as bugfixes +over the 5.11.x series. For more details, refer to the online documentation +included in this distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + - This release contains only minor code improvements. + +**************************************************************************** +* Qt 5.12.0 Changes * +**************************************************************************** + + - [QTBUG-52114] Interpreted ARGB32 as premultiplied for GraphicsVideoItem. + + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + +Gstreamer +--------- + + - [QTBUG-39327] Added an ability to pass custom pipeline and video sink. + Also registered "qtvideosink" gstreamer element to be used in pipelines. + - [QTBUG-69402] Emitted stateChanged(StoppedState) when recording is finished. + +WindowsAudio +------------ + + - [QTBUG-63492] Fixed crackling at the end of playback. + - [QTBUG-45174] Introduced QT_WAVE_BUFFERS env var to define numbers of buffers. + +DirectShow +---------- + + - [QTBUG-32743] Implemented image capture settings. + - [QTBUG-53019] Added option to allow building without evr support. + The environment variable QT_DIRECTHSOW_NO_EVR can now be used to disable EVR at runtime. + +Android +------- + + - [QTBUG-61115] Implemented QMediaPlayer::setPlaybackRate(). + +IMX +--- + + - [QTBUG-50927] Copied data and uploaded back if mapping has not succeeded. -- cgit v1.2.1 From 6966a09c9a6a2c134a739446cc582e47d0c6ed6d Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Fri, 16 Nov 2018 09:22:25 +0200 Subject: Add changes file for Qt 5.11.3 + f844a2acbb7ecc4d7b1776d1d6eeb8feab7044f1 Add OpenGL core profile support to QtMultimediaQuickTools + c5400d31a40847e2905b11759090400653624a94 Fix Gstreamer plugin to pass tst_QMediaPlayerBackend + 2c5efb49495e31afa399a1c1ea003a9b630ba113 Pulse: Fix crash when stop() is called while reading buffers + 32708d53946da77b6137fa04b1849b27e84f2d0f Fix video window parenting and positioning + e8a82901e2456bd6112cb1298b795f202b80a36d Android: Fix crash when play() is called but state is not set + 6ed348b476938c9401f1f9bb751f3a0f2f4ac310 EVR: Fix crash when video source is changed and ANGLE is used + 6b0bbfadf483c5eaca90a4737399fa98ef0d9347 Retrieve some information from the track metadata if available + 78a57c2e335ba3eb5324275b7a33b4a244488f57 EVR: Fix crash when no resources created + ab9f3f089c6f9537ae316697ee151ad63c6618fd DirectShow: Fix crash when camera destroyed + fc33195f87d7b2b036f1df625a8fda12557e05e4 Use the setDataSource(String) overload for non assets/file paths + d9bf568551c9e101374ba842e831650d34d0d41e Bump version Change-Id: I449d7953a02ae491688ceecd2862668f6b1609bf Reviewed-by: Christian Stromme --- dist/changes-5.11.3 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 dist/changes-5.11.3 diff --git a/dist/changes-5.11.3 b/dist/changes-5.11.3 new file mode 100644 index 000000000..39f8d6028 --- /dev/null +++ b/dist/changes-5.11.3 @@ -0,0 +1,58 @@ +Qt 5.11.3 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.11.0 through 5.11.2. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.11 series is binary compatible with the 5.10.x series. +Applications compiled for 5.10 will continue to run with 5.11. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + + - This release contains only minor code improvements. + +**************************************************************************** +* Qt 5.11.3 Changes * +**************************************************************************** + + - [QTBUG-51064] Added OpenGL core profile support to QtMultimediaQuickTools. + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + +Android +------- + + - [QTBUG-50539] Fixed setting http/rtsp url on the media player. + - [QTBUG-70653] Fixed crash when play() is called prior to a state being set. + +DirectShow +---------- + + - [QTBUG-70932] Fixed crash when the camera got destroyed.. + - [QTBUG-70672] Fixed crash when no resources could be created. + +QNX +--- + + - Retrieved some information from the track metadata if available. + - Fixed video window parenting and positioning. + +PulseAudio +---------- + + - [QTBUG-69734] Fixed crash when stop() is called while reading buffers. + +Gstreamer +--------- + + - [QTBUG-63517] Fixed tst_QMediaPlayerBackend to make it pass. -- cgit v1.2.1 From c459810caf72be43275e983b01cf97556ad55562 Mon Sep 17 00:00:00 2001 From: Val Doroshchuk Date: Mon, 19 Nov 2018 10:11:51 +0100 Subject: DirectShow: Display windows error string when camera fails Additionally to custom error messages it needs to show standard ones with error codes. Task-number: QTBUG-71851 Change-Id: I6504ec2417b0f686ab4e1a6902c4f00eeefcbbf2 Reviewed-by: Friedemann Kleint Reviewed-by: Andy Shaw --- src/plugins/directshow/camera/dscamerasession.cpp | 9 +++++---- src/plugins/directshow/camera/dscamerasession.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/plugins/directshow/camera/dscamerasession.cpp b/src/plugins/directshow/camera/dscamerasession.cpp index 8d0c72057..43cc9dbd1 100644 --- a/src/plugins/directshow/camera/dscamerasession.cpp +++ b/src/plugins/directshow/camera/dscamerasession.cpp @@ -502,7 +502,7 @@ failed: if (m_surface && m_surface->isActive()) m_surface->stop(); disconnectGraph(); - setError(QCamera::CameraError, errorString); + setError(QCamera::CameraError, errorString, hr); return false; } @@ -541,12 +541,13 @@ bool DSCameraSession::stopPreview() return true; failed: - setError(QCamera::CameraError, errorString); + setError(QCamera::CameraError, errorString, hr); return false; } -void DSCameraSession::setError(int error, const QString &errorString) +void DSCameraSession::setError(int error, const QString &errorString, HRESULT hr) { + qErrnoWarning(hr, "[0x%x] %s", hr, qPrintable(errorString)); emit cameraError(error, errorString); setStatus(QCamera::UnloadedStatus); } @@ -839,7 +840,7 @@ failed: SAFE_RELEASE(m_nullRendererFilter); SAFE_RELEASE(m_filterGraph); SAFE_RELEASE(m_graphBuilder); - setError(QCamera::CameraError, errorString); + setError(QCamera::CameraError, errorString, hr); return false; } diff --git a/src/plugins/directshow/camera/dscamerasession.h b/src/plugins/directshow/camera/dscamerasession.h index 361a0220e..91bd53766 100644 --- a/src/plugins/directshow/camera/dscamerasession.h +++ b/src/plugins/directshow/camera/dscamerasession.h @@ -173,7 +173,7 @@ private: void updateSourceCapabilities(); bool configurePreviewFormat(); void updateImageProcessingParametersInfos(); - void setError(int error, const QString &errorString); + void setError(int error, const QString &errorString, HRESULT hr); // These static functions are used for scaling of adjustable parameters, // which have the ranges from -1.0 to +1.0 in the QCameraImageProcessing API. -- cgit v1.2.1 From 9fb8dd4e76700da8d321a8677e44e771a0213a7e Mon Sep 17 00:00:00 2001 From: Ihor Dutchak Date: Sat, 16 Jun 2018 14:30:32 +0300 Subject: DirectShow: use supported pixel formats for QCamera video surface [ChangeLog][DirectShow] Do not convert QCamera video frames to RGB32 if provided QAbstractVideoSurface supports frame pixel format, requested by QCameraViewfinderSettings. Task-number: QTBUG-68768 Change-Id: I78d0aaf6c22c4bfee2b17f78a3709d7ba9a8b4fa Reviewed-by: VaL Doroshchuk --- src/plugins/directshow/camera/dscamerasession.cpp | 53 ++++++++++++----------- src/plugins/directshow/camera/dscamerasession.h | 1 + 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/src/plugins/directshow/camera/dscamerasession.cpp b/src/plugins/directshow/camera/dscamerasession.cpp index 43cc9dbd1..73c97c824 100644 --- a/src/plugins/directshow/camera/dscamerasession.cpp +++ b/src/plugins/directshow/camera/dscamerasession.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include "dscamerasession.h" #include "dsvideorenderer.h" @@ -67,6 +68,7 @@ DSCameraSession::DSCameraSession(QObject *parent) , m_previewStarted(false) , m_surface(nullptr) , m_previewPixelFormat(QVideoFrame::Format_Invalid) + , m_stride(-1) , m_readyForCapture(false) , m_imageIdCounter(0) , m_currentImageId(-1) @@ -613,12 +615,9 @@ void DSCameraSession::onFrameAvailable(double time, const QByteArray &data) // the device might be potentially unplugged. m_deviceLostEventTimer.start(100); - // (We should be getting only RGB32 data) - int stride = m_previewSize.width() * 4; - // In case the source produces frames faster than we can display them, // only keep the most recent one - m_currentFrame = QVideoFrame(new QMemoryVideoBuffer(data, stride), + m_currentFrame = QVideoFrame(new QMemoryVideoBuffer(data, m_stride), m_previewSize, m_previewPixelFormat); @@ -657,17 +656,11 @@ void DSCameraSession::presentFrame() m_captureMutex.lock(); if (m_capturedFrame.isValid()) { - Q_ASSERT(m_previewPixelFormat == QVideoFrame::Format_RGB32); - - m_capturedFrame.map(QAbstractVideoBuffer::ReadOnly); - captureImage = QImage(m_capturedFrame.bits(), - m_previewSize.width(), m_previewSize.height(), - QImage::Format_RGB32); + captureImage = qt_imageFromVideoFrame(m_capturedFrame); - captureImage = captureImage.mirrored(m_needsHorizontalMirroring); // also causes a deep copy of the data - - m_capturedFrame.unmap(); + const bool needsVerticalMirroring = m_previewSurfaceFormat.scanLineDirection() != QVideoSurfaceFormat::TopToBottom; + captureImage = captureImage.mirrored(m_needsHorizontalMirroring, needsVerticalMirroring); // also causes a deep copy of the data QtConcurrent::run(this, &DSCameraSession::processCapturedImage, m_currentImageId, m_captureDestinations, captureImage, m_imageCaptureFileName); @@ -878,22 +871,34 @@ bool DSCameraSession::configurePreviewFormat() VIDEOINFOHEADER *videoInfo = reinterpret_cast(m_sourceFormat->pbFormat); videoInfo->AvgTimePerFrame = 10000000 / resolvedViewfinderSettings.maximumFrameRate(); - // We only support RGB32, if the capture source doesn't support - // that format, the graph builder will automatically insert a - // converter. + m_previewPixelFormat = resolvedViewfinderSettings.pixelFormat(); + const AM_MEDIA_TYPE *resolvedGrabberFormat = &m_sourceFormat; - if (m_surface && !m_surface->supportedPixelFormats(QAbstractVideoBuffer::NoHandle) - .contains(QVideoFrame::Format_RGB32)) { - qWarning() << "Video surface needs to support RGB32 pixel format"; - return false; + if (m_surface) { + const auto surfaceFormats = m_surface->supportedPixelFormats(QAbstractVideoBuffer::NoHandle); + if (!surfaceFormats.contains(m_previewPixelFormat)) { + if (surfaceFormats.contains(QVideoFrame::Format_RGB32)) { + // As a fallback, we support RGB32, if the capture source doesn't support + // that format, the graph builder will automatically insert a + // converter (when possible). + + static const AM_MEDIA_TYPE rgb32GrabberFormat { MEDIATYPE_Video, MEDIASUBTYPE_ARGB32, 0, 0, 0, FORMAT_VideoInfo, nullptr, 0, nullptr}; + resolvedGrabberFormat = &rgb32GrabberFormat; + m_previewPixelFormat = QVideoFrame::Format_RGB32; + + } else { + qWarning() << "Video surface needs to support at least RGB32 pixel format"; + return false; + } + } } - m_previewPixelFormat = QVideoFrame::Format_RGB32; m_previewSize = resolvedViewfinderSettings.resolution(); m_previewSurfaceFormat = QVideoSurfaceFormat(m_previewSize, m_previewPixelFormat, QAbstractVideoBuffer::NoHandle); - m_previewSurfaceFormat.setScanLineDirection(QVideoSurfaceFormat::BottomToTop); + m_previewSurfaceFormat.setScanLineDirection(DirectShowMediaType::scanLineDirection(m_previewPixelFormat, videoInfo->bmiHeader)); + m_stride = DirectShowMediaType::bytesPerLine(m_previewSurfaceFormat); HRESULT hr; IAMStreamConfig* pConfig = 0; @@ -914,9 +919,7 @@ bool DSCameraSession::configurePreviewFormat() return false; } - // Set sample grabber format - static const AM_MEDIA_TYPE grabberFormat { MEDIATYPE_Video, MEDIASUBTYPE_ARGB32, 0, 0, 0, FORMAT_VideoInfo, nullptr, 0, nullptr}; - if (!m_previewSampleGrabber->setMediaType(&grabberFormat)) + if (!m_previewSampleGrabber->setMediaType(resolvedGrabberFormat)) return false; m_previewSampleGrabber->start(DirectShowSampleGrabber::CallbackMethod::BufferCB); diff --git a/src/plugins/directshow/camera/dscamerasession.h b/src/plugins/directshow/camera/dscamerasession.h index 91bd53766..18fc0cca7 100644 --- a/src/plugins/directshow/camera/dscamerasession.h +++ b/src/plugins/directshow/camera/dscamerasession.h @@ -207,6 +207,7 @@ private: QVideoSurfaceFormat m_previewSurfaceFormat; QVideoFrame::PixelFormat m_previewPixelFormat; QSize m_previewSize; + int m_stride; QCameraViewfinderSettings m_viewfinderSettings; QCameraViewfinderSettings m_actualViewfinderSettings; -- cgit v1.2.1 From 67a826716a9a58659f7272cbce3c450af384da5a Mon Sep 17 00:00:00 2001 From: Val Doroshchuk Date: Mon, 5 Nov 2018 09:26:18 +0100 Subject: Windows: Repaint QVideoWidget when WM_PAINT or WM_ERASEBKGND received Since updates are disabled, and no paint events will be sent to QVideoWidget, need to somehow repaint the video window. When BeginPaint is called outside of the expose event, the window might not be refreshed. So moved calling the repainting within the expose event. Also added repainting when the display rect is changed to immediate refreshing. Task-number: QTBUG-71326 Change-Id: I7c29b3f8ad35e33590c7b138a5141546ce3c1a42 Reviewed-by: Oliver Wolff Reviewed-by: Christian Stromme --- src/multimediawidgets/qvideowidget.cpp | 18 ++++++++++++++++++ src/multimediawidgets/qvideowidget.h | 3 +++ src/plugins/common/evr/evrvideowindowcontrol.cpp | 3 +++ 3 files changed, 24 insertions(+) diff --git a/src/multimediawidgets/qvideowidget.cpp b/src/multimediawidgets/qvideowidget.cpp index e9977c5a8..ab552b90d 100644 --- a/src/multimediawidgets/qvideowidget.cpp +++ b/src/multimediawidgets/qvideowidget.cpp @@ -324,6 +324,7 @@ QWindowVideoWidgetBackend::QWindowVideoWidgetBackend( control->setWinId(widget->winId()); #if defined(Q_OS_WIN) + // Disable updates to avoid flickering while resizing/moving. m_widget->setUpdatesEnabled(false); #endif } @@ -1001,6 +1002,23 @@ void QVideoWidget::paintEvent(QPaintEvent *event) } } +#if defined(Q_OS_WIN) +bool QVideoWidget::nativeEvent(const QByteArray &eventType, void *message, long *result) +{ + Q_D(QVideoWidget); + Q_UNUSED(eventType); + Q_UNUSED(result); + + MSG *mes = reinterpret_cast(message); + if (mes->message == WM_PAINT || mes->message == WM_ERASEBKGND) { + if (d->windowBackend) + d->windowBackend->showEvent(); + } + + return false; +} +#endif + #include "moc_qvideowidget.cpp" #include "moc_qvideowidget_p.cpp" QT_END_NAMESPACE diff --git a/src/multimediawidgets/qvideowidget.h b/src/multimediawidgets/qvideowidget.h index b1e2da46b..2a08b6fbd 100644 --- a/src/multimediawidgets/qvideowidget.h +++ b/src/multimediawidgets/qvideowidget.h @@ -81,6 +81,9 @@ public: int saturation() const; QSize sizeHint() const override; +#if defined(Q_OS_WIN) + bool nativeEvent(const QByteArray &eventType, void *message, long *result) override; +#endif public Q_SLOTS: void setFullScreen(bool fullScreen); diff --git a/src/plugins/common/evr/evrvideowindowcontrol.cpp b/src/plugins/common/evr/evrvideowindowcontrol.cpp index ce837c553..95f63c2e7 100644 --- a/src/plugins/common/evr/evrvideowindowcontrol.cpp +++ b/src/plugins/common/evr/evrvideowindowcontrol.cpp @@ -158,6 +158,9 @@ void EvrVideoWindowControl::setDisplayRect(const QRect &rect) } else { m_displayControl->SetVideoPosition(NULL, &displayRect); } + + // To refresh content immediately. + repaint(); } } -- cgit v1.2.1 From a9889e9e853b2b0e9b3736a258c908fa7559b35c Mon Sep 17 00:00:00 2001 From: Val Doroshchuk Date: Thu, 29 Nov 2018 11:52:51 +0100 Subject: DirectShow: Restart not active surface when frame is received If playback is not stopped but EndOfMedia is received, it would be still possible to seek to previous position and start playback again which will cause empty video output because the surface has been already stopped and should be restarted. Task-number: QTBUG-42057 Change-Id: I5ca496ba3af5c27c0ad61edb35d758e201061595 Reviewed-by: Oliver Wolff --- src/plugins/common/evr/evrcustompresenter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/common/evr/evrcustompresenter.cpp b/src/plugins/common/evr/evrcustompresenter.cpp index 5ebde2dda..872b97bcc 100644 --- a/src/plugins/common/evr/evrcustompresenter.cpp +++ b/src/plugins/common/evr/evrcustompresenter.cpp @@ -1925,12 +1925,12 @@ void EVRCustomPresenter::presentSample(IMFSample *sample) return; } - if (!m_surface || !m_surface->isActive() || !m_presentEngine->videoSurfaceFormat().isValid()) + if (!m_surface || !m_presentEngine->videoSurfaceFormat().isValid()) return; QVideoFrame frame = m_presentEngine->makeVideoFrame(sample); - if (m_surface->isActive() && m_surface->surfaceFormat() != m_presentEngine->videoSurfaceFormat()) { + if (!m_surface->isActive() || m_surface->surfaceFormat() != m_presentEngine->videoSurfaceFormat()) { m_surface->stop(); if (!m_surface->start(m_presentEngine->videoSurfaceFormat())) return; -- cgit v1.2.1 From 06f1f32daa89265269532a02457e73912da3c2d7 Mon Sep 17 00:00:00 2001 From: Val Doroshchuk Date: Tue, 27 Nov 2018 14:04:37 +0100 Subject: DirectShow: Don't queue video buffers from sample grabber Fixed an issue when buffers are sent using queued connection. Thus all buffers were collected before they were handled. Now only last buffer is kept. Also moved handling of device lost timer to main thread. Task-number: QTBUG-72012 Change-Id: I338587c5854739d6081c5cb502377e5779776417 Reviewed-by: Oliver Wolff --- src/plugins/directshow/camera/dscamerasession.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/directshow/camera/dscamerasession.cpp b/src/plugins/directshow/camera/dscamerasession.cpp index 73c97c824..d23b7f1e2 100644 --- a/src/plugins/directshow/camera/dscamerasession.cpp +++ b/src/plugins/directshow/camera/dscamerasession.cpp @@ -611,10 +611,6 @@ void DSCameraSession::onFrameAvailable(double time, const QByteArray &data) m_presentMutex.lock(); - // If no frames provided from ISampleGrabber for some time - // the device might be potentially unplugged. - m_deviceLostEventTimer.start(100); - // In case the source produces frames faster than we can display them, // only keep the most recent one m_currentFrame = QVideoFrame(new QMemoryVideoBuffer(data, m_stride), @@ -641,6 +637,10 @@ void DSCameraSession::onFrameAvailable(double time, const QByteArray &data) void DSCameraSession::presentFrame() { + // If no frames provided from ISampleGrabber for some time + // the device might be potentially unplugged. + m_deviceLostEventTimer.start(100); + m_presentMutex.lock(); if (m_currentFrame.isValid() && m_surface) { @@ -810,7 +810,7 @@ bool DSCameraSession::createFilterGraph() if (!m_previewSampleGrabber) { m_previewSampleGrabber = new DirectShowSampleGrabber; connect(m_previewSampleGrabber, &DirectShowSampleGrabber::bufferAvailable, - this, &DSCameraSession::onFrameAvailable); + this, &DSCameraSession::onFrameAvailable, Qt::DirectConnection); } -- cgit v1.2.1 From 4e9b9c1f268b333efd4b266091976585e4660352 Mon Sep 17 00:00:00 2001 From: VaL Doroshchuk Date: Wed, 5 Dec 2018 08:58:34 +0100 Subject: WMF: Map PKEY_Media_EncodingSettings to QMediaMetaData::Description According to https://docs.microsoft.com/en-us/windows/desktop/medfound/metadata-properties-for-media-files PKEY_Media_EncodingSettings is closed to description. Task-number: QTBUG-72287 Change-Id: I2cafc4b922ffc8ad01db43f8dfb97097f8185501 Reviewed-by: Oliver Wolff --- src/plugins/wmf/player/mfmetadatacontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/wmf/player/mfmetadatacontrol.cpp b/src/plugins/wmf/player/mfmetadatacontrol.cpp index ac57ccfb5..74063f7d1 100644 --- a/src/plugins/wmf/player/mfmetadatacontrol.cpp +++ b/src/plugins/wmf/player/mfmetadatacontrol.cpp @@ -299,7 +299,7 @@ void MFMetaDataControl::updateSource(IMFPresentationDescriptor* sourcePD, IMFMed m_availableMetaDatas.push_back(QMediaMetaData::SubTitle); } else if (key == PKEY_ParentalRating) { m_availableMetaDatas.push_back(QMediaMetaData::ParentalRating); - } else if (key == PKEY_Comment) { + } else if (key == PKEY_Media_EncodingSettings) { m_availableMetaDatas.push_back(QMediaMetaData::Description); } else if (key == PKEY_Copyright) { m_availableMetaDatas.push_back(QMediaMetaData::Copyright); -- cgit v1.2.1 From 7064057843bd474115055acdc76a886953acf898 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 19 Dec 2018 10:58:58 +0100 Subject: QGstUtils: fix build with MSVC MSVC didn't like the #iffery that was done with GST_STATIC_CAPS(). The build error was: qtmultimedia\src\gsttools\qgstutils.cpp(1323): error C2121: '#': invalid character: possibly the result of a macro expansion qtmultimedia\src\gsttools\qgstutils.cpp(1323): error C2059: syntax error: 'if' qtmultimedia\src\gsttools\qgstutils.cpp(1323): error C2143: syntax error: missing ';' before '{' qtmultimedia\src\gsttools\qgstutils.cpp(1311): error C2143: syntax error: missing ';' before '}' qtmultimedia\src\gsttools\qgstutils.cpp(1325): error C2059: syntax error: 'return' qtmultimedia\src\gsttools\qgstutils.cpp(1326): error C2059: syntax error: '}' qtmultimedia\src\gsttools\qgstutils.cpp(1326): error C2143: syntax error: missing ';' before '}' qtmultimedia\src\gsttools\qgstutils.cpp(1329): error C2143: syntax error: missing ';' before '{' qtmultimedia\src\gsttools\qgstutils.cpp(1329): error C2447: '{': missing function header (old-style formal list?) Change-Id: Ic9ac64648aba396fc4ef433e73d5c72a8c1c3da1 Reviewed-by: VaL Doroshchuk --- src/gsttools/qgstutils.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gsttools/qgstutils.cpp b/src/gsttools/qgstutils.cpp index ab037d959..6960ff8f4 100644 --- a/src/gsttools/qgstutils.cpp +++ b/src/gsttools/qgstutils.cpp @@ -1308,7 +1308,8 @@ void QGstUtils::setMetaData(GstBin *bin, const QMap &data) GstCaps *QGstUtils::videoFilterCaps() { - static GstStaticCaps staticCaps = GST_STATIC_CAPS( + static GstStaticCaps staticCaps = { + NULL, #if GST_CHECK_VERSION(1,2,0) "video/x-raw(ANY);" #elif GST_CHECK_VERSION(1,0,0) @@ -1320,7 +1321,9 @@ GstCaps *QGstUtils::videoFilterCaps() "video/x-android-buffer;" #endif "image/jpeg;" - "video/x-h264"); + "video/x-h264", + GST_PADDING_INIT + }; return gst_caps_make_writable(gst_static_caps_get(&staticCaps)); } -- cgit v1.2.1 From 885ad4bd1de3c0e8d14bae94f63d10e54b36283c Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 19 Dec 2018 11:13:53 +0100 Subject: GStreamer camera bin service plugin: remove bogus export macros Results to inconsistent DLL linkage errors on Windows. Change-Id: I0aebe05e40dbb4fac130c536849c68dd61aa12fe Reviewed-by: VaL Doroshchuk --- src/plugins/gstreamer/camerabin/camerabincapturebufferformat.h | 2 +- src/plugins/gstreamer/camerabin/camerabincapturedestination.h | 2 +- src/plugins/gstreamer/camerabin/camerabinexposure.h | 2 +- src/plugins/gstreamer/camerabin/camerabinflash.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.h b/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.h index a6cdc5297..7051913a7 100644 --- a/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.h +++ b/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.h @@ -52,7 +52,7 @@ class CameraBinSession; QT_USE_NAMESPACE -class Q_MULTIMEDIA_EXPORT CameraBinCaptureBufferFormat : public QCameraCaptureBufferFormatControl +class CameraBinCaptureBufferFormat : public QCameraCaptureBufferFormatControl { Q_OBJECT public: diff --git a/src/plugins/gstreamer/camerabin/camerabincapturedestination.h b/src/plugins/gstreamer/camerabin/camerabincapturedestination.h index 460fd1aa3..bc24a23d8 100644 --- a/src/plugins/gstreamer/camerabin/camerabincapturedestination.h +++ b/src/plugins/gstreamer/camerabin/camerabincapturedestination.h @@ -49,7 +49,7 @@ class CameraBinSession; QT_USE_NAMESPACE -class Q_MULTIMEDIA_EXPORT CameraBinCaptureDestination : public QCameraCaptureDestinationControl +class CameraBinCaptureDestination : public QCameraCaptureDestinationControl { Q_OBJECT public: diff --git a/src/plugins/gstreamer/camerabin/camerabinexposure.h b/src/plugins/gstreamer/camerabin/camerabinexposure.h index c30da25ad..db16bed24 100644 --- a/src/plugins/gstreamer/camerabin/camerabinexposure.h +++ b/src/plugins/gstreamer/camerabin/camerabinexposure.h @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE class CameraBinSession; -class Q_MULTIMEDIA_EXPORT CameraBinExposure : public QCameraExposureControl +class CameraBinExposure : public QCameraExposureControl { Q_OBJECT diff --git a/src/plugins/gstreamer/camerabin/camerabinflash.h b/src/plugins/gstreamer/camerabin/camerabinflash.h index 84177f122..0efd100a7 100644 --- a/src/plugins/gstreamer/camerabin/camerabinflash.h +++ b/src/plugins/gstreamer/camerabin/camerabinflash.h @@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE class CameraBinSession; -class Q_MULTIMEDIA_EXPORT CameraBinFlash : public QCameraFlashControl +class CameraBinFlash : public QCameraFlashControl { Q_OBJECT public: -- cgit v1.2.1 From 982d4c9505cf427709aac18346dd9df4a13f76c5 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Wed, 19 Dec 2018 11:21:54 +0100 Subject: GStreamer: remove unnecessary includes This makes it possible to build the GStreamer backend on Windows. Change-Id: I5b705524072d8bd89a7c9b834201b97e0d01d6cc Reviewed-by: VaL Doroshchuk --- src/gsttools/qgstreamerplayercontrol.cpp | 1 - src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.cpp | 1 - 2 files changed, 2 deletions(-) diff --git a/src/gsttools/qgstreamerplayercontrol.cpp b/src/gsttools/qgstreamerplayercontrol.cpp index 053e5e408..73f43f0b9 100644 --- a/src/gsttools/qgstreamerplayercontrol.cpp +++ b/src/gsttools/qgstreamerplayercontrol.cpp @@ -52,7 +52,6 @@ #include #include #include -#include //#define DEBUG_PLAYBIN diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.cpp b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.cpp index 4b0e7afa4..e9a7a5332 100644 --- a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.cpp +++ b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.cpp @@ -48,7 +48,6 @@ #include #include #include -#include QT_BEGIN_NAMESPACE -- cgit v1.2.1 From 5d7531192bbb411c24039dd5c68805d42383f547 Mon Sep 17 00:00:00 2001 From: VaL Doroshchuk Date: Tue, 11 Dec 2018 09:59:58 +0100 Subject: Fix QCamera::testCameraLockCancel test Since QCamera(0, provider) does not make any sense, because provider should not be passed to ctor, it is already inited as default. Change-Id: I398671ef9885a94d5f651a33f7f5376252611a1e Reviewed-by: Oliver Wolff --- tests/auto/unit/qcamera/tst_qcamera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/unit/qcamera/tst_qcamera.cpp b/tests/auto/unit/qcamera/tst_qcamera.cpp index 5c2d3529a..fa5e7187b 100644 --- a/tests/auto/unit/qcamera/tst_qcamera.cpp +++ b/tests/auto/unit/qcamera/tst_qcamera.cpp @@ -1500,7 +1500,7 @@ void tst_QCamera::testCameraLockCancel() { MockCameraService service; provider->service = &service; - QCamera camera(0, provider); + QCamera camera; camera.focus()->setFocusMode(QCameraFocus::AutoFocus); -- cgit v1.2.1 From 8c26502e386e76fa7db6ce8c4d073e9dabf00b44 Mon Sep 17 00:00:00 2001 From: Val Doroshchuk Date: Fri, 4 Jan 2019 12:27:28 +0100 Subject: Fix test to pass when wave is not available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I97023663c4232146f844de1d1b380f5a7bf11264 Reviewed-by: Tony Sarajärvi --- .../qmediaplayerbackend/tst_qmediaplayerbackend.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp index 76b791e21..25430a189 100644 --- a/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp +++ b/tests/auto/integration/qmediaplayerbackend/tst_qmediaplayerbackend.cpp @@ -308,13 +308,17 @@ void tst_QMediaPlayerBackend::unloadMedia() void tst_QMediaPlayerBackend::loadMediaInLoadingState() { - const QUrl url("http://unavailable.media/"); + if (!isWavSupported()) + QSKIP("Sound format is not supported"); + QMediaPlayer player; - player.setMedia(QMediaContent(url)); + player.setMedia(localWavFile); player.play(); + QCOMPARE(player.mediaStatus(), QMediaPlayer::LoadingMedia); // Sets new media while old has not been finished. - player.setMedia(QMediaContent(url)); - QTRY_COMPARE(player.mediaStatus(), QMediaPlayer::InvalidMedia); + player.setMedia(localWavFile); + QCOMPARE(player.mediaStatus(), QMediaPlayer::LoadingMedia); + QTRY_COMPARE(player.mediaStatus(), QMediaPlayer::LoadedMedia); } void tst_QMediaPlayerBackend::playPauseStop() -- cgit v1.2.1