summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Resource leak fixedJesus Fernandez2016-07-251-1/+4
| | | | | | | | CameraBinV4LImageProcessing::setParameter was leaking the resource fd in some cases in the switch using return instead of break. Change-Id: Ie56eaf4cf1d1b7531094c321f49a818632985628 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Make sure JNI_OnLoad is not called more than onceBogDan Vatra2016-07-201-0/+5
| | | | | | | | | | | | | Since Android 5.0 Google introduce a nasty bug[1] which calls JNI_OnLoad more than once. Basically every time when a library is loaded JNI_OnLoad is called if found, but it calls *again* JNI_OnLoad of its .so dependencies! [1] Workaround https://code.google.com/p/android/issues/detail?id=215069 Change-Id: I81b4a94beedaad299267ac6deab2f9c3a1693a62 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* AVFMediaAssetWriter - fix atomics useTimur Pocheptsov2016-07-192-27/+32
| | | | | | | | | | | 1. No need in two different atomics (m_stopped/m_aborted) - the single one 'm_state' with states (Idle/Active/Aborted) should be enough. 2. QAtomicInt::load/store actually have relaxed memory ordering semantics, (not like std::atomic with sequential ordering as the default one) which is not always appropriate - replace with loadAquire/storeRelease instead. Change-Id: I4ce8c9ca7556de3d2c7e369b8a05276b2870460c Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Android: Fix OpenGL texture name leakPavel Golikov2016-07-061-1/+7
| | | | | | | | | | | | | This fixes texture name leak when changing media player's source. Texture name shold be deleted by OpenGLResourcesDeleter class, but when player's source is changed OpenGLResourcesDeleter's texture name is reassigned with new one without old name deletion. This change deletes OpenGLResourcesDeleter's current texture name when new name is assigned. Task-number: QTBUG-54340 Change-Id: I22bbd60b4462b0034fd115f0582ea43b9bcaee4b Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* DirectShow: correctly clear surface in EVR presenterYoann Lopes2016-07-062-3/+27
| | | | | | | | The surface was never cleared in the EVR presenter. It could lead to situations where the presenter would use a destroyed surface. Change-Id: If2223f09f6f8c20c06345bed40803da10dcf4ae3 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Android: Fix attach- and detachFromGLContext()Christian Strømme2016-07-053-19/+37
| | | | | | | | | | | | | | | This fixes a regression caused by ba8127639857232d8a. The change assumed that the AndroidSurfaceTexture class could cope with changing textures, but since the callback from the SurfaceTextureListener was tied to the initial, invalid, texture handle, it would only work as long as there were only one texture; all textures would register the callback to the same invalid handle. This change maps the callback directly to the android texture object, instead of the texture handle. Task-number: QTBUG-54340 Change-Id: I39568d0f97fa6b9cb1182efaca568b16a26f0d09 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* DirectShow: fix deadlock in VideoSurfaceFilterYoann Lopes2016-07-051-2/+0
| | | | | | | | | | | | | When the DirectShow graph is done being built, there's no need to wake up any blocking calls on the main thread since setting a source is done asynchronously anyway. This could cause synchronous operations (like stopping or changing the video output) to end prematurely if called while a source was still being loaded, in turn causing the deadlock. Task-number: QTBUG-54504 Change-Id: I4f534e637bfca6d3020a3bc28725c8c7042941d5 Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
* QNX: Reset playback position before stopping mediaDan Cape2016-07-041-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | This change ensures that the next media file to be played back will start playing at position 0. Without this change, it would start playback at the last position of the previous media file. In the play() function, when attempting to play a video, we first go into the loading state which just defers playing until later. Since we set the state to “Playing”, we now accept events from mm-renderer. It sends us a position update which ends up being from the previous video. Since we’re in “Playing” state, we trust this event is right and set our internal m_position variable to that value. Once the media has loaded, play() is called again and then we hit the call setPositionInternal() which seeks the media to our internal m_position (the position we got from mm-renderer). To resolve this, we now will call setPosition in the stop function that will cause mm-renderer to seek to 0 just before it stops playback (as recommended in documentation) so that any events we get from mm-renderer when we move to the “Playing” state will be related to the current media. Change-Id: I8ae35e57dd690bbae1fb996c1feb15ee4addab55 Reviewed-by: James McDonnell <jmcdonnell@qnx.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* tst_qsoundeffect: Update to case testLoopingTuomas Heimonen2016-07-042-10/+3
| | | | | | | | | | Be more permissive while checking loops remaining. Remove file BLACKLIST Task-number: QTBUG-46689 Change-Id: I15b5fb55ee770a190b2c21dd8cf1fad45665a73c Reviewed-by: Milla Pohjanheimo <milla.pohjanheimo@qt.io> Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* winrt: Do not assert when missing region of interestMaurice Kalinowski2016-07-041-1/+2
| | | | | | | | | | | | | Asserting is too heavy and can cause false positive on devices like the Lumia 535, where focus is supported, but not setting a focus point. Later on we check for existence of the control during the initialization, so it is safe to continue here. Task-number: QTBUG-54278 Change-Id: Ie68ff754d742888bdd6f4047e07d207707c90c91 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix use of -ESTRPIPE where it's not available in errnoRalf Nolden2016-06-292-3/+16
| | | | | | | | | NetBSD does not have -ESTRPIPE, so use it only when defined. http://netbsd.gw.com/cgi-bin/man-cgi?errno+2+NetBSD-6.0 and https://mail-index.netbsd.org/pkgsrc-wip-discuss/2013/10/27/msg002529.html Change-Id: I92921a16fcae95f58a870aea98ca66f5a5d30a12 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* PulseAudio: keep device list up to date.Yoann Lopes2016-06-202-24/+103
| | | | | | | | | | | The list of devices was cached on startup and was never updated when a device was plugged, unplugged or if the default device changed. We now use the event subscription mechanism in PulseAudio to get notified of these changes and update the list accordingly. Change-Id: I5fe1c81494702aa9d38b91009621629dc9606323 Reviewed-by: Karim Pinter <karim.pinter@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit"Sze Howe Koh2016-06-163-3/+3
| | | | | | | See http://comments.gmane.org/gmane.comp.lib.qt.devel/25771 Change-Id: I9fc15721bf7a26d5da82739a6c83e76e33bb2827 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* AVFoundation: improve changing the capture device format.Yoann Lopes2016-06-145-43/+74
| | | | | | | | | Make sure the device format is always set in the same way. We don't actually set the format anymore when it's the same as the current one. We also make sure the frame rate is preserved. Change-Id: I1c68239bc99d9c3cef920effcf47fc253220c26f Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* AVFoundation: re-apply viewfinder settings on mode changes.Yoann Lopes2016-06-135-10/+28
| | | | | | | | | Since the active viewfinder resolution can be overridden by the image and video capture resolutions, we need to re-evaluate the viewfinder settings whenever the capture mode changes. Change-Id: Ibdb7a070585cf67ebb2fcfb95ccbdd105f5f41cf Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* AVFoundation: fix orientation of recorded videos.Yoann Lopes2016-06-134-4/+28
| | | | | | | | | | | | Make sure the video is recorded in the same orientation as the device. That means the top of the video matches the physical side of the device which is on top when starting recording. This patch makes sure the behavior is the same as on Android. In a future version, we should have an API to pick the desired orientation of the recorded video. Change-Id: Ia8bbfe621a0e54de3cb6bfe0a520f37e8a932539 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* AVFoundation: implement QAudioEncoderSettings.Yoann Lopes2016-06-0910-23/+346
| | | | | | Change-Id: I24d3da1417142bc80bc6b6c1c8124c246afe03db Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* AVFoundation: implement QMediaContainerControl.Yoann Lopes2016-06-098-5/+193
| | | | | Change-Id: I5097a0450f5836e48a697249619a1822775f3ad8 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6.1' into 5.6Liang Qi2016-06-092-6/+73
|\ | | | | | | Change-Id: I0b4fde2a47b428fd04012a8dbec16fd14797b8dd
| * winrt: Fix potential crash when querying for resolutionsv5.6.1-1v5.6.1Maurice Kalinowski2016-05-311-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c84bdf63e4de16586eda3c45d5c3c3b2dc4fe089 introduced a potential crash on Windows Phone as querying for photo resolutions still might return video properties. As a result, querying for ImageEncodingProperties will fail and the function returns no resolution at all causing an assert later on. Instead of checking for the stream type passed to getMediaStreamResolutions we have to check for the property type of the list itself. Task-number: QTBUG-53714 Change-Id: I7bfc48ebf1fef4f9165135af604ce6c91a418438 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Add changelog for 5.6.1.Yoann Lopes2016-05-231-0/+64
| | | | | | | | | | Change-Id: I5e4d301ff056b3de2da8f9a5271d36364bfd5dc8 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | winrt: Fix synchronization problems to render threadMaurice Kalinowski2016-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QWinRTAbstractVideoRendererControl::setActive was using QThread::requestInterrupt previously to indicate to the render thread that it is supposed to quit. However, when switching cameras you cannot tell the render thread to continue rendering. Instead start() is called and then the render thread recognized the previous interrupt request, resulting in a quit and no further rendering happening. Instead we wait for the render thread to complete by using shutdown(). Task-number: QTBUG-53722 Change-Id: Ibee2ed4f64400ca14c788984a73df4be0653ed2b Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | winrt: Add logging to QWinRTAbstractVideoRendererControlMaurice Kalinowski2016-06-081-0/+9
| | | | | | | | | | Change-Id: I44620b8513fdf20ebc0e093368044133eabdd6b3 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Android: Fix crash in AndroidCamere::open()Christian Strømme2016-06-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | We would attempt to delete the AndroidCameraPrivate object twice if the native call to open failed. On recent version of Android (~6.0), this problem is harder to reproduce, as the camera is properly released when the application goes into the background. Task-number: QTBUG-53536 Change-Id: I064d276f9025924dfdb071aa52311d2b553c6953 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | QCameraPrivate: NULL-fill fields to be set up by init().Edward Welbourne2016-06-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | c.f. the constructor already doing the same for provider and the various fields populated by initControls(), which init() calls. Should be redundant (all QCamera constructors do invoke d->init() as soon as they've constructed d), but better safe than sorry. Calms Coverity (CID 22319). Change-Id: Ibf5d13bb1ef17be8e66fa14ed5617b700051c495 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* | ALSA: improve handling of default device.Yoann Lopes2016-06-034-109/+56
| | | | | | | | | | | | | | | | | | | | - "default" is a valid argument for snd_pcm_open(), let ALSA handle that case rather than using the first device in the list. - Don't add "default" in the list of available devices if there is already one. Change-Id: Icd41aa6677923a79faf6c90d0627eedd8700b91b Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Android: flush the current video frame when the video output is reset.Yoann Lopes2016-06-031-0/+4
| | | | | | | | | | | | | | | | The texture renderer could end up in a situation where a frame could be scheduled to be rendered after the renderer was reset. Change-Id: Ie6b6c9d0b5f5851f14aa6eb5f8421196aff8c691 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | AVFoundation: correctly set default frame rate on OSX.Yoann Lopes2016-06-031-0/+7
| | | | | | | | | | | | | | | | | | On OSX, it's not possible to reset the frame rate to the default value by passing kCMTimeInvalid, so just set the first value from the supported frame rates. Change-Id: I984101c2a95e13053228e56f19b353e716eb2b67 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | AVFoundation: implement QVideoEncoderSettingsControl.Yoann Lopes2016-06-0316-258/+781
| | | | | | | | | | | | Task-number: QTBUG-40338 Change-Id: Ic23dabaad94d7b293019460710ae1a097002e227 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | winrt: focus action has to happen in the xaml threadMaurice Kalinowski2016-05-311-39/+51
| | | | | | | | | | | | | | Otherwise it will cause asserts and/or crashes. Change-Id: If8af4202395ae573b280744343dd853346a8c160 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | do not enable example installs explicitly any moreOswald Buddenhagen2016-05-241-1/+0
| | | | | | | | | | | | | | it's done centrally now. Change-Id: I67cdafc4f2d419b05fc07bc1d1046afba95a3544 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | DirectShow: fix playing resource files.Yoann Lopes2016-05-202-133/+41
| | | | | | | | | | | | | | | | | | | | Our custom filter that streams the data into the pipeline was incorrectly negotiating the sample type with the downstream filter. This also fixes playback when passing a QIODevice to QMediaPlayer. Task-number: QTBUG-46899 Change-Id: Iea8b8731d5404c416c8ed0d59cb61958b13b61b0 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Bump versionOswald Buddenhagen2016-05-191-1/+1
| | | | | | | | Change-Id: I2b6dc0d097a79d91d0c24cebadac1a891337f576
* | Merge remote-tracking branch 'origin/5.6.1' into 5.6Liang Qi2016-05-192-12/+24
|\| | | | | | | Change-Id: Iaecbb5c4a33bf0eaffa4f1896bdc09751b1f04c4
| * Doc: Remove repository name from examplesinstallpathTopi Reinio2016-05-121-3/+0
| | | | | | | | | | | | | | | | Examples in binary packages now directly match the install path. Change-Id: Ic272c741ca0bb805dc50ce591ac0ea1d93f07944 Task-number: QTBUG-52953 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
| * Merge 5.6 into 5.6.1Oswald Buddenhagen2016-05-127-20/+68
| |\ | | | | | | | | | Change-Id: Ib4a7640e12319d78ea5ae8f58d79c9fab8d0ea60
| * | winrt: Fix crash when initializing certain camerasMaurice Kalinowski2016-05-111-9/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some cameras return video properties when querying for MediaStreamType_Photo, ie. Surface Book. This caused an assert. Instead when asking for photo resolutions, only query the available image resolutions and skip results not of type image. Change-Id: Ia1886a11f47676d6713eec86f3a80c664871a968 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | | Make qtmultimedia 5.6 branch compile without c++11:nullptr usageRalf Nolden2016-05-171-1/+1
| |/ |/| | | | | | | | | | | | | 5.6 should not require c++11 features, however, nullptr slipped in here. Replace nullptr with Q_NULLPTR for initialization. Change-Id: Icf62618657b5bb725bd4c8f924853fa191f6e413 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | winrt: Only set focus if supportedMaurice Kalinowski2016-05-101-1/+1
| | | | | | | | | | | | Change-Id: Ic6dc2eb6acbd0f5167aa4bad9af08ce8aa5a456b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | decruft project fileOswald Buddenhagen2016-05-101-6/+0
| | | | | | | | | | | | | | the "created by qt creator" header is not supposed to be checked in. Change-Id: I6d8c623f41c633babe5923344c915412d3d6bcd4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Android: improve texture rendering on API level >= 16.Yoann Lopes2016-05-104-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Android API level 16 added SurfaceTexture::attachToGLContext(). This allows to create the OpenGL texture when the first video frame is available, rather than at initialization. This means we can do without the ugly hack that makes the render thread call us back through some custom property. Additionally, it allows to recreate a new OpenGL texture every time the SurfaceTexture is reset. Task-number: QTBUG-51911 Change-Id: I17b04524d426c42ef8aa0288b0731597bc9eba62 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Add FreeBSD define and include for <sys/types.h> where <linux/types.h> is usedRalf Nolden2016-05-091-0/+4
| | | | | | | | | | | | | | | | Compile fix: FreeBSD uses <sys/types.h> instead of the linux version <linux/types.h>, so this patch changes the include by Q_OS_FREEBSD define. Change-Id: Iafe18614ad2360dce9858039b22f9b6c2dd9caaa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Android: detect more error cases when rendering frames to textures.Yoann Lopes2016-05-091-0/+3
| | | | | | | | | | | | | | | | Don't render the frame if the SurfaceTexture has been released or if the render size is invalid. Change-Id: I6b8bf14e023ff54a560b0a9e6027ef9d7d06ab6a Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Android: correctly use mutex for texture rendering.Yoann Lopes2016-05-091-0/+3
|/ | | | | | | | | | Some sections were not protected by the mutex, even though they should have been. An example of problem that could happen because of this was if the SurfaceTexture was reset while the render thread was rendering that texture. Change-Id: Ie95860fd4eb722bbac04cccc430cc1a8abf1df4d Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* Polish the videowidget example.Friedemann Kleint2016-05-043-19/+62
| | | | | | | | | | - Add command line parsing and file argument. - Port to Qt 5 connection syntax. - Adapt size to available geometry (for High DPI). Task-number: QTBUG-53114 Change-Id: I1c1c547ddb14210ef5900f99f4870d6d91b67088 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* DirectShow: Invoke IGraphBuilder::AddSourceFilter() with local file name.Friedemann Kleint2016-05-031-1/+4
| | | | | | | | | | When possible, convert the URL to a local file name with native separators. The method seems to accept URLs with file scheme, but fails when passing UNC paths. Task-number: QTBUG-53114 Change-Id: Ib7418090080be8c1b8472e77541e686adaa3a18a Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* fix example installsOswald Buddenhagen2016-04-286-0/+16
| | | | | Change-Id: I9daec1e1ec1bc163d451ac03685ef6caba7dbde7 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* GStreamer camerabin: return the proper camera sourceZhang Xingtao2016-04-283-7/+19
| | | | | | | | | | | | | - return m_cameraSrc for function cameraSource() instead of m_videoSrc. m_videoSrc is not always assigned(default 0), it will crash on: if (g_object_class_find_property( G_OBJECT_GET_CLASS(m_session->cameraSource()), "exposure-mode")) { And as the function name says, it would be better to return the value m_cameraSrc. - make sure pointers are not NULL before using them. Change-Id: I8a56db34a805724b428409b87de7d072ee7bfa57 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* CoreAudio: use AudioComponent instead of deprecated Carbon ComponentDyami Caliri2016-04-272-54/+11
| | | | | | | | | | OS X 10.11 generates a warning when the code uses the Carbon Component Manager to locate audio devices. The new AudioComponent interface has been available since 10.7. Change-Id: I46ecbcd62871ecc46ce3ebd9ea2a37a9e1342f41 Task-number: QTBUG-48828 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* QNX: Avoid reading frames faster than they're renderedDan Cape2016-04-275-247/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous code would capture frames with a 60Hz timer into two pixmaps alternating pixmaps with each successive frame. Rendering was somewhat disconnected from this, if rendering was unable to occur at 60fps, multiple frames might be copied for each frame rendered. This meant that it might try copying a video frame into a pixmap that was currently being used by the GPU with bad effects. The primary effect being severe flicker on i.mx6 targets. The change is to ensure that we don't read the window data until we're just about to make use of it. This means we don't ever get ahead of ourselves and read the video window once for every frame rendered. The code has been significantly refactored. There is now a class that manages the pixmaps and egl images. This is created on demand and the images are created and destroyed when sizes change. Since this all now occurs in the proper thread, much of the nonsense of setting _q_GLThreadCallback to arrange a call from the render thread is avoided. Remove BlackBerry ifdefs that are no longer used. Change-Id: I4bf5efa4c39c8170e3f55499c167ee10e521e100 Reviewed-by: James McDonnell <jmcdonnell@qnx.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>