Commit Graph

1859 Commits

Author SHA1 Message Date
Yoann Lopes
6a6a69b7d8 AVFoundation: fix initial volume.
The volume level set before loading a media was never actually set on
AVPlayer.
Regression introduced by 4e07ff99 on OSX.

Task-number: QTBUG-48154
Change-Id: I599e3d55b35d7196aebc4753a367a29049f99d33
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-09-15 09:09:42 +00:00
Yoann Lopes
95fa47f747 AVFoundation: fix playback rate.
Calling play on the AVPlayer internally resets the playback rate, which
means any playback rate set before calling play was ignored.
We now always call setRate to start playback to avoid resetting the
rate with play.
Aslo fixed the playbackRateChanged() signal that was never emitted.

Task-number: QTBUG-45570
Change-Id: I3a77e1db31c57f1e3491287bdf977731b9d73509
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-09-15 09:09:11 +00:00
Yoann Lopes
29ce8886b3 Android: allow to map video buffers.
Since we internally use a fbo, use QOpenGLFramebufferObject::toImage()
to grab the pixel data and enable the use of map() on frames retrieved
using QAbstractVideoFilter.

Change-Id: If96e992e12e26091524913bb24926fa21d9d58cc
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2015-09-08 10:18:01 +00:00
Nico Vertriest
da6d287e46 Doc: minor corrections
Change-Id: Idcaac01294642e7e79f6e2b8bcfd2c9559274790
Task-number: QTBUG-43810
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-09-07 13:47:07 +00:00
Friedemann Kleint
8a5f74ddf2 Add 'resourcepolicy' to MODULE_PLUGIN_TYPES of multimedia.pro.
Fix warning:
WARNING: Project ERROR: No module claims plugin type resourcepolicy
discovered when running lupdate to create the translations.

Change-Id: I9fdde3e86219164cabbfe10672899eb2984f06d2
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2015-09-03 04:33:38 +00:00
Yoann Lopes
edc415be47 Fix crash in QSoundEffect when using it from a non-GUI thread.
The internal QIODevice used as data source was not set as child of the
parent QSoundEffectPrivate. If moveToThread() was called on the
QSoundEffect, the QIODevice would still receive events on the main
thread, leading to race conditions.

Task-number: QTBUG-46359
Change-Id: I180da2fb498108b316fd9b5b5cc84376b360fa3f
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-25 14:12:04 +00:00
Yoann Lopes
4eb4a3ada3 Fix QML Camera::supportedViewfinderFrameRateRanges().
Pass the resolution argument as a QJSValue instead of a QSize.
This allows to be more flexible and doesn't require the QML argument
to be an actual QML 'size' value. It can be any object with the
'width' and 'height' properties.

Added missing auto-tests for supportedViewfinderResolutions()
and supportedViewfinderFrameRateRanges().

Change-Id: I6c8ae72e6dab8c9d12bbada5b8e7f45e96e9289d
Task-number: QTBUG-47630
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-08-25 11:18:51 +00:00
Yoann Lopes
ded4d7b006 Fix possible crashes in QDeclarativeRadioData.
It would crash when accessing any of its properties when there is no
radio backend available.

Task-number: QTBUG-47859
Change-Id: Ic7c0a70ca3e9a4768359b3429ea812caece09fce
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-25 08:56:17 +00:00
Yoann Lopes
f5e18c6239 Fix MediaPlayer::playlist documentation.
Added missing '\since 5.6' tag.

Change-Id: I46e0ea8bad85fb1f51f5502766c13549c6dad9d5
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-24 13:05:46 +00:00
Yoann Lopes
3477104e0d Fix QCamera::lockStatus() documentation.
Change-Id: I1f7c063ef1e465ba658f637754b10b7af44b8373
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-24 13:05:40 +00:00
Yoann Lopes
a2244c9b7a Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	src/imports/multimedia/qdeclarativeaudio.cpp

Change-Id: I57c6252b084e4ed796f6f308b2e0c717d0f59b13
2015-08-24 14:36:13 +02:00
Yoann Lopes
008d20e0ec Android: minor refactor of the camera frame callback.
Change-Id: I6b281c9b2d02cf223e66e04e31fdd0268aa277fc
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-20 07:03:54 +00:00
Yoann Lopes
2e54790a59 Android: fix video probes when recording the camera.
The preview frame callback is cleared by the Android Camera whenever a
MediaRecorder is set up. We need to reset the callback after starting
the media recorder.

Change-Id: I604320b11eb3a7f6f8d7d3167d5aae371999be14
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-20 07:01:10 +00:00
Friedemann Kleint
31fce88b3f Fix 2 more tr()-contexts of messages in QPlaylistFileParserPrivate.
Use QPlaylistFileParser instead of QObject.

Change-Id: I5dd4b56f7f580ca4089db67bbfabdd58ef7e2778
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-19 16:20:20 +00:00
Yoann Lopes
28a20861fd QMediaPlayer: clear current playlist on deletion.
Makes sure the current playlist is unbound when QMediaPlayer is
destroyed.

Change-Id: If25efa67bf79af0326f6125d9615165a2c7dd6bb
Reviewed-by: Jim Hodapp <jim.hodapp@canonical.com>
Reviewed-by: Loïc Molinari <loic.molinari@canonical.com>
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-19 11:32:35 +00:00
Friedemann Kleint
aad6e64352 Fix tr()-context of messages in QPlaylistFileParserPrivate.
Use QPlaylistFileParser instead of QObject.

Change-Id: I83f6b0384fc60b356a8ae8b316d2aaa768e7ac4d
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-19 11:16:09 +00:00
Friedemann Kleint
9c9a240220 Make QWinRTImageEncoderControl a Q_OBJECT.
Fix lupdate warning:

qtmultimedia/src/plugins/winrt/qwinrtimageencodercontrol.cpp:60: Class 'QWinRTImageEncoderControl' lacks Q_OBJECT macro

when parsing the tr() in
QWinRTImageEncoderControl::imageCodecDescription().

Change-Id: I004c05c8cea620e30bff7a2b35b83eed01b7ed4c
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-19 07:12:11 +00:00
Yoann Lopes
cd3d540522 GStreamer: refactored widget and window control.
Instead of always using xvimagesink as GStreamer backend for the
widget and window control (works only with X11), we now try to
pick a video sink that fits the current configuration.
It first tries a set of known video sinks that can work with
the Qt platform plugin in use. If none is available, it
dynamically picks a video sink available on the system that can be
used with our backend.

Even if the video sink is now picked in a smarter way, xcb is still
the only supported platform plugin. The reason is that it's the
only Unix plugin which can provide a valid native window handle.
Additional work is needed to support other plugins like wayland
or directfb.

Change-Id: I3843dea363d6a0b85a6cc1f2952783b743e48ac6
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-18 13:16:50 +00:00
Yoann Lopes
13e40d522f Fix QCamera viewfinder capabilities functions..
- Filtering the results for a specific pixel aspect ratio would return
  wrong values.
- Correctly sort the frame rate ranges returned by
  supportedViewfinderFrameRateRanges().

Added missing auto-tests for all viewfinder capabilities functions.

Change-Id: Idfb40d4139cc48a5996ce2ddd98131a2f5be76bb
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-18 12:58:00 +00:00
Samuel Nevala
1b957a05fe winrt: Fix aspect ratio deviation between preview and encoding streams
The source texture size from camera was wrong due to a missing
IMediaDeviceController::SetMediaStreamPropertiesAsync call for the
preview media type. Therefore Viewfinder and StillImage capture modes
behave tha same from QCamera point of view. By default, the camera
takes the lowest capture resolution and the lowest preview
resolution with a matching aspect ratio. If the capture resolution
is set, the preview resolution is set to the lowest possible resolution
with a matching aspect ratio. Until viewfinder settings are implemented
for WinRT, there is no way for user to change the viewfinder resolution.

Change-Id: I4b76ceb46bd4c366561f5206d913b97c0d0df211
Task-Id: QTBUG-47465
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-08-18 10:52:15 +00:00
Ricardo Salveti de Araujo
e0b9217d27 Avoid races when sending EOS
In order to avoid races when sending EOS, we need to make sure that the
pipeline is in playing state first.

Task-number: QTBUG-45707
Change-Id: I518e89badf38bea8ab8e2cead9a1ca09659af8b2
Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com>
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-18 09:49:09 +00:00
Yoann Lopes
c9533b5aaf GStreamer: added convenience function in QGstUtils.
-> qt_gst_element_get_factory_name(GstElement *elem)

Change-Id: Icf806488b49fbcdecdd605b6316bd1ef8796a883
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-13 13:26:26 +00:00
Thiago Macieira
8b85c5a28e Add the GPLv3 license text
LGPLv3 refers to it but does not include it in its body.

Change-Id: Ib056b47dde3341ef9a52ffff13eed18cf3504738
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-08-13 15:07:55 +02:00
Yoann Lopes
8ba1e65291 Fix camera plugin selection.
When requesting a camera plugin for a given device id, it should fall
back to any available plugin if that device id is not found.

Change-Id: I685294c7fdcaa72bce70178b0aae2ec92e79e107
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-12 14:07:21 +00:00
Christian Strømme
dc1712d4b2 Remove obsolete check in QMediaService
The macro QT_NO_MEMBER_TEMPLATES was removed eons ago.

Change-Id: Ifc4f3ac8bcf1e9b42fad5dcfb101e3446a254abc
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-12 11:34:44 +00:00
Loïc Molinari
b05e9d99c2 Bind the playlist connected to a player.
Change-Id: I3c2e00773c88f671bdffcfe8c8175330ca405d4a
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-12 09:43:53 +00:00
Venugopal Shivashankar
ae9095d5bc Doc: Corrected a typo.
Change-Id: I53ab7ddf0a8c0416dce19bf2b642e7e294f3c868
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-11 13:53:38 +00:00
Yoann Lopes
68a09d3093 Fix documentation for QML metaData property.
For Audio, Video, MediaPlayer and Camera types.
Group the sub properties as a \qmlproperty group, which makes
the doc much clearer.

Change-Id: Id990d7b14a4c3f86768c6b3b4990845f84839944
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-08-11 13:36:41 +00:00
Yoann Lopes
6df6cacbb0 Fix qdoc warnings.
Change-Id: Ie351f33f88270186b7df0f9cd671fa4e31624231
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-11 13:14:28 +00:00
Yoann Lopes
b8553dae1d Doc: update qml module version to 5.5.
And remove import statements from snippets.

Change-Id: I109beabd445186f96f0750b6f23fb623c125181e
Task-number: QTBUG-47620
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-08-11 13:07:34 +00:00
Yoann Lopes
a00c588c70 Improve documentation for mediaObject property.
In Camera and MediaPlayer types.

Change-Id: Iaf17dc7e5f7075ce7eeefcf7992b970d1ea99e83
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-08-11 09:44:08 +00:00
Jim Hodapp
23acd9f01d Add audio role API to QMediaPlayer.
Change-Id: Ia5e3e2fe714f10b6aad62f0a4801c607905c7e0d
Task-number: QTBUG-41054
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-10 15:12:22 +00:00
Loïc Molinari
6684b4b23b Emit mediaAboutToBeRemoved() before mediaRemoved() in QMediaPlaylist.
When a new playlist's mediaObject is set, the content is cleared and the
mediaRemoved() signal is emitted without a former
mediaAboutToBeRemoved(). This is an issue for QAbstractItemModel
implementations, like the coming QDeclarativePlaylist, which call
beginInsertRow() and endInsertRows() in the respective signal handlers.

Change-Id: I7ec512ff2736e92858df94d9479741e05162e1f0
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-10 12:13:21 +00:00
Peng Wu
129b06ba77 winrt: Add camera video probe controls
[ChangLog][multimedia][winrt] The WinRT backend now supports QVideoProbes
on camera objects.

Task-number: QTBUG-46228
Change-Id: I7850c5ec6f61e5824064d4be8afc8a0b55d05806
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-10 12:12:52 +00:00
Peng Wu
5cec451c10 winrt: Add camera focus and focus lock controls
[ChangLog][multimedia][winrt] The winrt backend now supports camera focus
and focus lock for Windows Phone.

Task-Id: QTBUG-46120
Change-Id: Idb222798284d887a6e90a4986c69274e0ef765f5
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-08-10 12:12:49 +00:00
Loïc Molinari
475a14ccc3 Check and fix up bounds in QMediaPlaylist methods.
Change-Id: I665d665139dbe9663b20ecb08fa3dab9cbe3f899
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-10 11:37:44 +00:00
Yoann Lopes
ef3695a009 Blacklist failing test in tst_qsoundeffect on OpenSuse.
Change-Id: Iccf3e295fb79f043b2e64cb02528ac12e15a0ab6
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-08-10 11:36:48 +00:00
Loïc Molinari
414b748b23 Clean up QMediaPlayer documentation.
Change-Id: I2d744542270f283ccd8ba0160aeda7faa56b2b86
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-10 11:19:58 +00:00
Loïc Molinari
6c6d265a89 Added new playlist QML type.
Change-Id: I0788cc9719f427457ad0be9c9a5bfda00451a0c4
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-10 09:54:50 +00:00
Frederik Gladhorn
872f0de43e Merge remote-tracking branch 'origin/5.5' into dev
Change-Id: I957b44c06fca7a3f552edc18f286de043d31e42d
2015-08-09 15:27:16 +02:00
Yoann Lopes
3c54acb6f7 Add new property to QVideoSurfaceFormat.
The 'mirrored' property indicates the QVideoFrames need to be mirrored
along their vertical axis. This is typically needed for video frames
coming from a front camera on a mobile device.

This is implemented as a string-based property. In Qt 5.6, this should
be replaced by a new public function.

Change-Id: Ideb7de81e83f66826f4efb5f2951c4beec13546b
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-07 17:35:12 +00:00
Thiago Macieira
bc9cfcd08a Fix warnings about unused private fields
avfaudioinputselectorcontrol.h:68:23: warning: private field 'm_service' is not used [-Wunused-private-field]

Change-Id: I5722a2d1bf592862af3a4d36554419a653662892
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-06 16:00:03 +00:00
Thiago Macieira
b048f26281 Don't list avfcamerainfocontrol header and sources twice
This produces Makefile warnings
Makefile.Debug:351: warning: overriding commands for target `.obj/debug/avfcamerainfocontrol.o'
Makefile.Debug:337: warning: ignoring old commands for target `.obj/debug/avfcamerainfocontrol.o'
Makefile.Debug:514: warning: overriding commands for target `.moc/debug/moc_avfcamerainfocontrol.cpp'
Makefile.Debug:506: warning: ignoring old commands for target `.moc/debug/moc_avfcamerainfocontrol.cpp'
Makefile.Debug:351: warning: overriding commands for target `.obj/debug/avfcamerainfocontrol.o'
Makefile.Debug:337: warning: ignoring old commands for target `.obj/debug/avfcamerainfocontrol.o'
Makefile.Debug:514: warning: overriding commands for target `.moc/debug/moc_avfcamerainfocontrol.cpp'
Makefile.Debug:506: warning: ignoring old commands for target `.moc/debug/moc_avfcamerainfocontrol.cpp'

Change-Id: I2ec77cb92b4d218e5b07d895fdb96497061b527b
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-08-06 15:58:52 +00:00
Yoann Lopes
6b19a24b58 GStreamer: use QMediaStorageLocation to generate capture file names.
Change-Id: I2111eb8e28f60ca6305a48a8ee9299bc14ab0df9
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-04 12:56:54 +00:00
Yoann Lopes
b6dd9558a7 GStreamer: fix possible integer overflow in comparison.
Change-Id: I6cf4349f89320f72cce4d04cdf909476e583d11f
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2015-08-04 12:56:35 +00:00
Peng Wu
94eb599b69 winrt: Fix crash during certain video operations
The abstract video buffer pointer was being reused and (improperly)
deleted when its reference count went to zero. As QVideoFrame utilizes
an explicitly shared pointer which also tracks the video buffer, simply
reuse the QVideoFrame instance instead.

Task-number: QTBUG-47373
Change-Id: Idadae205cb520a0a1d752aa20256c0567b3be699
Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
2015-07-28 13:12:30 +00:00
Simon Hausmann
4819f90904 Exclude failing tests on RHEL and Ubuntu
Change-Id: Ifbfb36f47da5f826c94777286fde27d5edd29d01
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2015-07-23 12:02:40 +00:00
Simon Hausmann
82069d0527 Extend test exclusion for this test on OS X
The test doesn't work on OS X 10.9 and 10.10. It also doesn't work
on OS X 10.8, but the current CI system doesn't actually run tests
on 10.8. In the (future) event of us running tests on 10.8, this
change is required.

Change-Id: I6cbe6249aee2460353322d6f1254858238af3711
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-07-23 12:02:35 +00:00
Simon Hausmann
c4a1af736d Prospective fix for building QtMultimedia on Android against installed QtBase
We try to link in Qt5PlatformSupport, which depends on libqtfreetype, which in turn
is not installed. However we don't really need Qt5PlatformSupport, only QtCore private
headers for the JNI bridge.

Change-Id: Ic6d577081327eda7b80ce03c6fb7fd5cf024d05f
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2015-07-23 12:02:30 +00:00
Yoann Lopes
f25034afaf Fix video nodes material comparison.
Don't consider a material equal to another when their texture IDs
are not available yet.

Change-Id: Id4127d71abb2db33950a206dc722b24ab626e960
Task-number: QTBUG-47205
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-07-20 10:25:52 +00:00