From 06fe7e6ad7b8e2443b0ccf4a5b488a0e556cf8e2 Mon Sep 17 00:00:00 2001 From: El Mehdi Fekari Date: Thu, 11 Apr 2013 11:09:07 +0200 Subject: [PATCH 01/13] Fix for build break on QNX Disable the camera part as it's using APIs not supported for the PlayBook Change-Id: I4e06a74e8a9e5a00e19e443b8aa304cf2bce2216 Reviewed-by: Rafael Roquetto Reviewed-by: Sean Harmer --- src/plugins/blackberry/bbserviceplugin.cpp | 8 +++++++- src/plugins/blackberry/blackberry.pro | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/plugins/blackberry/bbserviceplugin.cpp b/src/plugins/blackberry/bbserviceplugin.cpp index 90364f3f..0a9abd71 100644 --- a/src/plugins/blackberry/bbserviceplugin.cpp +++ b/src/plugins/blackberry/bbserviceplugin.cpp @@ -40,9 +40,11 @@ ****************************************************************************/ #include "bbserviceplugin.h" +#ifndef Q_OS_BLACKBERRY_TABLET #include "bbcameraservice.h" -#include "bbmediaplayerservice.h" #include "bbvideodeviceselectorcontrol.h" +#endif +#include "bbmediaplayerservice.h" #include @@ -54,8 +56,10 @@ BbServicePlugin::BbServicePlugin() QMediaService *BbServicePlugin::create(const QString &key) { +#ifndef Q_OS_BLACKBERRY_TABLET if (key == QLatin1String(Q_MEDIASERVICE_CAMERA)) return new BbCameraService(); +#endif if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER)) return new BbMediaPlayerService(); @@ -102,7 +106,9 @@ QString BbServicePlugin::deviceDescription(const QByteArray &service, const QByt void BbServicePlugin::updateDevices() const { +#ifndef Q_OS_BLACKBERRY_TABLET BbVideoDeviceSelectorControl::enumerateDevices(&m_cameraDevices, &m_cameraDescriptions); +#endif if (m_cameraDevices.isEmpty()) { qWarning() << "No camera devices found"; diff --git a/src/plugins/blackberry/blackberry.pro b/src/plugins/blackberry/blackberry.pro index 806f2033..5684645f 100644 --- a/src/plugins/blackberry/blackberry.pro +++ b/src/plugins/blackberry/blackberry.pro @@ -11,7 +11,11 @@ HEADERS += bbserviceplugin.h SOURCES += bbserviceplugin.cpp include(common/common.pri) -include(camera/camera.pri) + +!blackberry-playbook { + include(camera/camera.pri) +} + include(mediaplayer/mediaplayer.pri) OTHER_FILES += blackberry_mediaservice.json From 3d848f05ad88e0207d372a6d98a658c5d6e57212 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 15 Apr 2013 09:40:37 +0200 Subject: [PATCH 02/13] Fix tr()-Context in BlackBerry-plugin. Do not use QObject::tr(). Change-Id: I0444a0abb319d3ae7044c269d8f280ebf63128e3 Reviewed-by: Andy Nichols --- src/plugins/blackberry/camera/bbcamerasession.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/blackberry/camera/bbcamerasession.cpp b/src/plugins/blackberry/camera/bbcamerasession.cpp index d2eb6227..24e0a379 100644 --- a/src/plugins/blackberry/camera/bbcamerasession.cpp +++ b/src/plugins/blackberry/camera/bbcamerasession.cpp @@ -335,7 +335,7 @@ static void imageCaptureImageCallback(camera_handle_t handle, camera_buffer_t *b QMetaObject::invokeMethod(data->session, "imageCaptureError", Qt::QueuedConnection, Q_ARG(int, data->requestId), Q_ARG(QCameraImageCapture::Error, QCameraImageCapture::FormatError), - Q_ARG(QString, QObject::tr("Camera provides image in unsupported format"))); + Q_ARG(QString, BbCameraSession::tr("Camera provides image in unsupported format"))); return; } @@ -344,7 +344,7 @@ static void imageCaptureImageCallback(camera_handle_t handle, camera_buffer_t *b QImage image; const bool ok = image.loadFromData(rawData, "JPG"); if (!ok) { - const QString errorMessage = QObject::tr("Could not load JPEG data from frame"); + const QString errorMessage = BbCameraSession::tr("Could not load JPEG data from frame"); // We are inside a worker thread here, so emit error signal inside the main thread QMetaObject::invokeMethod(data->session, "imageCaptureError", Qt::QueuedConnection, Q_ARG(int, data->requestId), From f2af807c5bef83a6b0f79b3adacae72d8be5b1ad Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 11 Apr 2013 09:45:50 +0200 Subject: [PATCH 03/13] Fix hang in tst_qaudioinput (Windows). Task-number: QTBUG-28731 Change-Id: Iebe598f9e0760b05d05d5a6b6ecbeb535e745e2c Reviewed-by: Jonas Rabbe --- tests/auto/integration/qaudioinput/tst_qaudioinput.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/integration/qaudioinput/tst_qaudioinput.cpp b/tests/auto/integration/qaudioinput/tst_qaudioinput.cpp index 9fb4dcbf..d1498379 100755 --- a/tests/auto/integration/qaudioinput/tst_qaudioinput.cpp +++ b/tests/auto/integration/qaudioinput/tst_qaudioinput.cpp @@ -767,9 +767,9 @@ void tst_QAudioInput::pushSuspendResume() QVERIFY(audioInput.processedUSecs() == processedUs); // Drain any data, in case we run out of space when resuming - while (audioInput.bytesReady() >= audioInput.periodSize()) { + const int reads = audioInput.bytesReady() / audioInput.periodSize(); + for (int r = 0; r < reads; ++r) feed->read(buffer.data(), audioInput.periodSize()); - } audioInput.resume(); From 315bcd075816465e57e703290b0b1404af2ae7c9 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Thu, 11 Apr 2013 16:20:06 -0700 Subject: [PATCH 04/13] Fix file path bug in audiorecorder example Default path and name of the output wave audio files were wrong. This means the files did not have the right name to be opened on Windows, and did not have the right path because they were being saved to the root folder. (C:/ on windows, and / on OSX). Now we fall back to the default filepath and name when we try to record without giving a path and filename. Task-number: QTBUG-28663 Change-Id: I8c782a31710cac65cd3c1ecd44de10b41c46e93d Reviewed-by: Christian Stromme --- .../audiorecorder/audiorecorder.cpp | 21 ------------------- .../multimedia/audiorecorder/audiorecorder.h | 1 - 2 files changed, 22 deletions(-) diff --git a/examples/multimedia/audiorecorder/audiorecorder.cpp b/examples/multimedia/audiorecorder/audiorecorder.cpp index ac847680..5f3b0a10 100644 --- a/examples/multimedia/audiorecorder/audiorecorder.cpp +++ b/examples/multimedia/audiorecorder/audiorecorder.cpp @@ -172,9 +172,6 @@ void AudioRecorder::toggleRecord() if (audioRecorder->state() == QMediaRecorder::StoppedState) { audioRecorder->setAudioInput(boxValue(ui->audioDeviceBox).toString()); - if (!outputLocationSet) - audioRecorder->setOutputLocation(generateAudioFilePath()); - QAudioEncoderSettings settings; settings.setCodec(boxValue(ui->audioCodecBox).toString()); settings.setSampleRate(boxValue(ui->sampleRateBox).toInt()); @@ -214,24 +211,6 @@ void AudioRecorder::displayErrorMessage() ui->statusbar->showMessage(audioRecorder->errorString()); } -QUrl AudioRecorder::generateAudioFilePath() -{ - QDir outputDir(QDir::rootPath()); - - int lastImage = 0; - int fileCount = 0; - foreach (const QString &fileName, outputDir.entryList(QStringList(QString("testclip_*")))) { - int imgNumber = fileName.mid(5, fileName.size() - 9).toInt(); - lastImage = qMax(lastImage, imgNumber); - if (outputDir.exists(fileName)) - fileCount += 1; - } - lastImage += fileCount; - QUrl location(QDir::toNativeSeparators(outputDir.canonicalPath() - + QString("/testclip_%1").arg(lastImage + 1, 4, 10, QLatin1Char('0')))); - return location; -} - // This function returns the maximum possible sample value for a given audio format qreal getPeakValue(const QAudioFormat& format) { diff --git a/examples/multimedia/audiorecorder/audiorecorder.h b/examples/multimedia/audiorecorder/audiorecorder.h index 22cce4bb..1a12031e 100644 --- a/examples/multimedia/audiorecorder/audiorecorder.h +++ b/examples/multimedia/audiorecorder/audiorecorder.h @@ -71,7 +71,6 @@ private slots: void updateState(QMediaRecorder::State); void updateProgress(qint64 pos); void displayErrorMessage(); - QUrl generateAudioFilePath(); private: Ui::AudioRecorder *ui; From ae042feed3c8ebf2fba4e34b99da2867084b9ef4 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Fri, 12 Apr 2013 14:13:49 +0200 Subject: [PATCH 05/13] AVFoundation: Remove stray semicolon after condition Change-Id: I1c9a822ee54e7c189fe8806a11334cd23cd79a31 Reviewed-by: Christian Stromme --- src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm b/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm index 9a180849..83042ce9 100644 --- a/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm +++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm @@ -357,7 +357,7 @@ static void *AVFMediaPlayerSessionObserverCurrentItemObservationContext = &AVFMe else if (context == AVFMediaPlayerSessionObserverCurrentItemObservationContext) { AVPlayerItem *newPlayerItem = [change objectForKey:NSKeyValueChangeNewKey]; - if (m_playerItem != newPlayerItem); + if (m_playerItem != newPlayerItem) { m_playerItem = newPlayerItem; From e728a61eb68c44ef1746804cb379e46be64580e5 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Fri, 12 Apr 2013 14:10:26 +0200 Subject: [PATCH 06/13] AVFoundation: Emit error when media fails to load This also makes sure that if you attempt to load an invalid media file while another file is playing that the old session is stopped. Task-number: QTBUG-30411 Change-Id: Ied4dbaffeac50465112c1e94e7c69d1600a6de51 Reviewed-by: Christian Stromme Reviewed-by: Dan Winkler --- .../mediaplayer/avfmediaplayersession.h | 1 + .../mediaplayer/avfmediaplayersession.mm | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.h b/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.h index 8c0db289..58a2d84c 100644 --- a/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.h +++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.h @@ -103,6 +103,7 @@ public Q_SLOTS: void processEOS(); void processLoadStateChange(); void processPositionChange(); + void processMediaLoadError(); void processCurrentItemChanged(); diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm b/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm index 83042ce9..7af6f439 100644 --- a/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm +++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm @@ -283,7 +283,7 @@ static void *AVFMediaPlayerSessionObserverCurrentItemObservationContext = &AVFMe -(void) assetFailedToPrepareForPlayback:(NSError *)error { Q_UNUSED(error) - //TODO: Let the session know that the assest failed to prepare for playback + QMetaObject::invokeMethod(m_session, "processMediaLoadError", Qt::AutoConnection); #ifdef QT_DEBUG_AVF qDebug() << Q_FUNC_INFO; qDebug() << [[error localizedDescription] UTF8String]; @@ -799,13 +799,6 @@ void AVFMediaPlayerSession::processLoadStateChange() [[(AVFMediaPlayerSessionObserver*)m_observer player] setRate:m_rate]; [[(AVFMediaPlayerSessionObserver*)m_observer player] play]; } - - } else { - Q_EMIT error(QMediaPlayer::FormatError, tr("Failed to load media")); - Q_EMIT mediaStatusChanged(m_mediaStatus = QMediaPlayer::InvalidMedia); - Q_EMIT stateChanged(m_state = QMediaPlayer::StoppedState); - - return; } if (newStatus != m_mediaStatus) @@ -817,6 +810,13 @@ void AVFMediaPlayerSession::processPositionChange() Q_EMIT positionChanged(position()); } +void AVFMediaPlayerSession::processMediaLoadError() +{ + Q_EMIT error(QMediaPlayer::FormatError, tr("Failed to load media")); + Q_EMIT mediaStatusChanged(m_mediaStatus = QMediaPlayer::InvalidMedia); + Q_EMIT stateChanged(m_state = QMediaPlayer::StoppedState); +} + void AVFMediaPlayerSession::processCurrentItemChanged() { #ifdef QT_DEBUG_AVF From 63f0fcb5d6b33b85812cf867057862064731b4b8 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Wed, 17 Apr 2013 15:13:56 +1000 Subject: [PATCH 07/13] Fix crash on idle status change with 64 bit architectures. bool and gboolean are not necessarily the same size on all architectures, and if gboolean is larger than bool then passing it as an argument to g_object_get can trash the stack. In this case overwriting some of the session pointer. Change-Id: Iaa7be6a327e9f69212bd7d5bb372d33f2026db0f Reviewed-by: Andy Nichols --- src/plugins/gstreamer/camerabin/camerabinsession.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/gstreamer/camerabin/camerabinsession.cpp b/src/plugins/gstreamer/camerabin/camerabinsession.cpp index f58bea20..2e5c53a4 100644 --- a/src/plugins/gstreamer/camerabin/camerabinsession.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinsession.cpp @@ -672,7 +672,7 @@ void CameraBinSession::updateBusyStatus(GObject *o, GParamSpec *p, gpointer d) Q_UNUSED(p); CameraBinSession *session = reinterpret_cast(d); - bool idle = false; + gboolean idle = false; g_object_get(o, "idle", &idle, NULL); bool busy = !idle; From b315d3e5cd7ca58e0f9e4447f165b5a9c8e96d17 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 17 Apr 2013 15:14:58 +0200 Subject: [PATCH 08/13] Doc: Fix module names in .qdocconf for Qt Multimedia & Widgets This change fixes QCH documentation title for Qt Multimedia Widgets. Also, the project names are changed to use CamelCase - this is required as qdoc will generate visible output (tags in example manifest files) based on those names. Also, removes documentation topic for QML types from Qt Multimedia Widgets as it doesn't have any. Change-Id: Ic5f3b7a3094a1012f3c356f0195a8eb40d9d9e35 Reviewed-by: Jerome Pasion --- src/multimedia/doc/qtmultimedia.qdocconf | 30 +++++++++---------- .../doc/qtmultimediawidgets.qdocconf | 26 +++++++--------- 2 files changed, 26 insertions(+), 30 deletions(-) diff --git a/src/multimedia/doc/qtmultimedia.qdocconf b/src/multimedia/doc/qtmultimedia.qdocconf index 7d26cb5c..e9c3b448 100644 --- a/src/multimedia/doc/qtmultimedia.qdocconf +++ b/src/multimedia/doc/qtmultimedia.qdocconf @@ -1,6 +1,6 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) -project = qtmultimedia +project = QtMultimedia description = Qt Multimedia Documentation url = http://qt-project.org/doc/qt-$QT_VER/qtmultimedia version = $QT_VERSION @@ -12,22 +12,22 @@ version = $QT_VERSION # Defines the name of the project. You cannot use operators (+, =, -) in # the name. Properties for this project are set using a qhp..property # format. -qhp.projects = qtmultimedia -qhp.qtmultimedia.file = qtmultimedia.qhp -qhp.qtmultimedia.namespace = org.qt-project.qtmultimedia.$QT_VERSION_TAG -qhp.qtmultimedia.indexTitle = Qt Multimedia -qhp.qtmultimedia.virtualFolder = qtmultimedia +qhp.projects = QtMultimedia +qhp.QtMultimedia.file = qtmultimedia.qhp +qhp.QtMultimedia.namespace = org.qt-project.qtmultimedia.$QT_VERSION_TAG +qhp.QtMultimedia.indexTitle = Qt Multimedia +qhp.QtMultimedia.virtualFolder = qtmultimedia # For listing child nodes in Qt Creator or Assistant. -qhp.qtmultimedia.subprojects = classes qmltypes -qhp.qtmultimedia.subprojects.classes.title = C++ Classes -qhp.qtmultimedia.subprojects.classes.indexTitle = Qt Multimedia C++ Classes -qhp.qtmultimedia.subprojects.classes.selectors = class fake:headerfile -qhp.qtmultimedia.subprojects.classes.sortPages = true -qhp.qtmultimedia.subprojects.qmltypes.title = QML Types -qhp.qtmultimedia.subprojects.qmltypes.indexTitle = Qt Multimedia QML Types -qhp.qtmultimedia.subprojects.qmltypes.selectors = fake:qmlclass -qhp.qtmultimedia.subprojects.qmltypes.sortPages = true +qhp.QtMultimedia.subprojects = classes qmltypes +qhp.QtMultimedia.subprojects.classes.title = C++ Classes +qhp.QtMultimedia.subprojects.classes.indexTitle = Qt Multimedia C++ Classes +qhp.QtMultimedia.subprojects.classes.selectors = class fake:headerfile +qhp.QtMultimedia.subprojects.classes.sortPages = true +qhp.QtMultimedia.subprojects.qmltypes.title = QML Types +qhp.QtMultimedia.subprojects.qmltypes.indexTitle = Qt Multimedia QML Types +qhp.QtMultimedia.subprojects.qmltypes.selectors = fake:qmlclass +qhp.QtMultimedia.subprojects.qmltypes.sortPages = true exampledirs += ../../../examples/multimedia \ snippets diff --git a/src/multimediawidgets/doc/qtmultimediawidgets.qdocconf b/src/multimediawidgets/doc/qtmultimediawidgets.qdocconf index a25ee1a1..305590f7 100644 --- a/src/multimediawidgets/doc/qtmultimediawidgets.qdocconf +++ b/src/multimediawidgets/doc/qtmultimediawidgets.qdocconf @@ -1,6 +1,6 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) -project = qtmultimediawidgets +project = QtMultimediaWidgets description = Qt Multimedia Widgets Documentation url = http://qt-project.org/doc/qt-$QT_VER/qtmultimediawidgets version = $QT_VERSION @@ -12,22 +12,18 @@ version = $QT_VERSION # Defines the name of the project. You cannot use operators (+, =, -) in # the name. Properties for this project are set using a qhp..property # format. -qhp.projects = qtmultimediawidgets -qhp.qtmultimediawidgets.file = qtmultimediawidgets.qhp -qhp.qtmultimediawidgets.namespace = org.qt-project.qtmultimediawidgets.$QT_VERSION_TAG -qhp.qtmultimediawidgets.indexTitle = Qt Multimedia -qhp.qtmultimediawidgets.virtualFolder = qtmultimediawidgets +qhp.projects = QtMultimediaWidgets +qhp.QtMultimediaWidgets.file = qtmultimediawidgets.qhp +qhp.QtMultimediaWidgets.namespace = org.qt-project.qtmultimediawidgets.$QT_VERSION_TAG +qhp.QtMultimediaWidgets.indexTitle = Qt Multimedia Widgets +qhp.QtMultimediaWidgets.virtualFolder = qtmultimediawidgets # For listing child nodes in Qt Creator or Assistant. -qhp.qtmultimediawidgets.subprojects = classes qmltypes -qhp.qtmultimediawidgets.subprojects.classes.title = C++ Classes -qhp.qtmultimediawidgets.subprojects.classes.indexTitle = Qt Multimedia Widgets C++ Classes -qhp.qtmultimediawidgets.subprojects.classes.selectors = class fake:headerfile -qhp.qtmultimediawidgets.subprojects.classes.sortPages = true -qhp.qtmultimediawidgets.subprojects.qmltypes.title = QML Types -qhp.qtmultimediawidgets.subprojects.qmltypes.indexTitle = Qt Multimedia Widgets QML Types -qhp.qtmultimediawidgets.subprojects.qmltypes.selectors = fake:qmlclass -qhp.qtmultimediawidgets.subprojects.qmltypes.sortPages = true +qhp.QtMultimediaWidgets.subprojects = classes +qhp.QtMultimediaWidgets.subprojects.classes.title = C++ Classes +qhp.QtMultimediaWidgets.subprojects.classes.indexTitle = Qt Multimedia Widgets C++ Classes +qhp.QtMultimediaWidgets.subprojects.classes.selectors = class fake:headerfile +qhp.QtMultimediaWidgets.subprojects.classes.sortPages = true exampledirs += ../../../examples/multimediawidgets \ snippets From 7b4c7bda730abc8a3929c13d05b5c02b084139e3 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Fri, 19 Apr 2013 16:44:02 +0200 Subject: [PATCH 09/13] Playbook: Work around failing screen_read_window() Change-Id: Ie029585b3ac1420fe461523b67aa8b65193e23b0 Reviewed-by: Sean Harmer Reviewed-by: Mehdi Fekari --- .../blackberry/common/windowgrabber.cpp | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/plugins/blackberry/common/windowgrabber.cpp b/src/plugins/blackberry/common/windowgrabber.cpp index d02e022a..db070d8e 100644 --- a/src/plugins/blackberry/common/windowgrabber.cpp +++ b/src/plugins/blackberry/common/windowgrabber.cpp @@ -87,6 +87,30 @@ void WindowGrabber::start() { int result = 0; +#ifdef Q_OS_BLACKBERRY_TABLET + + // HACK: On the Playbook, screen_read_window() will fail for invisible windows. + // To workaround this, make the window visible again, but set a global + // alpha of less than 255. The global alpha makes the window completely invisible + // (due to a bug?), but screen_read_window() will work again. + + errno = 0; + int val = 200; // anything less than 255 + result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_GLOBAL_ALPHA, &val); + if (result != 0) { + qWarning() << "WindowGrabber: unable to set global alpha:" << strerror(errno); + return; + } + + errno = 0; + val = 1; + result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_VISIBLE, &val); + if (result != 0) { + qWarning() << "WindowGrabber: unable to make window visible:" << strerror(errno); + return; + } +#endif + result = screen_create_context(&m_screenContext, SCREEN_APPLICATION_CONTEXT); if (result != 0) { qWarning() << "WindowGrabber: cannot create screen context:" << strerror(errno); From 6e8db5a6714ca6883a6c02fbabdf287b3934f33c Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Thu, 18 Apr 2013 17:16:38 +0200 Subject: [PATCH 10/13] Reset VideoSurface pointer when deleted Change-Id: Iec74c8a8b914d2c2765e0e1f319d89f3daedfe3f Reviewed-by: J-P Nurmi --- src/gsttools/qgstreamervideorenderer.cpp | 4 ++-- src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gsttools/qgstreamervideorenderer.cpp b/src/gsttools/qgstreamervideorenderer.cpp index 4bc92a18..5b0b0d7d 100644 --- a/src/gsttools/qgstreamervideorenderer.cpp +++ b/src/gsttools/qgstreamervideorenderer.cpp @@ -90,7 +90,7 @@ void QGstreamerVideoRenderer::setSurface(QAbstractVideoSurface *surface) m_videoSink = 0; if (m_surface) { - disconnect(m_surface, SIGNAL(supportedFormatsChanged()), + disconnect(m_surface.data(), SIGNAL(supportedFormatsChanged()), this, SLOT(handleFormatChange())); } @@ -99,7 +99,7 @@ void QGstreamerVideoRenderer::setSurface(QAbstractVideoSurface *surface) m_surface = surface; if (m_surface) { - connect(m_surface, SIGNAL(supportedFormatsChanged()), + connect(m_surface.data(), SIGNAL(supportedFormatsChanged()), this, SLOT(handleFormatChange())); } diff --git a/src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h b/src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h index b7121e0b..42ce913e 100644 --- a/src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h +++ b/src/multimedia/gsttools_headers/qgstreamervideorenderer_p.h @@ -44,6 +44,7 @@ #include #include +#include #include "qgstreamervideorendererinterface_p.h" @@ -74,7 +75,7 @@ private slots: private: QVideoSurfaceGstSink *m_videoSink; - QAbstractVideoSurface *m_surface; + QPointer m_surface; }; QT_END_NAMESPACE From 87b413ec9d1daa697536270911b3f965837b722d Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 23 Apr 2013 13:13:45 +0200 Subject: [PATCH 11/13] Doc: Several cosmetic doc fixes. -changed title of "Qt Multimedia Overview" to "Multimedia". It follows the other topic titles from qtdoc. -fixed column widths of paragraphs Change-Id: I8a12d1d9a2a9c3ca184d69ebe464c80721a117f7 Reviewed-by: Leena Miettinen Reviewed-by: Geir Vattekar --- src/multimedia/doc/src/multimedia.qdoc | 64 ++++++++++--------- src/multimedia/doc/src/qtmultimedia-cpp.qdoc | 12 ++-- .../doc/src/qtmultimedia-index.qdoc | 39 +++++++---- 3 files changed, 65 insertions(+), 50 deletions(-) diff --git a/src/multimedia/doc/src/multimedia.qdoc b/src/multimedia/doc/src/multimedia.qdoc index 6e360604..d53967e6 100644 --- a/src/multimedia/doc/src/multimedia.qdoc +++ b/src/multimedia/doc/src/multimedia.qdoc @@ -27,40 +27,37 @@ /*! \page multimediaoverview.html -\title Qt Multimedia Overview +\title Multimedia \brief A set of APIs for working with audio, video, radio and camera devices. \ingroup technology-apis +Multimedia support in Qt is provided by the \l{Qt Multimedia} module. The Qt +Multimedia module provides a rich feature set that enables you to easily take +advantage of a platform's multimedia capabilities such as media playback and +the use of camera and radio devices. -\section1 Overview - -Multimedia support in Qt is provided by the Qt Multimedia module. The -Qt Multimedia module provides a rich feature set that enables you to easily -take advantage of a platforms multimedia capabilites and hardware. This -ranges from the playback and recording of audio and video content to the use -of available devices like cameras and radios. - -\section2 Features +\section1 Features Here are some examples of what can be done with Qt Multimedia APIs: \list \li Access raw audio devices for input and output \li Play low latency sound effects -\li Play media files in playlists (like compressed audio, or video files) +\li Play media files in playlists (such as compressed audio or video files) \li Record audio and compress it -\li Tune and listen to radio stations, and receive radio program information +\li Tune and listen to radio stations \li Use a camera, including viewfinder, image capture, and movie recording \li Play 3D positional audio with \l {Positional Audio} {QtAudioEngine} \li Decode audio media files into memory for processing \li Accessing video frames or audio buffers as they are played or recorded \endlist -\section2 Multimedia Components +\section1 Multimedia Components -All of these tasks can be broadly broken down into four main areas. More information -(including background information and class references) are available here: +Qt's multimedia APIs are categorized into four main components. More +information (including background information and class references) is +available here: \list \li \l {Audio Overview} @@ -69,8 +66,9 @@ All of these tasks can be broadly broken down into four main areas. More inform \li \l {Radio Overview} \endlist -\section2 Multimedia Recipes -For some quick recipes for specific tasks, look at the overviews above and consult this table: +\section1 Multimedia Recipes + +For some quick recipes, look at the overviews above and consult this table: \table 70% \header @@ -85,7 +83,8 @@ For some quick recipes for specific tasks, look at the overviews above and consu \li QSoundEffect \row \li Playing low latency audio - \li \l{multimedia/audiooutput}{audioinput}, \l{multimedia/spectrum}{spectrum} + \li \l{multimedia/audiooutput}{audioinput}, + \l{multimedia/spectrum}{spectrum} \li \li QAudioOutput \row @@ -95,7 +94,8 @@ For some quick recipes for specific tasks, look at the overviews above and consu \li QMediaPlayer \row \li Accessing raw audio input data - \li \l{multimedia/spectrum}{spectrum}, \l {multimedia/audioinput}{audioinput} + \li \l{multimedia/spectrum}{spectrum}, + \l {multimedia/audioinput}{audioinput} \li \li QAudioInput \row @@ -138,12 +138,14 @@ For some quick recipes for specific tasks, look at the overviews above and consu \li QCamera, QAbstractVideoSurface, QVideoFrame \row \li Capturing photos - \li \l {Camera Example}{camera}, \l {multimediawidgets/declarative-camera}{declarative-camera} + \li \l {Camera Example}{camera}, + \l {multimediawidgets/declarative-camera}{declarative-camera} \li \l Camera \li QCamera, QCameraImageCapture \row \li Capturing movies - \li \l {Camera Example}{camera}, \l {multimediawidgets/declarative-camera}{declarative-camera} + \li \l {Camera Example}{camera}, + \l {multimediawidgets/declarative-camera}{declarative-camera} \li \l Camera \li QCamera, QMediaRecorder \row @@ -156,26 +158,26 @@ For some quick recipes for specific tasks, look at the overviews above and consu \section1 Limitations -In many cases the Qt Multimedia APIs build upon the multimedia framework of the underlying system. -This can mean that support for various codec or containers can vary between machines, -depending on what the end user has installed. +The Qt Multimedia APIs build upon the multimedia framework of the underlying +platform. This can mean that support for various codecs or containers can vary +between machines, depending on what the end user has installed. \section1 Advanced Usage -For developers wishing to access some platform specific settings, -or to port the Qt Multimedia APIs to a new platform or technology, -see \l{Multimedia Backend Development}. +For developers wishing to access some platform specific settings, or to port the +Qt Multimedia APIs to a new platform or technology, see \l{Multimedia Backend +Development}. \section1 Changes from Previous Versions -If you've previously used Qt Multimedia in Qt 4.x, or used Qt Multimedia Kit in Qt Mobility, please see -\l {Changes in Qt Multimedia} for more information on what has changed, and what you might need to -change when porting code. +If you previously used Qt Multimedia in Qt 4, or used Qt Multimedia Kit in +Qt Mobility, please see \l {Changes in Qt Multimedia} for more information on +what changed, and what you might need to change when porting code. \section1 Reference Documentation \section2 QML Types -The following types are accessed by using: +The QML types are accessed by using: \code import QtMultimedia 5.0 \endcode diff --git a/src/multimedia/doc/src/qtmultimedia-cpp.qdoc b/src/multimedia/doc/src/qtmultimedia-cpp.qdoc index 3405143e..a821088d 100644 --- a/src/multimedia/doc/src/qtmultimedia-cpp.qdoc +++ b/src/multimedia/doc/src/qtmultimedia-cpp.qdoc @@ -30,10 +30,12 @@ \title Qt Multimedia C++ Classes \ingroup modules - \brief The \l {Qt Multimedia} module provides audio, video, radio and camera functionality. + \brief The \l {Qt Multimedia} module provides audio, video, radio and camera + functionality. - The C++ classes provide more control over the multimedia content than the QML alternatives. - If your application is serving complex use cases such as decoding media files, accessing video or audio buffers, - use the C++ alternative. For more details about the complex audio, video, and camera use cases supported by the C++ - classes, refer to \l {Qt Multimedia Overview}. + The C++ classes provide more control over the multimedia content than the + QML alternatives. If your application is serving complex use cases such as + decoding media files, accessing video or audio buffers, use the C++ + alternative. For more details about the complex audio, video, and camera use + cases supported by the C++ classes, refer to \l {Qt Multimedia Overview}. */ diff --git a/src/multimedia/doc/src/qtmultimedia-index.qdoc b/src/multimedia/doc/src/qtmultimedia-index.qdoc index 7dfa0257..417c0c49 100644 --- a/src/multimedia/doc/src/qtmultimedia-index.qdoc +++ b/src/multimedia/doc/src/qtmultimedia-index.qdoc @@ -28,37 +28,46 @@ /*! \page qtmultimedia-index.html \title Qt Multimedia - \brief The Qt Multimedia module provides APIs for audio, video, radio and camera-related functionality. + \brief The Qt Multimedia module provides APIs for audio, video, radio, and + camera-related functionality. - Qt Multimedia is an essential module that provides a rich set of QML types and C++ classes to handle multimedia content. It also provides necessary APIs to access the camera and radio functionality. + Qt Multimedia is an essential module that provides a rich set of QML types + and C++ classes to handle multimedia content. It also provides necessary + APIs to access the camera and radio functionality. - The \l{Qt Multimedia Widgets} module provides widget based multimedia classes. + The \l{Qt Multimedia Widgets} module provides widget based multimedia + classes. - \section1 Getting started + \section1 Getting Started - The QML types can be imported into your applciation using the following import statement in your \c {.qml} file. + The QML types can be imported into your applciation using the following + import statement in your \c {.qml} file. \code import QtMultimedia 5.0 \endcode - If you intend to use the C++ classes in your application, include the C++ definitions using the following directive: + If you intend to use the C++ classes in your application, include the C++ + definitions using the following directive: \code #include \endcode - \note If you are using a few classes from this module, we recommend including those specific classes only instead of the module. + \note If you are using a few classes from this module, we recommend + including those specific classes only instead of the module. - To link against the corresponding C++ libraries, add the following to your \c {qmake} project file: + To link against the corresponding C++ libraries, add the following to your + \c {qmake} project file: \code QT += multimedia \endcode - \section1 QML types and C++ classes + \section1 QML Types and C++ Classes - The following is a list of important QML types and C++ classes provided by this module: + The following is a list of important QML types and C++ classes provided by + this module: \table \header @@ -72,13 +81,15 @@ \li Access camera viewfinder frames \row \li MediaPlayer - \li Add media playback functionality to a scene. It is same as Audio type, but can be used for video playback with the VideoOutput type. + \li Add media playback functionality to a scene. It is same as Audio type, + but can be used for video playback with the VideoOutput type. \row \li \l {QtMultimedia5::Radio}{Radio} \li Access radio functionality \row \li \l {QtMultimedia5::Video}{Video} - \li Add Video playback functionality to a scene. It uses MediaPlayer and VideoOutput types to provide video playback functionality. + \li Add Video playback functionality to a scene. It uses MediaPlayer and + VideoOutput types to provide video playback functionality. \endtable \table @@ -105,11 +116,11 @@ \li Control video data. \endtable - \section1 Related information + \section1 Related Information \section2 Guides \list - \li \l{Qt Multimedia Overview} + \li \l Multimedia - overview of multimedia support in Qt \li \l{Audio Overview} \li \l{Positional Audio} \li \l{Video Overview} From 73806b75a02743911556628d2dea5dd6d2f0dd01 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 26 Apr 2013 14:57:57 +0200 Subject: [PATCH 12/13] remove pointless code qt_plugin.prf handles it all. Change-Id: I689b68ee18d43723e2fa0d7c17b48a9dcac541aa Reviewed-by: Joerg Bornemann --- src/plugins/qnx/audio/audio.pro | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/plugins/qnx/audio/audio.pro b/src/plugins/qnx/audio/audio.pro index c38b09b7..35ddf73d 100644 --- a/src/plugins/qnx/audio/audio.pro +++ b/src/plugins/qnx/audio/audio.pro @@ -3,9 +3,8 @@ QT += multimedia-private CONFIG += no_private_qt_headers_warning PLUGIN_TYPE = audio - load(qt_plugin) -DESTDIR = $$QT.multimedia.plugins/$${PLUGIN_TYPE} + LIBS += -lasound HEADERS += qnxaudioplugin.h \ @@ -21,6 +20,3 @@ SOURCES += qnxaudioplugin.cpp \ qnxaudioutils.cpp OTHER_FILES += qnx_audio.json - -target.path += $$[QT_INSTALL_PLUGINS]/$${PLUGIN_TYPE} -INSTALLS += target From 20fa4834478ec211c3d4fbcd4066f01cc2024285 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 26 Apr 2013 14:58:31 +0200 Subject: [PATCH 13/13] remove pointless LIBS path QT+=multimedia handles that already. Change-Id: Ifc3be513be10d89de3ea03f11f9d41d7d56d432b Reviewed-by: Joerg Bornemann --- src/imports/multimedia/multimedia.pro | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/imports/multimedia/multimedia.pro b/src/imports/multimedia/multimedia.pro index f05f3126..d738dd4f 100644 --- a/src/imports/multimedia/multimedia.pro +++ b/src/imports/multimedia/multimedia.pro @@ -1,7 +1,5 @@ QT += qml quick network multimedia-private qtmultimediaquicktools-private -LIBS += -L$$QT.multimedia.libs - HEADERS += \ qdeclarativeaudio_p.h \ qdeclarativemediametadata_p.h \