summaryrefslogtreecommitdiffstats
path: root/src/plugins/avfoundation
Commit message (Collapse)AuthorAgeFilesLines
...
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-02-252-8/+8
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: I8e1554b648327ea2fb342b882ce8e439bd6f271d Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-1971-995/+1421
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I324f65c61171f36641472964d095d72e452afb3a Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devChristian Strømme2016-01-157-147/+172
|\| | | | | | | | | | | | | | | Conflicts: src/plugins/android/src/mediacapture/qandroidcamerasession.cpp src/plugins/wmf/mftvideo.cpp Change-Id: I78868b416ea4baec89ca3e2dc9eb4712db16d5fc
| * Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2016-01-077-147/+172
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/android/src/wrappers/jni/androidcamera.cpp Change-Id: Ibb34f710b1dfb9a23b378462f31432581c6c26f4
| | * 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>
| | * 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>
| | * 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>
* | | AVFoundation: replace foreach with range-based forAnton Kudryavtsev2016-01-153-4/+6
| | | | | | | | | | | | | | | Change-Id: I7a2f563f74fc67b55ea9b00f0e87d8ddaa2659c4 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | | tvOS supportMike Krus2016-01-137-22/+23
|/ / | | | | | | | | | | | | Builds, tested simple video playback Change-Id: I04e1da050c587cba3609107dc88a155a6949f2c3 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Yoann Lopes2015-11-203-44/+12
|\| | | | | | | Change-Id: I8e0f222f110cc23b426f2d68416f5cc3982e30f2
| * Add qt_real_to_fraction() helper function.Yoann Lopes2015-11-193-44/+12
| | | | | | | | | | | | | | | | | | | | 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>
* | Fix use-after-free in AVFCameraService during renderer destructionJohn Brooks2015-11-191-7/+4
| | | | | | | | | | Change-Id: I10a994b71e55565c0de31aa0c34f32964e2e3a1b Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
* | AVFoundation: don't automatically rotate camera captures.Yoann Lopes2015-11-042-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | We shouldn't do this automatically, as different kind of orientations might be wanted (sensor, device, UI). The default should be sensor orientation (no rotation applied). We should add an API to QCamera to enable automatic orientation of captured images. Change-Id: I56fff7f0c4aaaee37eb6ae2628e27073b4946b66 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | AVFoundation: fix camera capture previews.Yoann Lopes2015-10-204-38/+82
| | | | | | | | | | | | | | | | | | | | Generate the preview from a viewfinder frame and not from the final JPG image. In addition, the preview is now rotated to always be in the same orientation as the device at the time of capture. Task-number: QTBUG-46971 Change-Id: I48851225738e50fbd89c2f94904bac366303a9ad Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into 5.6Yoann Lopes2015-10-201-13/+3
|\| | | | | | | Change-Id: Ie1e478eca1cdfd99ccd3a3c8a07aefbfa27ccbdb
| * 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' into 5.6Liang Qi2015-10-026-107/+243
|\| | | | | | | Change-Id: I1373622a6d1fd0e2d35df2da79860a373056387f
| * 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>
| * 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>
* | Doc: minor correctionsNico Vertriest2015-09-071-1/+1
|/ | | | | | Change-Id: Idcaac01294642e7e79f6e2b8bcfd2c9559274790 Task-number: QTBUG-43810 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Fix warnings about unused private fieldsThiago Macieira2015-08-068-9/+5
| | | | | | | avfaudioinputselectorcontrol.h:68:23: warning: private field 'm_service' is not used [-Wunused-private-field] Change-Id: I5722a2d1bf592862af3a4d36554419a653662892 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Don't list avfcamerainfocontrol header and sources twiceThiago Macieira2015-08-061-2/+0
| | | | | | | | | | | | | | | This produces Makefile warnings Makefile.Debug:351: warning: overriding commands for target `.obj/debug/avfcamerainfocontrol.o' Makefile.Debug:337: warning: ignoring old commands for target `.obj/debug/avfcamerainfocontrol.o' Makefile.Debug:514: warning: overriding commands for target `.moc/debug/moc_avfcamerainfocontrol.cpp' Makefile.Debug:506: warning: ignoring old commands for target `.moc/debug/moc_avfcamerainfocontrol.cpp' Makefile.Debug:351: warning: overriding commands for target `.obj/debug/avfcamerainfocontrol.o' Makefile.Debug:337: warning: ignoring old commands for target `.obj/debug/avfcamerainfocontrol.o' Makefile.Debug:514: warning: overriding commands for target `.moc/debug/moc_avfcamerainfocontrol.cpp' Makefile.Debug:506: warning: ignoring old commands for target `.moc/debug/moc_avfcamerainfocontrol.cpp' Change-Id: I2ec77cb92b4d218e5b07d895fdb96497061b527b Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5.0' into 5.5Liang Qi2015-06-261-1/+1
|\ | | | | | | Change-Id: I5a5b387b93a4b9dbaa9710e78fd7bf1ca09aa3b3
| * AVFoundation: fix wrong Q_ASSERT.Yoann Lopes2015-06-021-1/+1
| | | | | | | | | | | | | | The assert was always triggered, at least on OSX. Change-Id: I9aabb6103b7f5540cff42facc448ffcf6a6de511 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | AVFoundation: don't use shared OpenGL contexts unless needed.Yoann Lopes2015-06-101-11/+15
| | | | | | | | | | | | | | | | | | | | We were always using shared OpenGL contexts to render media player frames into an OpenGL texture. There's no need to do that when there already is a current context on the current thread. This happens in non-QtQuick cases, when the OpenGL thread is also the main thread. Change-Id: Icb97ed49609c764263007a43b6bb481e23768111 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Media asset writer - use the right macroTimur Pocheptsov2015-06-031-10/+10
| | | | | | | | | | | | | | QT_PREPEND_NAMESPACE, not QT_MANGLE_NAMESPACE. Change-Id: I9eb4130b203a5fb8f9f7964a0a642686814d5990 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | AVFoundation: fix a problem when changing the camera viewfinder size.Yoann Lopes2015-06-021-1/+3
|/ | | | | | | We need to restart the video surface when the frame size changes. Change-Id: I81af3cb40fb40f7d157174ac96d42213880fbacd Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Video asset writer for iOSTimur Pocheptsov2015-05-2911-10/+1199
| | | | | | | | | | | | AVFoundation on iOS lacks the ability to use AVCaptureVideoDataOutput and AVCaptureMovieFileOutput simultaneously. Right now viewfinder stops working as soon as we add movie file output. The only workaround we have now is to write video/audio 'maually' - creating asset writer and feeding it with audio/video samples. Change-Id: I33a63546783279c545f0433b5051287269825d3f Task-number: QTBUG-37655 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* AVFoundation: fix default camera viewfinder pixel format.Yoann Lopes2015-05-293-41/+33
| | | | | | | | | | | | It was hardcoded to ARGB32, which is not a good idea, at least on iOS where the necessary conversion is slow. We now pick the QAbstractVideoSurface's preferred format, or if no surface is set, we pick the default from AVFoundation. As a result, the QML VideoOutput will now always use the NV12 format. Change-Id: I65205c706455502883b8098f0b5c0577b4106e01 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* AVFoundation: additional build fixes for OSX < 10.9.Yoann Lopes2015-05-271-9/+26
| | | | | | | | 0df8d839 didn't fix all of the problems. Task-number: QTBUG-46159 Change-Id: I4f2a390da1cca13775302aeef60c522e0da55a1a Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* AVFoundation: fix retrieving maximum camera zoom value.Yoann Lopes2015-05-191-5/+5
| | | | | | | | Maximum zoom value was incorrectly reset to 1.0 when doing the transition Active -> Loaded -> Active. Change-Id: I799900b1597637039d6c28d1d694fb6340b10540 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* AVFoundation: fix compilation on OSX < 10.9.Yoann Lopes2015-05-192-21/+37
| | | | | | | | AVCaptureConnection.videoMaxFrameDuration is supported only since 10.9. Task-number: QTBUG-46159 Change-Id: I8ea57b69e97ea3802b5c444c57ab090c4edf31e2 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* OSX/iOS: Fix volume and muteFrank Osterfeld2015-05-111-2/+2
| | | | | | | | | My last fix for iOS (4e07ff99) introduced this regression of passing the outdated value to the native player object. Change-Id: I01b0df8c7a0fe1382ef73b55d288a40daf024e3d Reviewed-by: James Turner <james.turner@kdab.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Yoann Lopes2015-05-056-48/+70
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/avfoundation/camera/avfcamerasession.h src/plugins/avfoundation/camera/avfcamerasession.mm Change-Id: Ib2e25d907a7069591920d2f69e007f314cc0fd85
| * Merge remote-tracking branch 'origin/5.4.2' into 5.45.4Yoann Lopes2015-05-044-45/+63
| |\ | | | | | | | | | Change-Id: Ib16e45133bcf4e4d88944df97be6a2f8a3c77135
| | * AVFoundation: fix microphone permission when using the camera.Yoann Lopes2015-04-234-45/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The microphone permission was always requested when using the camera, even when not actually using the microphone, which can only happen when recording a video. The permission request is triggered by adding an audio AVCaptureDeviceInput to the AVCaptureSession, which was done when setting the camera to LoadedState. This is now done when setting the camera mode to CaptureVideo. Task-number: QTBUG-45659 Change-Id: I3692797128cfb70ba5ccbc7a36b6955471039e80 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
| * | AVFoundation: correctly detect the default audio capture device.Yoann Lopes2015-04-232-3/+7
| |/ | | | | | | | | | | | | | | | | Use AVCaptureDevice::defaultDeviceWithMediaType instead of the first device in the list of available devices. Change-Id: I436921f99280a28d7158d345cd977a874cfb8968 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-154-38/+59
|\| | | | | | | | | | | | | | | Conflicts: src/multimedia/playback/playlistfileparser.cpp src/plugins/windowsaudio/qwindowsaudiodeviceinfo.cpp Change-Id: I52950def2b8283ae15797d05d4ead6a1256eba19
| * AVFoundation: fix QCameraInfo::availableCameras() on OS X.Yoann Lopes2015-04-104-38/+59
| | | | | | | | | | | | | | | | | | | | Cameras can be dynamically added or removed on OS X. Make sure the cache is updated often enough so QCameraInfo::availableCameras() return an up to date list. Task-number: QTBUG-39708 Change-Id: Id806d52278e1a29163fcc6707da7f86c0f3e7c0d Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Camera flash control - version for iOS/OS XTimur Pocheptsov2015-04-135-2/+317
| | | | | | | | | | | | | | | | | | | | AVCaptureDevice has API to work with camera flash on both iOS and OS X (quite limited on OS X though) - so camera flash control can be implemented in AVFoundation plugin. Task-number: QTBUG-37996 Change-Id: Ie9aaed09a709e7d09ccc1cedded93a69fea93975 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | AVFCameraViewfinderSettings - add NV12 formatTimur Pocheptsov2015-03-203-29/+94
| | | | | | | | | | | | | | | | | | Add QVideoFrame::Format_NV12 (AVFoundation has kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange and kCVPixelFormatType_420YpCbCr8BiPlanarFullRange). Report it (set it) only if it's supported by renderer's surface. Add bi-planar format support into CVPixelBufferVideoBuffer. Change-Id: Ibc1c2be056bddf5cf3b595570fc40c626ee3ccf5 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | AVCaptureDeviceFormat - avoid duplicates (OS X/iOS)Timur Pocheptsov2015-03-106-93/+140
| | | | | | | | | | | | | | | | | | | | | | Excluding video range (iOS) is not the right way to avoid "duplicates" - with other devices there can be also duplicates (formats with the same resolutions), but completely different pixel formats. Since we do not know what they will be in advance, we take the media subtype from the initial preset for a capture device and use it as a filter. Update viewfinder and image encoder settings controls. Change-Id: If20aea24b19b43574d5c3e9bf2ba85f50fc08916 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Image encoder control - version for OS X/iOSTimur Pocheptsov2015-03-028-6/+386
| | | | | | | | | | | | | | | | QImageEncoderControl - implementation for AVFoundation plugin (OS X/iOS, at the moment iOS >= 7.0). Change-Id: Ibc2c3ae48252dd4698e263f5abca5c328482d5e7 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Viewfinder settings control (1) for OS X/iOSTimur Pocheptsov2015-03-024-0/+184
| | | | | | | | | | | | | | | | | | QCameraViewfinderSettingsControl - version for AVFoundation plugin ('obsolete' viewfinder settings control interface, camera session uses v2 instead). v1 is implemented using v2 (the v2 object from camera service). Change-Id: I81207b52b0ba5a67e64465f0e5e0c80d7267df3e Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>