platform/upstream/qtmultimedia.git
9 years agoFix integer overflow in several audio plugins.
Yoann Lopes [Wed, 3 Sep 2014 12:45:50 +0000 (14:45 +0200)]
Fix integer overflow in several audio plugins.

Task-number: QTBUG-40804
Change-Id: If006cb7db319bb6fda4ce7eb4f907e897b5d9efa
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
9 years agoQNX: Fix end of media notification
Bernd Weimer [Wed, 3 Sep 2014 11:46:36 +0000 (13:46 +0200)]
QNX: Fix end of media notification

When auto-play is on, EndOfMedia would not be emitted. This is due to
a workaround for mmrenderer, that wrongly ignored stop events.
Once media is played stop events will always have to be processed.

Change-Id: I1cfd665bb06638ee3c86807aecc51e78f9baa938
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
9 years agoBump version
Frederik Gladhorn [Fri, 29 Aug 2014 09:33:37 +0000 (11:33 +0200)]
Bump version

Change-Id: I123f7fd8e2f88b36a69d3d5713f3b6390db610bc

9 years agoAdded 5.3.2 change file.
Yoann Lopes [Tue, 26 Aug 2014 11:53:55 +0000 (13:53 +0200)]
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>
9 years agoRestore QWindowsAudio support on wince.
Bjoern Breitmeyer [Fri, 22 Aug 2014 12:59:11 +0000 (14:59 +0200)]
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>
9 years agoWMF: fix bufferStatus() and availablePlaybackRanges().
Yoann Lopes [Mon, 14 Jul 2014 14:44:49 +0000 (16:44 +0200)]
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>
9 years agoAVFoundation: fix some controls not being correctly destroyed on iOS.
Yoann Lopes [Thu, 5 Jun 2014 13:25:55 +0000 (15:25 +0200)]
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>
9 years agoAVFoundation: fix retrieving tracks information from live sources.
Yoann Lopes [Thu, 8 May 2014 13:22:11 +0000 (15:22 +0200)]
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>
9 years agoAndroid: fix retrieving metadata from assets, qrc and remote files.
Yoann Lopes [Thu, 17 Jul 2014 16:41:44 +0000 (18:41 +0200)]
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>
9 years agoOpenSL: Fix QAudioOutput::setNotifyInterval().
Christian Strømme [Tue, 12 Aug 2014 14:46:50 +0000 (16:46 +0200)]
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>
9 years agoAndroid: Remove api level test in qtmultimedia.pro
Christian Strømme [Thu, 14 Aug 2014 13:37:28 +0000 (15:37 +0200)]
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>
9 years agoFix QSGVideoNode rendering of rgb frames with padding.
Daniele E. Domenichelli [Tue, 12 Aug 2014 13:07:23 +0000 (15:07 +0200)]
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>
9 years agoCoreAudioOutput use timeout when waiting for render thread
Dyami Caliri [Tue, 22 Jul 2014 18:19:14 +0000 (11:19 -0700)]
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>
9 years agoDetect V4L availability
Lisandro Damián Nicanor Pérez Meyer [Thu, 10 Jul 2014 22:19:37 +0000 (19:19 -0300)]
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>
9 years agoImprove Magnify and Ripple effects on video shader example
Niels Weber [Mon, 5 May 2014 14:16:05 +0000 (16:16 +0200)]
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>
10 years agoEnsure the system libraries are linked against when -no-opengl is used
Andy Shaw [Thu, 24 Jul 2014 11:50:45 +0000 (13:50 +0200)]
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>
10 years agoCoreAudio: make sure audio stops playing when the device is muted.
Yoann Lopes [Wed, 21 May 2014 11:40:42 +0000 (13:40 +0200)]
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>
10 years agoAndroid: Make sure we check and clear exceptions from the camera.
Christian Strømme [Thu, 10 Jul 2014 14:56:23 +0000 (16:56 +0200)]
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>
10 years agoDirectShow: Refactor camera backend.
Yoann Lopes [Mon, 7 Apr 2014 12:24:51 +0000 (14:24 +0200)]
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>
10 years agoAndroid: fix setting camera parameters from QML.
Yoann Lopes [Tue, 10 Jun 2014 15:34:42 +0000 (17:34 +0200)]
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>
10 years agoAVFoundation: correctly pass output URLs to AVCaptureMovieFileOutput.
Yoann Lopes [Fri, 9 May 2014 15:21:29 +0000 (17:21 +0200)]
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>
10 years agoPulseAudio: make plugin more robust.
Yoann Lopes [Thu, 12 Jun 2014 16:48:15 +0000 (18:48 +0200)]
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>
10 years agoFix documentation for QML Camera's cameraStateChanged signal.
Yoann Lopes [Wed, 2 Jul 2014 15:59:19 +0000 (17:59 +0200)]
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>
10 years agoFix AudioOutput example when no audio devices are available.
Yoann Lopes [Thu, 12 Jun 2014 16:57:54 +0000 (18:57 +0200)]
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>
10 years agoQAlsaAudioOutput remove async callback.
Dyami Caliri [Tue, 17 Jun 2014 14:45:34 +0000 (07:45 -0700)]
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>
10 years agoQAlsaAudioInput remove unused async_handler member.
Dyami Caliri [Wed, 18 Jun 2014 15:44:33 +0000 (08:44 -0700)]
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>
10 years agoGStreamer: correctly handle URLs from QMediaRecorder::setOutputLocation
Yoann Lopes [Tue, 1 Jul 2014 10:34:58 +0000 (12:34 +0200)]
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>
10 years agoGStreamer: fix looping a media when it's loaded from qrc.
Yoann Lopes [Tue, 17 Jun 2014 12:28:20 +0000 (14:28 +0200)]
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>
10 years agoDoc: link errors
Nico Vertriest [Fri, 27 Jun 2014 12:49:13 +0000 (14:49 +0200)]
Doc: link errors

Task-number: QTBUG-34749
Change-Id: I1d107a8700e03ac550fd6611d80a985a36558b22
Reviewed-by: Martin Smith <martin.smith@digia.com>
10 years agoAndroid: fix crash when stopping the camera while a recording is active
Yoann Lopes [Tue, 24 Jun 2014 15:08:03 +0000 (17:08 +0200)]
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>
10 years agoAndroid: fix registering recorded videos with the Android media scanner
Yoann Lopes [Tue, 24 Jun 2014 15:04:48 +0000 (17:04 +0200)]
Android: fix registering recorded videos with the Android media scanner

Change-Id: I6dfc4e13b8a0bccb1bcfead728f7e1ddb7b58bb4
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoAndroid: correctly update camera focus zones.
Yoann Lopes [Fri, 20 Jun 2014 08:56:59 +0000 (10:56 +0200)]
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>
10 years agoMerge remote-tracking branch 'origin/5.3.1' into 5.3
Frederik Gladhorn [Wed, 25 Jun 2014 08:26:32 +0000 (10:26 +0200)]
Merge remote-tracking branch 'origin/5.3.1' into 5.3

Change-Id: I6abb3fad4e03323919a9ee4dad62082784ac6160

10 years agoAdd changelog for 5.3.1.
Yoann Lopes [Wed, 18 Jun 2014 14:42:19 +0000 (16:42 +0200)]
Add changelog for 5.3.1.

Change-Id: I197a9c6a0fc623bdb3eafaa5fe970cb6a44546b4
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoBump version
Oswald Buddenhagen [Tue, 17 Jun 2014 22:36:14 +0000 (00:36 +0200)]
Bump version

Change-Id: I8af8aab3257d70270318a152a73380aebdd41a41

10 years agoImproved audiooutput and audioinput examples.
Yoann Lopes [Fri, 13 Jun 2014 14:48:36 +0000 (16:48 +0200)]
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>
10 years agoMerge remote-tracking branch 'origin/stable' into 5.3
Sergio Ahumada [Wed, 11 Jun 2014 08:05:00 +0000 (10:05 +0200)]
Merge remote-tracking branch 'origin/stable' into 5.3

Change-Id: I689554fb6e47b8183013de271a776909a05398dc

10 years agoMake multimedia QML types available for the 5.3 import version.
Yoann Lopes [Tue, 3 Jun 2014 14:50:56 +0000 (16:50 +0200)]
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>
10 years agoFix static initialization order fiasco in some plugins.
Yoann Lopes [Tue, 3 Jun 2014 14:32:46 +0000 (16:32 +0200)]
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>
10 years agoAndroid: Use a file descriptor for all local media files.
Christian Strømme [Wed, 4 Jun 2014 20:30:05 +0000 (22:30 +0200)]
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>
10 years agoImprove default audio plugin selection.
Yoann Lopes [Tue, 20 May 2014 13:52:54 +0000 (15:52 +0200)]
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>
10 years agoAndroid: don't start camera preview until the viewfinder is ready.
Yoann Lopes [Fri, 16 May 2014 12:17:03 +0000 (14:17 +0200)]
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>
10 years agoAndroid: fix media player's volume.
Yoann Lopes [Fri, 16 May 2014 14:47:41 +0000 (16:47 +0200)]
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>
10 years agoDoc: Remove comment about preliminary API for Qt 5.0
Topi Reinio [Wed, 4 Jun 2014 09:08:13 +0000 (11:08 +0200)]
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>
10 years agoAndroid: Don't expose java calls in the control classes.
Christian Strømme [Mon, 12 May 2014 12:38:09 +0000 (14:38 +0200)]
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>
10 years agoMake it possible to build multimedia for embedded Android
Christian Strømme [Thu, 15 May 2014 11:57:34 +0000 (13:57 +0200)]
Make it possible to build multimedia for embedded Android

Change-Id: I3400b18379242ea4d1b4f94f5da6b60c64d551e4
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoAndroid: Rename the wrapper classes
Christian Strømme [Fri, 9 May 2014 15:32:28 +0000 (17:32 +0200)]
Android: Rename the wrapper classes

Change-Id: I2ce15c8475da3186f128ba59b7c58f9b5b0a67e1
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoUse Q_CONSTRUCTOR_FUNCTION macro to register multimedia meta types.
Yoann Lopes [Mon, 26 May 2014 14:20:49 +0000 (16:20 +0200)]
Use Q_CONSTRUCTOR_FUNCTION macro to register multimedia meta types.

Task-number: QTBUG-39131
Change-Id: I2493c9e3e6f0065d0441a74ff240d7d91fbe059c
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoOpenSL: don't try to enqueue new buffers when the buffer queue is full.
Yoann Lopes [Wed, 21 May 2014 10:47:03 +0000 (12:47 +0200)]
OpenSL: don't try to enqueue new buffers when the buffer queue is full.

It could lead to corrupted sound since we were overwritting buffers
that weren't played yet.

Task-number: QTBUG-39015
Change-Id: I4c015c5383b813955998145d6316acc8c22f19a3
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoRemove C++11 code in iMX6 video node plugin.
Yoann Lopes [Mon, 19 May 2014 12:09:23 +0000 (14:09 +0200)]
Remove C++11 code in iMX6 video node plugin.

Use Q_FOREACH instead of C++11 range-based For loops.

Task-number: QTBUG-38900
Change-Id: I2b9f8444f2ac3ae71811112244c687cab79753c9
Reviewed-by: Thomas Senyk <thomas.senyk@pelagicore.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
10 years agoAndroid: fix calling start() and stop() on the video surface.
Yoann Lopes [Mon, 19 May 2014 10:48:59 +0000 (12:48 +0200)]
Android: fix calling start() and stop() on the video surface.

We restart the surface when the frame size changes, though we were
not using the correct function to get the surface's current frame size.
This was causing start() and stop() to be called for every frame.

Change-Id: I8ff4b4852cb7fcc92ac3b1b3ad7bf991d7bddc6b
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoAndroid: Fix loading from qrc
Christian Strømme [Fri, 16 May 2014 12:53:13 +0000 (14:53 +0200)]
Android: Fix loading from qrc

On Android < 4.1 our temporary file is discarded without checking the
content. With this change we just open the file and pass the fd to the
mediaplayer instead.

Change-Id: I9233822725d8987c572b2d0b598721cee886de80
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoDirectShow: remove debug output.
Yoann Lopes [Mon, 19 May 2014 12:34:57 +0000 (14:34 +0200)]
DirectShow: remove debug output.

Task-number: QTBUG-38924
Change-Id: Ibc08fd99f6eb10035e4d7da963d4d384012bbdbf
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
10 years agoWMF: fix video frames' viewport.
Yoann Lopes [Wed, 14 May 2014 16:45:37 +0000 (18:45 +0200)]
WMF: fix video frames' viewport.

It was not taken into account at all.

Change-Id: I4ce85aba214cb4d89dcd018b1616a2a38094b5a6
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoAndroid: fix QMediaPlayer::bufferStatus value.
Yoann Lopes [Mon, 12 May 2014 15:21:52 +0000 (17:21 +0200)]
Android: fix QMediaPlayer::bufferStatus value.

It was returning the buffering progress for the whole media, which is
not what is expected according to the documentation.
It should return instead how much the playback buffer is filled. This
information is not available on Android so we simply return 100% when
the status is BufferedMedia or BufferingMedia, 0% otherwise.

Change-Id: I9fb55a9317948ba9375291a57bbf100f186382a2
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoFix QSGVideoNode rendering of frames with stride != width.
Andrew den Exter [Wed, 14 May 2014 04:18:16 +0000 (04:18 +0000)]
Fix QSGVideoNode rendering of frames with stride != width.

Adjust texture coordinates to not render padding at the end of lines,
and better calculate the stride of UV planes.

Task-number: QTBUG-38218
Task-number: QTBUG-30447
Change-Id: I7b7577979719c48460b838f7dcc89b9d17741f79
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoImprove documentation for the QMediaPlayer::bufferStatus property.
Yoann Lopes [Mon, 12 May 2014 14:50:30 +0000 (16:50 +0200)]
Improve documentation for the QMediaPlayer::bufferStatus property.

The corresponding properties in the Audio and MediaPlayer QML elements
are also updated.

Change-Id: I7104d274d431e7712db2f045c375756e8c2ac03a
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoDoc: Copy snippets from the Qt Multimedia module
Sze Howe Koh [Sun, 26 May 2013 07:42:43 +0000 (15:42 +0800)]
Doc: Copy snippets from the Qt Multimedia module

Extract a compilable subsection of...
- src/multimedia/doc/snippets/multimedia-snippets/camera.cpp
- src/multimedia/doc/snippets/multimedia-snippets/video.cpp

...into the snippet folder searched by:
- src/multimediawidgets/qcameraviewfinder.cpp
- src/multimediawidgets/qgraphicsvideoitem.cpp
- src/multimediawidgets/qvideowidget.cpp
- src/multimediawidgets/qvideowidgetcontrol.cpp

Change-Id: Ica3c21b65bc57d5686a594afca09e771cc376cc0
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
10 years agoAndroid: Fix namespace usage.
Christian Strømme [Wed, 30 Apr 2014 10:31:21 +0000 (12:31 +0200)]
Android: Fix namespace usage.

Make it possible to build multimedia with a Qt namespace

Change-Id: Ibaeaf7edb38f8d784b8d0fcb9a26ca712488c23b
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoDoc: Clean up references to Qt System Info
Sze Howe Koh [Thu, 8 May 2014 15:47:38 +0000 (23:47 +0800)]
Doc: Clean up references to Qt System Info

The module is not released yet; the current documentation is misleading.

Change-Id: Ia20ac8e3504942f6f60b94264f3a12497e09da24
Reviewed-by: Niels Weber <niels.weber@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoPLS parser: Don't translate entries.
Yoann Lopes [Fri, 9 May 2014 13:31:33 +0000 (15:31 +0200)]
PLS parser: Don't translate entries.

Each entry in a PLS file uses the keywords 'File', 'Title' and 'Length'
in English, it should not be translated to the user's locale...

Task-number: QTBUG-38755
Change-Id: Ibd5bee18a856b3ebc1fdb177241db7a39b65d264
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoGStreamer: disable clock syncing in video sink for live sources.
Yoann Lopes [Tue, 29 Apr 2014 15:30:21 +0000 (17:30 +0200)]
GStreamer: disable clock syncing in video sink for live sources.

Task-number: QTBUG-38465
Change-Id: Icdf2df36b9b3c09dd047e60ac24e221a3d233c6f
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoMoved QMediaStorageLocation out of the Android plugin.
Yoann Lopes [Wed, 9 Apr 2014 17:13:45 +0000 (19:13 +0200)]
Moved QMediaStorageLocation out of the Android plugin.

It's now a private API in the QtMultimedia library in order to be
accessible in other plugins.

Change-Id: I63541de1e8c540cebc210f9037646ce74d866c6f
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoMerge remote-tracking branch 'origin/release' into stable
Frederik Gladhorn [Thu, 1 May 2014 10:46:28 +0000 (12:46 +0200)]
Merge remote-tracking branch 'origin/release' into stable

Change-Id: I900412b4c6f894dec27b8158d498b2ff18404ced

10 years agoFix documentation of qmlvideofx example
Niels Weber [Tue, 22 Apr 2014 10:13:23 +0000 (12:13 +0200)]
Fix documentation of qmlvideofx example

Make the documentation fit to the current state of the example.

Task-number: QTBUG-38121
Change-Id: I3379e3328d07ef8bcdb35a5e3821ab194c3443c4
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoHandle resizing of mainwindow better
Niels Weber [Mon, 28 Apr 2014 08:52:33 +0000 (10:52 +0200)]
Handle resizing of mainwindow better

Task-number: QTBUG-38121
Change-Id: I877fd5c626418a91850d43de31e71351c14eef25
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
10 years agoSelecting something now closes menu
Niels Weber [Mon, 28 Apr 2014 07:39:16 +0000 (09:39 +0200)]
Selecting something now closes menu

On a closed menu, the text is now hidden.

Task-number: QTBUG-38121
Change-Id: I305fd4f24768115ed21495857cce672d8cbd2135
Reviewed-by: Petref Saraci <petref.saraci@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
10 years agoAdd missing background for effect selection list.
Niels Weber [Mon, 28 Apr 2014 07:27:03 +0000 (09:27 +0200)]
Add missing background for effect selection list.

Also remove highlight and fix button text color.
Make Menu animation faster.

Task-number: QTBUG-38121
Change-Id: I7d5868d370a8dc7925cee5e694ae043970c569d9
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
10 years ago[QNX] Introduce env variable for default audio sink
Andreas Holzammer [Fri, 25 Apr 2014 08:28:16 +0000 (10:28 +0200)]
[QNX] Introduce env variable for default audio sink

Make it possible to change the default audio sink
via a environment variable.

Change-Id: Id0e14318fc99a896b8a41196941b758a31d23600
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
10 years agoFix documentation error
Fabian Bumberger [Wed, 23 Apr 2014 15:49:22 +0000 (17:49 +0200)]
Fix documentation error

Change-Id: I98f3e35677b5e07ea35898caec3f241b045b5033
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
10 years agoMerge remote-tracking branch 'origin/release' into stable
Jani Heikkinen [Wed, 23 Apr 2014 09:45:21 +0000 (12:45 +0300)]
Merge remote-tracking branch 'origin/release' into stable

Change-Id: Ieb521fb1e9f297a167eea19c771cb5915c01df97

10 years agoBump MODULE_VERSION to 5.3.1
Sergio Ahumada [Thu, 17 Apr 2014 15:24:25 +0000 (17:24 +0200)]
Bump MODULE_VERSION to 5.3.1

Change-Id: Ie88b34ee769ab3abbd0a5ab0fd8b7938475916ae
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
10 years agoRework qmlvideofx example
Niels Weber [Mon, 14 Apr 2014 16:36:40 +0000 (18:36 +0200)]
Rework qmlvideofx example

Task-number: QTBUG-38121
Change-Id: If06ba6ce2c66b4d735baaeb56e004861c62ea533
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
10 years agoAndroid: Camera code clean-up
Christian Strømme [Thu, 3 Apr 2014 16:09:48 +0000 (18:09 +0200)]
Android: Camera code clean-up

Change-Id: Ib400afde12067764c3dcc0f44e40ddc1abb3012f
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoAndroid: Use QMutexLock in camera callbacks.
Christian Strømme [Thu, 3 Apr 2014 15:26:05 +0000 (17:26 +0200)]
Android: Use QMutexLock in camera callbacks.

We should not release the locks before the native callbacks returns.

Change-Id: Ia2691f6c5be66a3dcf371e48e3bac7498b401833
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoDoc: Improved example documentation
Jerome Pasion [Wed, 9 Apr 2014 15:02:25 +0000 (17:02 +0200)]
Doc: Improved example documentation

-added instructions on how to run the example
 (using \include to insert a section from qtbase/doc/global/)
-updated copyright year
-removed links to Qt 4 API
-rearranged some of the sections
-created links from the example pages to Qt Multimedia
-fixed QDoc warnings related to the example pages

Task-number: QTBUG-33597
Change-Id: Id45ce5cbd40dbfa384abd7260a316f6f6837c186
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
10 years agoAndroid: Release the surface texture when not in use
Christian Strømme [Mon, 7 Apr 2014 12:04:49 +0000 (14:04 +0200)]
Android: Release the surface texture when not in use

With some Android versions the preview texture is released when the
application is suspended. If we don't release the texture in our
code, the preview will be empty when the application resumes.

Task-number: QTBUG-38165

Change-Id: I72244727081d8f94ee5f6cb0ab660ca59f4bb2de
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoAndroid: Use Q_GLOBAL_STATIC instead of a static QMap
Christian Strømme [Mon, 7 Apr 2014 13:13:42 +0000 (15:13 +0200)]
Android: Use Q_GLOBAL_STATIC instead of a static QMap

Change-Id: I7b65e0874051c4ef504914a0bd66e8471ec34fa7
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoAndroid: Fix the signature for setOnInfoListener.
Christian Strømme [Wed, 9 Apr 2014 13:15:03 +0000 (15:15 +0200)]
Android: Fix the signature for setOnInfoListener.

The argument part of the signature should be OnInfoListener and not
OnErrorListener.

Change-Id: I735fe1b0338b66c2f729254ed9e3251136781cbe
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoFix some MediaPlayer properties returning wrong values.
Yoann Lopes [Tue, 8 Apr 2014 16:50:23 +0000 (18:50 +0200)]
Fix some MediaPlayer properties returning wrong values.

Once the QML component is complete, don't cache any value anymore and
always ask the backend for the actual value.

Change-Id: I2c3ad55618e0532f713cfcc8258a70a1114fc975
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoWMF: improve changing playback rate on a media player.
Yoann Lopes [Tue, 25 Mar 2014 14:44:54 +0000 (15:44 +0100)]
WMF: improve changing playback rate on a media player.

When going back to normal rate after playing in fast forward (greater
than 2x), playback seemed frozen for some amount of time (up to 8
seconds).
When playing in fast forward, only key frames are shown, ignoring all
the others. When returning to a normal rate, the source reader will
usually be pointing to a key frame in the future compared to the
player clock position, meaning that all the frames in between won't be
shown until the player clock catches up with the latest key frame that
was read.

When leaving fast-forward, we now reset the position on the player to
force the source reader to point back to the frame at the current clock
position and avoid the seamingly frozen playback.

Also, emit playbackRateChanged() signal when changing the playback
rate.

Change-Id: I4f04f0f250083378e94fb4a47f9f917abeaaf24e
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoGStreamer: correctly get metadata from live sources.
Yoann Lopes [Fri, 21 Mar 2014 18:10:23 +0000 (19:10 +0100)]
GStreamer: correctly get metadata from live sources.

For some unknown reason, "iradio-mode" was set to false on the
source element, which was preventing new metadata to be received
when playing live streams.

Task-number: QTBUG-37640
Change-Id: Ib90297e81e26a99c3dfc753bdcd5cbd1ee2f6764
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoWMF: more reliable video seeking.
Yoann Lopes [Fri, 4 Apr 2014 13:09:03 +0000 (15:09 +0200)]
WMF: more reliable video seeking.

When seeking, the presentation clock can enter an undefined state until
it is started again from the new position. Wait for the clock to be
restarted before scheduling the prerolled frames, otherwise these
frames might get a wrong presentation time.

Change-Id: I02cb3338239775b7ef5d206ec5aa1b26719ac978
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoAndroid: Fix QtMediaRecorder
Christian Strømme [Mon, 7 Apr 2014 13:09:00 +0000 (15:09 +0200)]
Android: Fix QtMediaRecorder

Don't extend the MediaRecorder class as this causes ART to fail when it
doesn't find the postEventFromNative() function.

Task-number: QTBUG-38166

Change-Id: Ia38ce4558a2cc95a9b4cd05b9f926d41e53fdc0d
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoAndroid: Use androidSdkVersion() to get the API level.
Christian Strømme [Thu, 3 Apr 2014 09:17:30 +0000 (11:17 +0200)]
Android: Use androidSdkVersion() to get the API level.

Change-Id: Idc0b09ab2dc5d93e8da8dab3bd0e99e27fbc57e1
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoAndroid: Remove inheritance to QJNIObject in the Camera wrapper
Christian Strømme [Wed, 2 Apr 2014 16:57:16 +0000 (18:57 +0200)]
Android: Remove inheritance to QJNIObject in the Camera wrapper

The QJNIObject was never intended to be used as a base class.

Change-Id: I4986aeaebecd6e4136fed311e69368e20da4d060
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoAndroid: Fix MediaRecorder wrapper
Christian Strømme [Tue, 1 Apr 2014 17:04:12 +0000 (19:04 +0200)]
Android: Fix MediaRecorder wrapper

The QJNIObject was never intended to be used as a base class.

Change-Id: I8311f909a37aeae6040eba4471b379cfc732297b
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoWMF: don't return undefined value in Release() function.
Yoann Lopes [Mon, 7 Apr 2014 12:33:32 +0000 (14:33 +0200)]
WMF: don't return undefined value in Release() function.

The function was returning a member variable after the object was
deleted. Return a local copy instead.

Change-Id: I077e7e1c184ed0cfd4899a80c9147a2939c93cd7
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoWMF: support playback rate in our custom video sink.
Yoann Lopes [Fri, 4 Apr 2014 13:06:07 +0000 (15:06 +0200)]
WMF: support playback rate in our custom video sink.

Change-Id: Ic8fde3398813df68d2f77b2542f1fa507c8ea674
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoQNX: Fix MediaPlayer states handling
Fabian Bumberger [Mon, 24 Mar 2014 18:56:26 +0000 (19:56 +0100)]
QNX: Fix MediaPlayer states handling

Task-number: QTBUG-37753
Change-Id: I61ff490f061dedd8a9bdc22d76969d9afb9a6795
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
10 years agoTell glib not to complain about the use of API recently deprecated
Thiago Macieira [Thu, 3 Apr 2014 05:12:01 +0000 (22:12 -0700)]
Tell glib not to complain about the use of API recently deprecated

When building with glib 2.32 or later, without this #define, it prints a
warning saying:

function "g_value_get_char" was declared deprecated ("Use 'g_value_get_schar' instead")

Since g_value_get_schar is new in 2.32, we can't use it without #ifdef
around the call point. Since the old and new functions are identical in
behavior, just ask glib not to complain about the use of old functions.

I don't know which is the minimum version of glib we require, so I went
for the lowest available macro.

Change-Id: I33f9aa8497fc6bd50fffb3c59ee7e8e7fcdfe110
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agolet videonode plugins declare that they extend QtQuick
Oswald Buddenhagen [Fri, 4 Apr 2014 16:14:28 +0000 (18:14 +0200)]
let videonode plugins declare that they extend QtQuick

Change-Id: I4facc9ca0616927f7b1101cecb989fece38c2f7a
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agomake MODULE_PLUGIN_TYPES assignment actually have an effect
Oswald Buddenhagen [Fri, 4 Apr 2014 15:09:37 +0000 (17:09 +0200)]
make MODULE_PLUGIN_TYPES assignment actually have an effect

it must be done before load()ing qt_plugin.prf.

Change-Id: I0ad31f8d9761b2d059d656c9e4f674c8a7cc88a6
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoDirectShow: fix media seeking while stopped.
Yoann Lopes [Fri, 4 Apr 2014 16:43:30 +0000 (18:43 +0200)]
DirectShow: fix media seeking while stopped.

When changing the position of a media player while stopped, playback
was automatically resuming. We now cache the value and actually set the
position only when starting playback.

Task-number: QTBUG-38068
Change-Id: Ib35302e01967d70350125f9ad920551df2a3c25b
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoGStreamer: cleanup system includes.
Yoann Lopes [Thu, 3 Apr 2014 13:17:49 +0000 (15:17 +0200)]
GStreamer: cleanup system includes.

Replaced some linux includes with <private/qcore_unix_p.h> to be more
portable.
Use qt_safe_open() and qt_safe_close() instead of ::open() and
::close().

Task-number: QTBUG-38061
Change-Id: Idb3f50d070ec1701cafba98e79e2e85824653a3a
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoAdd support for running on big-endian systems
Dmitry Shachnev [Mon, 17 Mar 2014 04:44:24 +0000 (08:44 +0400)]
Add support for running on big-endian systems

Now qtmultimedia test suite passes on powerpc.

Change-Id: I540dff93195115ad1dc5725af7293e3b8540403f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoGStreamer: each QMediaPlayer now has its own volume by default.
Yoann Lopes [Fri, 7 Mar 2014 16:02:37 +0000 (17:02 +0100)]
GStreamer: each QMediaPlayer now has its own volume by default.

We were using the volume property of GStreamer's playbin element to set
the volume. This could behave differently depending on the system
configuration; it could affect the system volume or the media player
own audio stream.
We now use a 'volume' element to do software attenuation on the audio
data sent to the audio sink, it allows each QMediaPlayer to always have
its own volume.
To preserve the previous behavior, developers can set the
QT_GSTREAMER_USE_PLAYBIN_VOLUME environment variable to true.

[ChangeLog][QtMultimedia][GStreamer] QMediaPlayer::setVolume() doesn't
change the system volume anymore (it could be the case before depending
on the system configuration). Set the QT_GSTREAMER_USE_PLAYBIN_VOLUME
environment variable to true to restore that behavior.

Task-number: QTBUG-30317
Task-number: QTBUG-36511

Change-Id: Ia0249962a74ac21fb110fcb634c08706f8d5767a
Reviewed-by: Wouter Huysentruit <wouter_huysentruit@hotmail.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
10 years agoFix unit tests
Bernd Weimer [Mon, 31 Mar 2014 14:18:23 +0000 (16:18 +0200)]
Fix unit tests

Random playback mode is not good for testing index changed signal,
because the same media might be played successively.
Calling show() might result in showFullScreen() on some platforms,
which is not expected by some video widget tests.

Change-Id: Ib47433fc6411b6dfa244a245aae508df5627ec62
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
10 years agoBlackBerry: Fix the rotation of the viewfinder
Fabian Bumberger [Thu, 27 Mar 2014 15:18:11 +0000 (16:18 +0100)]
BlackBerry: Fix the rotation of the viewfinder

This fixes the rotation of the viewfinder. We have to adjust the orientation
depending on the primary screen orientation. On a keyboard device, the viewfinder
would not rotate at all (same if auto orientation is turned off).

Task-number: QTBUG-37894
Change-Id: I2bf955fb3303ed236d3234154ded94fe78607455
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
10 years agoFix memory leak in SampleGrabberCallback
Liang Jian [Tue, 1 Apr 2014 06:41:30 +0000 (14:41 +0800)]
Fix memory leak in SampleGrabberCallback

Add virtual destructor to SampleGrabberCallback to let it properly
destruct its subclass when calling 'detete this'

Change-Id: I5f74f82314e22225a0a153c7f4bca531a79dd8f9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>