Commit Graph

1447 Commits

Author SHA1 Message Date
Yoann Lopes
108dda7a90 GStreamer: port to 1.0.
0.10 is still used by default.
To enable GStreamer 1.0, pass GST_VERSION=1.0 to qmake
for qtmultimedia.pro.

Contributions from:
Andrew den Exter <andrew.den.exter@qinetic.com.au>
Ilya Smelykh <ilya@videoexpertsgroup.com>
Jim Hodapp <jim.hodapp@canonical.com>
Sergio Schvezov <sergio.schvezov@canonical.com>

Change-Id: I72a46d1170a8794a149bdb5e20767afcc5b7587c
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-11-27 23:30:05 +01:00
Yoann Lopes
7e3d69668e Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: Iaa608643f6626ed074a9fd374555cc5bc84659d5
2014-11-27 14:44:49 +01:00
Thiago Macieira
59f2bf1864 Remove unused private members
One is not used, the others are not even initialized, so don't use the
memory.

qsoundeffect_pulse_p.h:172:20: warning: private field 'm_resourceStatus' is not used [-Wunused-private-field]
qvideowidget_p.h:211:25: warning: private field 'm_aspectRatioMode' is not used [-Wunused-private-field]
qalsaaudioinput.h:156:22: warning: private field 'timestamp' is not used [-Wunused-private-field]
qalsaaudiooutput.h:135:22: warning: private field 'timestamp' is not used [-Wunused-private-field]

Change-Id: I7c9f50d57c4d29ee0dfd7dc086771d721cdb5b05
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2014-11-25 09:49:24 +01:00
Thiago Macieira
16a386b071 Fix Clang warning about comparison of different signs
Commit 4d35f66acf changed from -1 to ~0 because
ICC complained, but Clang still sees ~0 as int. So force to unsigned.

qgstappsrc.cpp:144:31: warning: comparison of integers of different signs: 'unsigned int' and 'int' [-Wsign-compare]

Change-Id: I6b0fdf8dc5df157d8e184f22dba44660e60ca3b2
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2014-11-24 18:35:55 +01:00
Frederik Gladhorn
eddc8e1e58 Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: Id87e56ccfc9f33f98c3d06991f6fe9c14d38fbac
2014-11-21 16:12:44 +01:00
Frederik Gladhorn
f2b3363c11 Merge remote-tracking branch 'origin/5.4.0' into 5.4
Change-Id: Iec2c793710c95919975aa3c03144d915ca5fa84f
2014-11-21 13:45:17 +01:00
Laszlo Agocs
96407d8d89 Fix bogus videonode plugin handling
Each plugin must provide its own unique key. Otherwise we will only ever
see one single plugin.

Right now running on i.MX6 is often broken because the imx6 videonode plugin is
not picked up since only the egl one is seen by the system. With the fix both plugins
provide their own unique key so both become visible.

Additionally, introduce a QT_VIDEONODE environment variable. This is useful to specify
which plugin to use. This is necessary in case multiple custom videonode plugins support
the same formats.

Change-Id: Iaa1988f8436dcb938cb9a95e2e0d68a4e92e113c
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2014-11-18 18:09:09 +01:00
Maurice Kalinowski
b369746ae7 WinRT: Fix compilation after ANGLE update
Header inclusion is not needed, hence remove it for WinRT.

Change-Id: I8117439849143975cad3dc14e36118b8da4621de
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2014-11-17 15:58:59 +01:00
Friedemann Kleint
2020b032e8 Check whether current context can be obtained when deleting textures.
Add a warning in that case.

Task-number: QTBUG-41966
Change-Id: I491ee9e13c9504040ab789951656983a736d9203
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2014-11-06 18:19:15 +01:00
Christian Strømme
e92bcbfa4d OpenSL ES: improve buffer logic
Don't use relaxed load and stores, we need to be stricter to avoid
problems with high frequency re-fills of the buffer. If we don't enforce
ordering we might end-up spending more time trying to acquire an open
slot in the buffer. Updating processes bytes is also moved off the
"OpenSL" thread.

Added some comments for improved readability.

Change-Id: Ie27965fc6bf4b8394081ae6419f4933522ada98e
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2014-11-04 15:09:26 +01:00
Christian Strømme
ad929984e3 OpenSL ES: Don't store or return the adjusted volume level.
According to our own docs we should always return 1.0 (MAX) volume level
if the device doesn't support setting the volume, which is the case
for OpenSL ES on Android.

Task-number: QTBUG-42159
Change-Id: I9144e9e2cd84cc80633c68c5d6fa32b8dbd0fcd5
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2014-11-04 14:18:39 +01:00
Venugopal Shivashankar
d0ed4f3b08 Doc: Added the missing screenshot image
Change-Id: Ifcef698bd735b7fe7e5f4a92984be07a01f283fb
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-11-03 12:26:04 +01:00
Friedemann Kleint
f1b775ab4f WMF plugin: Initialize member variable m_stateDirty.
Fix purify warning:
[W] UMR: Uninitialized memory read in MFPlayerControl::refreshState(void) {1 occurrence}

Task-number: QTBUG-41966
Change-Id: I1416f906dcc8c31a528ab7f09a258873fcfe9d1e
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2014-10-31 13:19:37 +01:00
Yoann Lopes
deb13f102a Add QT_GSTREAMER_CAMERABIN_VIDEOSRC environment variable.
It can be used to set which video source element should be used by
the camerabin.

Change-Id: I8d1cd8c4ba6fe5a89817699f645b0997e713aaca
Reviewed-by: Samuli Piippo <samuli.piippo@digia.com>
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-10-30 12:57:15 +01:00
Frederik Gladhorn
c3f5a15f24 Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I82a85963aa1cc6e0a2cf7a49c039c117948cbeab
2014-10-27 12:48:45 +01:00
Venu
f51ca0b97c Doc: Updated the \brief statements
Most of them were unnecessarily long.

Change-Id: I8942254c2211adb268e399056435e6acc940616f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-10-24 10:24:29 +02:00
Frederik Gladhorn
d7cfdf52fc Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: Ie44084828edf50050c695ac4dcc1cb532651499c
2014-10-20 19:13:19 +02:00
Christian Strømme
b366a99eb1 Android: Use the new findClass() method.
Avoid local caching.

Change-Id: I1e30896da664c5a45c38c09412c16cb8ff70c5c7
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
2014-10-17 13:35:35 +02:00
Frederik Gladhorn
e128207f75 Merge remote-tracking branch 'origin/5.3' into 5.4
Change-Id: I716fd3acb69e424047691069cd4a781f656d0487
2014-10-14 14:05:02 +02:00
Frederik Gladhorn
a7b67a97ec Merge remote-tracking branch 'origin/5.4' into dev
Change-Id: I8b9177d90afac8b834d333efc6c22b6b35dceaf8
2014-10-09 18:04:44 +02:00
Yoann Lopes
ca94dc79b6 GStreamer: fix QMediaRecorder::duration() when recording with a camera
To get the recording duration, we were using the camerabin's position,
which represents the time since it was started, not the time it's been
recording to a file.
We now retrieve the camerabin's filesink position.

Change-Id: I68eeb25d1718666288655d22deea23e25de73b90
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-10-03 11:38:49 +02:00
Yoann Lopes
f02d9e9343 AVFoundation: fix media player video rendering in QML.
The AVPlayerLayer was set on the QVideoRendererControl before its
geometry was updated, causing the renderer control to display frames
with an invalid size.

Change-Id: I90e18dce69d4b48a3d7932d44a7eab4fd443f1fb
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-10-01 16:23:33 +02:00
Bernd Weimer
2d911d4e09 QNX: Fix resetting video surface
If video surface object is set to 0, it must not be accessed to set a
property on it.

Task-number: QTBUG-40746
Change-Id: I1de0e5495918d3ea06706412fab15bf1af012f36
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-09-30 15:14:46 +02:00
David Schulz
cda94f73a3 WMF: Use media source only when it is initialized.
Change-Id: I0efcf6139d0b81194cf25383025f080f8656728c
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-09-30 09:21:10 +02:00
David Schulz
b3d88c66be WMF: Fix null ptr derefernce in MFPlayerSession.
Checking the sender of the mediaSourceReady signal to prevent accessing
the incorrect source resolver.

When the source resolver has finished the asynchronous operation and
the source resolver gets recreated in the player at the same time in a
different thread the signal mediaSourceReady still gets emitted from the
old source resolver.

The player assumes that the signal was emitted from the current source
resolver and accesses the unresolved media source in the
handleMediaSourceReady slot.

Task-number: QTBUG-39980
Change-Id: Ic52f6918995aac250048d91f89c520cfea111bd0
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-09-30 09:20:56 +02:00
Yoann Lopes
b6e1c00414 AVFoundation: fix build with iOS 8.0 SDK.
Change-Id: I9d9b97ad88631ba12a289f7575ca53386e592bd1
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2014-09-29 22:07:43 +02:00
Tomi Korpipää
7f1f5edf4d Updated snapshots for qmlvideo example documentation
Task-number: QTBUG-36287
Change-Id: I9da63560ba92a572d6d3943cfdade0b609469ace
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-29 12:25:38 +02:00
Sergio Ahumada
34cf911167 Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4 2014-09-26 16:11:59 +02:00
Sergio Ahumada
41a1c16340 Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts:
	.qmake.conf

Change-Id: Iad73368a22c6d4662188e6f357a265d0c26756d0
2014-09-26 15:28:44 +02:00
Yoann Lopes
ecc3c3507f GStreamer: fix artist-related metadata keys.
QMediaMetaData::AlbumArtist now maps to GST_TAG_ALBUM_ARTIST and
QMediaMetaData::ContributingArtist to GST_TAG_ARTIST.

Change-Id: Ifa2cb90ee8ae09beaee572ad113c05776e699432
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-09-26 14:27:42 +02:00
Yoann Lopes
e97fc77890 GStreamer: fix QMediaPlayer metadata signals.
- metaDataAvailableChanged was never emitted
- metaDataChanged was not emitted when clearing the current media

Change-Id: Ide05056450171a87aeb018be7e0bdea136341946
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-09-26 14:27:25 +02:00
Yoann Lopes
99a55585e9 Add metadata test for qmediaplayerbackend auto-test.
Change-Id: I419496293b11b6a941af08e9709595458b7ca423
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
2014-09-26 14:27:13 +02:00
Yoann Lopes
ec24592186 Android: fix some problems with the media player.
- Correctly emit positionChanged signal. One of the problems with
  this was that QMediaPlayer automatically sends periodic
  position updates while playing a media. There's no need to have
  the same logic in the backend.
- Seeking after reaching the end of the media now correctly works

Auto tests included.

Change-Id: I6d5ecbae6e05f94a8aac1a0834cf57427adf219b
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
2014-09-26 14:26:58 +02:00
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
Ludger Krämer
762ff94f67 implement QVideoProbe for iOS camera
This commit allows to use QVideoProbe for QCamera on iOS.
The logic for the implementation is taken from the Android plugin.

[ChangeLog][Platform Specific Changes][iOS]
QVideoProbe support is implemented for QCamera on iOS

Change-Id: I1db50defa8518287c4f1f3cc6602881702a95849
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-09-12 17:57:52 +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
Christian Strømme
e195b7fc05 Remove unused includes
Change-Id: Ibbce6e9135649d5dce0522320197dbbd0a92b3b9
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-09-11 15:09:15 +02:00
Nodir Temirkhodjaev
569dd64083 WMF: fix initializing of media player's volume.
According to the docs, MESessionTopologyStatus with status == MF_TOPOSTATUS_READY should be the correct place for the GetService call.

Change-Id: I7fdbedbe43b2191b35b95c7fd9c86940f58daff7
Reviewed-by: Wouter Huysentruit <wouter_huysentruit@hotmail.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2014-09-11 14:31:11 +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