summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-28 14:10:28 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-10-29 13:41:44 +0100
commit9f77002fd3106ca4477159212781264d5b688ddb (patch)
tree767a8cbe4ab1e66ca4c7ca9d9e5f8f727c47e281
parentc6e934601a3405f80c601aac207b09588e291b89 (diff)
Update dependenciesHEADdev
Fix some warnings about deprecated API and usage pf QMutexLocker. Change-Id: I16a1e66a57d0c638f88478ec250e92178c6a433c Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--dependencies.yaml4
-rw-r--r--src/gsttools/qgstvideorenderersink.cpp4
-rw-r--r--src/gsttools/qgstvideorenderersink_p.h4
-rw-r--r--src/multimedia/playback/qmedianetworkplaylistprovider.cpp13
-rw-r--r--src/multimedia/playback/qplaylistfileparser.cpp8
-rw-r--r--src/multimedia/qmediaobject.cpp2
-rw-r--r--src/plugins/android/src/mediaplayer/qandroidmetadatareadercontrol.cpp6
-rw-r--r--src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp6
-rw-r--r--src/plugins/android/src/wrappers/jni/androidsurfaceview.cpp12
-rw-r--r--src/plugins/directshow/player/directshowplayerservice.cpp34
-rw-r--r--src/plugins/directshow/player/directshowplayerservice.h36
11 files changed, 66 insertions, 63 deletions
diff --git a/dependencies.yaml b/dependencies.yaml
index f7bb83740..dcdfb9e95 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -1,7 +1,7 @@
dependencies:
../qtbase:
- ref: f3ecac059d37f829f9379887584b565d3ac6c03e
+ ref: 66c94b83565d2db79307124b6cd797da33a5a7ef
required: true
../qtdeclarative:
- ref: 47313e5181e87fd904e6de41c75dfc844ec3f278
+ ref: 675551f50c567a32e14b0af925d628d72fe2f250
required: false
diff --git a/src/gsttools/qgstvideorenderersink.cpp b/src/gsttools/qgstvideorenderersink.cpp
index 4000f2178..8f4f59358 100644
--- a/src/gsttools/qgstvideorenderersink.cpp
+++ b/src/gsttools/qgstvideorenderersink.cpp
@@ -441,7 +441,7 @@ bool QVideoSurfaceGstDelegate::event(QEvent *event)
}
}
-bool QVideoSurfaceGstDelegate::handleEvent(QMutexLocker *locker)
+bool QVideoSurfaceGstDelegate::handleEvent(QMutexLocker<QMutex> *locker)
{
if (m_flush) {
m_flush = false;
@@ -525,7 +525,7 @@ void QVideoSurfaceGstDelegate::notify()
}
bool QVideoSurfaceGstDelegate::waitForAsyncEvent(
- QMutexLocker *locker, QWaitCondition *condition, unsigned long time)
+ QMutexLocker<QMutex> *locker, QWaitCondition *condition, unsigned long time)
{
if (QThread::currentThread() == thread()) {
while (handleEvent(locker)) {}
diff --git a/src/gsttools/qgstvideorenderersink_p.h b/src/gsttools/qgstvideorenderersink_p.h
index 84162814c..81bcb5c02 100644
--- a/src/gsttools/qgstvideorenderersink_p.h
+++ b/src/gsttools/qgstvideorenderersink_p.h
@@ -122,12 +122,12 @@ public:
bool query(GstQuery *query);
private slots:
- bool handleEvent(QMutexLocker *locker);
+ bool handleEvent(QMutexLocker<QMutex> *locker);
void updateSupportedFormats();
private:
void notify();
- bool waitForAsyncEvent(QMutexLocker *locker, QWaitCondition *condition, unsigned long time);
+ bool waitForAsyncEvent(QMutexLocker<QMutex> *locker, QWaitCondition *condition, unsigned long time);
QPointer<QAbstractVideoSurface> m_surface;
diff --git a/src/multimedia/playback/qmedianetworkplaylistprovider.cpp b/src/multimedia/playback/qmedianetworkplaylistprovider.cpp
index 8282d636a..03bdb0e73 100644
--- a/src/multimedia/playback/qmedianetworkplaylistprovider.cpp
+++ b/src/multimedia/playback/qmedianetworkplaylistprovider.cpp
@@ -101,11 +101,14 @@ void QMediaNetworkPlaylistProviderPrivate::_q_handleNewItem(const QVariant& cont
Q_Q(QMediaNetworkPlaylistProvider);
QUrl url;
- if (content.type() == QVariant::Url) {
- url = content.toUrl();
- } else if (content.type() == QVariant::Map) {
- url = content.toMap()[QLatin1String("url")].toUrl();
- } else {
+ switch (content.metaType().id() ) {
+ case QMetaType::QUrl:
+ url = content.toUrl();
+ break;
+ case QMetaType::QVariantMap:
+ url = content.toMap().value(QLatin1String("url")).toUrl();
+ break;
+ default:
return;
}
diff --git a/src/multimedia/playback/qplaylistfileparser.cpp b/src/multimedia/playback/qplaylistfileparser.cpp
index b60e9778c..c1a423308 100644
--- a/src/multimedia/playback/qplaylistfileparser.cpp
+++ b/src/multimedia/playback/qplaylistfileparser.cpp
@@ -135,7 +135,7 @@ public:
*/
bool parseLineImpl(int lineIndex, const QString& line, const QUrl& root) override
{
- if (line[0] == '#' ) {
+ if (line[0] == u'#' ) {
if (m_extendedFormat) {
if (line.startsWith(QLatin1String("#EXTINF:"))) {
m_extraInfo.clear();
@@ -179,11 +179,11 @@ public:
startPos = 0;
const QChar* buf = line.data();
for (int i = startPos; i < line.length(); ++i) {
- if (buf[i] == '-') {
+ if (buf[i] == u'-') {
if (i == line.length() - 1)
return i;
++i;
- if (buf[i] != '-')
+ if (buf[i] != u'-')
return i - 1;
}
}
@@ -257,7 +257,7 @@ Version=2
}
QString getValue(QStringView line) {
- int start = line.indexOf('=');
+ int start = line.indexOf(u'=');
if (start < 0)
return QString();
return line.mid(start + 1).trimmed().toString();
diff --git a/src/multimedia/qmediaobject.cpp b/src/multimedia/qmediaobject.cpp
index a26433c8e..26a8580f5 100644
--- a/src/multimedia/qmediaobject.cpp
+++ b/src/multimedia/qmediaobject.cpp
@@ -64,7 +64,7 @@ void QMediaObjectPrivate::_q_notify()
for (int pi : qAsConst(properties)) {
QMetaProperty p = m->property(pi);
p.notifySignal().invoke(
- q, QGenericArgument(QMetaType::typeName(p.userType()), p.read(q).data()));
+ q, QGenericArgument(p.metaType().name(), p.read(q).data()));
}
}
diff --git a/src/plugins/android/src/mediaplayer/qandroidmetadatareadercontrol.cpp b/src/plugins/android/src/mediaplayer/qandroidmetadatareadercontrol.cpp
index de7a3aab1..d2e097895 100644
--- a/src/plugins/android/src/mediaplayer/qandroidmetadatareadercontrol.cpp
+++ b/src/plugins/android/src/mediaplayer/qandroidmetadatareadercontrol.cpp
@@ -83,7 +83,7 @@ QAndroidMetaDataReaderControl::QAndroidMetaDataReaderControl(QObject *parent)
QAndroidMetaDataReaderControl::~QAndroidMetaDataReaderControl()
{
- QMutexLocker l(g_metaDataReadersMtx);
+ QMutexLocker l(g_metaDataReadersMtx());
const int idx = g_metaDataReaders->indexOf(this);
if (idx != -1)
g_metaDataReaders->remove(idx);
@@ -117,7 +117,7 @@ void QAndroidMetaDataReaderControl::onMediaChanged(const QMediaContent &media)
void QAndroidMetaDataReaderControl::onUpdateMetaData()
{
{
- const QMutexLocker l(g_metaDataReadersMtx);
+ const QMutexLocker l(g_metaDataReadersMtx());
if (!g_metaDataReaders->contains(this))
g_metaDataReaders->append(this);
}
@@ -238,7 +238,7 @@ void QAndroidMetaDataReaderControl::extractMetadata(QAndroidMetaDataReaderContro
metadata.insert(QMediaMetaData::Year, string.toInt());
}
- const QMutexLocker lock(g_metaDataReadersMtx);
+ const QMutexLocker lock(g_metaDataReadersMtx());
if (!g_metaDataReaders->contains(caller))
return;
diff --git a/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp b/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp
index c5b670142..d861a355f 100644
--- a/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp
+++ b/src/plugins/android/src/wrappers/jni/androidsurfacetexture.cpp
@@ -52,7 +52,7 @@ Q_GLOBAL_STATIC(QMutex, g_textureMutex);
// native method for QtSurfaceTexture.java
static void notifyFrameAvailable(JNIEnv* , jobject, jlong id)
{
- const QMutexLocker lock(g_textureMutex);
+ const QMutexLocker lock(g_textureMutex());
const int idx = g_surfaceTextures->indexOf(id);
if (idx == -1)
return;
@@ -84,7 +84,7 @@ AndroidSurfaceTexture::AndroidSurfaceTexture(quint32 texName)
if (!m_surfaceTexture.isValid())
return;
- const QMutexLocker lock(g_textureMutex);
+ const QMutexLocker lock(g_textureMutex());
g_surfaceTextures->append(jlong(this));
QJNIObjectPrivate listener(QtSurfaceTextureListenerClassName, "(J)V", jlong(this));
setOnFrameAvailableListener(listener);
@@ -97,7 +97,7 @@ AndroidSurfaceTexture::~AndroidSurfaceTexture()
if (m_surfaceTexture.isValid()) {
release();
- const QMutexLocker lock(g_textureMutex);
+ const QMutexLocker lock(g_textureMutex());
const int idx = g_surfaceTextures->indexOf(jlong(this));
if (idx != -1)
g_surfaceTextures->remove(idx);
diff --git a/src/plugins/android/src/wrappers/jni/androidsurfaceview.cpp b/src/plugins/android/src/wrappers/jni/androidsurfaceview.cpp
index d7587f479..65dfe84b9 100644
--- a/src/plugins/android/src/wrappers/jni/androidsurfaceview.cpp
+++ b/src/plugins/android/src/wrappers/jni/androidsurfaceview.cpp
@@ -61,7 +61,7 @@ AndroidSurfaceHolder::AndroidSurfaceHolder(QJNIObjectPrivate object)
return;
{
- QMutexLocker locker(shLock);
+ QMutexLocker locker(shLock());
surfaceHolders->append(this);
}
@@ -73,7 +73,7 @@ AndroidSurfaceHolder::AndroidSurfaceHolder(QJNIObjectPrivate object)
AndroidSurfaceHolder::~AndroidSurfaceHolder()
{
- QMutexLocker locker(shLock);
+ QMutexLocker locker(shLock());
const int i = surfaceHolders->indexOf(this);
if (Q_UNLIKELY(i == -1))
return;
@@ -88,13 +88,13 @@ jobject AndroidSurfaceHolder::surfaceHolder() const
bool AndroidSurfaceHolder::isSurfaceCreated() const
{
- QMutexLocker locker(shLock);
+ QMutexLocker locker(shLock());
return m_surfaceCreated;
}
void AndroidSurfaceHolder::handleSurfaceCreated(JNIEnv*, jobject, jlong id)
{
- QMutexLocker locker(shLock);
+ QMutexLocker locker(shLock());
const int i = surfaceHolders->indexOf(reinterpret_cast<AndroidSurfaceHolder *>(id));
if (Q_UNLIKELY(i == -1))
return;
@@ -105,7 +105,7 @@ void AndroidSurfaceHolder::handleSurfaceCreated(JNIEnv*, jobject, jlong id)
void AndroidSurfaceHolder::handleSurfaceDestroyed(JNIEnv*, jobject, jlong id)
{
- QMutexLocker locker(shLock);
+ QMutexLocker locker(shLock());
const int i = surfaceHolders->indexOf(reinterpret_cast<AndroidSurfaceHolder *>(id));
if (Q_UNLIKELY(i == -1))
return;
@@ -154,7 +154,7 @@ AndroidSurfaceView::AndroidSurfaceView()
connect(m_surfaceHolder, &AndroidSurfaceHolder::surfaceCreated,
this, &AndroidSurfaceView::surfaceCreated);
{ // Lock now to avoid a race with handleSurfaceCreated()
- QMutexLocker locker(shLock);
+ QMutexLocker locker(shLock());
m_window = QWindow::fromWinId(WId(m_surfaceView.object()));
if (m_pendingVisible != -1)
diff --git a/src/plugins/directshow/player/directshowplayerservice.cpp b/src/plugins/directshow/player/directshowplayerservice.cpp
index ce5c9fe56..04e27b9c4 100644
--- a/src/plugins/directshow/player/directshowplayerservice.cpp
+++ b/src/plugins/directshow/player/directshowplayerservice.cpp
@@ -330,7 +330,7 @@ void DirectShowPlayerService::load(const QMediaContent &media, QIODevice *stream
updateStatus();
}
-void DirectShowPlayerService::doSetUrlSource(QMutexLocker *locker)
+void DirectShowPlayerService::doSetUrlSource(QMutexLocker<QMutex> *locker)
{
IBaseFilter *source = nullptr;
@@ -406,7 +406,7 @@ void DirectShowPlayerService::doSetUrlSource(QMutexLocker *locker)
}
}
-void DirectShowPlayerService::doSetStreamSource(QMutexLocker *locker)
+void DirectShowPlayerService::doSetStreamSource(QMutexLocker<QMutex> *locker)
{
Q_UNUSED(locker);
DirectShowIOSource *source = new DirectShowIOSource(m_loop);
@@ -441,7 +441,7 @@ void DirectShowPlayerService::doSetStreamSource(QMutexLocker *locker)
}
}
-void DirectShowPlayerService::doRender(QMutexLocker *locker)
+void DirectShowPlayerService::doRender(QMutexLocker<QMutex> *locker)
{
m_pendingTasks |= m_executedTasks & (Play | Pause);
@@ -582,7 +582,7 @@ void DirectShowPlayerService::doRender(QMutexLocker *locker)
}
}
-void DirectShowPlayerService::doFinalizeLoad(QMutexLocker *locker)
+void DirectShowPlayerService::doFinalizeLoad(QMutexLocker<QMutex> *locker)
{
if (m_graphStatus != Loaded) {
if (IMediaEvent *event = com_cast<IMediaEvent>(m_graph, IID_IMediaEvent)) {
@@ -648,7 +648,7 @@ void DirectShowPlayerService::releaseGraph()
}
}
-void DirectShowPlayerService::doReleaseGraph(QMutexLocker *locker)
+void DirectShowPlayerService::doReleaseGraph(QMutexLocker<QMutex> *locker)
{
Q_UNUSED(locker);
@@ -681,7 +681,7 @@ void DirectShowPlayerService::doReleaseGraph(QMutexLocker *locker)
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wmissing-field-initializers")
-void DirectShowPlayerService::doSetVideoProbe(QMutexLocker *locker)
+void DirectShowPlayerService::doSetVideoProbe(QMutexLocker<QMutex> *locker)
{
Q_UNUSED(locker);
@@ -715,7 +715,7 @@ void DirectShowPlayerService::doSetVideoProbe(QMutexLocker *locker)
m_videoSampleGrabber->start(DirectShowSampleGrabber::CallbackMethod::BufferCB);
}
-void DirectShowPlayerService::doSetAudioProbe(QMutexLocker *locker)
+void DirectShowPlayerService::doSetAudioProbe(QMutexLocker<QMutex> *locker)
{
Q_UNUSED(locker);
@@ -755,7 +755,7 @@ void DirectShowPlayerService::doSetAudioProbe(QMutexLocker *locker)
QT_WARNING_POP
-void DirectShowPlayerService::doReleaseVideoProbe(QMutexLocker *locker)
+void DirectShowPlayerService::doReleaseVideoProbe(QMutexLocker<QMutex> *locker)
{
Q_UNUSED(locker);
@@ -776,7 +776,7 @@ void DirectShowPlayerService::doReleaseVideoProbe(QMutexLocker *locker)
m_videoSampleGrabber = nullptr;
}
-void DirectShowPlayerService::doReleaseAudioProbe(QMutexLocker *locker)
+void DirectShowPlayerService::doReleaseAudioProbe(QMutexLocker<QMutex> *locker)
{
Q_UNUSED(locker);
@@ -899,7 +899,7 @@ void DirectShowPlayerService::play()
updateStatus();
}
-void DirectShowPlayerService::doPlay(QMutexLocker *locker)
+void DirectShowPlayerService::doPlay(QMutexLocker<QMutex> *locker)
{
// Invalidate if there is an error while loading.
if (m_error != QMediaPlayer::NoError) {
@@ -957,7 +957,7 @@ void DirectShowPlayerService::pause()
updateStatus();
}
-void DirectShowPlayerService::doPause(QMutexLocker *locker)
+void DirectShowPlayerService::doPause(QMutexLocker<QMutex> *locker)
{
if (IMediaControl *control = com_cast<IMediaControl>(m_graph, IID_IMediaControl)) {
locker->unlock();
@@ -1013,7 +1013,7 @@ void DirectShowPlayerService::stop()
updateStatus();
}
-void DirectShowPlayerService::doStop(QMutexLocker *locker)
+void DirectShowPlayerService::doStop(QMutexLocker<QMutex> *locker)
{
Q_UNUSED(locker);
if (m_executedTasks & (Play | Pause)) {
@@ -1049,7 +1049,7 @@ void DirectShowPlayerService::setRate(qreal rate)
::SetEvent(m_taskHandle);
}
-void DirectShowPlayerService::doSetRate(QMutexLocker *locker)
+void DirectShowPlayerService::doSetRate(QMutexLocker<QMutex> *locker)
{
if (IMediaSeeking *seeking = com_cast<IMediaSeeking>(m_graph, IID_IMediaSeeking)) {
// Cache current values as we can't query IMediaSeeking during a seek due to the
@@ -1139,7 +1139,7 @@ void DirectShowPlayerService::seek(qint64 position)
::SetEvent(m_taskHandle);
}
-void DirectShowPlayerService::doSeek(QMutexLocker *locker)
+void DirectShowPlayerService::doSeek(QMutexLocker<QMutex> *locker)
{
if (m_seekPosition == -1)
return;
@@ -1245,7 +1245,7 @@ void DirectShowPlayerService::setAudioOutput(IBaseFilter *filter)
m_playerControl->updateAudioOutput(m_audioOutput);
}
-void DirectShowPlayerService::doReleaseAudioOutput(QMutexLocker *locker)
+void DirectShowPlayerService::doReleaseAudioOutput(QMutexLocker<QMutex> *locker)
{
Q_UNUSED(locker);
m_pendingTasks |= m_executedTasks & (Play | Pause);
@@ -1353,7 +1353,7 @@ void DirectShowPlayerService::updateVideoProbe()
}
}
-void DirectShowPlayerService::doReleaseVideoOutput(QMutexLocker *locker)
+void DirectShowPlayerService::doReleaseVideoOutput(QMutexLocker<QMutex> *locker)
{
Q_UNUSED(locker);
m_pendingTasks |= m_executedTasks & (Play | Pause);
@@ -1551,7 +1551,7 @@ void DirectShowPlayerService::onVideoBufferAvailable(double time, const QByteArr
QT_WARNING_POP
-void DirectShowPlayerService::graphEvent(QMutexLocker *locker)
+void DirectShowPlayerService::graphEvent(QMutexLocker<QMutex> *locker)
{
Q_UNUSED(locker);
if (IMediaEvent *event = com_cast<IMediaEvent>(m_graph, IID_IMediaEvent)) {
diff --git a/src/plugins/directshow/player/directshowplayerservice.h b/src/plugins/directshow/player/directshowplayerservice.h
index e0b011f4a..9631a2a70 100644
--- a/src/plugins/directshow/player/directshowplayerservice.h
+++ b/src/plugins/directshow/player/directshowplayerservice.h
@@ -123,24 +123,24 @@ private:
void run();
- void doSetUrlSource(QMutexLocker *locker);
- void doSetStreamSource(QMutexLocker *locker);
- void doRender(QMutexLocker *locker);
- void doFinalizeLoad(QMutexLocker *locker);
- void doSetRate(QMutexLocker *locker);
- void doSeek(QMutexLocker *locker);
- void doPlay(QMutexLocker *locker);
- void doPause(QMutexLocker *locker);
- void doStop(QMutexLocker *locker);
- void doReleaseAudioOutput(QMutexLocker *locker);
- void doReleaseVideoOutput(QMutexLocker *locker);
- void doReleaseGraph(QMutexLocker *locker);
- void doSetVideoProbe(QMutexLocker *locker);
- void doSetAudioProbe(QMutexLocker *locker);
- void doReleaseVideoProbe(QMutexLocker *locker);
- void doReleaseAudioProbe(QMutexLocker *locker);
-
- void graphEvent(QMutexLocker *locker);
+ void doSetUrlSource(QMutexLocker<QMutex> *locker);
+ void doSetStreamSource(QMutexLocker<QMutex> *locker);
+ void doRender(QMutexLocker<QMutex> *locker);
+ void doFinalizeLoad(QMutexLocker<QMutex> *locker);
+ void doSetRate(QMutexLocker<QMutex> *locker);
+ void doSeek(QMutexLocker<QMutex> *locker);
+ void doPlay(QMutexLocker<QMutex> *locker);
+ void doPause(QMutexLocker<QMutex> *locker);
+ void doStop(QMutexLocker<QMutex> *locker);
+ void doReleaseAudioOutput(QMutexLocker<QMutex> *locker);
+ void doReleaseVideoOutput(QMutexLocker<QMutex> *locker);
+ void doReleaseGraph(QMutexLocker<QMutex> *locker);
+ void doSetVideoProbe(QMutexLocker<QMutex> *locker);
+ void doSetAudioProbe(QMutexLocker<QMutex> *locker);
+ void doReleaseVideoProbe(QMutexLocker<QMutex> *locker);
+ void doReleaseAudioProbe(QMutexLocker<QMutex> *locker);
+
+ void graphEvent(QMutexLocker<QMutex> *locker);
enum Task
{