Commit Graph

1353 Commits

Author SHA1 Message Date
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
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
Yoann Lopes
fbd57c983d GStreamer: correctly handle URLs from QMediaRecorder::setOutputLocation
Task-number: QTBUG-39949
Change-Id: Idf575b126bd3531655c8abda55c9e04149a4fb85
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-07-03 15:49:53 +02:00
Yoann Lopes
a7f924186c GStreamer: fix looping a media when it's loaded from qrc.
When playing a media for the second time, the backend resets the
the media by calling setMedia() with the same value.
The problem is that setMedia() clears the previous media, which is
a QFile in this case and is the one we are trying to set again...
The QFile was deleted, causing the current media to be a dangling
pointer.

Change-Id: I6854b40212fd084d1e31e756a040a02ad103b7ba
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-07-03 15:45:46 +02:00
Nico Vertriest
c9b4793350 Doc: link errors
Task-number: QTBUG-34749
Change-Id: I1d107a8700e03ac550fd6611d80a985a36558b22
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-07-01 13:10:14 +02:00
Kai Koehne
124b6a4ee6 Fix compilation with -no-opengl
Change-Id: Ib8f39dcea58018f076d6a3fa733303958c707f1a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-01 10:25:51 +02:00
Yoann Lopes
c8b88cd027 Android: fix crash when stopping the camera while a recording is active
When unloading the camera, any active recording is automatically
stopped, which in turn triggers the viewfinder to be restarted...
We don't try anymore to restart the viewfinder after stopping recording
unless the camera is still active.

Change-Id: I77e4e3fc8d7116ac660d8bb23f6c400ebed4ffed
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-30 16:03:26 +02:00
Yoann Lopes
23d7bf7ac8 Android: fix registering recorded videos with the Android media scanner
Change-Id: I6dfc4e13b8a0bccb1bcfead728f7e1ddb7b58bb4
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-30 16:02:22 +02:00
Yoann Lopes
99ce312731 Android: correctly update camera focus zones.
When setting a null custom focus point, we were correctly resetting
the focus zones but we were not emitting the focusZonesChanged signal,
causing the QML Camera to not update its focus zones.

Change-Id: I59940c4cd2979fa08dc26566dc0f6d19e503f64f
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-30 14:48:08 +02:00
Frederik Gladhorn
dfd00bca7e Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
	.qmake.conf

Change-Id: Ic2b4c2bf7b985c97d75d70980413da4f569f207a
2014-06-26 17:25:12 +02:00
Andrew den Exter
310402c6c1 Fix stuttering with RTSP streams.
Set the rtspsrc buffer-mode to 'slave' which is the default in
gstreamer 1.0 and doesn't cause the stuttering apparent with
the default buffer mode.

Change-Id: I4241fbe638c176ad93f441a3f76a1041ef1cb6bb
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-06-26 01:45:52 +02:00
Frederik Gladhorn
c46aa62c65 Merge remote-tracking branch 'origin/5.3.1' into 5.3
Change-Id: I6abb3fad4e03323919a9ee4dad62082784ac6160
2014-06-25 10:26:32 +02:00
Yoann Lopes
eb75bf8e3b Enable both PulseAudio and Alsa plugins on Linux.
It was previously only one or the other, and all Qt packages for linux
were only including the PulseAudio backend.
Now, both will be included; if PulseAudio is available it will be used
by default, otherwise it will fall back to Alsa.

Change-Id: I393c7728ec9741b1b58681608c184cd1b92126b1
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2014-06-19 15:34:06 +02:00
Yoann Lopes
140c4a9eed Add changelog for 5.3.1.
Change-Id: I197a9c6a0fc623bdb3eafaa5fe970cb6a44546b4
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-18 19:03:30 +02:00
Oswald Buddenhagen
1d73904b25 Bump version
Change-Id: I8af8aab3257d70270318a152a73380aebdd41a41
2014-06-18 00:36:14 +02:00
Yoann Lopes
34ab2b5369 Improved audiooutput and audioinput examples.
Always show the default audio device first in the drop-down box.

Change-Id: Icbafa9e316fd330fe7a9801a8e2efef6f20ff054
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-16 13:43:05 +02:00
Sergio Ahumada
d691f5ca2b Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
	.qmake.conf

Change-Id: Iecd8d7b94e52a8981526b12cffa40e99870ba62f
2014-06-14 21:59:24 +02:00
Topi Reinio
d415d3256d Doc: Fix qmlclass selector used in documentation config
A recent change (46959875) in qdoc raised QML types from
subnodes to top-level nodes. This change modifies the
documentation configuration file(s) accordingly.

Change-Id: Ie7d09a6d076a044133a8324fa5a5e28c32e7b7a6
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-06-11 19:57:44 +02:00
Sergio Ahumada
150ff6662d Merge remote-tracking branch 'origin/stable' into 5.3
Change-Id: I689554fb6e47b8183013de271a776909a05398dc
2014-06-11 10:05:00 +02:00
Yoann Lopes
b99a4b3025 Make multimedia QML types available for the 5.3 import version.
At least one type needs to be registered with the 5.3 version number to
make it known to the QML engine.

Change-Id: Iacfe62650b4194fbb89135fef7cb148309227ce2
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
2014-06-10 15:02:24 +02:00
Yoann Lopes
eadf1c8c41 Fix static initialization order fiasco in some plugins.
Some static variables were initialized using QMediaMetaData
values, which are also statically initialized.

Task-number: QTBUG-39202
Change-Id: Ibedc0a77d96cdfa575aad122c4ec654e6830e1f7
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-06-06 11:12:21 +02:00
Christian Strømme
8a66559e0b Android: Use a file descriptor for all local media files.
Using a fd is more consistent across different Android versions and
also works with files that are in the applications private storage.

Task-number: QTBUG-39346
Change-Id: I462822459d12d7842d15f1cb7caafc75c18fe32c
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-06-05 23:25:23 +02:00
Yoann Lopes
d71aaca893 Improve default audio plugin selection.
When no audio plugin is marked as default, use the first plugin
available.

Change-Id: Ide8db0fe55f43c4881c24505c1e2821b0fc176f6
Reviewed-by: Dyami Caliri <dyami@dragonframe.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-05 11:42:16 +02:00
Yoann Lopes
a3a6670172 Android: don't start camera preview until the viewfinder is ready.
If no video output is set for a camera, don't try to start the camera
and report an error.
If the video output is not ready, delay starting until it is.

Change-Id: Id08e31a4e795b71ac036a6532e9499ca5670d790
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-05 11:42:16 +02:00
Yoann Lopes
cf4aba93e4 Android: fix media player's volume.
- Preserve the volume when changing the current media.
- Don't actually set a new volume when the media player is muted.
  Intead, save the value to apply it when setMuted(false) is called.

Change-Id: I829eb280406ea35ff82a0c2638b2d19cf1d90643
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-06-05 11:42:16 +02:00
Topi Reinio
cb6b4e2079 Doc: Remove comment about preliminary API for Qt 5.0
Task-number: QTBUG-39195
Change-Id: I193321a29d06760e4ad5aa2eaca99d98b2e1f65a
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-06-05 09:48:33 +02:00
Robin Burchell
ae567c3f35 Handle resource requests through singleton.
Many applications have multiple objects dealing with audio, and each
needs to request audio resources from resource policy manager. Resource
policy manager handles audio resources per-manager. Each ResourceSet
instance creates new manager, which causes applications having multiple
audio objects to fight for the audio resources internally, even though
the streams are played from the same process id.

To overcome this in QtMultimedia applications, handle all ResourceSet
operations through singleton. This way one client has only one manager
id registered, and resource acquiring and releasing can be limited to
only when no resources are acquired or all resources are freed. To
reduce unnecessary noise from resource policy plugin to the clients,
keep track of client states and only notify clients which themselves
request for resources etc.

Change-Id: Ifa4488a9f6298a3f601399e9d339f7bd819be757
Done-with: Juho Hämäläinen <juho.hamalainen@tieto.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-06-04 13:58:08 +02:00
Christian Strømme
b9b06defc7 Android: Don't expose java calls in the control classes.
Makes the abstraction more clear.

Change-Id: Ia9a7b0b157e1182158cd26b62775d13f6c5e1727
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-06-04 13:19:40 +02:00
Christian Strømme
1ef3ef6a30 Make it possible to build multimedia for embedded Android
Change-Id: I3400b18379242ea4d1b4f94f5da6b60c64d551e4
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-06-04 13:19:28 +02:00