diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-11-05 07:33:34 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-11-05 07:33:34 +0100 |
commit | a045c989e15feda1201e81d8c2a7a403c33ad6da (patch) | |
tree | d5bf41f7229a4c0fd8f23bb74570fc3bc08d03a6 | |
parent | 4b99c0e0474da438e8b3e978dc84c2fb9880f6ce (diff) | |
parent | 8b92454d6fffcee7a8cf1fb5e0c92920c77733c8 (diff) |
-rw-r--r-- | dist/changes-5.13.2 | 68 | ||||
-rw-r--r-- | src/multimedia/playback/qmediaplaylist.cpp | 48 | ||||
-rw-r--r-- | src/plugins/alsa/qalsaaudiooutput.cpp | 34 | ||||
-rw-r--r-- | src/plugins/avfoundation/camera/avfmediaassetwriter.mm | 8 | ||||
-rw-r--r-- | src/qtmultimediaquicktools/qdeclarativevideooutput.cpp | 5 | ||||
-rw-r--r-- | src/qtmultimediaquicktools/qtmultimediaquicktools.pro | 23 | ||||
-rw-r--r-- | src/src.pro | 2 |
7 files changed, 129 insertions, 59 deletions
diff --git a/dist/changes-5.13.2 b/dist/changes-5.13.2 new file mode 100644 index 000000000..62dffcb02 --- /dev/null +++ b/dist/changes-5.13.2 @@ -0,0 +1,68 @@ +Qt 5.13.2 is a bug-fix release. It maintains both forward and backward +source compatibility with Qt 5.13.0 through 5.13.1. +In Qt 5.13.0, binary compatibility was broken due to the usage of the enum +QVideoFrame::PixelFormat, the break has been reverted, +thus introducing a binary compatibility break with earlier Qt 5.13.0 and 5.13.1. + +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.13 series is binary compatible with the 5.12.x series. +Applications compiled for 5.12 will continue to run with 5.13. + +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. + +**************************************************************************** +* Qt 5.13.2 Changes * +**************************************************************************** + + - In Qt 5.13.0 binary compatibility was broken + for usage of the enum QVideoFrame::PixelFormat by introducing + QVideoFrame::Format_ABGR32. + To minimize the impact of this, the break has been reverted, + thus introducing a binary compatibility break with earlier Qt 5.13.x + versions, but restoring compatibility with all earlier versions of Qt 5. + - Fixed crash when VideoOutput.sourceRect is requested but playback is stopped. + - [QTBUG-51588] Fixed leaking of QVideoFilterRunnable when window is closed. + - [QTBUG-45064] Introduced QGraphicsVideoItem::type(). + - Fixed camera.viewfinder to respect camera's media status + if the viewfinder is requested after the camera is loaded. + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + + - GStreamer: + * CameraBin plugin now fetches supported viewfinder settings at status + higher or equal to LoadedStatus if it has not been fetched. + * Fixed duplicated entries in supported Camera's resolution/framerate if the + underlying element uses caps' features. + * Introduced audio/x-raw codec in QAudioRecorder. + * [QTBUG-65399] Fixed media player to show pre-rolled frame on new media + (means to seek to the beginning) only when pause() is called. + * [QTBUG-76135] Show image processing warnings only when the camera is loaded. + * [QTBUG-78079] Fixed media player to recreate playbin features after custom pipeline. + * [QTBUG-73084] Fixed mapping of VPU texture using real physical address of data + which prevents leaks in the kernel for iMX boards. + + - AVFoundation: + * [QTBUG-77270] Fixed black frames being shown if current OpenGL context has been changed. + * [QTBUG-49806] Fixed media player to send StalledMedia status when no enough data to play + and resume playback afterwards. + + - DirectShow: + * [QTBUG-77829] Fixed crash when there is no surface on flush(). + * [QTBUG-77849] Introduced startTime and endTime to QVideoFrame. + * [QTBUG-77163] Introduced support to use QMediaPlayer in secondary thread. + * [QTBUG-46368] Implemented QMediaVideoProbeControl->flush(). + * [QTBUG-46368] Fixed media player to send media status before errors. + * [QTBUG-68778] Fixed media player to postpone seeking if the playback is stopped. + * Fixed crash when qrc media resource is set twice to media player. diff --git a/src/multimedia/playback/qmediaplaylist.cpp b/src/multimedia/playback/qmediaplaylist.cpp index 7c21a599b..9539a1809 100644 --- a/src/multimedia/playback/qmediaplaylist.cpp +++ b/src/multimedia/playback/qmediaplaylist.cpp @@ -184,20 +184,20 @@ bool QMediaPlaylist::setMediaObject(QMediaObject *mediaObject) disconnect(playlist, SIGNAL(loadFailed(QMediaPlaylist::Error,QString)), this, SLOT(_q_loadFailed(QMediaPlaylist::Error,QString))); - disconnect(playlist, SIGNAL(mediaChanged(int,int)), this, SIGNAL(mediaChanged(int,int))); - disconnect(playlist, SIGNAL(mediaAboutToBeInserted(int,int)), this, SIGNAL(mediaAboutToBeInserted(int,int))); - disconnect(playlist, SIGNAL(mediaInserted(int,int)), this, SIGNAL(mediaInserted(int,int))); - disconnect(playlist, SIGNAL(mediaAboutToBeRemoved(int,int)), this, SIGNAL(mediaAboutToBeRemoved(int,int))); - disconnect(playlist, SIGNAL(mediaRemoved(int,int)), this, SIGNAL(mediaRemoved(int,int))); + disconnect(playlist, &QMediaPlaylistProvider::mediaChanged, this, &QMediaPlaylist::mediaChanged); + disconnect(playlist, &QMediaPlaylistProvider::mediaAboutToBeInserted, this, &QMediaPlaylist::mediaAboutToBeInserted); + disconnect(playlist, &QMediaPlaylistProvider::mediaInserted, this, &QMediaPlaylist::mediaInserted); + disconnect(playlist, &QMediaPlaylistProvider::mediaAboutToBeRemoved, this, &QMediaPlaylist::mediaAboutToBeRemoved); + disconnect(playlist, &QMediaPlaylistProvider::mediaRemoved, this, &QMediaPlaylist::mediaRemoved); - disconnect(playlist, SIGNAL(loaded()), this, SIGNAL(loaded())); + disconnect(playlist, &QMediaPlaylistProvider::loaded, this, &QMediaPlaylist::loaded); - disconnect(d->control, SIGNAL(playbackModeChanged(QMediaPlaylist::PlaybackMode)), - this, SIGNAL(playbackModeChanged(QMediaPlaylist::PlaybackMode))); - disconnect(d->control, SIGNAL(currentIndexChanged(int)), - this, SIGNAL(currentIndexChanged(int))); - disconnect(d->control, SIGNAL(currentMediaChanged(QMediaContent)), - this, SIGNAL(currentMediaChanged(QMediaContent))); + disconnect(d->control, &QMediaPlaylistControl::playbackModeChanged, + this, &QMediaPlaylist::playbackModeChanged); + disconnect(d->control, &QMediaPlaylistControl::currentIndexChanged, + this, &QMediaPlaylist::currentIndexChanged); + disconnect(d->control, &QMediaPlaylistControl::currentMediaChanged, + this, &QMediaPlaylist::currentMediaChanged); // Copy playlist items, sync playback mode and sync current index between // old control and new control @@ -214,20 +214,20 @@ bool QMediaPlaylist::setMediaObject(QMediaObject *mediaObject) connect(playlist, SIGNAL(loadFailed(QMediaPlaylist::Error,QString)), this, SLOT(_q_loadFailed(QMediaPlaylist::Error,QString))); - connect(playlist, SIGNAL(mediaChanged(int,int)), this, SIGNAL(mediaChanged(int,int))); - connect(playlist, SIGNAL(mediaAboutToBeInserted(int,int)), this, SIGNAL(mediaAboutToBeInserted(int,int))); - connect(playlist, SIGNAL(mediaInserted(int,int)), this, SIGNAL(mediaInserted(int,int))); - connect(playlist, SIGNAL(mediaAboutToBeRemoved(int,int)), this, SIGNAL(mediaAboutToBeRemoved(int,int))); - connect(playlist, SIGNAL(mediaRemoved(int,int)), this, SIGNAL(mediaRemoved(int,int))); + connect(playlist, &QMediaPlaylistProvider::mediaChanged, this, &QMediaPlaylist::mediaChanged); + connect(playlist, &QMediaPlaylistProvider::mediaAboutToBeInserted, this, &QMediaPlaylist::mediaAboutToBeInserted); + connect(playlist, &QMediaPlaylistProvider::mediaInserted, this, &QMediaPlaylist::mediaInserted); + connect(playlist, &QMediaPlaylistProvider::mediaAboutToBeRemoved, this, &QMediaPlaylist::mediaAboutToBeRemoved); + connect(playlist, &QMediaPlaylistProvider::mediaRemoved, this, &QMediaPlaylist::mediaRemoved); - connect(playlist, SIGNAL(loaded()), this, SIGNAL(loaded())); + connect(playlist, &QMediaPlaylistProvider::loaded, this, &QMediaPlaylist::loaded); - connect(d->control, SIGNAL(playbackModeChanged(QMediaPlaylist::PlaybackMode)), - this, SIGNAL(playbackModeChanged(QMediaPlaylist::PlaybackMode))); - connect(d->control, SIGNAL(currentIndexChanged(int)), - this, SIGNAL(currentIndexChanged(int))); - connect(d->control, SIGNAL(currentMediaChanged(QMediaContent)), - this, SIGNAL(currentMediaChanged(QMediaContent))); + connect(d->control, &QMediaPlaylistControl::playbackModeChanged, + this, &QMediaPlaylist::playbackModeChanged); + connect(d->control, &QMediaPlaylistControl::currentIndexChanged, + this, &QMediaPlaylist::currentIndexChanged); + connect(d->control, &QMediaPlaylistControl::currentMediaChanged, + this, &QMediaPlaylist::currentMediaChanged); if (removedStart != -1 && removedEnd != -1) { emit mediaAboutToBeRemoved(removedStart, removedEnd); diff --git a/src/plugins/alsa/qalsaaudiooutput.cpp b/src/plugins/alsa/qalsaaudiooutput.cpp index ddbe04de9..5c8ae171c 100644 --- a/src/plugins/alsa/qalsaaudiooutput.cpp +++ b/src/plugins/alsa/qalsaaudiooutput.cpp @@ -53,9 +53,11 @@ #include <QtMultimedia/private/qaudiohelpers_p.h> #include "qalsaaudiooutput.h" #include "qalsaaudiodeviceinfo.h" +#include <QLoggingCategory> QT_BEGIN_NAMESPACE +Q_LOGGING_CATEGORY(lcAlsaOutput, "qt.multimedia.alsa.output") //#define DEBUG_AUDIO 1 QAlsaAudioOutput::QAlsaAudioOutput(const QByteArray &device) @@ -403,28 +405,22 @@ bool QAlsaAudioOutput::open() fatal = true; errMessage = QString::fromLatin1("QAudioOutput: buffer/period min and max: err = %1").arg(err); } else { - if (maxBufferTime < buffer_time || buffer_time < minBufferTime || maxPeriodTime < period_time || minPeriodTime > period_time) { -#ifdef DEBUG_AUDIO - qDebug()<<"defaults out of range"; - qDebug()<<"pmin="<<minPeriodTime<<", pmax="<<maxPeriodTime<<", bmin="<<minBufferTime<<", bmax="<<maxBufferTime; -#endif - period_time = minPeriodTime; - if (period_time*4 <= maxBufferTime) { - // Use 4 periods if possible - buffer_time = period_time*4; - chunks = 4; - } else if (period_time*2 <= maxBufferTime) { - // Use 2 periods if possible - buffer_time = period_time*2; - chunks = 2; + static unsigned user_buffer_time = qEnvironmentVariableIntValue("QT_ALSA_OUTPUT_BUFFER_TIME"); + static unsigned user_period_time = qEnvironmentVariableIntValue("QT_ALSA_OUTPUT_PERIOD_TIME"); + const bool outOfRange = maxBufferTime < buffer_time || buffer_time < minBufferTime || maxPeriodTime < period_time || minPeriodTime > period_time; + if (outOfRange || user_period_time || user_buffer_time) { + period_time = user_period_time ? user_period_time : minPeriodTime; + if (!user_buffer_time) { + chunks = maxBufferTime / period_time; + buffer_time = period_time * chunks; } else { - qWarning()<<"QAudioOutput: alsa only supports single period!"; - fatal = true; + buffer_time = user_buffer_time; + chunks = buffer_time / period_time; } -#ifdef DEBUG_AUDIO - qDebug()<<"used: buffer_time="<<buffer_time<<", period_time="<<period_time; -#endif } + qCDebug(lcAlsaOutput) << "buffer time: [" << minBufferTime << "-" << maxBufferTime << "] =" << buffer_time; + qCDebug(lcAlsaOutput) << "period time: [" << minPeriodTime << "-" << maxPeriodTime << "] =" << period_time; + qCDebug(lcAlsaOutput) << "chunks =" << chunks; } } if ( !fatal ) { diff --git a/src/plugins/avfoundation/camera/avfmediaassetwriter.mm b/src/plugins/avfoundation/camera/avfmediaassetwriter.mm index 318d66117..9030adb2c 100644 --- a/src/plugins/avfoundation/camera/avfmediaassetwriter.mm +++ b/src/plugins/avfoundation/camera/avfmediaassetwriter.mm @@ -413,7 +413,7 @@ enum WriterState m_audioOutput.reset([[AVCaptureAudioDataOutput alloc] init]); - if (m_audioOutput && [captureSession canAddOutput:m_audioOutput]) { + if (m_audioOutput.data() && [captureSession canAddOutput:m_audioOutput]) { [captureSession addOutput:m_audioOutput]; } else { qDebugCamera() << Q_FUNC_INFO << "failed to add audio output"; @@ -431,7 +431,7 @@ enum WriterState { Q_ASSERT(m_service && m_service->videoOutput() && m_service->videoOutput()->videoDataOutput()); - Q_ASSERT(m_assetWriter); + Q_ASSERT(m_assetWriter.data()); m_cameraWriterInput.reset([[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeVideo outputSettings:m_videoSettings @@ -451,7 +451,7 @@ enum WriterState m_cameraWriterInput.data().expectsMediaDataInRealTime = YES; - if (m_audioOutput) { + if (m_audioOutput.data()) { CMFormatDescriptionRef sourceFormat = m_audioCaptureDevice ? m_audioCaptureDevice.activeFormat.formatDescription : 0; m_audioWriterInput.reset([[AVAssetWriterInput alloc] initWithMediaType:AVMediaTypeAudio outputSettings:m_audioSettings @@ -479,7 +479,7 @@ enum WriterState [m_service->videoOutput()->videoDataOutput() setSampleBufferDelegate:self queue:m_videoQueue]; - if (m_audioOutput) { + if (m_audioOutput.data()) { Q_ASSERT(m_audioQueue); [m_audioOutput setSampleBufferDelegate:self queue:m_audioQueue]; } diff --git a/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp b/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp index 18cf0e927..74c83246f 100644 --- a/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp +++ b/src/qtmultimediaquicktools/qdeclarativevideooutput.cpp @@ -206,6 +206,7 @@ void QDeclarativeVideoOutput::setSource(QObject *source) } m_sourceType = MediaObjectSource; +#if QT_CONFIG(opengl) } else if (metaObject->indexOfProperty("videoSurface") != -1) { // Make sure our backend is a QDeclarativeVideoRendererBackend m_backend.reset(); @@ -219,6 +220,7 @@ void QDeclarativeVideoOutput::setSource(QObject *source) m_source.data()->setProperty("videoSurface", QVariant::fromValue<QAbstractVideoSurface*>(surface)); m_sourceType = VideoSurfaceSource; +#endif } else { m_sourceType = NoSource; } @@ -247,12 +249,13 @@ bool QDeclarativeVideoOutput::createBackend(QMediaService *service) } } } - +#if QT_CONFIG(opengl) if (!backendAvailable) { m_backend.reset(new QDeclarativeVideoRendererBackend(this)); if (m_backend->init(service)) backendAvailable = true; } +#endif // QDeclarativeVideoWindowBackend only works when there is a service with a QVideoWindowControl. // Without service, the QDeclarativeVideoRendererBackend should always work. diff --git a/src/qtmultimediaquicktools/qtmultimediaquicktools.pro b/src/qtmultimediaquicktools/qtmultimediaquicktools.pro index 7c8d07647..cb1f8106b 100644 --- a/src/qtmultimediaquicktools/qtmultimediaquicktools.pro +++ b/src/qtmultimediaquicktools/qtmultimediaquicktools.pro @@ -11,20 +11,23 @@ PRIVATE_HEADERS += \ HEADERS += \ $$PRIVATE_HEADERS \ - qdeclarativevideooutput_render_p.h \ - qdeclarativevideooutput_window_p.h \ - qsgvideonode_yuv_p.h \ - qsgvideonode_rgb_p.h \ - qsgvideonode_texture_p.h + qdeclarativevideooutput_window_p.h SOURCES += \ qsgvideonode_p.cpp \ qdeclarativevideooutput.cpp \ - qdeclarativevideooutput_render.cpp \ - qdeclarativevideooutput_window.cpp \ - qsgvideonode_yuv.cpp \ - qsgvideonode_rgb.cpp \ - qsgvideonode_texture.cpp + qdeclarativevideooutput_window.cpp + +qtConfig(opengl) { + SOURCES += qdeclarativevideooutput_render.cpp \ + qsgvideonode_rgb.cpp \ + qsgvideonode_yuv.cpp \ + qsgvideonode_texture.cpp + HEADERS += qdeclarativevideooutput_render_p.h \ + qsgvideonode_rgb_p.h \ + qsgvideonode_yuv_p.h \ + qsgvideonode_texture_p.h +} RESOURCES += \ qtmultimediaquicktools.qrc diff --git a/src/src.pro b/src/src.pro index 97a053379..1dc1015c6 100644 --- a/src/src.pro +++ b/src/src.pro @@ -16,7 +16,7 @@ src_plugins.subdir = plugins src_plugins.depends = multimedia -qtHaveModule(quick):qtConfig(opengl) { +qtHaveModule(quick) { src_qtmultimediaquicktools.subdir = qtmultimediaquicktools src_qtmultimediaquicktools.depends = multimedia |