Commit Graph

433 Commits

Author SHA1 Message Date
Yoann Lopes
301baf2b68 Android: use correct format when capturing a picture to a buffer.
Don't decode the JPEG data to raw RGB using QImage. QCameraImageCapture
reports anyway that JPEG is the only supported buffer format.

Change-Id: Ib17760e4361b004775c002b686ef7529b3768aab
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-11-06 14:28:16 +01:00
Yoann Lopes
2412c298d4 Android: fix two race conditions in the media player.
start() could be called before the media player was marked as prepared.
When changing media, setMediaPath() could be called before the media
player was reset.

Task-number: QTBUG-34558
Change-Id: I886fd5f5008f76dcbc88c57d7b16a439b394d4a7
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-11-06 14:24:35 +01:00
Frank Osterfeld
27e6611c0e BB10: do not mix up pixel width and height
This fixes the aspect ratio calculation for video windows.

Change-Id: Ie4762b98ee805a41031e1ba88f5cd353426dfdf8
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-11-04 11:46:30 +01:00
Yoann Lopes
4edc0cc3b9 DirectShow: fix compilation with MSVC 2008.
Task-number: QTBUG-34479
Change-Id: I48ab0760273e08678be5f057e2b39db8cbe10cff
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-31 12:46:08 +01:00
Yoann Lopes
30cf028fb1 Android: fix camera preview showing black frames after restarting it.
Clear the camera preview size when stopping the preview in order to
force it to be reset when starting it again.

Task-number: QTBUG-34346
Change-Id: I0edf8d996348745b9aa7cf0790c16b6cd813b33b
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-29 20:26:24 +01:00
Yoann Lopes
acbd998749 WMF: emit positionChanged() signal when reaching the end of a media.
This is necessary for QML MediaPlayer to report the correct position at
the end of a media.

Change-Id: Ifac2a721b850c726305d1a98e360da638b1fa87a
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-29 11:43:08 +01:00
Tobias Koenig
43bc5f65d2 Blackberry: Improve camera focus handling
Use different state variables for focus/exposure/whitebalance
locks and update the exposure and whitebalance variables explicitly,
since BB10 doesn't provide a status callback method as for focus.

Change-Id: Ie6ba8f6a2a27f317c39994d21be8549c99daef6d
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-10-25 18:51:52 +02:00
Yoann Lopes
1235fb9910 OpenSL ES: enable the plugin only on Android.
Removed the configure test to enable or not the plugin (which solves
the problem of the plugin not being built on Windows because of a bug
in QMake). Even though it should work on other OpenSL ES
implementations than the Android one, it hasn't been tested. Compile
and use the plugin only on Android for now.

Task-number: QTBUG-34275
Change-Id: I02d47c8be3be8163a17c68b44b8c4b18a218a3fe
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-25 18:51:52 +02:00
Rafael Roquetto
2858e6cc3e BlackBerry: fix BbVideoWindowControl window zorder
Change-Id: I6c3b70d5d5a0afcb00ce2494ee071d6f3abd7626
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-10-25 14:39:14 +02:00
Tobias Koenig
a2f9f25d85 Blackberry: Fix camera viewfinder
Enter the event loop between opening the camera and starting
the viewfinder window grabber. The latter needs a windowGroup
set, so in case the QCamera and QCameraViewfinder are constructed
directly/indirectly inside the main window constructor, we have to
wait for the top-level window of the application to be created, so
that we can retrieve the windowGroup from it.

Task-number: QTBUG-33739
Change-Id: Ib23781f0e4a2a07ba388e22debcb59b00509ed16
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2013-10-24 16:42:25 +02:00
Tobias Koenig
e3bd0333de Blackberry: Fix video recording
The latest BB10 firmware (10.2) requires to set the rotation
property of the video explicitly to the value of the video
viewfinder.

Change-Id: Iec9d43480820655b5d3ecdd136917d5458f0e55b
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-10-24 14:00:25 +02:00
Frederik Gladhorn
f15105a02d Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I15d0b9f03136840aff189ffb9de6e3899c204ca2
2013-10-24 12:56:17 +02:00
Bernd Weimer
1b563aca1a Removed camera error code
Removed mapping of one camera error code to a string, because the
code is not available yet in the BlackBerry NDK version 10.2.

Change-Id: I91a8adc8d915e065daccb665ce7a57236b9d1545
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-10-18 15:35:04 +02:00
Yoann Lopes
068169528c WMF: fix output samples from our video probe MFTransform.
The EVR sink allocates its buffers and expect the node connected to it
to use them. Our video probe MFTransform should therefore copy the input
buffers into the EVR buffers rather than just passing on the input
buffers.

Task-number: QTBUG-30435
Change-Id: I978479ced341b96ce627c682f99662dec1dfdb3f
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-16 12:09:50 +02:00
Friedemann Kleint
98a6eefda9 Add Linguist comment for translation of Drive-mode.
Translators not familiar with cameras might mistake it for
something related to driving a car.

Change-Id: If54a563a32af537d291b79253056b7b57e108f5b
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-10-15 15:38:55 +02:00
Yoann Lopes
99c4a08c38 WMF: allow to set a qrc file name as source of a QAudioDecoder.
Task-number: QTBUG-33518
Change-Id: I01d8a1fa7b9a1c3ea2af9de6033dff2773cd6ace
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-14 18:44:03 +02:00
Yoann Lopes
a23b14874c WMF: allow to load media whose content doesn't match its file extension.
This also allows to play streams without providing a MIME type.

Task-number: QTBUG-33631
Task-number: QTBUG-33518
Change-Id: Ia106592cb5ed0a0f7ede6308dc8e2c12cf4e63b1
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-14 18:43:48 +02:00
Frederik Gladhorn
677aac0e92 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/blackberry/camera/bbcamerasession.cpp

Change-Id: I7c86e10140ab86fd2a07e2f034dec38ae9112559
2013-10-14 14:35:38 +02:00
Yoann Lopes
6f0cdc264f WMF: fixed compilation on Windows Vista.
We were using one function which is available only on Windows 7 (and
later). Replace it with Vista-compatible calls.

Task-number: QTBUG-32864
Change-Id: I77492a407330c3689dfbf8dc1180894cf7ca5f8d
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-11 16:08:22 +02:00
Yoann Lopes
7d24543c27 DirectShow: improve metadata support.
Correctly return the list of available metadata.
On Windows Vista and later, we now use shell properties to retrieve the
metadata. This allows us to get much more metadata properties.

Task-number: QTBUG-30776
Change-Id: If542756d08d832903984ef10d09c4caf410bdb1c
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-11 14:21:48 +02:00
Yoann Lopes
8d78790872 QNX: enable AudioCapture plugin.
This allows to use the QAudioRecorder API on QNX (and Blackberry), using
the low-latency audio plugin as backend.

Change-Id: I9bed7c01948a40f931f2a6b29c0f5cbfc99635bd
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-10-11 09:43:25 +02:00
Fabian Bumberger
2e1d38a3c7 Enable camera on the Playbook
Change-Id: I61537899bee63150861df57f9140316eca6a6eed
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-10-10 17:55:19 +02:00
Yoann Lopes
c2f95891c0 Refactored AudioCapture plugin.
Change-Id: I025588d7d2afc8d8137a258d86f6dab5b00b234a
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-09 19:02:13 +02:00
Yoann Lopes
b49746b588 Android: fix media recording location.
When letting the plugin decide where to save the recorded media, doing
several recordings would always use the same output file instead of
creating a different one every time.

Change-Id: If352257d6c91ada8565c1463820321f84c9bb92f
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-09 18:02:44 +02:00
Yoann Lopes
28df116570 Android: fixed image capture preview.
We used to generate the capture preview from the video output, grabbing
the pixels of the last frame (in a FBO). This is not possible anymore,
we instead query the camera for a preview frame, which is in the NV21
format and needs to be converted to RGB.

Change-Id: I1c728b3a708a6f052a83aebf9f15f511eab7a02f
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-01 17:26:31 +02:00
Yoann Lopes
be7a6241e7 Android: refactor video renderer.
Removed the overhead of having to create a shared OpenGL context in the GUI
thread and pre-render the frame into a FBO.

We now directly render the GL_TEXTURE_EXTERNAL_OES in the QtQuick render
thread, using an Android-specific QSGVideoNode.
We also use a callback from the render thread to create the texture from
there and not have to create a separate shared OpenGL context.

Change-Id: I6c8eb94b47d0a03329c912701b8af3fb5ebd1876
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-10-01 17:26:21 +02:00
Frederik Gladhorn
85aadf8cb2 Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-10-01 09:13:55 +02:00
Bernd Weimer
957084ac1b Added missing camera error strings
On BlackBerry some camera error codes were not mapped to
corresponding strings.

Change-Id: I3c26f07eccc7204b89a387e83d342f6821773a1b
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2013-10-01 09:11:23 +02:00
Yoann Lopes
2162d9a2cc Android: fix plugin json metadata.
Change-Id: I0f2feca44843760df13a938d9190daf2d447d645
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-09-26 12:26:18 +02:00
Yoann Lopes
c3ca3a760e Some cleanup in the GStreamer plugin.
Removed QGstreamerVideoOverlay and related classes. It was used as
'Window' control but performs worse than QGstreamerVideoWindow which
does basically the same thing using GStreamer ready-made components
instead.
Removed X11 dependencies and related configuration tests. It was only
needed for QGstreamerVideoOverlay.

Change-Id: I2ad2636ccf0060e56cd64f3d9e5b3c24dc75f5a3
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-09-20 14:37:06 +02:00
Christian Strømme
ac029c65f2 Android: Adapt the multimedia plugin to new QJNI API
Change-Id: Id87f5518724eed6c9de6d5d3b8141860bd511643
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-09-20 10:11:50 +02:00
Yoann Lopes
17480111ed Android: fix compilation on x86.
Task-number: QTBUG-33554
Change-Id: I4da7410d3b77ec6d72a73d3b6ceb7b76bb48d2b7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2013-09-19 14:44:17 +02:00
Andy Nichols
b357c55f2d CoreAudio: Create an audio plugin supporting iOS and OS X
This removes the Mac audio backend that was hardcoded into QtMultimedia
and adds a new audio plugin using the CoreAudio API.

Change-Id: Ib15291825f9452a3763e0eeb281d952deb0bad3d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-09-19 14:36:28 +02:00
Christian Strømme
044e48d5a4 OpenSL: Fix build warning about unused result variable.
Change-Id: I11a4a3792feb90c46d4f3a77aafa82c18a9d9a45
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-09-17 21:17:07 +02:00
Christian Strømme
ef64462696 OpenSL: Fix typos
Change-Id: I1a293bbf8ad3d9016ff6a7ec816c33d3303e5959
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-09-12 16:04:23 +02:00
Yoann Lopes
0a7882f6b3 Android: added camera support.
This patch includes all camera features: viewport, settings, image
capture, and video recording.
It also adds support for QAudioRecorder.

Change-Id: Ib962177cc8de4bac03f42a2bc0f534e03464bbfc
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-09-12 12:56:57 +02:00
Sergio Ahumada
25be645862 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I2cba36426d8af40f94712f7f05f4e0dd4efce6e7
2013-09-06 14:32:51 +02:00
Tobias Hunger
71808302a5 PulseaudioInput: Remove unused members
Clang warns about them.

Change-Id: I8fb2e9bc30f35ec9540b09a34bf23bf9eb671b9c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-02 15:06:22 +02:00
Bernd Weimer
13a53a5056 BlackBerry: Pass encoded URLs to mm renderer
MM renderer expects (remote) URLs to be percent encoded.

Change-Id: Ib7429cbeb3b7aa6baba99419d8b101a712ab4881
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2013-08-29 09:24:31 +02:00
Frederik Gladhorn
cb1871d061 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I469f258c4838f87edaedc8620d925a3c537d1619
2013-08-27 22:44:53 +02:00
Andy Nichols
48a6a8a043 AVFoundation: Basic camera support for iOS
Enables basic software rendering support for iOS.

Change-Id: Icd29076ea627295819ede6d9680de576ba39b34e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-08-27 14:16:26 +02:00
Andy Nichols
94ccfbc132 AVFoundation: Enable QVideoWidget on iOS
Change-Id: I88041e7a2ea052fe449542eeaada31c09d93d163
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-08-27 14:16:18 +02:00
Andy Nichols
51d0f852b9 AVFoundation: Use CoreAnimation to render video to QVideoWidget
Previously a QGLWidget was used as a target for the
AVFVideoFrameRenderer.  This was uncessary as it is possible to render
directly on top of the QWidget using the CoreAnimation Framework.

Change-Id: I08923c85fd56c8874c1d8c187ae5145e220fab92
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-08-27 14:16:10 +02:00
Andy Nichols
17a700292a AVFoundation: Enable use of QMediaPlayer for audio on iOS
This commit disables the video components of the AVFoundation
mediaplayer backend when building for iOS and enables the use of
QMediaPlayer with audio assets.

Change-Id: Iadd6f9c61ed1e656301326e90a22cbca6428b654
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2013-08-27 14:15:54 +02:00
Yoann Lopes
a2f078f108 WMF and GStreamer: fixed incorrect frame startTime and endTime.
The QVideoFrame documentation explicitly says that the time is in
microseconds, however the GStreamer backend was setting the time in
milliseconds and the WMF backend in 100-nanosecond units.
With WMF, the time was missing from the QVideoFrame when presenting it to
the video surface.

Task-number: QTBUG-31731
Change-Id: I0638d2abf8eed25b3a531db67c19a18703e5b630
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2013-08-22 13:16:49 +02:00
Christian Strømme
ca769ba264 Android: Use isValid() to check if the jobject is valid.
Change-Id: I5ec67b9b2abfae2e2c2a44f0bcc7c72cb54beb49
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-08-21 13:31:53 +02:00
Yoann Lopes
4585518d52 Android: fixed media player buffering logic.
When the media is ready, the status should always transition to
LoadedMedia and then immediately to BufferingMedia or BufferedMedia.
Also, when the duration is queried before the media is ready but already
buffering, it should always return 0 to avoid errors from the Android
media player.

Task-number: QTBUG-32635
Change-Id: Ibcb9c23b4f64c4f9a1a8e0ef81989ae78cfb19ef
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-08-19 15:31:21 +02:00
Yoann Lopes
291f1229fe WMF: fixed QMediaPlayer changing to EndOfMedia status too early.
It was changing to EndOfMedia status and explicitly stopping playback
when receiving the MEEndOfPresentation event from the WMF session.
However, this event means that all data has bean read from the source but
not necessarily played yet. According to the documentation, playback is
done when the MESessionEnded event is sent. It now reports the EndOfMedia
status at that moment instead. stop() is not explicitly called anymore since
MESessionEnded also implies the session has stopped.

Task-number: QTBUG-30825
Change-Id: I6c6c09e736fe33f7cf17c75038ea7be1b5701a1c
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-08-16 15:30:10 +02:00
Yoann Lopes
bdf0cc7a16 WMF: use qFabs instead of fabsf.
Task-number: QTBUG-32360
Change-Id: Ibec3d044ac38f54abd895d56f1851011bf6b5272
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2013-08-16 15:30:00 +02:00
Frederik Gladhorn
74e4b59ec8 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/plugins.pro

Change-Id: Ieec8b5984b0fba97872bf96c38410369dc0e20cf
2013-08-12 12:47:02 +02:00