Commit Graph

1380 Commits

Author SHA1 Message Date
Frederik Gladhorn
659f238bbb Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts:
	src/gsttools/qgstreamervideoinputdevicecontrol.cpp
	src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp
	src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp

Change-Id: Ic854589562d2deeaa0ebf75840cb8a2ee32e99de
2014-09-01 12:52:51 +02:00
Yoann Lopes
1dba07b602 Added 5.3.2 change file.
Change-Id: I865ae833267c6e91bf61e15acf1acb4292e5c3b2
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-08-27 16:24:28 +02:00
Bjoern Breitmeyer
b3c2dca466 Restore QWindowsAudio support on wince.
Enabled Audio playback with wave device on WindowsCE again.

Change-Id: Ic7749821ef8f991a909cbeb29083219ea988f5dc
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-08-27 13:54:59 +02:00
Samuel Gaist
80ba1d635d Fix little typo in QCameraExposureControl
Should not shuld

Change-Id: I97f7e6ce322dc73bc3b1775a336493d95da848a2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-08-26 15:30:12 +02:00
Yoann Lopes
20da381608 WMF: fix bufferStatus() and availablePlaybackRanges().
- Correctly initialize and clear PROPVARIANT structures
- Return coherent data even when the information is not available

Change-Id: I22b46f95f255cbb740a154c6296a5c3a91e64f67
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-08-25 17:39:55 +02:00
Yoann Lopes
5f0f81bcc1 AVFoundation: fix some controls not being correctly destroyed on iOS.
This patch also makes sure AVF video layers are removed from their
parent layer when their corresponding Qt video outputs are destroyed.

Task-number: QTBUG-39385
Change-Id: I164cd0da7084f84c0473ed3e396e734acce2a22e
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-08-25 17:30:31 +02:00
Yoann Lopes
bee6244e24 AVFoundation: fix retrieving tracks information from live sources.
For live sources, tracks information is available only after the
AVPlayer changed its status to AVPlayerStatusReadyToPlay. It also
seems to be available only from AVPlayerItem.tracks rather than
AVAsset.tracks.
The audioAvailableChanged() and videoAvailableChanged()
signals are now correclty emitted and the video layer is
correctly positioned for live sources.

Task-number: QTBUG-38666
Change-Id: I8ee015a6ce81694c1fc1e44c679887cf7ccb0fd6
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-08-25 17:30:23 +02:00
Yoann Lopes
341b86c63f Android: fix retrieving metadata from assets, qrc and remote files.
We need the same logic as for the media player: local files and assets
must be loaded with a FileDescriptor.
Because of a bug in Android API level >= 14, remote files have to be
loaded in different ways depending on the version.

Task-number: QTBUG-40274
Change-Id: I6411b959064d22219cf981a4dc8f4f26cf16f65f
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-08-25 17:29:37 +02:00
Christian Strømme
fb35f025e3 OpenSL: Fix QAudioOutput::setNotifyInterval().
It was not possible to change the notify interval after calling
start().

Task-number: QTBUG-40208
Change-Id: I82a626003e3bdfe7b7fc88b2f97da492c788877e
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-08-25 16:33:16 +02:00
Christian Strømme
18e665b5a6 Android: Remove api level test in qtmultimedia.pro
ANDROID_API_VERSION env. var should take precedence, if set.

Change-Id: I54325852ede27ff5c1bb19b81d3d649605607de9
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-08-25 16:33:04 +02:00
Thiago Macieira
2205ae322b Add a declaration to QIODevice
It isn't getting #included nor forward-declared at this point. That was
only an indirect inclusion.

qaudiosystem.h:78:24: error: ‘QIODevice’ has not been declared

Change-Id: I5b9121b693bb06414638e8a4664115597da7466f
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-08-25 16:21:16 +02:00
Andrew Knight
778b233bcd winrt: Add media playback service
This introduces a MediaPlayer service based on the MFEngineEx API. Only
scene graph video rendering is supported at this time. The video renderer
control is abstracted in order to provide a base for future video nodes
which do not source their content from the MF engine.

[ChangeLog] Media player support was added to the winrt backend.

Change-Id: I8155a1030466ea352fad0a87d1ae97a88983760c
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-08-25 16:05:24 +02:00
Andrew Knight
5d04ed2a0a Introducing Windows Runtime backend
This lays the foundation for using supported APIs in Media Foundation
for the Windows Runtime family of devies. Due to the narrowing of
supported MF classes, as well as classes that are only available on
Windows 8 and newer, this backend is built as a new plugin rather than
a modification to the existing wmf plugin.

[ChangeLog] Added a new backend plugin, winrt, to support multimedia
within Windows Runtime OSes.

Change-Id: If64ac417127b7400baa5e56fe02b65f909a4dece
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-08-25 16:05:14 +02:00
Daniele E. Domenichelli
5195520a5a Fix QSGVideoNode rendering of rgb frames with padding.
Change-Id: I6870cfa51b01b648494e2068be06e52b67403739
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-08-25 16:04:32 +02:00
Antti Kokko
2732e23887 Update license headers and add new license files
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL

Change-Id: Ied06887225df341064c12bcc14c259ae74116f2e
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-08-24 17:30:13 +02:00
Dyami Caliri
c93c1d1dc3 CoreAudioOutput use timeout when waiting for render thread
On Snow Leopard (at least), changing the default audio device while
audio is playing can cause CoreAudioOutput to freeze in
audioThreadStop(). It seems that the OS stops calling renderCallback
when the device changes, so audioThreadStop() waits forever.

Change-Id: If7244cc50f12295ff91a979ef50e3bee1273affd
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
2014-08-21 20:55:10 +02:00
Lisandro Damián Nicanor Pérez Meyer
ff527de013 Detect V4L availability
Do not build related stuff if not found.
Makes GStreamer support available on Hurd.

Task-number: QTBUG-39762
Change-Id: I1f70b6975e5bef99ab2441aac4d90508bc8b64bd
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-08-18 15:07:47 +02:00
Niels Weber
da77331952 Improve Magnify and Ripple effects on video shader example
Re-enable Magnify shader.
Use correct coordinates for Magnify and Ripple shader.

Task-number: QTBUG-38121
Change-Id: Ie8d962ba841d074c9ebcf3b86f948848ad6a1812
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-08-18 14:05:22 +02:00
Robin Burchell
9be98e09bc Set volume only if volume was explicitly set.
Change-Id: I0d5abab0ffbf61a74c59ce240fd39e756479026b
Done-with: Juho Hämäläinen <juho.hamalainen@tieto.com>
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-08-04 20:38:45 +02:00
Robin Burchell
e316aa6491 Resource policy support for QSoundEffect.
Since sound effects are something short and mixed with other audio, do
not acquire resources explicitly. Follow the resources availability
information to determine when it is ok to play the sound effects.

When client has registered itself to resource manager, client's streams
are classified properly. If no higher priority client has acquired the
resources, isAvailable() is true, and sound effects can be played. We
do not explicitly acquire the resources, since then other clients with
the same resource class would lose the resources, thus not possible to
have second client play music with QMediaPlayer class while our client
would just want to play simple sound effects.

Change-Id: Ib5589349dca6900a8bee616b8ad77e7cb5ec9533
Done-with: Juho Hämäläinen <juho.hamalainen@tieto.com>
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-08-04 20:38:40 +02:00
Robin Burchell
5f33d7bea3 Only call pa_cvolme set on stream creation if volume explicitly set.
Streams without a custom volume set use suitable volume selected
by the PulseAudio server. This is usually the correct choice, since then
stream-restore module can apply old volume to the stream. Also with
Sailfish explicitly setting the volume to streams breaks system volume.

Change-Id: I75f5bf4e7aaafb4bd55510f5ac4ddf03767d494b
Done-with: Juho Hämäläinen <juho.hamalainen@tieto.com>
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-08-04 20:38:14 +02:00
Robin Burchell
1c5ea9561a Implement more full resource policy features.
* Handle released by manager properly.

Signal resourcesReleasedByManager is different from signal
handleResourcesLost and needs to be handled separately.
Signal handleResourcesLost means some other client has acquired the
resources, thus the resources are lost from us, but if the other client
frees the resources, we will automatically get the resources back.
With resourcesReleasedByManager we lose the resources, and resource
manager releases them as well (same as if client would call release()),
so only way to re-acquire resources in latter case is calling acquire()
again.

This distinction is useful for example in cases where user is listening
to music with headphones connected and removes the headphones, then the
music player shouldn't continue playback until user requests so. But if
user is listening to music when phone call is received, it is convenient
to resume the playback automatically after the call.

 * Implement availability changed.

Availability changed is information whether resources the client is
interested in are available (no higher priority resource classes have
acquired the resources).

 * Implement missing resources released.

Emit resourcesReleased signal when receiving corresponding signal from
libresource-qt.

 * Add mechanism to change used resource class.

Check for environment for special variable, and if the variable has
proper data, use that as the resource class. Can be set with for example
qputenv("NEMO_RESOURCE_CLASS_OVERRIDE", "game");

Change-Id: I8e92f40cc5c01b6b94f54c3fa0f7a07775e87df0
Done-with: Juho Hämäläinen <juho.hamalainen@tieto.com>
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-08-04 13:02:22 +02:00
Robin Burchell
0ed18d846c QMediaNetworkPlaylistProvider: Upon error parsing, stop parsing.
When an error is found parsing a playlist, stop parsing. This will also prevent
the emission of the "loaded" signal when the parser finishes.

Some of the newly added testcases do not yet pass because the parser is overly
strict. These improvements are being tracked in QTBUG-40515.

Change-Id: I5c96b7eb488996f28eebd7b6c643940de8e2e0b9
Done-by: Andres Gomez <agomez@igalia.com>
Task-number: QTBUG-40513
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-08-04 05:20:29 +02:00
Thiago Macieira
e16ac8b55c Fix build with Mesa EGL
Mesa EGL headers include X11 headers, which may #define Bool.

Change-Id: I17379c24bfb7bac809b92f4c2a41298de00a972c
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-07-31 19:46:31 +02:00
Frederik Gladhorn
35df77c88c Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev 2014-07-29 13:24:46 +02:00
Frederik Gladhorn
4a2f3b0d8f Merge remote-tracking branch 'origin/5.3' into dev
Change-Id: I6091afdf3d4ab71462dc42ef29e001ccd8ca627b
2014-07-29 12:50:59 +02:00
Laszlo Agocs
66ba21971b Support dynamic opengl32 - ANGLE switching on Windows
Change-Id: I38532db3ab0ad4fcb8dbabd0cbb528f7d8e4ba06
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-29 12:18:37 +02:00
Yoann Lopes
49cde1b2c4 Add missing registration of CameraViewfinder QML type.
Change-Id: If4eedd6298731953a3f86c86f0e61b850ee263aa
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-07-25 06:33:44 +02:00
Andy Shaw
f31e186354 Ensure the system libraries are linked against when -no-opengl is used
Task-number: QTBUG-40406
Change-Id: I1e166a5003f524cdeb4a53d78a382a6b11719b6a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-07-24 13:59:12 +02:00
Frederik Gladhorn
86d5c7e4dc Merge remote-tracking branch 'origin/5.3' into dev
Change-Id: If8e5050901a320f1ff692e842f173c0062bed5fe
2014-07-22 20:23:12 +02:00
Andrew den Exter
39c2694414 Add an EGLImageKHR video node.
[ChangeLog] Added a VideoNode plugin which allows direct rendering of
EGLImageKHR backed video frames.

Change-Id: I36fb6fd27680dbe9c71a446bbd54df95488725f8
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-18 16:03:52 +02:00
Yoann Lopes
888759e334 New camera selection API in QML.
Also added a new QtMultimedia global object which makes it possible
to retrieve the list of available cameras. It can be extended with
new utility functions in the future.

Includes documentation, example and auto tests.

Task-number: QTBUG-23770
Change-Id: Ifea076329c3582ea99246ee1131853344a7b773f
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-17 18:58:00 +02:00
Yoann Lopes
2bc7a39a0d CoreAudio: make sure audio stops playing when the device is muted.
The audio session's category was set to Playback, which implies that
audio is still audible even after setting the device to silent mode or
locking the screen. This shouldn't be the default behavior.
We now set it to Ambient, which preserves mixing with other apps
but makes sure sound is turned off when it should.

Task-number: QTBUG-39036
Change-Id: Ic36668d73f3179dc38b41023e380e15f8c8517e0
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-16 14:59:06 +02:00
Christian Strømme
a7d10a265a Android: Make sure we check and clear exceptions from the camera.
In several places we where ignoring the fact that we might get an
exception from the camera code on Android. Failing to clear them will
cause the application to to terminate.

Task-number: QTBUG-39425
Change-Id: Idfe40e1749f54d551d37dae25912d9ddbc3da01e
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-14 01:59:35 +02:00
Andrew den Exter
cddbe8736d Provide face and orientation info from gstreamer camera backend.
Cleans up duplicate device enumeration code so the devices listed by
the QMediaServiceProviderPlugin are the same as those in the
QVideoInputDeviceControl and includes face and orientation information
if available.

Change-Id: Iaa4c303c973bcf3e0f7c8c2fd7a7de629bccec86
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-12 02:46:10 +02:00
Yoann Lopes
389d66b3ed DirectShow: Refactor camera backend.
Almost entire rewrite of the camera backend. It doesn't provide new
features but is more stable and behave as it should.

- Correctly report camera state and status
- Correctly report if the camera is ready to capture
- Emit imageExposed() signal
- Save captured images in an appropriate directory
- Images can be captured even without a viewport
- Better error handling

Removed the custom QVideoWidgetControl as it doesn't provide anything more
than the QVideoWidget's renderer control fallback.

Task-number: QTBUG-33782
Change-Id: I9baf6f83e7c69619f20a101921f7865a1c90d5e4
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-11 18:47:12 +02:00
Yoann Lopes
f352e44df9 Android: fix setting camera parameters from QML.
We were ignoring new parameter values when the camera was not loaded.
All QML properties that were set at initialization time were therefore
ignored since the camera is not loaded at that point.
We now store all camera parameters and apply them once the camera is
loaded.

Task-number: QTBUG-39307
Change-Id: If66d768941c25cede2aea1b48fb928c4735c10f8
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-10 16:00:06 +02:00
Yoann Lopes
f935715767 AVFoundation: correctly pass output URLs to AVCaptureMovieFileOutput.
The URL string passed to NSURL was not fully encoded, causing the
recorder to start with a nil URL, leading to an exception.
We now use QURL::toNSURL() which automatically encode the URL.

Task-number: QTBUG-38668
Change-Id: I06bf881a0a25fb37efd8784ebf518c8b90ecc6b4
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-10 15:59:53 +02:00
Yoann Lopes
85f4b8177c PulseAudio: make plugin more robust.
Handle more thoroughly error cases, such as when the PulseAudio daemon
does not respond or terminates while QAudioInput/QAudioOutput is
active, in which cases it used to crash or hang.

We now correctly emit the error signal and change the state when errors
occur.

Task-number: QTBUG-29742
Change-Id: I173d35aece60d96e578785e1522cf78b24dcb8b8
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-10 15:59:37 +02:00
Frederik Gladhorn
074bd6ab37 Merge remote-tracking branch 'origin/5.3' into dev
Change-Id: I38ebcb3da0e4d2acc9e7108c9579ea98323864e0
2014-07-10 10:14:36 +02:00
Andrew den Exter
4ba4f1a51d Implement customFocusPoint in camerabin backend.
Send a regions-of-interest event containing a rectangle surrounding the
focus point to the camera source when the camera's focusPointMode
is QCameraFocus::CustomFocusPoint.  Reset the regions-of-interest if the
focusPointMode changes to any other value.

[ChangeLog][GStreamer] Implement customFocusPoint in camerabin backend.

Change-Id: If75405733b18d476dff5467abae3f08271caf06a
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-10 01:39:22 +02:00
Andrew den Exter
6347605341 Add QML accessors for camera viewfinder properties.
[ChangeLog] Added QML accessors for camera viewfinder properties.

Change-Id: I05a2a6c552aa8606e8dc31a11d1cfdedf66c554f
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-09 01:31:04 +02:00
Yoann Lopes
8da61153c9 Fix documentation for QML Camera's cameraStateChanged signal.
The signal name is 'cameraStateChanged' but was documented as
'stateChanged'.

Change-Id: I80279613b55105a925acafc21f67c4a0917906af
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-08 17:40:08 +02:00
Yoann Lopes
382d4c873a Fix AudioOutput example when no audio devices are available.
Don't try to generate audio data with an invalid QAudioFormat, which
can happen when no audio devices are available.

Change-Id: I4de82dbf64def55fee21cf63ef99888a8084bd95
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-08 13:49:56 +02:00
Andrew den Exter
1a3ae99441 Support per-plane strides and data offsets in QVideoFrame.
Since just adding a new virtual isn't binary compatible add a new derivative
type with a virtual member and connect it up through a virtual in the private
class.

[ChangeLog] Support for per-plane strides and data offsets in QVideoFrame.

Task-number: QTBUG-38345
Change-Id: I1974c2b0b454d130e17971ce549031259d61f9cd
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-08 13:20:54 +02:00
Andrew den Exter
ab379c3da2 Add meta-data accessors to the QML Camera type.
Add write accessors to the properties of QDeclarativeMediaMetaData as
well as additional properties for previously unmapped image keys and
add a metaData property exposing this to QDeclarativeCamera.

[ChangeLog] New metaData property for the QML Camera type.

Change-Id: I4456b7b6120842f7ad9a1b175e42b9fb332adf13
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-07 13:49:09 +02:00
Thiago Macieira
4d35f66acf Fix change-of-sign warning
qgstappsrc.cpp(54): warning #68: integer conversion resulted in a change of sign

Change-Id: I0bf8c93cb5e27114a8857dc650ac506152607491
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-07 13:46:35 +02:00
Jerome Pasion
6048450ed7 Doc: Removing url variable from qdocconf file.
-url inherited from the url variable set in qtbase/doc/global

Change-Id: I5761a583cc1242f31f1beece7da2236c47e3a9bd
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-07 11:46:41 +02:00
Dyami Caliri
a63da4b593 QAlsaAudioOutput remove async callback.
The async callback mechanism in ALSA is prone to deadlock.
There was already a timer fallback mechanism that appears to be
sufficient.

Task-number: QTBUG-39677
Change-Id: I44b59e6b16eea1c9c4eeb6967335ce4f468cf3c4
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-04 16:14:48 +02:00
Dyami Caliri
a391ad4763 QAlsaAudioInput remove unused async_handler member.
The member 'ahandler' was not used and will not be used. Removing to
avoid confusion.

Change-Id: I35f3659a650f109c564c6308573a211f324e5411
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-07-04 16:14:20 +02:00