summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix tst_QAudioOutput::pushSuspendResume().5.5Pasi Petäjäjärvi2016-01-191-2/+3
| | | | | | | | | Documentation states that state in push mode after suspend and resume should be QAudio::IdleState. Task-number: QTBUG-50390 Change-Id: I214f1808948ce862b62afd0fb9d245d0c7e4ad26 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
* OpenSL ES: fix QAudioOutput state after resume().Yoann Lopes2016-01-191-1/+1
| | | | | | | | | In push mode, the state must be IdleState after resume(), and only change to ActiveState once it receives some data. Task-number: QTBUG-50390 Change-Id: Iaf47363196ee94b80ac4ebe58a588929af8d3fad Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
* Alsa: fix QAudioOutput state after resume().Yoann Lopes2016-01-191-1/+1
| | | | | | | | | In push mode, the state must be IdleState after resume(), and only change to ActiveState once it receives some data. Task-number: QTBUG-50390 Change-Id: Idd08d8826f00d943b3bf750524f811874e010149 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
* PulseAudio: fix QAudioOutput state after resume().Yoann Lopes2016-01-191-1/+1
| | | | | | | | | In push mode, the state must be IdleState after resume(), and only change to ActiveState once it receives some data. Change-Id: I8caff011f517e91629abf45af51580f24136bcea Task-number: QTBUG-50390 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
* CoreAudio: fix QAudioOutput state after resume().Yoann Lopes2016-01-192-1/+5
| | | | | | | | | In push mode, the state must be IdleState after resume(), and only change to ActiveState once it receives some data. Task-number: QTBUG-50390 Change-Id: I4a38aa84a55e90d7a2db3e1d504674b2a688bbde Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
* WindowsAudio: fix QAudioOutput state after resume().Yoann Lopes2016-01-191-1/+1
| | | | | | | | | In push mode, the state must be IdleState after resume(), and only change to ActiveState once it receives some data. Task-number: QTBUG-50390 Change-Id: I0e12f4eaff350b9423e44779f229e0e1061cf576 Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@theqtcompany.com>
* GStreamer: fix GstAppSrc usage.Yoann Lopes2016-01-194-29/+39
| | | | | | | | | | | | | | | | Allow our GstAppSrc wrapper to be reconfigured with a new GstAppSrc object. This is necessary because that object changes every time playback is restarted, even for the same source. The consequence of not allowing the reconfigure was that playback for a given qrc media would only work the first time; any subsequent calls to play() would not work since our wrapper wouldn't know about the new GstAppSrc object and therefore wouldn't be able to produce any data. Also improved management of the wrapper lifecycle. Task-number: QTBUG-49531 Change-Id: I905afb6848cc7e9a563b4edc2c5875cdd7e53d21 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Be more permissive in QSoundEffect integration test.Pasi Petäjäjärvi2016-01-181-1/+1
| | | | | Change-Id: I9f92fda79bb359f8fa53aa11b9b6889cd35fcb6e Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Fix setting state to not playing when audio error occurredPasi Petäjäjärvi2016-01-141-1/+2
| | | | | | | | | Even if QAudioOutput has finished playing audio state don't change to stopped because QSoundEffect checks only QAudio::IdleState as when to stop itself. Change-Id: Iea3a4926c87ea5a7b440e62d832bbc13bcdd3b6d Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Fix clearing signals already send after first part of audio dataPasi Petäjäjärvi2016-01-131-1/+1
| | | | | | | | | Previous place for clearing received signal could errounsely clear already sent signal which causes next signalState comparison to fail on some platform. Change-Id: Iaffdbbcab1ec9afa0be6f1f7b7aee62b981ee319 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Remove testing category to empty stringPasi Petäjäjärvi2016-01-131-1/+0
| | | | | | | Not all backends have empty default category Change-Id: I55025bf213063c5fd64dd5be4031aabf3a148a7b Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Remove checking exact remaining loop amount right after calling play()Pasi Petäjäjärvi2016-01-131-4/+2
| | | | | | | | Depending on platform it is unknown how many times it has already been actually playing the audio. Change-Id: I27b65cee8de5f9f75ceda277ee22d86f7897ce7b Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Fix usage of QMutexLocker, destroy it only at end of scopeSergio Martins2016-01-122-2/+2
| | | | | | Change-Id: I8b47d49f7a83a71a1b90ab57ee7bc3791ef59667 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Android: Don't call restartViewfinder() for audio only recordings.Christian Strømme2016-01-111-2/+7
| | | | | | | | | | | Calling restartViewfinder() would try to access m_cameraSession without checking if it was valid. This change adds guards around the calls to restartViewfinder(), and one in the function itself. Task-number: QTBUG-50282 Change-Id: I1f2b4d2b2342bf2dc2b7f28a7bcd00e08a0edb44 Reviewed-by: jian liang <jianliang79@gmail.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Fix playing sound in loop if sample size is smallPasi Petäjäjärvi2016-01-071-0/+2
| | | | | | | | | | | If sample size is smaller that current periodsize, then playing sample multiple times in loop will fail. Reason is data offset of sample is set out of the bounds actual sample data size. Change-Id: I81f580cbb8dabf89db0d61528f5f1c9489216e0c Task-number: QTBUG-49838 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* AVFoundation: correctly set the activeFormat on the AVCaptureDevice.Yoann Lopes2015-12-107-38/+62
| | | | | | | | | | | | | | According to the AVCaptureDevice documentation, the device must be locked before starting the capture session to prevent the activeFormat from being overridden. We now do that, but only if we explicitly set an activeFormat. Otherwise the device is not locked, which allows the session to find an appropriate format for the capture device. The device is also locked when enabling video capture, as doing so might also reset the activeFormat. Task-number: QTBUG-49170 Change-Id: I75478fd4bbfec96cd2abd2c3ae2951088b38978e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* QNX: Handling looping properlyRoger Maclean2015-12-031-0/+3
| | | | | | | | | | | | | On play, if we're at the end of media, set the position to the beginning. The code was previously setting the position to the last known position, likely just prior to the end which causes the last few frames of video to be played endlessly. Task-number: QTBUG-49668 Change-Id: I9613114294c22152dd66ae7111c38c8cdef5b907 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* AVFoundation: fix setting up the video capture session.Yoann Lopes2015-12-031-1/+1
| | | | | | | | | Because of an incorrect 'if' condition, the video capture session was set up twice when starting the camera. Change-Id: I4211a8c77ab9b8086628fb0f12fb28842de830cf Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* AVFoundation: fix setting the camera viewfinder resolution.Yoann Lopes2015-12-033-1/+10
| | | | | | | | | | | | | | Image capture resolution and viewfinder resolution must be the same, with the image capture resolution taking precedence over the viewfinder resolution when both are explicitly set. The code was getting the active image capture resolution, instead of the one explicitly requested, to adjust the viewfinder resolution. That effectively made the viewfinder resolution always ignored since the active capture resolution always has a default value. Task-number: QTBUG-49170 Change-Id: I2f3d01366d83a3e28c0a1ea0109663cfdfa75963 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Android: check for exceptions in some camera operations.Yoann Lopes2015-12-034-2/+61
| | | | | | | | | | | Not all camera operations are documented to raise exceptions, but they actually might do so depending on the hardware/drivers. Check for exceptions in all functions that could porentially fail and react appropriately. Task-number: QTBUG-49134 Change-Id: I633ca7f2e3aeb6532e1c445735e62135f52cf25f Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* alsa: Relax ALSA version checks for 1.1.x to be detected.Raphael Kubo da Costa2015-11-274-9/+9
| | | | | | | | | Relax the check for SND_LIB_MINOR and SND_LIB_SUBMINOR so that ALSA 1.1.x is not considered older than 1.0.10. QtMultimedia builds fine with ALSA 1.1. Change-Id: If697c34cc7d9bbe2f2a3413d0c25ac4de4e93b34 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* AVFoundation: improve viewfinder settings.Yoann Lopes2015-11-202-110/+102
| | | | | | | | | | | | Retrieving the supported viewfinder settings don't actually require a video surface, we just need a capture device. The supported settings can now be retrieved without calling QCamera::setSurface(). More generally, all viewfinder settings that don't require a video surface can now be gotten/set before calling setSurface(). Task-number: QTBUG-49170 Change-Id: I39b14eeb40517a9ba399748b5778be8bbc8cfcda Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Add qt_real_to_fraction() helper function.Yoann Lopes2015-11-196-46/+154
| | | | | | | | | | Private API meant to be used by plugins whose backends expect frame rate values represented by a ratio. The function implementation was moved from the AVFoundation plugin to the QtMultimedia library. Change-Id: I555b9d5da5ca3bae88992ed03501869fb731e45f Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Support compiling with GStreamer < 0.10.32 in the camerabin plugin.Yoann Lopes2015-11-1915-18/+162
| | | | | | | | | | | | | | | | | | | The documented minimum GStreamer version for Qt Multimedia is 0.10.24, however, the camerabin plugin actually required 0.10.32 to compile successfully. The reason is mainly due to the GstEncodingProfiles API, which is used to implement the audio and video encoding settings controls. There's no hard requirement for that API anymore and the aforementioned controls simply don't do anything when the GStreamer version used to compile is older than 0.10.32. A few other GStreamer calls had to be ifdef'd or replaced in order to compile with 0.10.24. Note that this patch only makes sure it compiles with older versions, running the camerabin plugin with GStreamer < 0.10.32 is currently untested and it might not work as expected. Task-number: QTBUG-48914 Change-Id: I4ce8e932f24a33e919e29326729e12bbae561faf Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Don't initialize volume on pulse audio input by default.Morten Minde Neergaard2015-11-192-1/+5
| | | | | | Task-number: QTBUG-49461 Change-Id: I32b707e19091ab8344175b2dc0cdd1747f1186b3 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* GStreamer camerabin: always provide the zoom control.Yoann Lopes2015-10-281-2/+2
| | | | | | | | It doesn't actually require GstPhotography to be available at compile time. Change-Id: I738e71e4a108a40e79440096be6607afff0134fa Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* GStreamer: fix compilation with version < 0.10.31.Yoann Lopes2015-10-2012-30/+147
| | | | | | | | | | Qt 5.4 and earlier required GStreamer 0.10.24 as minimum version. Qt 5.5 added code that requires 0.10.31, this code is now ifdef'd and we now support again 0.10.24. Task-number: QTBUG-48353 Change-Id: Ie708a33c0515874b003ce26a3400475075d316ca Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Fix signal/slot declaration in QVideoOutputOrientationHandler.Yoann Lopes2015-10-161-2/+2
| | | | | Change-Id: I03cdd677feaf06ac2d61682cab46232f983e6494 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* AVFoundation: fix camera frames texture format.Yoann Lopes2015-10-161-13/+3
| | | | | Change-Id: I87ca4abf80a5be9983aefc791b8a0ef0cd4ac33d Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5.1' into 5.5Liang Qi2015-10-131-0/+68
|\ | | | | | | Change-Id: I9c55b5a63321475a468fb3a1b6ab775a9fe12689
| * Add 5.5.1 change file.v5.5.15.5.1Yoann Lopes2015-09-151-0/+68
| | | | | | | | | | Change-Id: Icb8094e4d6ae94be43b726a25881350a6f266ef4 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | AVFoundation: render camera frames using OpenGL textures on iOS.Yoann Lopes2015-09-173-40/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenGL textures can easily be created from a CVImageBuffer using Apple APIs. It avoids having to map the buffer to main memory and therefore greatly improves rendering performances. We could do the same on OSX, but there, the textures are always of the GL_TEXTURE_RECTANGLE target type and changes need to be done to the QVideoFrame API and to the video node implementations to support that. Change-Id: I6dde7e8d7a27460e41523cd474c3c741affc1480 Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Fixed revisions of camera-related meta objects.Marco Benelli2015-09-152-9/+17
| | | | | | | | | | Change-Id: I91fe90122d53ce12322cecac8282ef9622869b71 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | AVFoundation: implemented QMediaPlayer::seekable.Yoann Lopes2015-09-153-1/+19
| | | | | | | | | | Change-Id: Iaca8daa2460062954497b3e510dd1828953c80fd Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | AVFoundation: fix rendering when player reached EndOfMedia.Yoann Lopes2015-09-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | Once the media player reached the end of the media, it shouldn't be rendering frames anymore. This could happen when seeking after reaching the end. The output layer is now cleared on EndOfMedia to make sure that doesn't happen. Change-Id: I18a21eaff6c63a2bd54d4c2953f89eb1722f66d5 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | AVFoundation: correctly unload current media.Yoann Lopes2015-09-151-31/+14
| | | | | | | | | | | | | | | | | | | | When loading a new media, we should unload the previous media. This makes sure all properties set right after loading a new media (e.g. position, volume) are correctly set on the new AVPlayer and not on the old one. Change-Id: I4cd71b785ccdb4cd0772cedffc3c25665f402776 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | AVFoundation: store seek requests before media is loaded.Yoann Lopes2015-09-152-5/+27
| | | | | | | | | | | | | | | | And actually seek once the media is loaded. Task-number: QTBUG-48057 Change-Id: I9446a1e66a48f9a94c039be9af81689ed04bc56c Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | AVFoundation: fix initial volume.Yoann Lopes2015-09-152-22/+28
| | | | | | | | | | | | | | | | | | | | The volume level set before loading a media was never actually set on AVPlayer. Regression introduced by 4e07ff99 on OSX. Task-number: QTBUG-48154 Change-Id: I599e3d55b35d7196aebc4753a367a29049f99d33 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | AVFoundation: fix playback rate.Yoann Lopes2015-09-153-8/+13
|/ | | | | | | | | | | | Calling play on the AVPlayer internally resets the playback rate, which means any playback rate set before calling play was ignored. We now always call setRate to start playback to avoid resetting the rate with play. Aslo fixed the playbackRateChanged() signal that was never emitted. Task-number: QTBUG-45570 Change-Id: I3a77e1db31c57f1e3491287bdf977731b9d73509 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Android: allow to map video buffers.Yoann Lopes2015-09-081-8/+39
| | | | | | | | | Since we internally use a fbo, use QOpenGLFramebufferObject::toImage() to grab the pixel data and enable the use of map() on frames retrieved using QAbstractVideoFilter. Change-Id: If96e992e12e26091524913bb24926fa21d9d58cc Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix crash in QSoundEffect when using it from a non-GUI thread.Yoann Lopes2015-08-251-0/+1
| | | | | | | | | | | The internal QIODevice used as data source was not set as child of the parent QSoundEffectPrivate. If moveToThread() was called on the QSoundEffect, the QIODevice would still receive events on the main thread, leading to race conditions. Task-number: QTBUG-46359 Change-Id: I180da2fb498108b316fd9b5b5cc84376b360fa3f Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Fix QML Camera::supportedViewfinderFrameRateRanges().Yoann Lopes2015-08-253-3/+163
| | | | | | | | | | | | | | Pass the resolution argument as a QJSValue instead of a QSize. This allows to be more flexible and doesn't require the QML argument to be an actual QML 'size' value. It can be any object with the 'width' and 'height' properties. Added missing auto-tests for supportedViewfinderResolutions() and supportedViewfinderFrameRateRanges(). Change-Id: I6c8ae72e6dab8c9d12bbada5b8e7f45e96e9289d Task-number: QTBUG-47630 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix possible crashes in QDeclarativeRadioData.Yoann Lopes2015-08-251-8/+30
| | | | | | | | | It would crash when accessing any of its properties when there is no radio backend available. Task-number: QTBUG-47859 Change-Id: Ic7c0a70ca3e9a4768359b3429ea812caece09fce Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Android: minor refactor of the camera frame callback.Yoann Lopes2015-08-205-123/+121
| | | | | Change-Id: I6b281c9b2d02cf223e66e04e31fdd0268aa277fc Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Android: fix video probes when recording the camera.Yoann Lopes2015-08-203-12/+30
| | | | | | | | | The preview frame callback is cleared by the Android Camera whenever a MediaRecorder is set up. We need to reset the callback after starting the media recorder. Change-Id: I604320b11eb3a7f6f8d7d3167d5aae371999be14 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* QMediaPlayer: clear current playlist on deletion.Yoann Lopes2015-08-191-0/+2
| | | | | | | | | | Makes sure the current playlist is unbound when QMediaPlayer is destroyed. Change-Id: If25efa67bf79af0326f6125d9615165a2c7dd6bb Reviewed-by: Jim Hodapp <jim.hodapp@canonical.com> Reviewed-by: Loïc Molinari <loic.molinari@canonical.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* GStreamer: refactored widget and window control.Yoann Lopes2015-08-1811-446/+707
| | | | | | | | | | | | | | | | | | | Instead of always using xvimagesink as GStreamer backend for the widget and window control (works only with X11), we now try to pick a video sink that fits the current configuration. It first tries a set of known video sinks that can work with the Qt platform plugin in use. If none is available, it dynamically picks a video sink available on the system that can be used with our backend. Even if the video sink is now picked in a smarter way, xcb is still the only supported platform plugin. The reason is that it's the only Unix plugin which can provide a valid native window handle. Additional work is needed to support other plugins like wayland or directfb. Change-Id: I3843dea363d6a0b85a6cc1f2952783b743e48ac6 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Fix QCamera viewfinder capabilities functions..Yoann Lopes2015-08-185-6/+462
| | | | | | | | | | | | - Filtering the results for a specific pixel aspect ratio would return wrong values. - Correctly sort the frame rate ranges returned by supportedViewfinderFrameRateRanges(). Added missing auto-tests for all viewfinder capabilities functions. Change-Id: Idfb40d4139cc48a5996ce2ddd98131a2f5be76bb Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Avoid races when sending EOSRicardo Salveti de Araujo2015-08-181-2/+2
| | | | | | | | | | In order to avoid races when sending EOS, we need to make sure that the pipeline is in playing state first. Task-number: QTBUG-45707 Change-Id: I518e89badf38bea8ab8e2cead9a1ca09659af8b2 Reviewed-by: Timo Jyrinki <timo.jyrinki@canonical.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* GStreamer: added convenience function in QGstUtils.Yoann Lopes2015-08-135-8/+18
| | | | | | | -> qt_gst_element_get_factory_name(GstElement *elem) Change-Id: Icf806488b49fbcdecdd605b6316bd1ef8796a883 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>