summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/alsa/qalsaaudioinput.cpp11
-rw-r--r--src/plugins/alsa/qalsaaudiooutput.cpp7
-rw-r--r--src/plugins/android/jar/src/org/qtproject/qt5/android/multimedia/QtAndroidMediaPlayer.java11
-rw-r--r--src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp6
-rw-r--r--src/plugins/android/src/wrappers/jni/androidcamera.h1
-rw-r--r--src/plugins/android/src/wrappers/jni/androidmediaplayer.cpp5
-rw-r--r--src/plugins/audiocapture/audiocapturesession.cpp4
-rw-r--r--src/plugins/avfoundation/camera/avfcameradebug.h2
-rw-r--r--src/plugins/avfoundation/camera/avfstoragelocation.h2
-rw-r--r--src/plugins/avfoundation/camera/camera.pro3
-rw-r--r--src/plugins/avfoundation/mediaplayer/mediaplayer.pro4
-rw-r--r--src/plugins/directshow/camera/camera.pri2
-rw-r--r--src/plugins/directshow/camera/dscameraservice.h2
-rw-r--r--src/plugins/directshow/directshow.pro8
-rw-r--r--src/plugins/directshow/player/player.pri8
-rw-r--r--src/plugins/gstreamer/camerabin/camerabin.pro18
-rw-r--r--src/plugins/gstreamer/camerabin/camerabincapturebufferformat.cpp6
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinexposure.h6
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinservice.cpp21
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinsession.h6
-rw-r--r--src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp94
-rw-r--r--src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.h67
-rw-r--r--src/plugins/gstreamer/common.pri26
-rw-r--r--src/plugins/gstreamer/mediacapture/mediacapture.pro2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp1
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp4
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp20
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp17
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp5
-rw-r--r--src/plugins/plugins.pro27
-rw-r--r--src/plugins/pulseaudio/pulseaudio.pro3
-rw-r--r--src/plugins/qnx-audio/audio/qnxaudioinput.cpp2
-rw-r--r--src/plugins/qnx-audio/audio/qnxaudiooutput.cpp2
-rw-r--r--src/plugins/qnx/bbserviceplugin.cpp139
-rw-r--r--src/plugins/qnx/bbserviceplugin.h84
-rw-r--r--src/plugins/qnx/blackberry_mediaservice.json4
-rw-r--r--src/plugins/qnx/mediaplayer/bpsmediaplayercontrol.cpp119
-rw-r--r--src/plugins/qnx/mediaplayer/bpsmediaplayercontrol.h64
-rw-r--r--src/plugins/qnx/mediaplayer/mediaplayer.pri19
-rw-r--r--src/plugins/qnx/mediaplayer/mmrenderermediaplayerservice.cpp8
-rw-r--r--src/plugins/qnx/qnx.pro17
-rw-r--r--src/plugins/resourcepolicy/resourcepolicy.pro4
-rw-r--r--src/plugins/videonode/videonode.pro4
-rw-r--r--src/plugins/windowsaudio/qwindowsaudiooutput.cpp23
-rw-r--r--src/plugins/wmf/decoder/decoder.pri6
-rw-r--r--src/plugins/wmf/mfstream.cpp2
-rw-r--r--src/plugins/wmf/player/mfactivate.cpp (renamed from src/plugins/wmf/mfactivate.cpp)0
-rw-r--r--src/plugins/wmf/player/mfactivate.h (renamed from src/plugins/wmf/mfactivate.h)0
-rw-r--r--src/plugins/wmf/player/mftvideo.cpp (renamed from src/plugins/wmf/mftvideo.cpp)0
-rw-r--r--src/plugins/wmf/player/mftvideo.h (renamed from src/plugins/wmf/mftvideo.h)0
-rw-r--r--src/plugins/wmf/player/player.pri13
-rw-r--r--src/plugins/wmf/player/samplegrabber.cpp (renamed from src/plugins/wmf/samplegrabber.cpp)0
-rw-r--r--src/plugins/wmf/player/samplegrabber.h (renamed from src/plugins/wmf/samplegrabber.h)0
-rw-r--r--src/plugins/wmf/sourceresolver.cpp3
-rw-r--r--src/plugins/wmf/wmf.pro15
-rw-r--r--src/plugins/wmf/wmf_audiodecode.json4
-rw-r--r--src/plugins/wmf/wmfserviceplugin.cpp4
-rw-r--r--src/plugins/wmf/wmfserviceplugin.h6
58 files changed, 142 insertions, 799 deletions
diff --git a/src/plugins/alsa/qalsaaudioinput.cpp b/src/plugins/alsa/qalsaaudioinput.cpp
index 8109e6932..5a4111a90 100644
--- a/src/plugins/alsa/qalsaaudioinput.cpp
+++ b/src/plugins/alsa/qalsaaudioinput.cpp
@@ -49,6 +49,7 @@
//
#include <QtCore/qcoreapplication.h>
+#include <QtCore/qvarlengtharray.h>
#include <QtMultimedia/private/qaudiohelpers_p.h>
#include "qalsaaudioinput.h"
#include "qalsaaudiodeviceinfo.h"
@@ -526,20 +527,22 @@ qint64 QAlsaAudioInput::read(char* data, qint64 len)
int count=0;
int err = 0;
+ QVarLengthArray<char, 4096> buffer(bytesToRead);
while(count < 5 && bytesToRead > 0) {
- char buffer[bytesToRead];
int chunks = bytesToRead / period_size;
int frames = chunks * period_frames;
if (frames > (int)buffer_frames)
frames = buffer_frames;
- int readFrames = snd_pcm_readi(handle, buffer, frames);
+ int readFrames = snd_pcm_readi(handle, buffer.data(), frames);
bytesRead = snd_pcm_frames_to_bytes(handle, readFrames);
if (m_volume < 1.0f)
- QAudioHelperInternal::qMultiplySamples(m_volume, settings, buffer, buffer, bytesRead);
+ QAudioHelperInternal::qMultiplySamples(m_volume, settings,
+ buffer.constData(),
+ buffer.data(), bytesRead);
if (readFrames >= 0) {
- ringBuffer.write(buffer, bytesRead);
+ ringBuffer.write(buffer.data(), bytesRead);
#ifdef DEBUG_AUDIO
qDebug() << QString::fromLatin1("read in bytes = %1 (frames=%2)").arg(bytesRead).arg(readFrames).toLatin1().constData();
#endif
diff --git a/src/plugins/alsa/qalsaaudiooutput.cpp b/src/plugins/alsa/qalsaaudiooutput.cpp
index 5e444a0a9..cd97ae85b 100644
--- a/src/plugins/alsa/qalsaaudiooutput.cpp
+++ b/src/plugins/alsa/qalsaaudiooutput.cpp
@@ -49,6 +49,7 @@
//
#include <QtCore/qcoreapplication.h>
+#include <QtCore/qvarlengtharray.h>
#include <QtMultimedia/private/qaudiohelpers_p.h>
#include "qalsaaudiooutput.h"
#include "qalsaaudiodeviceinfo.h"
@@ -567,9 +568,9 @@ qint64 QAlsaAudioOutput::write( const char *data, qint64 len )
frames = snd_pcm_bytes_to_frames(handle, space);
if (m_volume < 1.0f) {
- char out[space];
- QAudioHelperInternal::qMultiplySamples(m_volume, settings, data, out, space);
- err = snd_pcm_writei(handle, out, frames);
+ QVarLengthArray<char, 4096> out(space);
+ QAudioHelperInternal::qMultiplySamples(m_volume, settings, data, out.data(), space);
+ err = snd_pcm_writei(handle, out.constData(), frames);
} else {
err = snd_pcm_writei(handle, data, frames);
}
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 6818b2909..7fb4a8690 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
@@ -44,7 +44,6 @@ import java.lang.String;
import java.io.FileInputStream;
// API is level is < 9 unless marked otherwise.
-import android.app.Activity;
import android.content.Context;
import android.media.MediaPlayer;
import android.net.Uri;
@@ -68,7 +67,7 @@ public class QtAndroidMediaPlayer
private MediaPlayer mMediaPlayer = null;
private Uri mUri = null;
private final long mID;
- private final Activity mActivity;
+ private final Context mContext;
private boolean mMuted = false;
private int mVolume = 100;
private static final String TAG = "Qt MediaPlayer";
@@ -207,10 +206,10 @@ public class QtAndroidMediaPlayer
}
- public QtAndroidMediaPlayer(final Activity activity, final long id)
+ public QtAndroidMediaPlayer(final Context context, final long id)
{
mID = id;
- mActivity = activity;
+ mContext = context;
}
private void setState(int state)
@@ -363,7 +362,7 @@ public class QtAndroidMediaPlayer
final boolean inAssets = (mUri.getScheme().compareTo("assets") == 0);
if (inAssets) {
final String asset = mUri.getPath().substring(1 /* Remove first '/' */);
- final AssetManager am = mActivity.getAssets();
+ final AssetManager am = mContext.getAssets();
afd = am.openFd(asset);
final long offset = afd.getStartOffset();
final long length = afd.getLength();
@@ -374,7 +373,7 @@ public class QtAndroidMediaPlayer
FileDescriptor fd = fis.getFD();
mMediaPlayer.setDataSource(fd);
} else {
- mMediaPlayer.setDataSource(mActivity, mUri);
+ mMediaPlayer.setDataSource(mContext, mUri);
}
setState(State.Initialized);
} catch (final IOException e) {
diff --git a/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp b/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp
index 68d2fc66b..1c6497eb0 100644
--- a/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp
+++ b/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp
@@ -59,11 +59,11 @@ public:
if (--mControl->mActiveStateChangeNotifiers)
return;
- if (mPreviousState != mControl->state())
- Q_EMIT mControl->stateChanged(mControl->state());
-
if (mPreviousMediaStatus != mControl->mediaStatus())
Q_EMIT mControl->mediaStatusChanged(mControl->mediaStatus());
+
+ if (mPreviousState != mControl->state())
+ Q_EMIT mControl->stateChanged(mControl->state());
}
private:
diff --git a/src/plugins/android/src/wrappers/jni/androidcamera.h b/src/plugins/android/src/wrappers/jni/androidcamera.h
index f4694d7dc..1a59ff3c7 100644
--- a/src/plugins/android/src/wrappers/jni/androidcamera.h
+++ b/src/plugins/android/src/wrappers/jni/androidcamera.h
@@ -62,6 +62,7 @@ struct AndroidCameraInfo
QCamera::Position position;
int orientation;
};
+Q_DECLARE_TYPEINFO(AndroidCameraInfo, Q_MOVABLE_TYPE);
class AndroidCamera : public QObject
{
diff --git a/src/plugins/android/src/wrappers/jni/androidmediaplayer.cpp b/src/plugins/android/src/wrappers/jni/androidmediaplayer.cpp
index f65d6aade..582d8aa9d 100644
--- a/src/plugins/android/src/wrappers/jni/androidmediaplayer.cpp
+++ b/src/plugins/android/src/wrappers/jni/androidmediaplayer.cpp
@@ -57,10 +57,11 @@ AndroidMediaPlayer::AndroidMediaPlayer()
: QObject()
{
QWriteLocker locker(rwLock);
+ auto context = QtAndroidPrivate::activity() ? QtAndroidPrivate::activity() : QtAndroidPrivate::service();
const jlong id = reinterpret_cast<jlong>(this);
mMediaPlayer = QJNIObjectPrivate(QtAndroidMediaPlayerClassName,
- "(Landroid/app/Activity;J)V",
- QtAndroidPrivate::activity(),
+ "(Landroid/content/Context;J)V",
+ context,
id);
mediaPlayers->append(this);
}
diff --git a/src/plugins/audiocapture/audiocapturesession.cpp b/src/plugins/audiocapture/audiocapturesession.cpp
index e4a9688e8..7ed3313d8 100644
--- a/src/plugins/audiocapture/audiocapturesession.cpp
+++ b/src/plugins/audiocapture/audiocapturesession.cpp
@@ -206,10 +206,6 @@ QDir AudioCaptureSession::defaultDir() const
{
QStringList dirCandidates;
-#if defined(Q_WS_MAEMO_6)
- dirCandidates << QLatin1String("/home/user/MyDocs");
-#endif
-
dirCandidates << QDir::home().filePath("Documents");
dirCandidates << QDir::home().filePath("My Documents");
dirCandidates << QDir::homePath();
diff --git a/src/plugins/avfoundation/camera/avfcameradebug.h b/src/plugins/avfoundation/camera/avfcameradebug.h
index 79bf8eb0e..8838122e0 100644
--- a/src/plugins/avfoundation/camera/avfcameradebug.h
+++ b/src/plugins/avfoundation/camera/avfcameradebug.h
@@ -40,7 +40,7 @@
#ifndef AVFDEBUG_H
#define AVFDEBUG_H
-#include "qtmultimediadefs.h"
+#include "qtmultimediaglobal.h"
#include <QtCore/qdebug.h>
diff --git a/src/plugins/avfoundation/camera/avfstoragelocation.h b/src/plugins/avfoundation/camera/avfstoragelocation.h
index e3267c1e7..76621983d 100644
--- a/src/plugins/avfoundation/camera/avfstoragelocation.h
+++ b/src/plugins/avfoundation/camera/avfstoragelocation.h
@@ -40,7 +40,7 @@
#ifndef AVFSTORAGE_H
#define AVFSTORAGE_H
-#include "qtmultimediadefs.h"
+#include "qtmultimediaglobal.h"
#include <QtCore/qdir.h>
#include <QtMultimedia/qcamera.h>
diff --git a/src/plugins/avfoundation/camera/camera.pro b/src/plugins/avfoundation/camera/camera.pro
index 4c6376735..bd7b1fc97 100644
--- a/src/plugins/avfoundation/camera/camera.pro
+++ b/src/plugins/avfoundation/camera/camera.pro
@@ -10,13 +10,14 @@ LIBS += -framework CoreFoundation \
-framework AudioToolbox \
-framework CoreAudio \
-framework QuartzCore \
- -framework AVFoundation \
-framework CoreMedia
osx:LIBS += -framework AppKit \
-framework AudioUnit
ios:LIBS += -framework CoreGraphics \
-framework CoreVideo
+QMAKE_USE += avfoundation
+
OTHER_FILES += avfcamera.json
DEFINES += QMEDIA_AVF_CAMERA
diff --git a/src/plugins/avfoundation/mediaplayer/mediaplayer.pro b/src/plugins/avfoundation/mediaplayer/mediaplayer.pro
index 29e231066..f9a086b33 100644
--- a/src/plugins/avfoundation/mediaplayer/mediaplayer.pro
+++ b/src/plugins/avfoundation/mediaplayer/mediaplayer.pro
@@ -6,7 +6,9 @@ CONFIG += no_keywords
QT += multimedia-private network
-LIBS += -framework AVFoundation -framework CoreMedia -framework CoreVideo -framework QuartzCore
+LIBS += -framework CoreMedia -framework CoreVideo -framework QuartzCore
+
+QMAKE_USE += avfoundation
DEFINES += QMEDIA_AVF_MEDIAPLAYER
diff --git a/src/plugins/directshow/camera/camera.pri b/src/plugins/directshow/camera/camera.pri
index 6c67a8fe2..fb7fbd3f5 100644
--- a/src/plugins/directshow/camera/camera.pri
+++ b/src/plugins/directshow/camera/camera.pri
@@ -28,4 +28,4 @@ SOURCES += \
$$PWD/dscameraimageprocessingcontrol.cpp
*-msvc*:INCLUDEPATH += $$(DXSDK_DIR)/include
-LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32
+QMAKE_USE += directshow
diff --git a/src/plugins/directshow/camera/dscameraservice.h b/src/plugins/directshow/camera/dscameraservice.h
index dd5a7b9e3..8976e41cf 100644
--- a/src/plugins/directshow/camera/dscameraservice.h
+++ b/src/plugins/directshow/camera/dscameraservice.h
@@ -48,7 +48,6 @@ QT_BEGIN_NAMESPACE
class DSCameraControl;
class DSCameraSession;
-class DSVideoOutputControl;
class DSVideoDeviceControl;
class DSImageCaptureControl;
class DSCameraViewfinderSettingsControl;
@@ -68,7 +67,6 @@ public:
private:
DSCameraControl *m_control;
DSCameraSession *m_session;
- DSVideoOutputControl *m_videoOutput;
DSVideoDeviceControl *m_videoDevice;
QMediaControl *m_videoRenderer;
DSImageCaptureControl *m_imageCapture;
diff --git a/src/plugins/directshow/directshow.pro b/src/plugins/directshow/directshow.pro
index 10c6fe2b6..5eb4fbc96 100644
--- a/src/plugins/directshow/directshow.pro
+++ b/src/plugins/directshow/directshow.pro
@@ -1,19 +1,19 @@
TARGET = dsengine
+QT += multimedia-private
+
win32:!qtHaveModule(opengl)|qtConfig(dynamicgl) {
LIBS_PRIVATE += -lgdi32 -luser32
}
-QT += multimedia-private
-
HEADERS += dsserviceplugin.h
SOURCES += dsserviceplugin.cpp
-!config_wmsdk: DEFINES += QT_NO_WMSDK
+!qtConfig(wmsdk): DEFINES += QT_NO_WMSDK
mingw: DEFINES += NO_DSHOW_STRSAFE
include(helpers/helpers.pri)
-!config_wmf: include(player/player.pri)
+!qtConfig(wmf-backend): include(player/player.pri)
include(camera/camera.pri)
OTHER_FILES += \
diff --git a/src/plugins/directshow/player/player.pri b/src/plugins/directshow/player/player.pri
index 8b4bb70b7..7391ec7f0 100644
--- a/src/plugins/directshow/player/player.pri
+++ b/src/plugins/directshow/player/player.pri
@@ -1,7 +1,7 @@
INCLUDEPATH += $$PWD
-LIBS += -lstrmiids -ldmoguids -luuid -lole32 -loleaut32 -lmsdmo -lgdi32
-
+QMAKE_USE += directshow
+LIBS += -lgdi32
qtHaveModule(widgets): QT += widgets
@@ -29,7 +29,7 @@ SOURCES += \
$$PWD/directshowmetadatacontrol.cpp \
$$PWD/vmr9videowindowcontrol.cpp
-config_evr {
+qtConfig(evr) {
DEFINES += HAVE_EVR
include($$PWD/../../common/evr.pri)
@@ -41,7 +41,7 @@ config_evr {
$$PWD/directshowevrvideowindowcontrol.cpp
}
-config_wshellitem {
+qtConfig(wshellitem) {
QT += core-private
} else {
DEFINES += QT_NO_SHELLITEM
diff --git a/src/plugins/gstreamer/camerabin/camerabin.pro b/src/plugins/gstreamer/camerabin/camerabin.pro
index 214489f3e..d214d61c6 100644
--- a/src/plugins/gstreamer/camerabin/camerabin.pro
+++ b/src/plugins/gstreamer/camerabin/camerabin.pro
@@ -52,17 +52,7 @@ SOURCES += \
$$PWD/camerabincapturebufferformat.cpp \
$$PWD/camerabininfocontrol.cpp
-maemo6 {
- HEADERS += \
- $$PWD/camerabuttonlistener_meego.h
-
- SOURCES += \
- $$PWD/camerabuttonlistener_meego.cpp
-
- CONFIG += have_gst_photography
-}
-
-config_gstreamer_photography {
+qtConfig(gstreamer_photography) {
DEFINES += HAVE_GST_PHOTOGRAPHY
HEADERS += \
@@ -77,15 +67,15 @@ config_gstreamer_photography {
$$PWD/camerabinfocus.cpp \
$$PWD/camerabinlocks.cpp
- LIBS += -lgstphotography-$$GST_VERSION
+ QMAKE_USE += gstreamer_photography
DEFINES += GST_USE_UNSTABLE_API #prevents warnings because of unstable photography API
}
-config_gstreamer_encodingprofiles {
+qtConfig(gstreamer_encodingprofiles) {
DEFINES += HAVE_GST_ENCODING_PROFILES
}
-config_linux_v4l: {
+qtConfig(linux_v4l) {
DEFINES += USE_V4L
HEADERS += \
diff --git a/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.cpp b/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.cpp
index d4570b8b1..8b3e10546 100644
--- a/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.cpp
@@ -57,11 +57,7 @@ QList<QVideoFrame::PixelFormat> CameraBinCaptureBufferFormat::supportedBufferFor
{
//the exact YUV format is unknown with camerabin until the first capture is requested
return QList<QVideoFrame::PixelFormat>()
- << QVideoFrame::Format_Jpeg
-#ifdef Q_WS_MAEMO_6
- << QVideoFrame::Format_UYVY
-#endif
- ;
+ << QVideoFrame::Format_Jpeg;
}
QVideoFrame::PixelFormat CameraBinCaptureBufferFormat::bufferFormat() const
diff --git a/src/plugins/gstreamer/camerabin/camerabinexposure.h b/src/plugins/gstreamer/camerabin/camerabinexposure.h
index a7de86627..0435569d4 100644
--- a/src/plugins/gstreamer/camerabin/camerabinexposure.h
+++ b/src/plugins/gstreamer/camerabin/camerabinexposure.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef CAMERABINEXPOSURECONTROL_MAEMO_H
-#define CAMERABINEXPOSURECONTROL_MAEMO_H
+#ifndef CAMERABINEXPOSURECONTROL_H
+#define CAMERABINEXPOSURECONTROL_H
#include <qcamera.h>
#include <qcameraexposurecontrol.h>
@@ -72,4 +72,4 @@ private:
QT_END_NAMESPACE
-#endif // CAMERABINEXPOSURECONTROL_MAEMO_H
+#endif // CAMERABINEXPOSURECONTROL_H
diff --git a/src/plugins/gstreamer/camerabin/camerabinservice.cpp b/src/plugins/gstreamer/camerabin/camerabinservice.cpp
index 2be4e345a..3fbd1a60e 100644
--- a/src/plugins/gstreamer/camerabin/camerabinservice.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinservice.cpp
@@ -73,20 +73,11 @@
#endif
#include <private/qgstreamervideowindow_p.h>
#include <private/qgstreamervideorenderer_p.h>
-
-#if defined(Q_WS_MAEMO_6) && defined(__arm__)
-#include "qgstreamergltexturerenderer.h"
-#endif
-
#include <private/qmediaserviceprovider_p.h>
#include <QtCore/qdebug.h>
#include <QtCore/qprocess.h>
-#if defined(Q_WS_MAEMO_6)
-#include "camerabuttonlistener_meego.h"
-#endif
-
QT_BEGIN_NAMESPACE
CameraBinService::CameraBinService(GstElementFactory *sourceFactory, QObject *parent):
@@ -119,17 +110,9 @@ CameraBinService::CameraBinService(GstElementFactory *sourceFactory, QObject *pa
if (m_videoInputDevice->deviceCount())
m_captureSession->setDevice(m_videoInputDevice->deviceName(m_videoInputDevice->selectedDevice()));
-#if defined(Q_WS_MAEMO_6) && defined(__arm__) && defined(HAVE_WIDGETS)
- m_videoRenderer = new QGstreamerGLTextureRenderer(this);
-#else
m_videoRenderer = new QGstreamerVideoRenderer(this);
-#endif
-#ifdef Q_WS_MAEMO_6
- m_videoWindow = new QGstreamerVideoWindow(this, "omapxvsink");
-#else
m_videoWindow = new QGstreamerVideoWindow(this);
-#endif
// If the GStreamer video sink is not available, don't provide the video window control since
// it won't work anyway.
if (!m_videoWindow->videoSink()) {
@@ -156,10 +139,6 @@ CameraBinService::CameraBinService(GstElementFactory *sourceFactory, QObject *pa
m_metaDataControl = new CameraBinMetaData(this);
connect(m_metaDataControl, SIGNAL(metaDataChanged(QMap<QByteArray,QVariant>)),
m_captureSession, SLOT(setMetaData(QMap<QByteArray,QVariant>)));
-
-#if defined(Q_WS_MAEMO_6)
- new CameraButtonListener(this);
-#endif
}
CameraBinService::~CameraBinService()
diff --git a/src/plugins/gstreamer/camerabin/camerabinsession.h b/src/plugins/gstreamer/camerabin/camerabinsession.h
index 41398087d..ca0b22761 100644
--- a/src/plugins/gstreamer/camerabin/camerabinsession.h
+++ b/src/plugins/gstreamer/camerabin/camerabinsession.h
@@ -37,8 +37,8 @@
**
****************************************************************************/
-#ifndef CAMERABINCAPTURESESSION_MAEMO_H
-#define CAMERABINCAPTURESESSION_MAEMO_H
+#ifndef CAMERABINCAPTURESESSION_H
+#define CAMERABINCAPTURESESSION_H
#include <qmediarecordercontrol.h>
@@ -288,4 +288,4 @@ public:
QT_END_NAMESPACE
-#endif // CAMERABINCAPTURESESSION_MAEMO_H
+#endif // CAMERABINCAPTURESESSION_H
diff --git a/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp b/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp
deleted file mode 100644
index 0516f338b..000000000
--- a/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $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 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "camerabuttonlistener_meego.h"
-
-#include <QtWidgets/qapplication.h>
-#include <QtGui/qevent.h>
-#include <QtWidgets/qwidget.h>
-#include <QtCore/qdebug.h>
-
-QT_BEGIN_NAMESPACE
-
-CameraButtonListener::CameraButtonListener(QObject *parent) :
- QObject(parent),
- m_focusPressed(false),
- m_shutterPressed(false)
-{
- m_keys = new MeeGo::QmKeys(this);
- connect(m_keys, SIGNAL(keyEvent(MeeGo::QmKeys::Key,MeeGo::QmKeys::State)),
- this, SLOT(handleQmKeyEvent(MeeGo::QmKeys::Key,MeeGo::QmKeys::State)));
-}
-
-CameraButtonListener::~CameraButtonListener()
-{
-}
-
-void CameraButtonListener::handleQmKeyEvent(MeeGo::QmKeys::Key key, MeeGo::QmKeys::State state)
-{
- if (key == MeeGo::QmKeys::Camera) {
- QWidget *window = QApplication::focusWidget();
-
- bool focusPressed = (state == MeeGo::QmKeys::KeyHalfDown) ||
- (state == MeeGo::QmKeys::KeyDown);
-
- if (m_focusPressed != focusPressed) {
- m_focusPressed = focusPressed;
- if (window) {
- QApplication::postEvent(window,
- new QKeyEvent(focusPressed ? QEvent::KeyPress : QEvent::KeyRelease,
- Qt::Key_CameraFocus,
- Qt::NoModifier));
- }
- }
-
- bool shutterPressed = (state == MeeGo::QmKeys::KeyDown);
- if (m_shutterPressed != shutterPressed) {
- m_shutterPressed = shutterPressed;
- if (window) {
- QApplication::postEvent(window,
- new QKeyEvent(shutterPressed ? QEvent::KeyPress : QEvent::KeyRelease,
- Qt::Key_Camera,
- Qt::NoModifier));
- }
- }
- }
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.h b/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.h
deleted file mode 100644
index 776640ed4..000000000
--- a/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $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 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-#ifndef CAMERABUTTONLISTENER_MEEGO_H
-#define CAMERABUTTONLISTENER_MEEGO_H
-
-#include <QtCore/qobject.h>
-#include <qmsystem2/qmkeys.h>
-
-QT_BEGIN_NAMESPACE
-
-class CameraButtonListener : public QObject
-{
- Q_OBJECT
-public:
- CameraButtonListener(QObject *parent = 0);
- ~CameraButtonListener();
-
-private slots:
- void handleQmKeyEvent(MeeGo::QmKeys::Key key, MeeGo::QmKeys::State state);
-
-private:
- MeeGo::QmKeys *m_keys;
- bool m_focusPressed;
- bool m_shutterPressed;
-};
-
-QT_END_NAMESPACE
-
-#endif // CAMERABUTTONLISTENER_MEEGO_H
diff --git a/src/plugins/gstreamer/common.pri b/src/plugins/gstreamer/common.pri
index babdb7cfb..110bc8549 100644
--- a/src/plugins/gstreamer/common.pri
+++ b/src/plugins/gstreamer/common.pri
@@ -1,4 +1,3 @@
-
QT += core-private multimedia-private network
qtHaveModule(widgets) {
@@ -8,30 +7,15 @@ qtHaveModule(widgets) {
LIBS += -lqgsttools_p
-CONFIG += link_pkgconfig
-
-PKGCONFIG += \
- gstreamer-$$GST_VERSION \
- gstreamer-base-$$GST_VERSION \
- gstreamer-audio-$$GST_VERSION \
- gstreamer-video-$$GST_VERSION \
- gstreamer-pbutils-$$GST_VERSION
-
-maemo*:PKGCONFIG +=gstreamer-plugins-bad-$$GST_VERSION
-
-mir: {
- DEFINES += HAVE_MIR
-}
-
+QMAKE_USE += gstreamer
-config_resourcepolicy {
+qtConfig(resourcepolicy) {
+ QMAKE_USE += libresourceqt5
DEFINES += HAVE_RESOURCE_POLICY
- PKGCONFIG += libresourceqt5
}
-config_gstreamer_appsrc {
- PKGCONFIG += gstreamer-app-$$GST_VERSION
+qtConfig(gstreamer_app) {
+ QMAKE_USE += gstreamer_app
DEFINES += HAVE_GST_APPSRC
- LIBS += -lgstapp-$$GST_VERSION
}
diff --git a/src/plugins/gstreamer/mediacapture/mediacapture.pro b/src/plugins/gstreamer/mediacapture/mediacapture.pro
index db5210d4d..17248a495 100644
--- a/src/plugins/gstreamer/mediacapture/mediacapture.pro
+++ b/src/plugins/gstreamer/mediacapture/mediacapture.pro
@@ -31,7 +31,7 @@ SOURCES += $$PWD/qgstreamercaptureservice.cpp \
# Camera usage with gstreamer needs to have
#CONFIG += use_gstreamer_camera
-use_gstreamer_camera:config_linux_v4l {
+use_gstreamer_camera:qtConfig(linux_v4l) {
DEFINES += USE_GSTREAMER_CAMERA
OTHER_FILES += \
diff --git a/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp b/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp
index 17bddbf9b..40294214a 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp
@@ -50,7 +50,6 @@ QGstreamerAudioEncode::QGstreamerAudioEncode(QObject *parent)
:QAudioEncoderSettingsControl(parent)
, m_codecs(QGstCodecsInfo::AudioEncoder)
{
-
for (const QString& codecName : m_codecs.supportedCodecs()) {
GstElementFactory *factory = gst_element_factory_find(m_codecs.codecElement(codecName).constData());
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
index 7b216b63b..958204803 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
@@ -330,10 +330,6 @@ QDir QGstreamerRecorderControl::defaultDir() const
{
QStringList dirCandidates;
-#if defined(Q_WS_MAEMO_6)
- dirCandidates << QLatin1String("/home/user/MyDocs");
-#endif
-
if (m_session->captureMode() & QGstreamerCaptureSession::Video)
dirCandidates << QStandardPaths::writableLocation(QStandardPaths::MoviesLocation);
else
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
index 2919648a7..3e7286e51 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
@@ -239,14 +239,6 @@ void QGstreamerPlayerControl::playOrPause(QMediaPlayer::State newState)
setMedia(m_currentResource, m_stream);
}
-#ifdef Q_WS_MAEMO_6
- //this is a work around for the gstreamer bug,
- //should be remove once it get fixed
- if (newState == QMediaPlayer::PlayingState && m_mediaStatus == QMediaPlayer::InvalidMedia) {
- setMedia(m_currentResource, m_stream);
- }
-#endif
-
if (m_mediaStatus == QMediaPlayer::EndOfMedia && m_pendingSeekPosition == -1) {
m_pendingSeekPosition = 0;
}
@@ -612,18 +604,18 @@ void QGstreamerPlayerControl::popAndNotifyState()
QMediaPlayer::MediaStatus oldMediaStatus = m_mediaStatusStack.pop();
if (m_stateStack.isEmpty()) {
- if (m_currentState != oldState) {
+ if (m_mediaStatus != oldMediaStatus) {
#ifdef DEBUG_PLAYBIN
- qDebug() << "State changed:" << m_currentState;
+ qDebug() << "Media status changed:" << m_mediaStatus;
#endif
- emit stateChanged(m_currentState);
+ emit mediaStatusChanged(m_mediaStatus);
}
- if (m_mediaStatus != oldMediaStatus) {
+ if (m_currentState != oldState) {
#ifdef DEBUG_PLAYBIN
- qDebug() << "Media status changed:" << m_mediaStatus;
+ qDebug() << "State changed:" << m_currentState;
#endif
- emit mediaStatusChanged(m_mediaStatus);
+ emit stateChanged(m_currentState);
}
}
}
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
index f233a487f..2c2de1bbc 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
@@ -37,6 +37,7 @@
**
****************************************************************************/
+#include <QtMultimedia/private/qtmultimediaglobal_p.h>
#include <QtCore/qvariant.h>
#include <QtCore/qdebug.h>
@@ -56,11 +57,7 @@
#include <private/qgstreamervideowindow_p.h>
#include <private/qgstreamervideorenderer_p.h>
-#if defined(Q_WS_MAEMO_6) && defined(__arm__)
-#include "private/qgstreamergltexturerenderer.h"
-#endif
-
-#if defined(HAVE_MIR) && defined (__arm__)
+#if QT_CONFIG(mirclient) && defined (__arm__)
#include "private/qgstreamermirtexturerenderer_p.h"
#endif
@@ -92,20 +89,14 @@ QGstreamerPlayerService::QGstreamerPlayerService(QObject *parent):
m_streamsControl = new QGstreamerStreamsControl(m_session,this);
m_availabilityControl = new QGStreamerAvailabilityControl(m_control->resources(), this);
-#if defined(Q_WS_MAEMO_6) && defined(__arm__)
- m_videoRenderer = new QGstreamerGLTextureRenderer(this);
-#elif defined(HAVE_MIR) && defined (__arm__)
+#if QT_CONFIG(mirclient) && defined (__arm__)
m_videoRenderer = new QGstreamerMirTextureRenderer(this, m_session);
#else
m_videoRenderer = new QGstreamerVideoRenderer(this);
#endif
-#ifdef Q_WS_MAEMO_6
- m_videoWindow = new QGstreamerVideoWindow(this, "omapxvsink");
-#else
m_videoWindow = new QGstreamerVideoWindow(this);
-#endif
- // If the GStreamer video sink is not available, don't provide the video window control since
+ // If the GStreamer video sink is not available, don't provide the video window control since
// it won't work anyway.
if (!m_videoWindow->videoSink()) {
delete m_videoWindow;
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
index ed07e4054..09b74148e 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
@@ -155,10 +155,6 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent)
if (m_playbin) {
//GST_PLAY_FLAG_NATIVE_VIDEO omits configuration of ffmpegcolorspace and videoscale,
//since those elements are included in the video output bin when necessary.
-#ifdef Q_WS_MAEMO_6
- int flags = GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_AUDIO |
- GST_PLAY_FLAG_NATIVE_VIDEO | GST_PLAY_FLAG_NATIVE_AUDIO;
-#else
int flags = GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_AUDIO;
QByteArray envFlags = qgetenv("QT_GSTREAMER_PLAYBIN_FLAGS");
if (!envFlags.isEmpty()) {
@@ -168,7 +164,6 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent)
flags |= GST_PLAY_FLAG_NATIVE_VIDEO;
#endif
}
-#endif
g_object_set(G_OBJECT(m_playbin), "flags", flags, NULL);
GstElement *audioSink = gst_element_factory_make("autoaudiosink", "audiosink");
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index f113f68b3..099e472da 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -5,6 +5,7 @@
######################################################################
TEMPLATE = subdirs
+QT_FOR_CONFIG += multimedia-private
SUBDIRS += m3u
@@ -17,53 +18,53 @@ android {
}
qnx {
- config_mmrenderer: SUBDIRS += qnx
+ qtConfig(mmrenderer): SUBDIRS += qnx
SUBDIRS += audiocapture
}
-qnx:!blackberry {
+qnx {
SUBDIRS += qnx-audio
}
win32 {
- config_wasapi: SUBDIRS += wasapi
+ qtConfig(wasapi): SUBDIRS += wasapi
}
win32:!winrt {
SUBDIRS += audiocapture \
windowsaudio
- config_directshow: SUBDIRS += directshow
- config_wmf: SUBDIRS += wmf
+ qtConfig(directshow): SUBDIRS += directshow
+ qtConfig(wmf-backend): SUBDIRS += wmf
}
+
winrt {
SUBDIRS += winrt
}
unix:!mac:!android {
- config_gstreamer {
+ qtConfig(gstreamer) {
SUBDIRS += gstreamer
} else {
SUBDIRS += audiocapture
}
- config_pulseaudio: SUBDIRS += pulseaudio
- config_alsa: SUBDIRS += alsa
+ qtConfig(pulseaudio): SUBDIRS += pulseaudio
+ qtConfig(alsa): SUBDIRS += alsa
# v4l is turned off because it is not supported in Qt 5
- # config_linux_v4l {
- # !maemo*:SUBDIRS += v4l
+ # qtConfig(linux_v4l) {
+ # SUBDIRS += v4l
# }
}
darwin:!watchos {
SUBDIRS += audiocapture coreaudio
-
- config_avfoundation: SUBDIRS += avfoundation
+ qtConfig(avfoundation): SUBDIRS += avfoundation
}
-config_resourcepolicy {
+qtConfig(resourcepolicy) {
SUBDIRS += resourcepolicy
}
diff --git a/src/plugins/pulseaudio/pulseaudio.pro b/src/plugins/pulseaudio/pulseaudio.pro
index 7f4d3de22..c6339e9e8 100644
--- a/src/plugins/pulseaudio/pulseaudio.pro
+++ b/src/plugins/pulseaudio/pulseaudio.pro
@@ -1,8 +1,7 @@
TARGET = qtmedia_pulse
QT += multimedia-private
-CONFIG += link_pkgconfig
-PKGCONFIG += libpulse
+QMAKE_USE += pulseaudio
HEADERS += qpulseaudioplugin.h \
qaudiodeviceinfo_pulse.h \
diff --git a/src/plugins/qnx-audio/audio/qnxaudioinput.cpp b/src/plugins/qnx-audio/audio/qnxaudioinput.cpp
index fc67f4211..35d11597c 100644
--- a/src/plugins/qnx-audio/audio/qnxaudioinput.cpp
+++ b/src/plugins/qnx-audio/audio/qnxaudioinput.cpp
@@ -282,7 +282,7 @@ bool QnxAudioInput::open()
}
// Necessary so that bytesFree() which uses the "free" member of the status struct works
- snd_pcm_plugin_set_disable(m_pcmHandle, PLUGIN_DISABLE_MMAP);
+ snd_pcm_plugin_set_disable(m_pcmHandle, PLUGIN_MMAP);
snd_pcm_channel_info_t info;
memset(&info, 0, sizeof(info));
diff --git a/src/plugins/qnx-audio/audio/qnxaudiooutput.cpp b/src/plugins/qnx-audio/audio/qnxaudiooutput.cpp
index 2c196624b..d5805c2bd 100644
--- a/src/plugins/qnx-audio/audio/qnxaudiooutput.cpp
+++ b/src/plugins/qnx-audio/audio/qnxaudiooutput.cpp
@@ -286,7 +286,7 @@ bool QnxAudioOutput::open()
}
// Necessary so that bytesFree() which uses the "free" member of the status struct works
- snd_pcm_plugin_set_disable(m_pcmHandle, PLUGIN_DISABLE_MMAP);
+ snd_pcm_plugin_set_disable(m_pcmHandle, PLUGIN_MMAP);
snd_pcm_channel_info_t info;
memset(&info, 0, sizeof(info));
diff --git a/src/plugins/qnx/bbserviceplugin.cpp b/src/plugins/qnx/bbserviceplugin.cpp
deleted file mode 100644
index e83d1caa3..000000000
--- a/src/plugins/qnx/bbserviceplugin.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $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 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "bbserviceplugin.h"
-
-#include "bbcamerainfocontrol.h"
-#include "bbcameraservice.h"
-#include "bbcamerasession.h"
-#include "bbvideodeviceselectorcontrol.h"
-#include "mmrenderermediaplayerservice.h"
-
-#include <QDebug>
-
-QT_BEGIN_NAMESPACE
-
-BbServicePlugin::BbServicePlugin()
-{
-}
-
-QMediaService *BbServicePlugin::create(const QString &key)
-{
- if (key == QLatin1String(Q_MEDIASERVICE_CAMERA))
- return new BbCameraService();
-
- if (key == QLatin1String(Q_MEDIASERVICE_MEDIAPLAYER))
- return new MmRendererMediaPlayerService();
-
- return 0;
-}
-
-void BbServicePlugin::release(QMediaService *service)
-{
- delete service;
-}
-
-QMediaServiceProviderHint::Features BbServicePlugin::supportedFeatures(const QByteArray &service) const
-{
- Q_UNUSED(service)
- return QMediaServiceProviderHint::Features();
-}
-
-QByteArray BbServicePlugin::defaultDevice(const QByteArray &service) const
-{
- if (service == Q_MEDIASERVICE_CAMERA) {
- if (m_cameraDevices.isEmpty())
- updateDevices();
-
- return m_defaultCameraDevice;
- }
-
- return QByteArray();
-}
-
-QList<QByteArray> BbServicePlugin::devices(const QByteArray &service) const
-{
- if (service == Q_MEDIASERVICE_CAMERA) {
- if (m_cameraDevices.isEmpty())
- updateDevices();
-
- return m_cameraDevices;
- }
-
- return QList<QByteArray>();
-}
-
-QString BbServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device)
-{
- if (service == Q_MEDIASERVICE_CAMERA) {
- if (m_cameraDevices.isEmpty())
- updateDevices();
-
- for (int i = 0; i < m_cameraDevices.count(); i++)
- if (m_cameraDevices[i] == device)
- return m_cameraDescriptions[i];
- }
-
- return QString();
-}
-
-void BbServicePlugin::updateDevices() const
-{
- m_defaultCameraDevice.clear();
- BbVideoDeviceSelectorControl::enumerateDevices(&m_cameraDevices, &m_cameraDescriptions);
-
- if (m_cameraDevices.isEmpty()) {
- qWarning() << "No camera devices found";
- } else {
- m_defaultCameraDevice = m_cameraDevices.contains(BbCameraSession::cameraIdentifierRear())
- ? BbCameraSession::cameraIdentifierRear()
- : m_cameraDevices.first();
- }
-}
-
-QCamera::Position BbServicePlugin::cameraPosition(const QByteArray &device) const
-{
- return BbCameraInfoControl::position(device);
-}
-
-int BbServicePlugin::cameraOrientation(const QByteArray &device) const
-{
- return BbCameraInfoControl::orientation(device);
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/qnx/bbserviceplugin.h b/src/plugins/qnx/bbserviceplugin.h
deleted file mode 100644
index e2e77c233..000000000
--- a/src/plugins/qnx/bbserviceplugin.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $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 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef BBRSERVICEPLUGIN_H
-#define BBRSERVICEPLUGIN_H
-
-#include <qmediaserviceproviderplugin.h>
-
-QT_BEGIN_NAMESPACE
-
-class BbServicePlugin
- : public QMediaServiceProviderPlugin,
- public QMediaServiceSupportedDevicesInterface,
- public QMediaServiceDefaultDeviceInterface,
- public QMediaServiceCameraInfoInterface,
- public QMediaServiceFeaturesInterface
-{
- Q_OBJECT
- Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
- Q_INTERFACES(QMediaServiceDefaultDeviceInterface)
- Q_INTERFACES(QMediaServiceCameraInfoInterface)
- Q_INTERFACES(QMediaServiceFeaturesInterface)
- Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "blackberry_mediaservice.json")
-public:
- BbServicePlugin();
-
- QMediaService *create(const QString &key) Q_DECL_OVERRIDE;
- void release(QMediaService *service) Q_DECL_OVERRIDE;
- QMediaServiceProviderHint::Features supportedFeatures(const QByteArray &service) const Q_DECL_OVERRIDE;
-
- QByteArray defaultDevice(const QByteArray &service) const Q_DECL_OVERRIDE;
- QList<QByteArray> devices(const QByteArray &service) const Q_DECL_OVERRIDE;
- QString deviceDescription(const QByteArray &service, const QByteArray &device) Q_DECL_OVERRIDE;
- QVariant deviceProperty(const QByteArray &service, const QByteArray &device, const QByteArray &property) Q_DECL_OVERRIDE;
-
- QCamera::Position cameraPosition(const QByteArray &device) const Q_DECL_OVERRIDE;
- int cameraOrientation(const QByteArray &device) const Q_DECL_OVERRIDE;
-
-private:
- void updateDevices() const;
-
- mutable QByteArray m_defaultCameraDevice;
- mutable QList<QByteArray> m_cameraDevices;
- mutable QStringList m_cameraDescriptions;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/qnx/blackberry_mediaservice.json b/src/plugins/qnx/blackberry_mediaservice.json
deleted file mode 100644
index 2a59cc770..000000000
--- a/src/plugins/qnx/blackberry_mediaservice.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "Keys": ["blackberrymultimedia"],
- "Services": ["org.qt-project.qt.camera", "org.qt-project.qt.mediaplayer"]
-}
diff --git a/src/plugins/qnx/mediaplayer/bpsmediaplayercontrol.cpp b/src/plugins/qnx/mediaplayer/bpsmediaplayercontrol.cpp
deleted file mode 100644
index 35bdb8360..000000000
--- a/src/plugins/qnx/mediaplayer/bpsmediaplayercontrol.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $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 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "bpsmediaplayercontrol.h"
-#include "mmrenderervideowindowcontrol.h"
-
-#include <bps/mmrenderer.h>
-#include <bps/screen.h>
-
-QT_BEGIN_NAMESPACE
-
-BpsMediaPlayerControl::BpsMediaPlayerControl(QObject *parent)
- : MmRendererMediaPlayerControl(parent),
- m_eventMonitor(0)
-{
- openConnection();
-}
-
-BpsMediaPlayerControl::~BpsMediaPlayerControl()
-{
- destroy();
-}
-
-void BpsMediaPlayerControl::startMonitoring(int contextId, const QString &contextName)
-{
- m_eventMonitor = mmrenderer_request_events(contextName.toLatin1().constData(), 0, contextId);
- if (!m_eventMonitor) {
- qDebug() << "Unable to request multimedia events";
- emit error(0, "Unable to request multimedia events");
- }
-}
-
-void BpsMediaPlayerControl::stopMonitoring()
-{
- if (m_eventMonitor) {
- mmrenderer_stop_events(m_eventMonitor);
- m_eventMonitor = 0;
- }
-}
-
-bool BpsMediaPlayerControl::nativeEventFilter(const QByteArray &eventType, void *message, long *result)
-{
- Q_UNUSED(result)
- Q_UNUSED(eventType)
-
- bps_event_t * const event = static_cast<bps_event_t *>(message);
- if (!event ||
- (bps_event_get_domain(event) != mmrenderer_get_domain() &&
- bps_event_get_domain(event) != screen_get_domain()))
- return false;
-
- if (event && bps_event_get_domain(event) == screen_get_domain()) {
- const screen_event_t screen_event = screen_event_get_event(event);
- if (MmRendererVideoWindowControl *control = videoWindowControl())
- control->screenEventHandler(screen_event);
- }
-
- if (bps_event_get_domain(event) == mmrenderer_get_domain()) {
- if (bps_event_get_code(event) == MMRENDERER_STATE_CHANGE) {
- const mmrenderer_state_t newState = mmrenderer_event_get_state(event);
- if (newState == MMR_STOPPED) {
- handleMmStopped();
- return false;
- }
- }
-
- if (bps_event_get_code(event) == MMRENDERER_STATUS_UPDATE) {
- const qint64 newPosition = QString::fromLatin1(mmrenderer_event_get_position(event)).
- toLongLong();
- handleMmStatusUpdate(newPosition);
-
- const QString status = QString::fromLatin1(mmrenderer_event_get_bufferstatus(event));
- setMmBufferStatus(status);
-
- const QString level = QString::fromLatin1(mmrenderer_event_get_bufferlevel(event));
- setMmBufferLevel(level);
- }
- }
-
- return false;
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/qnx/mediaplayer/bpsmediaplayercontrol.h b/src/plugins/qnx/mediaplayer/bpsmediaplayercontrol.h
deleted file mode 100644
index d9789d689..000000000
--- a/src/plugins/qnx/mediaplayer/bpsmediaplayercontrol.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Toolkit.
-**
-** $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 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.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef BPSMEDIAPLAYERCONTROL_H
-#define BPSMEDIAPLAYERCONTROL_H
-
-#include "mmrenderermediaplayercontrol.h"
-
-QT_BEGIN_NAMESPACE
-
-class BpsMediaPlayerControl Q_DECL_FINAL : public MmRendererMediaPlayerControl
-{
- Q_OBJECT
-public:
- explicit BpsMediaPlayerControl(QObject *parent = 0);
- ~BpsMediaPlayerControl();
-
- void startMonitoring(int contextId, const QString &contextName) Q_DECL_OVERRIDE;
- void stopMonitoring() Q_DECL_OVERRIDE;
-
- bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) Q_DECL_OVERRIDE;
-
-private:
- mmrenderer_monitor_t *m_eventMonitor;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/plugins/qnx/mediaplayer/mediaplayer.pri b/src/plugins/qnx/mediaplayer/mediaplayer.pri
index 9dedab0fd..756857cce 100644
--- a/src/plugins/qnx/mediaplayer/mediaplayer.pri
+++ b/src/plugins/qnx/mediaplayer/mediaplayer.pri
@@ -7,8 +7,8 @@ HEADERS += \
$$PWD/mmrenderermetadatareadercontrol.h \
$$PWD/mmrendererplayervideorenderercontrol.h \
$$PWD/mmrendererutil.h \
- $$PWD/mmrenderervideowindowcontrol.h
-
+ $$PWD/mmrenderervideowindowcontrol.h \
+ $$PWD/ppsmediaplayercontrol.h
SOURCES += \
$$PWD/mmrenderermediaplayercontrol.cpp \
$$PWD/mmrenderermediaplayerservice.cpp \
@@ -16,16 +16,7 @@ SOURCES += \
$$PWD/mmrenderermetadatareadercontrol.cpp \
$$PWD/mmrendererplayervideorenderercontrol.cpp \
$$PWD/mmrendererutil.cpp \
- $$PWD/mmrenderervideowindowcontrol.cpp
-
-LIBS += -lmmrndclient -lstrm
+ $$PWD/mmrenderervideowindowcontrol.cpp \
+ $$PWD/ppsmediaplayercontrol.cpp
-blackberry {
- HEADERS += $$PWD/bpsmediaplayercontrol.h
- SOURCES += $$PWD/bpsmediaplayercontrol.cpp
-} else {
- HEADERS += $$PWD/ppsmediaplayercontrol.h
- SOURCES += $$PWD/ppsmediaplayercontrol.cpp
- QT += core-private
- LIBS += -lpps
-}
+QMAKE_USE += mmrenderer pps
diff --git a/src/plugins/qnx/mediaplayer/mmrenderermediaplayerservice.cpp b/src/plugins/qnx/mediaplayer/mmrenderermediaplayerservice.cpp
index 2709a99dd..e253c68d8 100644
--- a/src/plugins/qnx/mediaplayer/mmrenderermediaplayerservice.cpp
+++ b/src/plugins/qnx/mediaplayer/mmrenderermediaplayerservice.cpp
@@ -44,13 +44,7 @@
#include "mmrendererutil.h"
#include "mmrenderervideowindowcontrol.h"
-#ifdef Q_OS_BLACKBERRY
-#include "bpsmediaplayercontrol.h"
-typedef BpsMediaPlayerControl PlatformSpecificMediaPlayerControl;
-#else
#include "ppsmediaplayercontrol.h"
-typedef PpsMediaPlayerControl PlatformSpecificMediaPlayerControl;
-#endif
QT_BEGIN_NAMESPACE
@@ -78,7 +72,7 @@ QMediaControl *MmRendererMediaPlayerService::requestControl(const char *name)
{
if (qstrcmp(name, QMediaPlayerControl_iid) == 0) {
if (!m_mediaPlayerControl) {
- m_mediaPlayerControl = new PlatformSpecificMediaPlayerControl;
+ m_mediaPlayerControl = new PpsMediaPlayerControl;
updateControls();
}
return m_mediaPlayerControl;
diff --git a/src/plugins/qnx/qnx.pro b/src/plugins/qnx/qnx.pro
index 4d76fa5f7..960c614e0 100644
--- a/src/plugins/qnx/qnx.pro
+++ b/src/plugins/qnx/qnx.pro
@@ -1,22 +1,15 @@
TARGET = qtmedia_qnx
-QT += multimedia-private gui-private
+QT += multimedia-private gui-private core-private
LIBS += -lscreen
include(common/common.pri)
include(mediaplayer/mediaplayer.pri)
-blackberry {
- include(camera/camera.pri)
- HEADERS += bbserviceplugin.h
- SOURCES += bbserviceplugin.cpp
- OTHER_FILES += blackberry_mediaservice.json
-} else {
- HEADERS += neutrinoserviceplugin.h
- SOURCES += neutrinoserviceplugin.cpp
- OTHER_FILES += neutrino_mediaservice.json
-}
+HEADERS += neutrinoserviceplugin.h
+SOURCES += neutrinoserviceplugin.cpp
+OTHER_FILES += neutrino_mediaservice.json
+PLUGIN_CLASS_NAME = NeutrinoServicePlugin
PLUGIN_TYPE = mediaservice
-PLUGIN_CLASS_NAME = BbServicePlugin
load(qt_plugin)
diff --git a/src/plugins/resourcepolicy/resourcepolicy.pro b/src/plugins/resourcepolicy/resourcepolicy.pro
index 91a946665..89e75be1b 100644
--- a/src/plugins/resourcepolicy/resourcepolicy.pro
+++ b/src/plugins/resourcepolicy/resourcepolicy.pro
@@ -1,8 +1,8 @@
TARGET = resourceqt
QT += multimedia-private
-CONFIG += link_pkgconfig
-PKGCONFIG += libresourceqt5
+
+QMAKE_USE += libresourceqt5
INCLUDEPATH += $$PWD \
$${SOURCE_DIR}/src/multimedia
diff --git a/src/plugins/videonode/videonode.pro b/src/plugins/videonode/videonode.pro
index 5fbcaecd4..ab7295406 100644
--- a/src/plugins/videonode/videonode.pro
+++ b/src/plugins/videonode/videonode.pro
@@ -1,7 +1,7 @@
TEMPLATE = subdirs
-QT_FOR_CONFIG += gui-private
+QT_FOR_CONFIG += gui-private multimedia-private
-config_gpu_vivante {
+qtConfig(gpu_vivante) {
SUBDIRS += imx6
}
diff --git a/src/plugins/windowsaudio/qwindowsaudiooutput.cpp b/src/plugins/windowsaudio/qwindowsaudiooutput.cpp
index c4bbbe85d..815b78979 100644
--- a/src/plugins/windowsaudio/qwindowsaudiooutput.cpp
+++ b/src/plugins/windowsaudio/qwindowsaudiooutput.cpp
@@ -53,6 +53,7 @@
#include "qwindowsaudioutils.h"
#include <QtEndian>
#include <QtCore/QDataStream>
+#include <private/qaudiohelpers_p.h>
//#define DEBUG_AUDIO 1
@@ -72,7 +73,7 @@ QWindowsAudioOutput::QWindowsAudioOutput(const QByteArray &device)
audioSource = 0;
pullMode = true;
finished = false;
- volumeCache = (qreal)1.;
+ volumeCache = qreal(1.0);
}
QWindowsAudioOutput::~QWindowsAudioOutput()
@@ -280,8 +281,6 @@ bool QWindowsAudioOutput::open()
timeStampOpened.restart();
elapsedTimeOffset = 0;
- setVolume(volumeCache);
-
errorState = QAudio::NoError;
if(pullMode) {
deviceState = QAudio::ActiveState;
@@ -407,7 +406,11 @@ qint64 QWindowsAudioOutput::write( const char *data, qint64 len )
remain = l;
else
remain = period_size;
- memcpy(current->lpData, p, remain);
+
+ if (volumeCache < qreal(1.0))
+ QAudioHelperInternal::qMultiplySamples(volumeCache, settings, p, current->lpData, remain);
+ else
+ memcpy(current->lpData, p, remain);
l -= remain;
p += remain;
@@ -595,16 +598,10 @@ QAudio::State QWindowsAudioOutput::state() const
void QWindowsAudioOutput::setVolume(qreal v)
{
- const qreal normalizedVolume = qBound(qreal(0.0), v, qreal(1.0));
- if (deviceState != QAudio::ActiveState) {
- volumeCache = normalizedVolume;
+ if (qFuzzyCompare(volumeCache, v))
return;
- }
- const quint16 scaled = normalizedVolume * 0xFFFF;
- DWORD vol = MAKELONG(scaled, scaled);
- MMRESULT res = waveOutSetVolume(hWaveOut, vol);
- if (res == MMSYSERR_NOERROR)
- volumeCache = normalizedVolume;
+
+ volumeCache = qBound(qreal(0), v, qreal(1));
}
qreal QWindowsAudioOutput::volume() const
diff --git a/src/plugins/wmf/decoder/decoder.pri b/src/plugins/wmf/decoder/decoder.pri
index 992e710fe..7637ac848 100644
--- a/src/plugins/wmf/decoder/decoder.pri
+++ b/src/plugins/wmf/decoder/decoder.pri
@@ -1,7 +1,7 @@
INCLUDEPATH += $$PWD
-LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32 -lMf -lMfuuid -lMfplat \
- -lPropsys -lmfreadwrite -lwmcodecdspuuid
+LIBS += -lmfreadwrite -lwmcodecdspuuid
+QMAKE_USE += wmf
HEADERS += \
$$PWD/mfdecoderservice.h \
@@ -11,4 +11,4 @@ HEADERS += \
SOURCES += \
$$PWD/mfdecoderservice.cpp \
$$PWD/mfdecodersourcereader.cpp \
- $$PWD/mfaudiodecodercontrol.cpp \ No newline at end of file
+ $$PWD/mfaudiodecodercontrol.cpp
diff --git a/src/plugins/wmf/mfstream.cpp b/src/plugins/wmf/mfstream.cpp
index 3ae6324af..fd95bf20b 100644
--- a/src/plugins/wmf/mfstream.cpp
+++ b/src/plugins/wmf/mfstream.cpp
@@ -236,7 +236,7 @@ STDMETHODIMP MFStream::Seek(
break;
}
bool seekOK = m_stream->seek(pos);
- if (*pqwCurrentPosition)
+ if (pqwCurrentPosition)
*pqwCurrentPosition = pos;
if (seekOK)
return S_OK;
diff --git a/src/plugins/wmf/mfactivate.cpp b/src/plugins/wmf/player/mfactivate.cpp
index e06906584..e06906584 100644
--- a/src/plugins/wmf/mfactivate.cpp
+++ b/src/plugins/wmf/player/mfactivate.cpp
diff --git a/src/plugins/wmf/mfactivate.h b/src/plugins/wmf/player/mfactivate.h
index 3243296e8..3243296e8 100644
--- a/src/plugins/wmf/mfactivate.h
+++ b/src/plugins/wmf/player/mfactivate.h
diff --git a/src/plugins/wmf/mftvideo.cpp b/src/plugins/wmf/player/mftvideo.cpp
index 747fe6aea..747fe6aea 100644
--- a/src/plugins/wmf/mftvideo.cpp
+++ b/src/plugins/wmf/player/mftvideo.cpp
diff --git a/src/plugins/wmf/mftvideo.h b/src/plugins/wmf/player/mftvideo.h
index ffcb80b32..ffcb80b32 100644
--- a/src/plugins/wmf/mftvideo.h
+++ b/src/plugins/wmf/player/mftvideo.h
diff --git a/src/plugins/wmf/player/player.pri b/src/plugins/wmf/player/player.pri
index c24370eea..38ccb82a6 100644
--- a/src/plugins/wmf/player/player.pri
+++ b/src/plugins/wmf/player/player.pri
@@ -1,6 +1,7 @@
INCLUDEPATH += $$PWD
-LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lgdi32 -luser32 -lole32 -loleaut32 -lMf -lMfuuid -lMfplat -lPropsys
+LIBS += -lgdi32 -luser32
+QMAKE_USE += wmf
DEFINES += QMEDIA_MEDIAFOUNDATION_PLAYER
@@ -13,7 +14,10 @@ HEADERS += \
$$PWD/mfmetadatacontrol.h \
$$PWD/mfaudioprobecontrol.h \
$$PWD/mfvideoprobecontrol.h \
- $$PWD/mfevrvideowindowcontrol.h
+ $$PWD/mfevrvideowindowcontrol.h \
+ $$PWD/samplegrabber.h \
+ $$PWD/mftvideo.h \
+ $$PWD/mfactivate.h
SOURCES += \
$$PWD/mfplayerservice.cpp \
@@ -24,6 +28,9 @@ SOURCES += \
$$PWD/mfmetadatacontrol.cpp \
$$PWD/mfaudioprobecontrol.cpp \
$$PWD/mfvideoprobecontrol.cpp \
- $$PWD/mfevrvideowindowcontrol.cpp
+ $$PWD/mfevrvideowindowcontrol.cpp \
+ $$PWD/samplegrabber.cpp \
+ $$PWD/mftvideo.cpp \
+ $$PWD/mfactivate.cpp
include($$PWD/../../common/evr.pri)
diff --git a/src/plugins/wmf/samplegrabber.cpp b/src/plugins/wmf/player/samplegrabber.cpp
index d137335f3..d137335f3 100644
--- a/src/plugins/wmf/samplegrabber.cpp
+++ b/src/plugins/wmf/player/samplegrabber.cpp
diff --git a/src/plugins/wmf/samplegrabber.h b/src/plugins/wmf/player/samplegrabber.h
index 9ca673a1b..9ca673a1b 100644
--- a/src/plugins/wmf/samplegrabber.h
+++ b/src/plugins/wmf/player/samplegrabber.h
diff --git a/src/plugins/wmf/sourceresolver.cpp b/src/plugins/wmf/sourceresolver.cpp
index 78163e97f..f10f68c42 100644
--- a/src/plugins/wmf/sourceresolver.cpp
+++ b/src/plugins/wmf/sourceresolver.cpp
@@ -37,12 +37,13 @@
**
****************************************************************************/
-#include "mfplayersession.h"
#include "mfstream.h"
#include "sourceresolver.h"
#include <Mferror.h>
#include <nserror.h>
#include <QtCore/qfile.h>
+#include <QtCore/qdebug.h>
+#include <QtMultimedia/qmediaplayer.h>
/*
SourceResolver is separated from MFPlayerSession to handle the work of resolving a media source
diff --git a/src/plugins/wmf/wmf.pro b/src/plugins/wmf/wmf.pro
index e83c51595..c75efe28c 100644
--- a/src/plugins/wmf/wmf.pro
+++ b/src/plugins/wmf/wmf.pro
@@ -10,24 +10,19 @@ INCLUDEPATH += .
HEADERS += \
wmfserviceplugin.h \
mfstream.h \
- sourceresolver.h \
- samplegrabber.h \
- mftvideo.h \
- mfactivate.h
+ sourceresolver.h
SOURCES += \
wmfserviceplugin.cpp \
mfstream.cpp \
- sourceresolver.cpp \
- samplegrabber.cpp \
- mftvideo.cpp \
- mfactivate.cpp
+ sourceresolver.cpp
-include (player/player.pri)
+contains(QT_CONFIG, wmf-backend): include (player/player.pri)
include (decoder/decoder.pri)
OTHER_FILES += \
- wmf.json
+ wmf.json \
+ wmf_audiodecode.json
PLUGIN_TYPE = mediaservice
PLUGIN_CLASS_NAME = WMFServicePlugin
diff --git a/src/plugins/wmf/wmf_audiodecode.json b/src/plugins/wmf/wmf_audiodecode.json
new file mode 100644
index 000000000..2a65dd758
--- /dev/null
+++ b/src/plugins/wmf/wmf_audiodecode.json
@@ -0,0 +1,4 @@
+{
+ "Keys": ["windowsmediafoundation"],
+ "Services": ["org.qt-project.qt.audiodecode"]
+}
diff --git a/src/plugins/wmf/wmfserviceplugin.cpp b/src/plugins/wmf/wmfserviceplugin.cpp
index ada1c8069..e19154aee 100644
--- a/src/plugins/wmf/wmfserviceplugin.cpp
+++ b/src/plugins/wmf/wmfserviceplugin.cpp
@@ -97,9 +97,13 @@ void WMFServicePlugin::release(QMediaService *service)
QMediaServiceProviderHint::Features WMFServicePlugin::supportedFeatures(
const QByteArray &service) const
{
+#ifdef QMEDIA_MEDIAFOUNDATION_PLAYER
if (service == Q_MEDIASERVICE_MEDIAPLAYER)
return QMediaServiceProviderHint::StreamPlayback;
else
+#else
+ Q_UNUSED(service);
+#endif
return QMediaServiceProviderHint::Features();
}
diff --git a/src/plugins/wmf/wmfserviceplugin.h b/src/plugins/wmf/wmfserviceplugin.h
index cd3000199..39b7b86d9 100644
--- a/src/plugins/wmf/wmfserviceplugin.h
+++ b/src/plugins/wmf/wmfserviceplugin.h
@@ -54,7 +54,11 @@ class WMFServicePlugin
Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
Q_INTERFACES(QMediaServiceDefaultDeviceInterface)
Q_INTERFACES(QMediaServiceFeaturesInterface)
+#ifdef QMEDIA_MEDIAFOUNDATION_PLAYER
Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "wmf.json")
+#else
+ Q_PLUGIN_METADATA(IID "org.qt-project.qt.mediaserviceproviderfactory/5.0" FILE "wmf_audiodecode.json")
+#endif
public:
QMediaService* create(QString const& key);
void release(QMediaService *service);
@@ -66,4 +70,4 @@ public:
QString deviceDescription(const QByteArray &service, const QByteArray &device);
};
-#endif // DSSERVICEPLUGIN_H
+#endif // WMFSERVICEPLUGIN_H