summaryrefslogtreecommitdiffstats
path: root/src/qtmultimedia-1.patch
blob: 4950c0c73a0f257f91f71c1527dee5f2011d9e6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
This file is part of MXE.
See index.html for further information.

From fd3efc0163d9963c91e24ece43b774c70ec57640 Mon Sep 17 00:00:00 2001
From: Yoann Lopes <yoann.lopes@digia.com>
Date: Wed, 27 Nov 2013 16:05:19 +0100
Subject: [PATCH 1/5] Android: print a warning when using SurfaceTexture on
 Android 2.3.

SurfaceTexture is available since Android 3.0, print a warning when
camera preview or video playback is used on an older Android version.

Task-number: QTBUG-35075
Change-Id: Ie04c62df99048a25e8fd971e0708157d0d32c503
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>

diff --git a/src/plugins/android/src/wrappers/jsurfacetexture.cpp b/src/plugins/android/src/wrappers/jsurfacetexture.cpp
index 1505443..47487f1 100644
--- a/src/plugins/android/src/wrappers/jsurfacetexture.cpp
+++ b/src/plugins/android/src/wrappers/jsurfacetexture.cpp
@@ -62,6 +62,8 @@ JSurfaceTexture::JSurfaceTexture(unsigned int texName)
 {
     if (isValid())
         g_objectMap.insert(int(texName), this);
+    else // If the class is not available, it means the Android version is < 3.0
+        qWarning("Camera preview and video playback require Android 3.0 (API level 11) or later.");
 }
 
 JSurfaceTexture::~JSurfaceTexture()
@@ -94,16 +96,24 @@ static JNINativeMethod methods[] = {
 
 bool JSurfaceTexture::initJNI(JNIEnv *env)
 {
-    jclass clazz = env->FindClass("org/qtproject/qt5/android/multimedia/QtSurfaceTexture");
+    // SurfaceTexture is available since API 11, try to find it first before loading
+    // our custom class
+    jclass surfaceTextureClass = env->FindClass("android/graphics/SurfaceTexture");
     if (env->ExceptionCheck())
         env->ExceptionClear();
 
-    if (clazz) {
-        g_qtSurfaceTextureClass = static_cast<jclass>(env->NewGlobalRef(clazz));
-        if (env->RegisterNatives(g_qtSurfaceTextureClass,
-                                 methods,
-                                 sizeof(methods) / sizeof(methods[0])) < 0) {
-            return false;
+    if (surfaceTextureClass) {
+        jclass clazz = env->FindClass("org/qtproject/qt5/android/multimedia/QtSurfaceTexture");
+        if (env->ExceptionCheck())
+            env->ExceptionClear();
+
+        if (clazz) {
+            g_qtSurfaceTextureClass = static_cast<jclass>(env->NewGlobalRef(clazz));
+            if (env->RegisterNatives(g_qtSurfaceTextureClass,
+                                     methods,
+                                     sizeof(methods) / sizeof(methods[0])) < 0) {
+                return false;
+            }
         }
     }
 
-- 
1.8.4


From e4654ca5ee255598269c0805507384c4a02ebdb2 Mon Sep 17 00:00:00 2001
From: Yoann Lopes <yoann.lopes@digia.com>
Date: Wed, 27 Nov 2013 18:01:56 +0100
Subject: [PATCH 2/5] Fix version availability for VideoOutput's
 autoOrientation property.

This new property is available since 5.2, not 5.1.

Change-Id: Ie3b5cd3c5d909f6d4ba662a2eaf03f1e6bb8b21b
Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>

diff --git a/src/imports/multimedia/multimedia.cpp b/src/imports/multimedia/multimedia.cpp
index d2bc829..f05252f 100644
--- a/src/imports/multimedia/multimedia.cpp
+++ b/src/imports/multimedia/multimedia.cpp
@@ -76,7 +76,7 @@ public:
         qmlRegisterType<QDeclarativeAudio>(uri, 5, 0, "Audio");
         qmlRegisterType<QDeclarativeAudio>(uri, 5, 0, "MediaPlayer");
         qmlRegisterType<QDeclarativeVideoOutput>(uri, 5, 0, "VideoOutput");
-        qmlRegisterType<QDeclarativeVideoOutput, 1>(uri, 5, 1, "VideoOutput");
+        qmlRegisterType<QDeclarativeVideoOutput, 2>(uri, 5, 2, "VideoOutput");
         qmlRegisterType<QDeclarativeRadio>(uri, 5, 0, "Radio");
         qmlRegisterType<QDeclarativeRadioData>(uri, 5, 0, "RadioData");
         qmlRegisterType<QDeclarativeCamera>(uri, 5, 0, "Camera");
diff --git a/src/imports/multimedia/qdeclarativevideooutput.cpp b/src/imports/multimedia/qdeclarativevideooutput.cpp
index 07c78b7..240dc46 100644
--- a/src/imports/multimedia/qdeclarativevideooutput.cpp
+++ b/src/imports/multimedia/qdeclarativevideooutput.cpp
@@ -429,7 +429,7 @@ void QDeclarativeVideoOutput::setOrientation(int orientation)
 
     By default \c autoOrientation is disabled.
 
-    \since QtMultimedia 5.1
+    \since QtMultimedia 5.2
 */
 bool QDeclarativeVideoOutput::autoOrientation() const
 {
diff --git a/src/imports/multimedia/qdeclarativevideooutput_p.h b/src/imports/multimedia/qdeclarativevideooutput_p.h
index 1de1fcc..07fdb41 100644
--- a/src/imports/multimedia/qdeclarativevideooutput_p.h
+++ b/src/imports/multimedia/qdeclarativevideooutput_p.h
@@ -62,7 +62,7 @@ class QDeclarativeVideoOutput : public QQuickItem
     Q_PROPERTY(QObject* source READ source WRITE setSource NOTIFY sourceChanged)
     Q_PROPERTY(FillMode fillMode READ fillMode WRITE setFillMode NOTIFY fillModeChanged)
     Q_PROPERTY(int orientation READ orientation WRITE setOrientation NOTIFY orientationChanged)
-    Q_PROPERTY(bool autoOrientation READ autoOrientation WRITE setAutoOrientation NOTIFY autoOrientationChanged REVISION 1)
+    Q_PROPERTY(bool autoOrientation READ autoOrientation WRITE setAutoOrientation NOTIFY autoOrientationChanged REVISION 2)
     Q_PROPERTY(QRectF sourceRect READ sourceRect NOTIFY sourceRectChanged)
     Q_PROPERTY(QRectF contentRect READ contentRect NOTIFY contentRectChanged)
     Q_ENUMS(FillMode)
-- 
1.8.4


From 288e49d49308f84afa180086aebb9ce61738e626 Mon Sep 17 00:00:00 2001
From: Yoann Lopes <yoann.lopes@digia.com>
Date: Wed, 27 Nov 2013 19:20:27 +0100
Subject: [PATCH 3/5] Add changes-5.2.0 file.

Change-Id: Ieec89755a30996a5b0ed37ecaa6ee957344f8594
Reviewed-by: Sergio Ahumada <sahumada@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>

diff --git a/dist/changes-5.2.0 b/dist/changes-5.2.0
new file mode 100644
index 0000000..e485659
--- /dev/null
+++ b/dist/changes-5.2.0
@@ -0,0 +1,86 @@
+Qt 5.2 introduces many new features and improvements as well as bugfixes
+over the 5.1.x series. For more details, refer to the online documentation
+included in this distribution. The documentation is also available online:
+
+  http://qt-project.org/doc/qt-5.2
+
+The Qt version 5.2 series is binary compatible with the 5.1.x series.
+Applications compiled for 5.1 will continue to run with 5.2.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+  http://bugreports.qt-project.org/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+*                           General                                        *
+****************************************************************************
+
+ - Improved ALSA implementation of the audio APIs.
+ - Improved WAV support in QSoundEffect.
+ - New resource policy plugin based on libresourceqt.
+ - Fix QVideoSurfaceArbFpPainter mistakenly failing to start in some cases.
+ - Improved QAudioRecorder implementation on Windows and Mac OS.
+ - Various documentation fixes.
+ - Improved audiorecorder example.
+ - [QTBUG-32487] Make PulseAudio implementation of QSoundEffect more robust.
+ - [QTBUG-32882] Enable QSoundEffect with loopCount of Infinite to play.
+ - [QTBUG-31731] WMF and GStreamer: fixed incorrect frame startTime and endTime.
+ - [QTBUG-30442] VideoOutput: take the video format's scanLineDirection into account.
+ - [QTBUG-34125] Correctly clear the current media in Audio and MediaPlayer qml elements.
+
+Qt for Android
+--------------
+
+ - New OpenSL ES plugin for low-latency audio support on Android.
+ - New camera support on Android.
+ - Improved video renderering with Qt Quick.
+ - Camera and recording permissions are now automatically added when using QtMultimedia on Android.
+ - [QTBUG-32635] Fixed media player buffering logic.
+ - [QTBUG-34558] Fix two race conditions in the media player.
+
+Qt for iOS
+----------
+
+ - New media player and basic camera support on iOS.
+
+Qt for BlackBerry
+-----------------
+
+ - Fix setting a URL containing reserved characters on a media player.
+ - Enable camera on the Playbook.
+ - New QAudioRecorder support.
+ - Fix video recording with BB 10.2.
+ - Improve camera focus handling.
+ - Fixed pixel aspect ratio for video windows.
+ - [QTBUG-33739] Fix camera viewfinder.
+
+Qt for Windows
+--------------
+
+ - WMF: emit positionChanged() signal when reaching the end of a media.
+ - [QTBUG-30776] DirectShow: improve metadata support.
+ - [QTBUG-33631][QTBUG-33518] WMF: allow to load media whose content doesn't match its file extension.
+ - [QTBUG-33518] WMF: allow to load QRC files with QAudioDecoder.
+ - [QTBUG-30435] WMF: fixed the media player failing to play some media formats.
+ - [QTBUG-32360] WMF: fixed compilation with Visual Studio 2008.
+ - [QTBUG-34479] DirectShow: fixed compilation with Visual Studio 2008.
+ - [QTBUG-32864] WMF: fixed compilation on Windows Vista.
+ - [QTBUG-30825] WMF: fixed QMediaPlayer changing to EndOfMedia status too early.
+ - [QTBUG-33160] Fix QAudioOutput::setVolume() limited to 50% on 32-bit Windows.
+
+Qt for QNX
+----------
+
+ - New camera and media player support when mmrenderer is available.
+
+****************************************************************************
+*                            Plugins                                       *
+****************************************************************************
+
+ - New QML import version QtMultimedia 5.2 adds a new autoOrientation
+   property to the VideoOutput type, which allows the video output to
+   always match the screen orientation.
-- 
1.8.4


From ea9f9788d502d4a4307a464d87a00be198df09ad Mon Sep 17 00:00:00 2001
From: Frank Osterfeld <frank.osterfeld.qnx@kdab.com>
Date: Thu, 28 Nov 2013 10:27:46 +0100
Subject: [PATCH 4/5] QNX/PPS: Fix end-of-track handling

The state to check for is actually "stopped", not "STOPPED".
Fixes end-of-track detection.

Task-number: QTBUG-35189
Change-Id: Ifa2f0635b31ef8c584c1800ef870c0dbef2b1daf
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>

diff --git a/src/plugins/qnx/mediaplayer/ppsmediaplayercontrol.cpp b/src/plugins/qnx/mediaplayer/ppsmediaplayercontrol.cpp
index eb0842f..b54c796 100644
--- a/src/plugins/qnx/mediaplayer/ppsmediaplayercontrol.cpp
+++ b/src/plugins/qnx/mediaplayer/ppsmediaplayercontrol.cpp
@@ -57,7 +57,7 @@ PpsMediaPlayerControl::PpsMediaPlayerControl(QObject *parent)
     m_ppsStatusFd(-1),
     m_ppsStateNotifier(0),
     m_ppsStateFd(-1)
-  , m_previouslySeenState("STOPPED")
+  , m_previouslySeenState("stopped")
 {
     openConnection();
 }
@@ -177,7 +177,7 @@ void PpsMediaPlayerControl::ppsReadyRead(int fd)
 
     if (pps_decoder_get_string(&decoder, "state", &value) == PPS_DECODER_OK) {
         const QByteArray state = value;
-        if (state != m_previouslySeenState && state == "STOPPED")
+        if (state != m_previouslySeenState && state == "stopped")
             handleMmStopped();
         m_previouslySeenState = state;
     }
-- 
1.8.4


From b3ca574eaada965dbd20a90f89c3eb524627321a Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Thu, 13 Dec 2012 20:23:48 +0100
Subject: [PATCH 5/5] remove duplicate defs (mxe-specific)


diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
index e9503d4..b92aa98 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
@@ -67,19 +67,19 @@ typedef struct _DDPIXELFORMAT* LPDDPIXELFORMAT;
 #else
 
 extern GUID CLSID_AudioInputDeviceCategory;
-extern GUID CLSID_AudioRendererCategory;
-extern GUID IID_ICreateDevEnum;
-extern GUID CLSID_SystemDeviceEnum;
+//extern GUID CLSID_AudioRendererCategory;
+//extern GUID IID_ICreateDevEnum;
+//extern GUID CLSID_SystemDeviceEnum;
 
 #ifndef __ICreateDevEnum_INTERFACE_DEFINED__
 #define __ICreateDevEnum_INTERFACE_DEFINED__
 
-DECLARE_INTERFACE_(ICreateDevEnum, IUnknown)
-{
-    STDMETHOD(CreateClassEnumerator)(REFCLSID clsidDeviceClass,
-                                     IEnumMoniker **ppEnumMoniker,
-                                     DWORD dwFlags) PURE;
-};
+//DECLARE_INTERFACE_(ICreateDevEnum, IUnknown)
+//{
+//    STDMETHOD(CreateClassEnumerator)(REFCLSID clsidDeviceClass,
+//                                     IEnumMoniker **ppEnumMoniker,
+//                                     DWORD dwFlags) PURE;
+//};
 
 #endif //  __ICreateDevEnum_INTERFACE_DEFINED__
 
-- 
1.8.4