From ccc41383044f192353d035dd9b94d2b62b0e52ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Wed, 12 Jun 2013 17:49:08 +0200 Subject: [PATCH 1/5] Fix for url bug in the qmlvideo examples. In the FileBrowser paths where being prepended with file:///, since all the paths already starts with a forward slash, navigating away from the initial directory was therefore not possible. To make the examples work on Android, QT += multimedia was added. Change-Id: Iff96729d476c4292999b022bdd6d5770b6b011e7 Reviewed-by: Paul Olav Tvete Reviewed-by: Andy Nichols --- examples/multimedia/video/qmlvideo/main.cpp | 4 ++-- .../multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml | 2 +- examples/multimedia/video/qmlvideo/qmlvideo.pro | 2 +- examples/multimedia/video/qmlvideofx/main.cpp | 6 +++--- .../video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml | 2 +- examples/multimedia/video/qmlvideofx/qmlvideofx.pro | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/multimedia/video/qmlvideo/main.cpp b/examples/multimedia/video/qmlvideo/main.cpp index e44476a1..81c38d24 100644 --- a/examples/multimedia/video/qmlvideo/main.cpp +++ b/examples/multimedia/video/qmlvideo/main.cpp @@ -132,10 +132,10 @@ int main(int argc, char *argv[]) QUrl videoPath; const QStringList moviesLocation = QStandardPaths::standardLocations(QStandardPaths::MoviesLocation); if (moviesLocation.isEmpty()) { - QUrl appPath(QString("file:///%1").arg(app.applicationDirPath())); + QUrl appPath(QString("file://%1").arg(app.applicationDirPath())); videoPath = appPath.resolved(QUrl("./")); } else - videoPath = QString("file:///%1").arg(moviesLocation.first()); + videoPath = QString("file://%1").arg(moviesLocation.first()); viewer.rootContext()->setContextProperty("videoPath", videoPath); QMetaObject::invokeMethod(rootObject, "init"); diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml index 04f1092f..18b7b0e0 100644 --- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml +++ b/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml @@ -101,7 +101,7 @@ Rectangle { Rectangle { id: wrapper function launch() { - var path = "file:///" + filePath; + var path = "file://" + filePath; if (folders.isFolder(index)) down(path); else diff --git a/examples/multimedia/video/qmlvideo/qmlvideo.pro b/examples/multimedia/video/qmlvideo/qmlvideo.pro index 3ea513d3..26865c59 100644 --- a/examples/multimedia/video/qmlvideo/qmlvideo.pro +++ b/examples/multimedia/video/qmlvideo/qmlvideo.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = qmlvideo -QT += quick +QT += quick multimedia LOCAL_SOURCES = main.cpp LOCAL_HEADERS = trace.h diff --git a/examples/multimedia/video/qmlvideofx/main.cpp b/examples/multimedia/video/qmlvideofx/main.cpp index ab613daa..b0698e23 100644 --- a/examples/multimedia/video/qmlvideofx/main.cpp +++ b/examples/multimedia/video/qmlvideofx/main.cpp @@ -116,13 +116,13 @@ int main(int argc, char *argv[]) FileReader fileReader; viewer.rootContext()->setContextProperty("fileReader", &fileReader); - QUrl appPath(QString("file:///%1").arg(app.applicationDirPath())); + QUrl appPath(QString("file://%1").arg(app.applicationDirPath())); QUrl imagePath; const QStringList picturesLocation = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation); if (picturesLocation.isEmpty()) imagePath = appPath.resolved(QUrl("images")); else - imagePath = QString("file:///%1").arg(picturesLocation.first()); + imagePath = QString("file://%1").arg(picturesLocation.first()); viewer.rootContext()->setContextProperty("imagePath", imagePath); QUrl videoPath; @@ -130,7 +130,7 @@ int main(int argc, char *argv[]) if (moviesLocation.isEmpty()) videoPath = appPath.resolved(QUrl("./")); else - videoPath = QString("file:///%1").arg(moviesLocation.first()); + videoPath = QString("file://%1").arg(moviesLocation.first()); viewer.rootContext()->setContextProperty("videoPath", videoPath); viewer.setTitle("qmlvideofx"); diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml index c089f6b1..3d4343c2 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml @@ -102,7 +102,7 @@ Rectangle { Rectangle { id: wrapper function launch() { - var path = "file:///" + filePath + var path = "file://" + filePath if (folders.isFolder(index)) down(path); else diff --git a/examples/multimedia/video/qmlvideofx/qmlvideofx.pro b/examples/multimedia/video/qmlvideofx/qmlvideofx.pro index d62ade86..56344490 100644 --- a/examples/multimedia/video/qmlvideofx/qmlvideofx.pro +++ b/examples/multimedia/video/qmlvideofx/qmlvideofx.pro @@ -1,7 +1,7 @@ TEMPLATE = app TARGET = qmlvideofx -QT += quick +QT += quick multimedia SOURCES += filereader.cpp main.cpp HEADERS += filereader.h trace.h From 16a775d47a69913ce4f0306531c97469066ea896 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Thu, 13 Jun 2013 15:42:12 +0200 Subject: [PATCH 2/5] Android: Fix for uncaught java exception. If an exception's getMessage() function returns a null object, we can't send it directly to the Log function, as it will throw an exception... To avoid this we can prepend the string from getMessage() with an empty string. Change-Id: Ie026cbf9af133352919a4536c152b6d35cb8c0a7 Reviewed-by: Paul Olav Tvete Reviewed-by: Yoann Lopes --- .../multimedia/QtAndroidMediaPlayer.java | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/plugins/android/jar/src/org/qtproject/qt5/android/multimedia/QtAndroidMediaPlayer.java b/src/plugins/android/jar/src/org/qtproject/qt5/android/multimedia/QtAndroidMediaPlayer.java index b2115b7d..e4dbae63 100644 --- a/src/plugins/android/jar/src/org/qtproject/qt5/android/multimedia/QtAndroidMediaPlayer.java +++ b/src/plugins/android/jar/src/org/qtproject/qt5/android/multimedia/QtAndroidMediaPlayer.java @@ -82,7 +82,7 @@ public class QtAndroidMediaPlayer extends MediaPlayer try { mApplicationContext = activity.getApplicationContext(); } catch(final Exception e) { - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } } @@ -101,7 +101,7 @@ public class QtAndroidMediaPlayer extends MediaPlayer currentPosition = getCurrentPosition(); } } catch (final InterruptedException e) { - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); return; } } @@ -262,7 +262,7 @@ public class QtAndroidMediaPlayer extends MediaPlayer progressThread.start(); } catch (final IllegalStateException e) { reset(); - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } } @@ -276,7 +276,7 @@ public class QtAndroidMediaPlayer extends MediaPlayer super.pause(); } catch (final IllegalStateException e) { reset(); - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } } @@ -289,7 +289,7 @@ public class QtAndroidMediaPlayer extends MediaPlayer try { super.stop(); } catch (final IllegalStateException e) { - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } finally { reset(); } @@ -305,7 +305,7 @@ public class QtAndroidMediaPlayer extends MediaPlayer super.seekTo(msec); onMediaPlayerInfoNative(MEDIA_PLAYER_PROGRESS, msec, mID); } catch (final IllegalStateException e) { - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } } @@ -320,7 +320,7 @@ public class QtAndroidMediaPlayer extends MediaPlayer try { playing = super.isPlaying(); } catch (final IllegalStateException e) { - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } return playing; @@ -345,13 +345,13 @@ public class QtAndroidMediaPlayer extends MediaPlayer /* MEDIA_ERROR_UNSUPPORTED= */ -1010, mID); } catch (final IllegalArgumentException e) { - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } catch (final SecurityException e) { - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } catch (final IllegalStateException e) { - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } catch (final NullPointerException e) { - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } } @@ -366,7 +366,7 @@ public class QtAndroidMediaPlayer extends MediaPlayer try { currentPosition = super.getCurrentPosition(); } catch (final IllegalStateException e) { - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } return currentPosition; @@ -383,7 +383,7 @@ public class QtAndroidMediaPlayer extends MediaPlayer try { duration = super.getDuration(); } catch (final IllegalStateException e) { - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } return duration; @@ -415,7 +415,7 @@ public class QtAndroidMediaPlayer extends MediaPlayer if (!mMuted) mVolume = volume; } catch (final IllegalStateException e) { - Log.d(TAG, e.getMessage()); + Log.d(TAG, "" + e.getMessage()); } } From e25db62a59e86a62990de43f554af3baecdd47ff Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Thu, 20 Jun 2013 17:40:11 +0200 Subject: [PATCH 3/5] Multimedia plugins now have a unique JSON metadata 'Keys' property. They previously had the multimedia services they provided as keys. This was a problem when several plugins were available on the same platform, providing the same multimedia service, but with different features or capabilities. Since they had the same key, only the first plugin in the directory was loaded. Nevertheless, it was actually working until commit 732dcfe7 in qtbase, as all plugins were loaded even when sharing the same key. The services a multimedia plugin provides are now declared in the 'Services' property. To preserve compatibility with third-party plugins, if that new property doesn't exist it falls back to the 'Keys' property. Task-number: QTBUG-31868 Task-number: QTBUG-31476 Change-Id: Ic3ba32eeef21b69b922bd3d4feb111101559d132 Reviewed-by: Friedemann Kleint Reviewed-by: Lars Knoll --- src/multimedia/qmediapluginloader.cpp | 7 ++++++- src/plugins/android/mediaplayer/mediaplayer.json | 3 ++- src/plugins/audiocapture/audiocapture.json | 3 ++- src/plugins/avfoundation/camera/avfcamera.json | 3 ++- src/plugins/avfoundation/mediaplayer/avfmediaplayer.json | 3 ++- src/plugins/blackberry/blackberry_mediaservice.json | 3 ++- src/plugins/directshow/directshow.json | 3 ++- src/plugins/directshow/directshow_camera.json | 3 ++- src/plugins/gstreamer/audiodecoder/audiodecoder.json | 3 ++- src/plugins/gstreamer/camerabin/camerabin.json | 3 ++- src/plugins/gstreamer/gstreamer.json | 3 ++- src/plugins/gstreamer/mediacapture/mediacapture.json | 3 ++- src/plugins/gstreamer/mediacapture/mediacapturecamera.json | 3 ++- src/plugins/gstreamer/mediaplayer/mediaplayer.json | 3 ++- src/plugins/qt7/qt7.json | 3 ++- src/plugins/v4l/v4l.json | 3 ++- src/plugins/wmf/wmf.json | 3 ++- .../mockserviceplugin1/mockserviceplugin1.json | 3 ++- .../mockserviceplugin2/mockserviceplugin2.json | 3 ++- .../mockserviceplugin3/mockserviceplugin3.json | 3 ++- .../mockserviceplugin4/mockserviceplugin4.json | 3 ++- 21 files changed, 46 insertions(+), 21 deletions(-) diff --git a/src/multimedia/qmediapluginloader.cpp b/src/multimedia/qmediapluginloader.cpp index e23e32a3..1b4a13f8 100644 --- a/src/multimedia/qmediapluginloader.cpp +++ b/src/multimedia/qmediapluginloader.cpp @@ -127,7 +127,12 @@ void QMediaPluginLoader::loadMetadata() qDebug() << "QMediaPluginLoader: Inserted index " << i << " into metadata: " << jsonobj; #endif - QJsonArray arr = jsonobj.value(QStringLiteral("Keys")).toArray(); + QJsonArray arr = jsonobj.value(QStringLiteral("Services")).toArray(); + // Preserve compatibility with older plugins (made before 5.1) in which + // services were declared in the 'Keys' property + if (arr.isEmpty()) + arr = jsonobj.value(QStringLiteral("Keys")).toArray(); + foreach (QJsonValue value, arr) { QString key = value.toString(); diff --git a/src/plugins/android/mediaplayer/mediaplayer.json b/src/plugins/android/mediaplayer/mediaplayer.json index c4a27ea0..f371ebfd 100644 --- a/src/plugins/android/mediaplayer/mediaplayer.json +++ b/src/plugins/android/mediaplayer/mediaplayer.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.mediaplayer"] + "Keys": ["androidmultimedia"], + "Services": ["org.qt-project.qt.mediaplayer"] } diff --git a/src/plugins/audiocapture/audiocapture.json b/src/plugins/audiocapture/audiocapture.json index d963a2e3..4c7673da 100644 --- a/src/plugins/audiocapture/audiocapture.json +++ b/src/plugins/audiocapture/audiocapture.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.audiosource"] + "Keys": ["audiocapture"], + "Services": ["org.qt-project.qt.audiosource"] } diff --git a/src/plugins/avfoundation/camera/avfcamera.json b/src/plugins/avfoundation/camera/avfcamera.json index d3a58c75..e4310b62 100644 --- a/src/plugins/avfoundation/camera/avfcamera.json +++ b/src/plugins/avfoundation/camera/avfcamera.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.camera"] + "Keys": ["avfoundationcamera"], + "Services": ["org.qt-project.qt.camera"] } diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayer.json b/src/plugins/avfoundation/mediaplayer/avfmediaplayer.json index c4a27ea0..5626edec 100644 --- a/src/plugins/avfoundation/mediaplayer/avfmediaplayer.json +++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayer.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.mediaplayer"] + "Keys": ["avfoundationmediaplayer"], + "Services": ["org.qt-project.qt.mediaplayer"] } diff --git a/src/plugins/blackberry/blackberry_mediaservice.json b/src/plugins/blackberry/blackberry_mediaservice.json index 54c1c9f0..2a59cc77 100644 --- a/src/plugins/blackberry/blackberry_mediaservice.json +++ b/src/plugins/blackberry/blackberry_mediaservice.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.camera", "org.qt-project.qt.mediaplayer"] + "Keys": ["blackberrymultimedia"], + "Services": ["org.qt-project.qt.camera", "org.qt-project.qt.mediaplayer"] } diff --git a/src/plugins/directshow/directshow.json b/src/plugins/directshow/directshow.json index 54c1c9f0..b1783b5e 100644 --- a/src/plugins/directshow/directshow.json +++ b/src/plugins/directshow/directshow.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.camera", "org.qt-project.qt.mediaplayer"] + "Keys": ["directshow"], + "Services": ["org.qt-project.qt.camera", "org.qt-project.qt.mediaplayer"] } diff --git a/src/plugins/directshow/directshow_camera.json b/src/plugins/directshow/directshow_camera.json index d3a58c75..c37ce2c9 100644 --- a/src/plugins/directshow/directshow_camera.json +++ b/src/plugins/directshow/directshow_camera.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.camera"] + "Keys": ["directshow"], + "Services": ["org.qt-project.qt.camera"] } diff --git a/src/plugins/gstreamer/audiodecoder/audiodecoder.json b/src/plugins/gstreamer/audiodecoder/audiodecoder.json index 3cc81dc7..4314f2ef 100644 --- a/src/plugins/gstreamer/audiodecoder/audiodecoder.json +++ b/src/plugins/gstreamer/audiodecoder/audiodecoder.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.audiodecode"] + "Keys": ["gstreameraudiodecode"], + "Services": ["org.qt-project.qt.audiodecode"] } diff --git a/src/plugins/gstreamer/camerabin/camerabin.json b/src/plugins/gstreamer/camerabin/camerabin.json index d3a58c75..3246b468 100644 --- a/src/plugins/gstreamer/camerabin/camerabin.json +++ b/src/plugins/gstreamer/camerabin/camerabin.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.camera"] + "Keys": ["gstreamercamerabin"], + "Services": ["org.qt-project.qt.camera"] } diff --git a/src/plugins/gstreamer/gstreamer.json b/src/plugins/gstreamer/gstreamer.json index 3f6ccdaf..0656cce4 100644 --- a/src/plugins/gstreamer/gstreamer.json +++ b/src/plugins/gstreamer/gstreamer.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.mediaplayer", "org.qt-project.qt.audiosource", "org.qt-project.qt.camera", "org.qt-project.qt.audiodecode"] + "Keys": ["gstreamer"], + "Services": ["org.qt-project.qt.mediaplayer", "org.qt-project.qt.audiosource", "org.qt-project.qt.camera", "org.qt-project.qt.audiodecode"] } diff --git a/src/plugins/gstreamer/mediacapture/mediacapture.json b/src/plugins/gstreamer/mediacapture/mediacapture.json index d963a2e3..68ca3f55 100644 --- a/src/plugins/gstreamer/mediacapture/mediacapture.json +++ b/src/plugins/gstreamer/mediacapture/mediacapture.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.audiosource"] + "Keys": ["gstreamermediacapture"], + "Services": ["org.qt-project.qt.audiosource"] } diff --git a/src/plugins/gstreamer/mediacapture/mediacapturecamera.json b/src/plugins/gstreamer/mediacapture/mediacapturecamera.json index b3123836..af9f3575 100644 --- a/src/plugins/gstreamer/mediacapture/mediacapturecamera.json +++ b/src/plugins/gstreamer/mediacapture/mediacapturecamera.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.audiosource", "org.qt-project.qt.camera"] + "Keys": ["gstreamermediacapture"] + "Services": ["org.qt-project.qt.audiosource", "org.qt-project.qt.camera"] } diff --git a/src/plugins/gstreamer/mediaplayer/mediaplayer.json b/src/plugins/gstreamer/mediaplayer/mediaplayer.json index c4a27ea0..bd1a7e64 100644 --- a/src/plugins/gstreamer/mediaplayer/mediaplayer.json +++ b/src/plugins/gstreamer/mediaplayer/mediaplayer.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.mediaplayer"] + "Keys": ["gstreamermediaplayer"], + "Services": ["org.qt-project.qt.mediaplayer"] } diff --git a/src/plugins/qt7/qt7.json b/src/plugins/qt7/qt7.json index c4a27ea0..b4cebad9 100644 --- a/src/plugins/qt7/qt7.json +++ b/src/plugins/qt7/qt7.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.mediaplayer"] + "Keys": ["qt7"], + "Services": ["org.qt-project.qt.mediaplayer"] } diff --git a/src/plugins/v4l/v4l.json b/src/plugins/v4l/v4l.json index f87f329c..467fd526 100644 --- a/src/plugins/v4l/v4l.json +++ b/src/plugins/v4l/v4l.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.radio"] + "Keys": ["v4l"], + "Services": ["org.qt-project.qt.radio"] } diff --git a/src/plugins/wmf/wmf.json b/src/plugins/wmf/wmf.json index b350cef4..e7073648 100644 --- a/src/plugins/wmf/wmf.json +++ b/src/plugins/wmf/wmf.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.mediaplayer", "org.qt-project.qt.audiodecode"] + "Keys": ["windowsmediafoundation"], + "Services": ["org.qt-project.qt.mediaplayer", "org.qt-project.qt.audiodecode"] } diff --git a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.json b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.json index c4a27ea0..69ff5645 100644 --- a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.json +++ b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin1/mockserviceplugin1.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.mediaplayer"] + "Keys": ["mockserviceplugin1"], + "Services": ["org.qt-project.qt.mediaplayer"] } diff --git a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.json b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.json index ec05f3e5..15d8ed50 100644 --- a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.json +++ b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin2/mockserviceplugin2.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.mediaplayer", "org.qt-project.qt.radio"] + "Keys": ["mockserviceplugin2"], + "Services": ["org.qt-project.qt.mediaplayer", "org.qt-project.qt.radio"] } diff --git a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.json b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.json index 58bbc4d7..591a02e5 100644 --- a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.json +++ b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin3/mockserviceplugin3.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.mediaplayer", "org.qt-project.qt.audiosource"] + "Keys": ["mockserviceplugin3"], + "Services": ["org.qt-project.qt.mediaplayer", "org.qt-project.qt.audiosource"] } diff --git a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.json b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.json index c4a27ea0..d8b8bd7e 100644 --- a/tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.json +++ b/tests/auto/unit/qmediaserviceprovider/mockserviceplugin4/mockserviceplugin4.json @@ -1,3 +1,4 @@ { - "Keys": ["org.qt-project.qt.mediaplayer"] + "Keys": ["mockserviceplugin4"], + "Services": ["org.qt-project.qt.mediaplayer"] } From 1c0cfdf408a398f4fe3efded775341b50106505d Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Wed, 19 Jun 2013 10:54:25 +0200 Subject: [PATCH 4/5] Add changes-5.1.0 file Change-Id: I01369d608876e69da57839165283ed343b683e88 Reviewed-by: Iikka Eklund Reviewed-by: Yoann Lopes --- dist/changes-5.1.0 | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 dist/changes-5.1.0 diff --git a/dist/changes-5.1.0 b/dist/changes-5.1.0 new file mode 100644 index 00000000..937d6fac --- /dev/null +++ b/dist/changes-5.1.0 @@ -0,0 +1,38 @@ +Qt 5.1 introduces many new features and improvements as well as bugfixes +over the 5.0.x series. 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.1 + +The Qt version 5.1 series is binary compatible with the 5.0.x series. +Applications compiled for 5.0 will continue to run with 5.1. + +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. + +**************************************************************************** +* General * +**************************************************************************** + + - Fixed signal not being emitted in QDeclarativeCameraFocus. + - Decouple qmediametadata.h from qmultimedia.h + - Reset VideoSurface pointer when deleted + - Fix crash on idle status change with 64 bit architectures. + - Add support for m3u8 playlist formats + - Fix calculation bug in QWaveDecoder. + + - [QTBUG-28047] Make directshow-plugin available. + - [QTBUG-28589] Add error handling in image capturing in camera + - [QTBUG-30411] AVFoundation: Emit error when media fails to load + +Qt for Android +-------------- + + - Add libQt5MultimediaQuick_p to the list of dependencies. + - Fixed crash when resetting the video surface. + - Add MediaPlayer support for Android From f424e8249b7b83d7d8f5a353161d2cc093840beb Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Tue, 25 Jun 2013 13:20:55 +0200 Subject: [PATCH 5/5] Use correct default audio output and input devices on Windows. It was returning the first available device as the default, which might not be the actual default device. Use the WAVE_MAPPER device ID instead that tells Windows to use the most appropriate device. Change-Id: Id1e9324e889bbaaab54bc0e0da810a7ce5fcb592 Reviewed-by: Andy Nichols --- .../audio/qaudiodeviceinfo_win32_p.cpp | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp index f3af7e0d..e9503d4c 100644 --- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp +++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp @@ -469,20 +469,22 @@ QList QAudioDeviceInfoInternal::availableDevices(QAudio::Mode mode) QByteArray QAudioDeviceInfoInternal::defaultOutputDevice() { - QList list = availableDevices(QAudio::AudioOutput); - if (list.size() > 0) - return list.at(0); - else - return QByteArray(); + QByteArray defaultDevice; + QDataStream ds(&defaultDevice, QIODevice::WriteOnly); + ds << quint32(WAVE_MAPPER) // device ID for default device + << QStringLiteral("Default Output Device"); + + return defaultDevice; } QByteArray QAudioDeviceInfoInternal::defaultInputDevice() { - QList list = availableDevices(QAudio::AudioInput); - if (list.size() > 0) - return list.at(0); - else - return QByteArray(); + QByteArray defaultDevice; + QDataStream ds(&defaultDevice, QIODevice::WriteOnly); + ds << quint32(WAVE_MAPPER) // device ID for default device + << QStringLiteral("Default Input Device"); + + return defaultDevice; } QT_END_NAMESPACE