Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I5575a4ba13212c9bfe73a3de3ef17c6528beafc3
This commit is contained in:
Vendored
+49
@@ -0,0 +1,49 @@
|
|||||||
|
Qt 5.4.1 is a bug-fix release. It maintains both forward and backward
|
||||||
|
compatibility (source and binary) with Qt 5.4.0.
|
||||||
|
|
||||||
|
For more details, refer to the online documentation included in this
|
||||||
|
distribution. The documentation is also available online:
|
||||||
|
|
||||||
|
http://qt-project.org/doc/qt-5.4
|
||||||
|
|
||||||
|
The Qt version 5.4 series is binary compatible with the 5.3.x series.
|
||||||
|
Applications compiled for 5.3 will continue to run with 5.4.
|
||||||
|
|
||||||
|
Some of the changes listed in this file include issue tracking numbers
|
||||||
|
corresponding to tasks in the Qt Bug Tracker:
|
||||||
|
|
||||||
|
http://bugreports.qt-project.org/
|
||||||
|
|
||||||
|
Each of these identifiers can be entered in the bug tracker to obtain more
|
||||||
|
information about a particular change.
|
||||||
|
|
||||||
|
****************************************************************************
|
||||||
|
* Library *
|
||||||
|
****************************************************************************
|
||||||
|
|
||||||
|
QtMultimedia
|
||||||
|
------------
|
||||||
|
|
||||||
|
- VideoOutput's autoOrientation property now correctly works after
|
||||||
|
switching cameras.
|
||||||
|
|
||||||
|
****************************************************************************
|
||||||
|
* Platform Specific Changes *
|
||||||
|
****************************************************************************
|
||||||
|
|
||||||
|
Android
|
||||||
|
-------
|
||||||
|
|
||||||
|
- [QTBUG-42159] QAudioInput::setVolume() is now functioning.
|
||||||
|
|
||||||
|
Linux
|
||||||
|
-----
|
||||||
|
|
||||||
|
- [QTBUG-43514] Fixed static linking.
|
||||||
|
|
||||||
|
WinRT
|
||||||
|
-----
|
||||||
|
|
||||||
|
- [QTBUG-41066] Fix VideoOutput autoOrientation when used with a Camera.
|
||||||
|
- [QTBUG-41065] Show Camera viewfinder frames in a resolution adapted to
|
||||||
|
the current capture mode.
|
||||||
@@ -925,7 +925,7 @@ void QDeclarativeCamera::setDigitalZoom(qreal value)
|
|||||||
\qmlproperty variant QtMultimedia::Camera::metaData.gpsLongitude
|
\qmlproperty variant QtMultimedia::Camera::metaData.gpsLongitude
|
||||||
\qmlproperty variant QtMultimedia::Camera::metaData.gpsAltitude
|
\qmlproperty variant QtMultimedia::Camera::metaData.gpsAltitude
|
||||||
|
|
||||||
These properties hold the the geographic position in decimal degrees of the
|
These properties hold the geographic position in decimal degrees of the
|
||||||
camera at time of capture.
|
camera at time of capture.
|
||||||
|
|
||||||
\sa {QMediaMetaData}
|
\sa {QMediaMetaData}
|
||||||
|
|||||||
@@ -123,9 +123,8 @@ QDeclarativeCameraCapture::~QDeclarativeCameraCapture()
|
|||||||
This property holds a bool value indicating whether the camera
|
This property holds a bool value indicating whether the camera
|
||||||
is ready to capture photos or not.
|
is ready to capture photos or not.
|
||||||
|
|
||||||
If camera is not ready to capture image immediately,
|
Calling capture() while \e ready is \c false is not permitted and
|
||||||
the capture request is queued with all the related camera settings,
|
results in an error.
|
||||||
and the request will be executed as soon as possible.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -134,11 +133,8 @@ QDeclarativeCameraCapture::~QDeclarativeCameraCapture()
|
|||||||
This property holds a bool value indicating whether the camera
|
This property holds a bool value indicating whether the camera
|
||||||
is ready to capture photos or not.
|
is ready to capture photos or not.
|
||||||
|
|
||||||
It's permissible to call capture() while the camera is active
|
Calling capture() while \e ready is \c false is not permitted and
|
||||||
regardless of the \e ready property value.
|
results in an error.
|
||||||
If camera is not ready to capture image immediately,
|
|
||||||
the capture request is queued with all the related camera settings,
|
|
||||||
and the request will be executed as soon as possible.
|
|
||||||
*/
|
*/
|
||||||
bool QDeclarativeCameraCapture::isReadyForCapture() const
|
bool QDeclarativeCameraCapture::isReadyForCapture() const
|
||||||
{
|
{
|
||||||
@@ -157,11 +153,13 @@ bool QDeclarativeCameraCapture::isReadyForCapture() const
|
|||||||
for video.
|
for video.
|
||||||
|
|
||||||
Camera saves all the capture parameters like exposure settings or
|
Camera saves all the capture parameters like exposure settings or
|
||||||
image processing parameters, so changes to camera paramaters after
|
image processing parameters, so changes to camera parameters after
|
||||||
capture() is called do not affect previous capture requests.
|
capture() is called do not affect previous capture requests.
|
||||||
|
|
||||||
CameraCapture::capture returns the capture requestId parameter, used with
|
capture() returns the capture requestId parameter, used with
|
||||||
imageExposed(), imageCaptured(), imageMetadataAvailable() and imageSaved() signals.
|
imageExposed(), imageCaptured(), imageMetadataAvailable() and imageSaved() signals.
|
||||||
|
|
||||||
|
\sa ready
|
||||||
*/
|
*/
|
||||||
int QDeclarativeCameraCapture::capture()
|
int QDeclarativeCameraCapture::capture()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -488,11 +488,8 @@ void QCameraImageCapture::setCaptureDestination(QCameraImageCapture::CaptureDest
|
|||||||
\property QCameraImageCapture::readyForCapture
|
\property QCameraImageCapture::readyForCapture
|
||||||
\brief whether the service is ready to capture a an image immediately.
|
\brief whether the service is ready to capture a an image immediately.
|
||||||
|
|
||||||
It's permissible to call capture() while the camera status is QCamera::ActiveStatus
|
Calling capture() while \e readyForCapture is \c false is not permitted and
|
||||||
regardless of isReadyForCapture property value.
|
results in an error.
|
||||||
If camera is not ready to capture image immediately,
|
|
||||||
the capture request is queued with all the related camera settings
|
|
||||||
to be executed as soon as possible.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool QCameraImageCapture::isReadyForCapture() const
|
bool QCameraImageCapture::isReadyForCapture() const
|
||||||
@@ -523,11 +520,13 @@ bool QCameraImageCapture::isReadyForCapture() const
|
|||||||
the default directory, with a full path reported with imageCaptured() and imageSaved() signals.
|
the default directory, with a full path reported with imageCaptured() and imageSaved() signals.
|
||||||
|
|
||||||
QCamera saves all the capture parameters like exposure settings or
|
QCamera saves all the capture parameters like exposure settings or
|
||||||
image processing parameters, so changes to camera paramaters after
|
image processing parameters, so changes to camera parameters after
|
||||||
capture() is called do not affect previous capture requests.
|
capture() is called do not affect previous capture requests.
|
||||||
|
|
||||||
QCameraImageCapture::capture returns the capture Id parameter, used with
|
QCameraImageCapture::capture returns the capture Id parameter, used with
|
||||||
imageExposed(), imageCaptured() and imageSaved() signals.
|
imageExposed(), imageCaptured() and imageSaved() signals.
|
||||||
|
|
||||||
|
\sa isReadyForCapture()
|
||||||
*/
|
*/
|
||||||
int QCameraImageCapture::capture(const QString &file)
|
int QCameraImageCapture::capture(const QString &file)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ QCameraImageCaptureControl::~QCameraImageCaptureControl()
|
|||||||
|
|
||||||
The Camera service should save all the capture parameters
|
The Camera service should save all the capture parameters
|
||||||
like exposure settings or image processing parameters,
|
like exposure settings or image processing parameters,
|
||||||
so changes to camera paramaters after capture() is called
|
so changes to camera parameters after capture() is called
|
||||||
do not affect previous capture requests.
|
do not affect previous capture requests.
|
||||||
|
|
||||||
Returns the capture request id number, which is used later
|
Returns the capture request id number, which is used later
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
\brief Platform notes for the BlackBerry Platform
|
\brief Platform notes for the BlackBerry Platform
|
||||||
|
|
||||||
Qt Multimedia supports BlackBerry devices that run the BB10 operating system.
|
Qt Multimedia supports BlackBerry devices that run the BB10 operating system.
|
||||||
This page covers the availibility of different features on BB10.
|
This page covers the availability of different features on BB10.
|
||||||
|
|
||||||
\section1 Implementation
|
\section1 Implementation
|
||||||
|
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ void QMediaPlayerPrivate::setPlaylistMedia()
|
|||||||
return;
|
return;
|
||||||
} else if (control != 0) {
|
} else if (control != 0) {
|
||||||
// If we've just switched to a new playlist,
|
// If we've just switched to a new playlist,
|
||||||
// then last emited currentMediaChanged was a playlist.
|
// then last emitted currentMediaChanged was a playlist.
|
||||||
// Make sure we emit currentMediaChanged if new playlist has
|
// Make sure we emit currentMediaChanged if new playlist has
|
||||||
// the same media as the previous one:
|
// the same media as the previous one:
|
||||||
// sample.m3u
|
// sample.m3u
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
player->setVideoOutput(myVideoSurface);
|
player->setVideoOutput(myVideoSurface);
|
||||||
player->setMedia(QUrl::fromLocalFile("observation.mp4"));
|
player->setMedia(QUrl::fromLocalFile("observation.mp4"));
|
||||||
player->play(); // Start receving frames as they get presented to myVideoSurface
|
player->play(); // Start receiving frames as they get presented to myVideoSurface
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
This same approach works with the QCamera object as well, to receive viewfinder or video
|
This same approach works with the QCamera object as well, to receive viewfinder or video
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
#ifndef QVIDEOPROBE_H
|
#ifndef QVIDEOPROBE_H
|
||||||
#define QVIDEOPROBE_H
|
#define QVIDEOPROBE_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QtCore/QObject>
|
||||||
#include <QtMultimedia/qvideoframe.h>
|
#include <QtMultimedia/qvideoframe.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|||||||
@@ -141,8 +141,8 @@ QAbstractVideoSurface::Error QVideoSurfaceGenericPainter::start(const QVideoSurf
|
|||||||
bool ok = m_imageFormat != QImage::Format_Invalid && !m_imageSize.isEmpty();
|
bool ok = m_imageFormat != QImage::Format_Invalid && !m_imageSize.isEmpty();
|
||||||
#ifndef QT_NO_OPENGL
|
#ifndef QT_NO_OPENGL
|
||||||
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES)
|
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES)
|
||||||
#endif
|
|
||||||
ok &= format.pixelFormat() != QVideoFrame::Format_RGB24;
|
ok &= format.pixelFormat() != QVideoFrame::Format_RGB24;
|
||||||
|
#endif
|
||||||
if (ok)
|
if (ok)
|
||||||
return QAbstractVideoSurface::NoError;
|
return QAbstractVideoSurface::NoError;
|
||||||
} else if (t == QAbstractVideoBuffer::QPixmapHandle) {
|
} else if (t == QAbstractVideoBuffer::QPixmapHandle) {
|
||||||
|
|||||||
@@ -276,33 +276,38 @@ void QAndroidCameraSession::adjustViewfinderSize(const QSize &captureSize, bool
|
|||||||
if (!m_camera)
|
if (!m_camera)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QSize viewfinderResolution = m_camera->previewSize();
|
QSize currentViewfinderResolution = m_camera->previewSize();
|
||||||
const qreal aspectRatio = qreal(captureSize.width()) / qreal(captureSize.height());
|
const qreal aspectRatio = qreal(captureSize.width()) / qreal(captureSize.height());
|
||||||
if (viewfinderResolution.isValid() &&
|
if (currentViewfinderResolution.isValid() &&
|
||||||
qFuzzyCompare(aspectRatio,
|
qAbs(aspectRatio - (qreal(currentViewfinderResolution.width()) / currentViewfinderResolution.height())) < 0.01) {
|
||||||
qreal(viewfinderResolution.width()) / viewfinderResolution.height())) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QSize adjustedViewfinderResolution;
|
||||||
QList<QSize> previewSizes = m_camera->getSupportedPreviewSizes();
|
QList<QSize> previewSizes = m_camera->getSupportedPreviewSizes();
|
||||||
for (int i = previewSizes.count() - 1; i >= 0; --i) {
|
for (int i = previewSizes.count() - 1; i >= 0; --i) {
|
||||||
const QSize &size = previewSizes.at(i);
|
const QSize &size = previewSizes.at(i);
|
||||||
// search for viewfinder resolution with the same aspect ratio
|
// search for viewfinder resolution with the same aspect ratio
|
||||||
if (qFuzzyCompare(aspectRatio, (static_cast<qreal>(size.width())/static_cast<qreal>(size.height())))) {
|
if (qAbs(aspectRatio - (qreal(size.width()) / size.height())) < 0.01) {
|
||||||
viewfinderResolution = size;
|
adjustedViewfinderResolution = size;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_camera->previewSize() != viewfinderResolution) {
|
if (!adjustedViewfinderResolution.isValid()) {
|
||||||
|
qWarning("Cannot find a viewfinder resolution matching the capture aspect ratio.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentViewfinderResolution != adjustedViewfinderResolution) {
|
||||||
if (m_videoOutput)
|
if (m_videoOutput)
|
||||||
m_videoOutput->setVideoSize(viewfinderResolution);
|
m_videoOutput->setVideoSize(adjustedViewfinderResolution);
|
||||||
|
|
||||||
// if preview is started, we have to stop it first before changing its size
|
// if preview is started, we have to stop it first before changing its size
|
||||||
if (m_previewStarted && restartPreview)
|
if (m_previewStarted && restartPreview)
|
||||||
m_camera->stopPreview();
|
m_camera->stopPreview();
|
||||||
|
|
||||||
m_camera->setPreviewSize(viewfinderResolution);
|
m_camera->setPreviewSize(adjustedViewfinderResolution);
|
||||||
|
|
||||||
// restart preview
|
// restart preview
|
||||||
if (m_previewStarted && restartPreview)
|
if (m_previewStarted && restartPreview)
|
||||||
|
|||||||
@@ -337,7 +337,7 @@ void QAndroidMediaPlayerControl::setMedia(const QMediaContent &mediaContent,
|
|||||||
if (!mTempFile.isNull())
|
if (!mTempFile.isNull())
|
||||||
mediaPath = QStringLiteral("file://") + mTempFile->fileName();
|
mediaPath = QStringLiteral("file://") + mTempFile->fileName();
|
||||||
} else {
|
} else {
|
||||||
mediaPath = url.toString();
|
mediaPath = url.toString(QUrl::FullyEncoded);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mVideoSize.isValid() && mVideoOutput)
|
if (mVideoSize.isValid() && mVideoOutput)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
TARGET = dsengine
|
TARGET = dsengine
|
||||||
win32:!qtHaveModule(opengl) {
|
win32:!qtHaveModule(opengl)|contains(QT_CONFIG,dynamicgl) {
|
||||||
LIBS_PRIVATE += -lgdi32 -luser32
|
LIBS_PRIVATE += -lgdi32 -luser32
|
||||||
}
|
}
|
||||||
PLUGIN_TYPE=mediaservice
|
PLUGIN_TYPE=mediaservice
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
#include "dsvideodevicecontrol.h"
|
#include "dsvideodevicecontrol.h"
|
||||||
|
|
||||||
#ifdef QMEDIA_DIRECTSHOW_CAMERA
|
#ifdef QMEDIA_DIRECTSHOW_CAMERA
|
||||||
|
#include <QtCore/QElapsedTimer>
|
||||||
#include <dshow.h>
|
#include <dshow.h>
|
||||||
#include "dscameraservice.h"
|
#include "dscameraservice.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -121,8 +122,7 @@ QByteArray DSServicePlugin::defaultDevice(const QByteArray &service) const
|
|||||||
{
|
{
|
||||||
#ifdef QMEDIA_DIRECTSHOW_CAMERA
|
#ifdef QMEDIA_DIRECTSHOW_CAMERA
|
||||||
if (service == Q_MEDIASERVICE_CAMERA) {
|
if (service == Q_MEDIASERVICE_CAMERA) {
|
||||||
if (m_cameraDevices.isEmpty())
|
updateDevices();
|
||||||
updateDevices();
|
|
||||||
|
|
||||||
return m_defaultCameraDevice;
|
return m_defaultCameraDevice;
|
||||||
}
|
}
|
||||||
@@ -135,8 +135,7 @@ QList<QByteArray> DSServicePlugin::devices(const QByteArray &service) const
|
|||||||
{
|
{
|
||||||
#ifdef QMEDIA_DIRECTSHOW_CAMERA
|
#ifdef QMEDIA_DIRECTSHOW_CAMERA
|
||||||
if (service == Q_MEDIASERVICE_CAMERA) {
|
if (service == Q_MEDIASERVICE_CAMERA) {
|
||||||
if (m_cameraDevices.isEmpty())
|
updateDevices();
|
||||||
updateDevices();
|
|
||||||
|
|
||||||
return m_cameraDevices;
|
return m_cameraDevices;
|
||||||
}
|
}
|
||||||
@@ -149,8 +148,7 @@ QString DSServicePlugin::deviceDescription(const QByteArray &service, const QByt
|
|||||||
{
|
{
|
||||||
#ifdef QMEDIA_DIRECTSHOW_CAMERA
|
#ifdef QMEDIA_DIRECTSHOW_CAMERA
|
||||||
if (service == Q_MEDIASERVICE_CAMERA) {
|
if (service == Q_MEDIASERVICE_CAMERA) {
|
||||||
if (m_cameraDevices.isEmpty())
|
updateDevices();
|
||||||
updateDevices();
|
|
||||||
|
|
||||||
for (int i=0; i<m_cameraDevices.count(); i++)
|
for (int i=0; i<m_cameraDevices.count(); i++)
|
||||||
if (m_cameraDevices[i] == device)
|
if (m_cameraDevices[i] == device)
|
||||||
@@ -164,6 +162,10 @@ QString DSServicePlugin::deviceDescription(const QByteArray &service, const QByt
|
|||||||
|
|
||||||
void DSServicePlugin::updateDevices() const
|
void DSServicePlugin::updateDevices() const
|
||||||
{
|
{
|
||||||
|
static QElapsedTimer timer;
|
||||||
|
if (timer.isValid() && timer.elapsed() < 500) // ms
|
||||||
|
return;
|
||||||
|
|
||||||
addRefCount();
|
addRefCount();
|
||||||
|
|
||||||
m_defaultCameraDevice.clear();
|
m_defaultCameraDevice.clear();
|
||||||
@@ -176,6 +178,7 @@ void DSServicePlugin::updateDevices() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
releaseRefCount();
|
releaseRefCount();
|
||||||
|
timer.restart();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -454,7 +454,9 @@ QList<QByteArray> QWindowsAudioDeviceInfo::availableDevices(QAudio::Mode mode)
|
|||||||
pPropBag->Release();
|
pPropBag->Release();
|
||||||
pMoniker->Release();
|
pMoniker->Release();
|
||||||
}
|
}
|
||||||
|
pEnum->Release();
|
||||||
}
|
}
|
||||||
|
pDevEnum->Release();
|
||||||
}
|
}
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
#else // Q_OS_WINCE
|
#else // Q_OS_WINCE
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ void QWindowsAudioInput::initMixer()
|
|||||||
return;
|
return;
|
||||||
mixerID = (HMIXEROBJ)mixerIntID;
|
mixerID = (HMIXEROBJ)mixerIntID;
|
||||||
|
|
||||||
// Get the Destination (Recording) Line Infomation
|
// Get the Destination (Recording) Line Information
|
||||||
MIXERLINE mixerLine;
|
MIXERLINE mixerLine;
|
||||||
mixerLine.cbStruct = sizeof(MIXERLINE);
|
mixerLine.cbStruct = sizeof(MIXERLINE);
|
||||||
mixerLine.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_WAVEIN;
|
mixerLine.dwComponentType = MIXERLINE_COMPONENTTYPE_DST_WAVEIN;
|
||||||
|
|||||||
@@ -1296,7 +1296,7 @@ void MFPlayerSession::commitRateChange(qreal rate, BOOL isThin)
|
|||||||
// (which might be earlier than the last decoded key frame)
|
// (which might be earlier than the last decoded key frame)
|
||||||
resetPosition = true;
|
resetPosition = true;
|
||||||
} else if (cmdNow == CmdPause) {
|
} else if (cmdNow == CmdPause) {
|
||||||
// If paused, dont reset the position until we resume, otherwise
|
// If paused, don't reset the position until we resume, otherwise
|
||||||
// a new frame will be rendered
|
// a new frame will be rendered
|
||||||
m_presentationClock->GetCorrelatedTime(0, &hnsClockTime, &hnsSystemTime);
|
m_presentationClock->GetCorrelatedTime(0, &hnsClockTime, &hnsSystemTime);
|
||||||
m_request.setCommand(CmdSeekResume);
|
m_request.setCommand(CmdSeekResume);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user