Commit Graph

1400 Commits

Author SHA1 Message Date
Yoann Lopes
5c30ed55ef Improve audiorecorder example.
- Show actual recording location
- Update control buttons depending on the recorder state instead of
  the status
- Create audio levels using the actual audio format from the audio
  buffers. The format from the QMediaRecorder might not always contain
  the value actually used.

Task-number: QTBUG-36154
Change-Id: I418b4472b0d984f47efb1a1813da6ef440ba9a40
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-09-26 14:23:20 +02:00
Yoann Lopes
f9de9889f6 Use QCameraInfo in camera example.
To replace QCamera::availableDevices(), which is deprecated since 5.3.

Change-Id: I0b1bd6286ec78d6d26ce309d224369989d4a5063
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-09-26 14:23:07 +02:00
Tomi Korpipää
5c3a5cf810 QMLVideo Example visual update
Task-number: QTBUG-36287
Change-Id: I797a995c2ccd6f6fec40fbf50f93e297ae15a9b1
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-26 05:04:55 +02:00
Yoann Lopes
2d9d5acb9c Remove QuickTime backend.
The backend was kept only for Mac OS X 10.6 support. AVFoundation is
used in 10.7 and later. Following the 10.6 deprecation plan, the code
is now being removed for Qt 5.4.

Change-Id: I513d00adda35f6012dda548b8d824d158efffb16
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-25 12:45:42 +02:00
Yoann Lopes
c1c205b772 Android: fix QMediaPlayer's state and mediaStatus signals.
Emit signals only after both properties are written to avoid having
incoherent values in signal handlers.

Task-number: QTBUG-40314
Change-Id: I6c8445e61cccf1a9803647329c4fa1f0e452f56d
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-09-24 14:46:38 +02:00
Yoann Lopes
49dc6dc459 WMF: fix crash on media player destruction.
A race condition could cause a frame to be presented even after the
QAbstractVideoSurface was deleted. We now check that the surface is
valid before presenting a frame.

Task-number: QTBUG-41158
Change-Id: If593469a8267583e499e781336af38d3fbf318fd
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-09-24 14:17:21 +02:00
Yoann Lopes
78dccc998f WMF: fix video rendering with ANGLE.
The format of the offscreen surface used for video rendering should be
compatible with the EGL config.

Change-Id: Ic016245ce80c2483771e620c3eed345262d03c44
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-09-24 14:10:08 +02:00
Alex Blasche
f788f8e5c6 Make the multimedia examples less verbose
Important warnings such as missing services are still printed though.

Task-number: QTBUG-31080
Change-Id: I96fd3837c4edc58c61b97bf950b7cab05ceed014
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-09-22 11:11:10 +02:00
Alex Blasche
da383e5c7e Remove QtSystemInfo dependency from Multimedia examples
QtSystemInfo is not officially supported in Qt5 and its QML API is
currently broken. Inhibition of the screensaver is not essential
for the example anyway.

Task-number: QTBUG-31080
Change-Id: Ia2e7d8de3e2044e11e1681907e61a7207489ad1b
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-09-19 09:12:48 +02:00
Yoann Lopes
46c56ed530 Revert "QMediaNetworkPlaylistProvider: Upon error parsing, stop parsing."
This reverts commit 0ed18d846c.
The same patch was submitted in both 5.3 and 5.4 branches. It should
have been pushed only to 5.3.

Change-Id: I9e2974886190dfb2e5def5bc325c58f6e7783f55
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
2014-09-17 13:11:07 +02:00
Andrew den Exter
3b20608fe3 Ensure pre-roll frames are displayed when gstreamer backend is paused.
Perform a seek before transitioning from the stopped state to paused or
playing to force the pipeline to resupply the video sink with any
pre-roll buffer it may have previously ignored during loading.  And
don't assume showPrerollFrames to be true if the current state is not
stopped as the policy handling may have prevented an effectual state
change.

Change-Id: I288a70bc4da32f3534eab4b14702ca8f8fdb4222
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-09-12 14:32:42 +02:00
Christian Strømme
65d44edd3d OpenSL ES: Be less rigid about tearing down the output device.
We where very strict about tearing down the audio device. While this is
a good strategy to avoid unnecessary resource usage, it also causes
excessive re-allocations, e.g., when transiting from start to stop and
back again. This can increase latency, especially in case where a short
clip is re-played at a high frequency.
This change also decrease the chance of the player ending up in some
unknown state where it drops audio clips without any warning.

Task-number: QTBUG-40864
Change-Id: I1afad4af0622983f0f0c221d91cf794585d8cad2
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-09-12 14:04:08 +02:00
Jens Cornelis
8d5114a630 Fixed avfmediaplayersession.mm for OSX 10.10 Yosemite.
Implicit cast caused build to fail. Explicit cast builds fine.

Task-number: QTBUG-41136
Change-Id: I0147c26a0f8b8198d6ed9944311547b81a50bccb
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-09-11 18:56:53 +02:00
Andrew den Exter
55ce8ed072 Implement encoder settings in camerabin backend.
This is not comprehensive since different encoders have different names
and representations for many settings, but it should cover bit rate for
most encoders, and quality and encodingMode for a number of common
encoders.

Change-Id: I0ba4e70c2f234e0deaaa02bdecc0f5198122c1e9
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-09-11 11:41:06 +02:00
Thiago Macieira
9c020cd39a Add necessary includes that were indirect
qstringlist.h no longer includes qdatastream.h

Change-Id: Iabc231741ab0d8c8edbb4f77a4c6fe45c6a98896
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-09-10 15:44:58 +02:00
Yoann Lopes
f65cf958b1 Fix V4L usage.
ff527de0 was submitted to 5.3 while cddbe873 was submitted to 5.4.
The former's behavior was not preserved when 5.3 got merged into 5.4.

Change-Id: I7435ea30634001ae6e87c316eb8a8ab6f5e988e3
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-09-09 15:04:11 +02:00
Allan Sandfeld Jensen
f803f87068 Fix build with QT_OPENGL_DYNAMIC
Change-Id: I4375a808170f3e4888101fea7a833399061a8935
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-09-09 14:06:57 +02:00
Laszlo Agocs
d00ad751bd ANGLE is never available on WinCE
Change-Id: I853774af533d7f4b37b4789344e531d2688f91f5
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-09-09 12:10:01 +02:00
Yoann Lopes
bc1fa076c9 Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4 2014-09-01 14:19:53 +02:00
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
Andrew Knight
0c3438c9a1 winrt: Add camera service
This adds a basic camera service with viewfinder (video renderer based),
still image capture, and device selection support.

Runtime apps must set the "webcam" and "microphone" device capabilities
in order to access the hardware. This can be done by adding the following
to the .pro file:
    WINRT_MANIFEST.capabilites_device += webcam microphone

[ChangeLog] Enabled basic camera support in the winrt backend.

Change-Id: If4f963ef645d93c757ae23aec9a9c8aae122324f
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-08-30 08:24:07 +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