diff options
Diffstat (limited to 'src')
31 files changed, 217 insertions, 175 deletions
diff --git a/src/gsttools/qgstutils.cpp b/src/gsttools/qgstutils.cpp index 820ac84b4..6a573fa78 100644 --- a/src/gsttools/qgstutils.cpp +++ b/src/gsttools/qgstutils.cpp @@ -642,7 +642,8 @@ QVector<QGstUtils::CameraInfo> QGstUtils::enumerateCameras(GstElementFactory *fa memset(&input, 0, sizeof(input)); for (; ::ioctl(fd, VIDIOC_ENUMINPUT, &input) >= 0; ++input.index) { if (input.type == V4L2_INPUT_TYPE_CAMERA || input.type == 0) { - isCamera = ::ioctl(fd, VIDIOC_S_INPUT, input.index) != 0; + const int ret = ::ioctl(fd, VIDIOC_S_INPUT, &input.index); + isCamera = (ret == 0 || errno == ENOTTY); break; } } diff --git a/src/imports/multimedia/plugins.qmltypes b/src/imports/multimedia/plugins.qmltypes index 20bbf7d3e..e4044fa70 100644 --- a/src/imports/multimedia/plugins.qmltypes +++ b/src/imports/multimedia/plugins.qmltypes @@ -4,7 +4,7 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable QtMultimedia 5.8' +// 'qmlplugindump -nonrelocatable QtMultimedia 5.9' Module { dependencies: ["QtQuick 2.0"] @@ -149,10 +149,12 @@ Module { exports: [ "QtMultimedia/Audio 5.0", "QtMultimedia/Audio 5.6", + "QtMultimedia/Audio 5.9", "QtMultimedia/MediaPlayer 5.0", - "QtMultimedia/MediaPlayer 5.6" + "QtMultimedia/MediaPlayer 5.6", + "QtMultimedia/MediaPlayer 5.9" ] - exportMetaObjectRevisions: [0, 1, 0, 1] + exportMetaObjectRevisions: [0, 1, 2, 0, 1, 2] Enum { name: "Status" values: { @@ -243,6 +245,7 @@ Module { Property { name: "mediaObject"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "availability"; type: "Availability"; isReadonly: true } Property { name: "audioRole"; revision: 1; type: "AudioRole" } + Property { name: "notifyInterval"; revision: 2; type: "int" } Signal { name: "playlistChanged"; revision: 1 } Signal { name: "loopCountChanged" } Signal { name: "paused" } @@ -258,6 +261,7 @@ Module { Parameter { name: "error"; type: "QDeclarativeAudio::Error" } Parameter { name: "errorString"; type: "string" } } + Signal { name: "notifyIntervalChanged"; revision: 2 } Method { name: "play" } Method { name: "pause" } Method { name: "stop" } @@ -554,13 +558,17 @@ Module { Component { name: "QDeclarativeCameraCapture" prototype: "QObject" - exports: ["QtMultimedia/CameraCapture 5.0"] + exports: [ + "QtMultimedia/CameraCapture 5.0", + "QtMultimedia/CameraCapture 5.9" + ] isCreatable: false - exportMetaObjectRevisions: [0] + exportMetaObjectRevisions: [0, 1] Property { name: "ready"; type: "bool"; isReadonly: true } Property { name: "capturedImagePath"; type: "string"; isReadonly: true } Property { name: "resolution"; type: "QSize" } Property { name: "errorString"; type: "string"; isReadonly: true } + Property { name: "supportedResolutions"; revision: 1; type: "QVariantList"; isReadonly: true } Signal { name: "readyForCaptureChanged" Parameter { type: "bool" } @@ -729,9 +737,12 @@ Module { Component { name: "QDeclarativeCameraFlash" prototype: "QObject" - exports: ["QtMultimedia/CameraFlash 5.0"] + exports: [ + "QtMultimedia/CameraFlash 5.0", + "QtMultimedia/CameraFlash 5.9" + ] isCreatable: false - exportMetaObjectRevisions: [0] + exportMetaObjectRevisions: [0, 1] Enum { name: "FlashMode" values: { @@ -749,6 +760,7 @@ Module { } Property { name: "ready"; type: "bool"; isReadonly: true } Property { name: "mode"; type: "FlashMode" } + Property { name: "supportedModes"; revision: 1; type: "QVariantList"; isReadonly: true } Signal { name: "flashReady" Parameter { name: "status"; type: "bool" } diff --git a/src/multimedia/doc/snippets/multimedia-snippets/qsound.cpp b/src/multimedia/doc/snippets/multimedia-snippets/qsound.cpp index ddf0453c4..6f1bd7229 100644 --- a/src/multimedia/doc/snippets/multimedia-snippets/qsound.cpp +++ b/src/multimedia/doc/snippets/multimedia-snippets/qsound.cpp @@ -1,12 +1,22 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, you may use this file under the terms of the BSD license +** as follows: ** ** "Redistribution and use in source and binary forms, with or without ** modification, are permitted provided that the following conditions are diff --git a/src/multimedia/doc/src/audiooverview.qdoc b/src/multimedia/doc/src/audiooverview.qdoc index 6e6d4169c..d39738da4 100644 --- a/src/multimedia/doc/src/audiooverview.qdoc +++ b/src/multimedia/doc/src/audiooverview.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/cameraoverview.qdoc b/src/multimedia/doc/src/cameraoverview.qdoc index 449dfebb4..6962c2c48 100644 --- a/src/multimedia/doc/src/cameraoverview.qdoc +++ b/src/multimedia/doc/src/cameraoverview.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/changes.qdoc b/src/multimedia/doc/src/changes.qdoc index a7a5d973d..65bc88073 100644 --- a/src/multimedia/doc/src/changes.qdoc +++ b/src/multimedia/doc/src/changes.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/multimedia.qdoc b/src/multimedia/doc/src/multimedia.qdoc index 944d8c4d7..68e8ba31c 100644 --- a/src/multimedia/doc/src/multimedia.qdoc +++ b/src/multimedia/doc/src/multimedia.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/multimediabackend.qdoc b/src/multimedia/doc/src/multimediabackend.qdoc index 0622f5f09..48d598999 100644 --- a/src/multimedia/doc/src/multimediabackend.qdoc +++ b/src/multimedia/doc/src/multimediabackend.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/platform-notes-ios.qdoc b/src/multimedia/doc/src/platform-notes-ios.qdoc index 81e9ea0c5..db5cd6d5a 100644 --- a/src/multimedia/doc/src/platform-notes-ios.qdoc +++ b/src/multimedia/doc/src/platform-notes-ios.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/platform-notes-windows.qdoc b/src/multimedia/doc/src/platform-notes-windows.qdoc index 2374ef981..e86d6a276 100644 --- a/src/multimedia/doc/src/platform-notes-windows.qdoc +++ b/src/multimedia/doc/src/platform-notes-windows.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/plugins/qml-multimedia.qdoc b/src/multimedia/doc/src/plugins/qml-multimedia.qdoc index 4cb30a8b8..b6df70973 100644 --- a/src/multimedia/doc/src/plugins/qml-multimedia.qdoc +++ b/src/multimedia/doc/src/plugins/qml-multimedia.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/qtaudioengine.qdoc b/src/multimedia/doc/src/qtaudioengine.qdoc index 2de2bb250..bb12489de 100644 --- a/src/multimedia/doc/src/qtaudioengine.qdoc +++ b/src/multimedia/doc/src/qtaudioengine.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/qtmultimedia-cpp.qdoc b/src/multimedia/doc/src/qtmultimedia-cpp.qdoc index 44623beca..a7b13bad4 100644 --- a/src/multimedia/doc/src/qtmultimedia-cpp.qdoc +++ b/src/multimedia/doc/src/qtmultimedia-cpp.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/qtmultimedia-examples.qdoc b/src/multimedia/doc/src/qtmultimedia-examples.qdoc index dd35aeb1a..d8da05c32 100644 --- a/src/multimedia/doc/src/qtmultimedia-examples.qdoc +++ b/src/multimedia/doc/src/qtmultimedia-examples.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/qtmultimedia-index.qdoc b/src/multimedia/doc/src/qtmultimedia-index.qdoc index dfc9c3f15..269e3d24a 100644 --- a/src/multimedia/doc/src/qtmultimedia-index.qdoc +++ b/src/multimedia/doc/src/qtmultimedia-index.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/qtmultimedia5.qdoc b/src/multimedia/doc/src/qtmultimedia5.qdoc index 29ef2734e..28060a0cc 100644 --- a/src/multimedia/doc/src/qtmultimedia5.qdoc +++ b/src/multimedia/doc/src/qtmultimedia5.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/radiooverview.qdoc b/src/multimedia/doc/src/radiooverview.qdoc index 3f2b0f314..7dcad72d0 100644 --- a/src/multimedia/doc/src/radiooverview.qdoc +++ b/src/multimedia/doc/src/radiooverview.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/doc/src/videooverview.qdoc b/src/multimedia/doc/src/videooverview.qdoc index a0b96fbc8..c3fa50f04 100644 --- a/src/multimedia/doc/src/videooverview.qdoc +++ b/src/multimedia/doc/src/videooverview.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/playback/qplaylistfileparser.cpp b/src/multimedia/playback/qplaylistfileparser.cpp index d0617d2cf..47a3d239e 100644 --- a/src/multimedia/playback/qplaylistfileparser.cpp +++ b/src/multimedia/playback/qplaylistfileparser.cpp @@ -563,7 +563,8 @@ void QPlaylistFileParser::start(const QNetworkRequest& request, const QString &m connect(d->m_source.data(), SIGNAL(finished()), this, SLOT(handleData())); connect(d->m_source.data(), SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(handleError())); - d->handleData(); + if (url.isLocalFile()) + d->handleData(); } void QPlaylistFileParser::abort() diff --git a/src/multimedia/qmediametadata.cpp b/src/multimedia/qmediametadata.cpp index 42fabbe7e..0f3d3defd 100644 --- a/src/multimedia/qmediametadata.cpp +++ b/src/multimedia/qmediametadata.cpp @@ -1,26 +1,38 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** -** This file is part of the documentation of the Qt Toolkit. +** This file is part of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:FDL$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimedia/qmultimedia.cpp b/src/multimedia/qmultimedia.cpp index f1673871f..34d7cbe5a 100644 --- a/src/multimedia/qmultimedia.cpp +++ b/src/multimedia/qmultimedia.cpp @@ -1,26 +1,38 @@ /**************************************************************************** ** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ ** -** This file is part of the documentation of the Qt Toolkit. +** This file is part of the Qt Toolkit. ** -** $QT_BEGIN_LICENSE:FDL$ +** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or (at your option) the GNU General +** Public license version 3 or any later version approved by the KDE Free +** Qt Foundation. The licenses are as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-2.0.html and +** https://www.gnu.org/licenses/gpl-3.0.html. ** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimediawidgets/doc/src/qtmultimediawidgets-index.qdoc b/src/multimediawidgets/doc/src/qtmultimediawidgets-index.qdoc index 1b76d8259..0c2271ef0 100644 --- a/src/multimediawidgets/doc/src/qtmultimediawidgets-index.qdoc +++ b/src/multimediawidgets/doc/src/qtmultimediawidgets-index.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/multimediawidgets/doc/src/qtmultimediawidgets.qdoc b/src/multimediawidgets/doc/src/qtmultimediawidgets.qdoc index 735c23e1a..691d66838 100644 --- a/src/multimediawidgets/doc/src/qtmultimediawidgets.qdoc +++ b/src/multimediawidgets/doc/src/qtmultimediawidgets.qdoc @@ -11,8 +11,8 @@ ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms -** and conditions see http://www.qt.io/terms-conditions. For further -** information use the contact form at http://www.qt.io/contact-us. +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free @@ -20,7 +20,7 @@ ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements -** will be met: http://www.gnu.org/copyleft/fdl.html. +** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ diff --git a/src/plugins/android/src/common/qandroidvideooutput.cpp b/src/plugins/android/src/common/qandroidvideooutput.cpp index b425b9d89..eb41d4a8e 100644 --- a/src/plugins/android/src/common/qandroidvideooutput.cpp +++ b/src/plugins/android/src/common/qandroidvideooutput.cpp @@ -324,6 +324,7 @@ void QAndroidTextureVideoOutput::onFrameAvailable() if (!m_surface->isActive()) { QVideoSurfaceFormat format(frame.size(), frame.pixelFormat(), QAbstractVideoBuffer::GLTextureHandle); + format.setScanLineDirection(QVideoSurfaceFormat::BottomToTop); m_surface->start(format); } diff --git a/src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp b/src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp index df73b9d2c..29d7743ed 100644 --- a/src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp @@ -305,7 +305,9 @@ bool CameraBinImageCapture::processBusMessage(const QGstreamerMessage &message) if (!element) return false; - QString elementName = QString::fromLatin1(gst_element_get_name(element)); + gchar *name = gst_element_get_name(element); + QString elementName = QString::fromLatin1(name); + g_free(name); #if !GST_CHECK_VERSION(1,0,0) GstElementClass *elementClass = GST_ELEMENT_GET_CLASS(element); QString elementLongName = elementClass->details.longname; diff --git a/src/plugins/qnx/mediaplayer/mediaplayer.pri b/src/plugins/qnx/mediaplayer/mediaplayer.pri index f1b51a06e..71bb98827 100644 --- a/src/plugins/qnx/mediaplayer/mediaplayer.pri +++ b/src/plugins/qnx/mediaplayer/mediaplayer.pri @@ -23,4 +23,4 @@ SOURCES += \ $$PWD/mmreventmediaplayercontrol.cpp \ $$PWD/mmreventthread.cpp -QMAKE_USE += mmrenderer pps +QMAKE_USE += mmrenderer diff --git a/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp b/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp index 83e24dc67..55116f642 100644 --- a/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp +++ b/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.cpp @@ -450,8 +450,8 @@ void MmRendererMediaPlayerControl::setMedia(const QMediaContent &media, QIODevic void MmRendererMediaPlayerControl::continueLoadMedia() { + updateMetaData(nullptr); attach(); - updateMetaData(); if (m_playAfterMediaLoaded) play(); } @@ -578,12 +578,9 @@ void MmRendererMediaPlayerControl::setMmBufferLevel(const QString &bufferLevel) } } -void MmRendererMediaPlayerControl::updateMetaData() +void MmRendererMediaPlayerControl::updateMetaData(const strm_dict *dict) { - if (m_mediaStatus == QMediaPlayer::LoadedMedia) - m_metaData.parse(m_contextName); - else - m_metaData.clear(); + m_metaData.update(dict); if (m_videoWindowControl) m_videoWindowControl->setMetaData(m_metaData); diff --git a/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.h b/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.h index cff536f4d..ffa80bd27 100644 --- a/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.h +++ b/src/plugins/qnx/mediaplayer/mmrenderermediaplayercontrol.h @@ -48,6 +48,7 @@ typedef struct mmr_connection mmr_connection_t; typedef struct mmr_context mmr_context_t; typedef struct mmrenderer_monitor mmrenderer_monitor_t; +typedef struct strm_dict strm_dict_t; QT_BEGIN_NAMESPACE @@ -116,6 +117,7 @@ protected: void setMmBufferStatus(const QString &bufferStatus); void setMmBufferLevel(const QString &bufferLevel); void handleMmStopped(); + void updateMetaData(const strm_dict_t *dict); // must be called from subclass dtors (calls virtual function stopMonitoring()) void destroy(); @@ -132,7 +134,6 @@ private: void closeConnection(); void attach(); void detach(); - void updateMetaData(); // All these set the specified value to the backend, but neither emit changed signals // nor change the member value. diff --git a/src/plugins/qnx/mediaplayer/mmrenderermetadata.cpp b/src/plugins/qnx/mediaplayer/mmrenderermetadata.cpp index 9f1087382..50b45382c 100644 --- a/src/plugins/qnx/mediaplayer/mmrenderermetadata.cpp +++ b/src/plugins/qnx/mediaplayer/mmrenderermetadata.cpp @@ -42,6 +42,13 @@ #include <QtCore/qfile.h> #include <QtCore/qstringlist.h> +#include <sys/strm.h> + +static const char *strm_string_getx(const strm_string_t *sstr, const char *defaultValue) +{ + return sstr ? strm_string_get(sstr) : defaultValue; +} + QT_BEGIN_NAMESPACE MmRendererMetaData::MmRendererMetaData() @@ -69,91 +76,72 @@ static const char * seekableKey = "md_title_seekable"; static const int mediaTypeAudioFlag = 4; static const int mediaTypeVideoFlag = 2; -bool MmRendererMetaData::parse(const QString &contextName) +bool MmRendererMetaData::update(const strm_dict_t *dict) { - clear(); - QString fileName = - QString("/pps/services/multimedia/renderer/context/%1/metadata").arg(contextName); + if (!dict) { + clear(); + return true; + } - // In newer OS versions, the filename is "metadata0", not metadata, so try both. - if (!QFile::exists(fileName)) - fileName += '0'; + const strm_string_t *value; - QFile metaDataFile(fileName); - if (!metaDataFile.open(QFile::ReadOnly)) { - qWarning() << "Unable to open media metadata file" << fileName << ":" - << metaDataFile.errorString(); - return false; - } + value = strm_dict_find_rstr(dict, durationKey); + m_duration = QByteArray(strm_string_getx(value, "0")).toLongLong(); - const QString separator("::"); - QTextStream stream(&metaDataFile); - Q_FOREVER { - const QString line = stream.readLine(); - if (line.isNull()) - break; - - const int separatorPos = line.indexOf(separator); - if (separatorPos != -1) { - const QStringRef key = line.leftRef(separatorPos); - const QStringRef value = line.midRef(separatorPos + separator.length()); - - if (key == durationKey) - m_duration = value.toLongLong(); - else if (key == widthKey) - m_width = value.toInt(); - else if (key == heightKey) - m_height = value.toInt(); - else if (key == mediaTypeKey) - m_mediaType = value.toInt(); - else if (key == pixelWidthKey) - m_pixelWidth = value.toFloat(); - else if (key == pixelHeightKey) - m_pixelHeight = value.toFloat(); - else if (key == titleKey) - m_title = value.toString(); - else if (key == seekableKey) - m_seekable = !(value == QLatin1String("0")); - else if (key == artistKey) - m_artist = value.toString(); - else if (key == commentKey) - m_comment = value.toString(); - else if (key == genreKey) - m_genre = value.toString(); - else if (key == yearKey) - m_year = value.toInt(); - else if (key == bitRateKey) - m_audioBitRate = value.toInt(); - else if (key == sampleKey) - m_sampleRate = value.toInt(); - else if (key == albumKey) - m_album = value.toString(); - else if (key == trackKey) - m_track = value.toInt(); - } - } + value = strm_dict_find_rstr(dict, widthKey); + m_width = QByteArray(strm_string_getx(value, "0")).toInt(); + + value = strm_dict_find_rstr(dict, heightKey); + m_height = QByteArray(strm_string_getx(value, "0")).toInt(); + + value = strm_dict_find_rstr(dict, mediaTypeKey); + m_mediaType = QByteArray(strm_string_getx(value, "-1")).toInt(); + + value = strm_dict_find_rstr(dict, pixelWidthKey); + m_pixelWidth = QByteArray(strm_string_getx(value, "1")).toFloat(); + + value = strm_dict_find_rstr(dict, pixelHeightKey); + m_pixelHeight = QByteArray(strm_string_getx(value, "1")).toFloat(); + + value = strm_dict_find_rstr(dict, titleKey); + m_title = QString::fromLatin1(QByteArray(strm_string_getx(value, nullptr))); + + value = strm_dict_find_rstr(dict, seekableKey); + m_seekable = (strcmp(strm_string_getx(value, "1"), "0") != 0); + + value = strm_dict_find_rstr(dict, artistKey); + m_artist = QString::fromLatin1(QByteArray(strm_string_getx(value, nullptr))); + + value = strm_dict_find_rstr(dict, commentKey); + m_comment = QString::fromLatin1(QByteArray(strm_string_getx(value, nullptr))); + + value = strm_dict_find_rstr(dict, genreKey); + m_genre = QString::fromLatin1(QByteArray(strm_string_getx(value, nullptr))); + + value = strm_dict_find_rstr(dict, yearKey); + m_year = QByteArray(strm_string_getx(value, "0")).toInt(); + + value = strm_dict_find_rstr(dict, bitRateKey); + m_audioBitRate = QByteArray(strm_string_getx(value, "0")).toInt(); + + value = strm_dict_find_rstr(dict, sampleKey); + m_sampleRate = QByteArray(strm_string_getx(value, "0")).toInt(); + + value = strm_dict_find_rstr(dict, albumKey); + m_album = QString::fromLatin1(QByteArray(strm_string_getx(value, nullptr))); + + value = strm_dict_find_rstr(dict, trackKey); + m_track = QByteArray(strm_string_getx(value, "0")).toInt(); return true; } void MmRendererMetaData::clear() { - m_duration = 0; - m_height = 0; - m_width = 0; - m_mediaType = -1; - m_pixelWidth = 1; - m_pixelHeight = 1; - m_seekable = true; - m_title.clear(); - m_artist.clear(); - m_comment.clear(); - m_genre.clear(); - m_year = 0; - m_audioBitRate = 0; - m_sampleRate = 0; - m_album.clear(); - m_track = 0; + strm_dict_t *dict; + dict = strm_dict_new(); + update(dict); + strm_dict_destroy(dict); } qlonglong MmRendererMetaData::duration() const diff --git a/src/plugins/qnx/mediaplayer/mmrenderermetadata.h b/src/plugins/qnx/mediaplayer/mmrenderermetadata.h index 4473e5306..ad2193d29 100644 --- a/src/plugins/qnx/mediaplayer/mmrenderermetadata.h +++ b/src/plugins/qnx/mediaplayer/mmrenderermetadata.h @@ -43,13 +43,15 @@ #include <QtCore/QSize> #include <QtCore/QString> +typedef struct strm_dict strm_dict_t; + QT_BEGIN_NAMESPACE class MmRendererMetaData { public: MmRendererMetaData(); - bool parse(const QString &contextName); + bool update(const strm_dict_t *dict); void clear(); // Duration in milliseconds diff --git a/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp b/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp index 3aac3124c..a0bac1261 100644 --- a/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp +++ b/src/plugins/qnx/mediaplayer/mmreventmediaplayercontrol.cpp @@ -122,12 +122,15 @@ void MmrEventMediaPlayerControl::readEvents() } break; } + case MMR_EVENT_METADATA: { + updateMetaData(event->data); + break; + } case MMR_EVENT_ERROR: case MMR_EVENT_STATE: case MMR_EVENT_NONE: case MMR_EVENT_OVERFLOW: case MMR_EVENT_WARNING: - case MMR_EVENT_METADATA: case MMR_EVENT_PLAYLIST: case MMR_EVENT_INPUT: case MMR_EVENT_OUTPUT: |