summaryrefslogtreecommitdiffstats
path: root/src/plugins/avfoundation/camera
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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-023-40/+137
|\| | | | | | | 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>
* | 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>
* | 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>
* 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>
* | Viewfinder settings control (2) - version for iOS/OS XTimur Pocheptsov2015-03-029-3/+716
| | | | | | | | | | | | | | | | QCameraViewfinderSettingsControl2 - version for AV foundation plugin (the new settings control interface implemented). Change-Id: I3fbfb87925e57c914d43eb711fa5422e26981207 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Add AVF camera utilities - general aux. functions/classesTimur Pocheptsov2015-03-026-8/+430
| | | | | | | | | | | | | | | | | | Move configuration lock class into avfutility.h + add several standalone functions to work with AVCaptureDeviceFormat/AVCaptureDevice etc. - utility functions that are not specific to any class. Change-Id: Idba544248772a3b2a4e00dddb377b1c0e62b8085 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Update copyright headersAntti Kokko2015-02-1234-435/+331
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I1c6faa4f59f8eca54f01ef20941fa60161dd7872 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Camera zoom control - version for the AVFoundation pluginTimur Pocheptsov2015-02-055-1/+294
| | | | | | | | | | | | | | | | AVFCameraZoomControl for AVFoundation plugin (videoZoomFactor in AVCaptureDeviceFormat). iOS only. Change-Id: I585b8df4c2a477971ada7bd81fabbd44f2371d98 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | AVFCameraExposureControl - exposure control for iOSTimur Pocheptsov2015-02-055-2/+756
| | | | | | | | | | | | | | | | Exposure control, version for AVFoundation plugin (this code is using quite a new API, iOS >=8 only). Change-Id: I6871a758e8dfb98ab46b66d91a44142163e0bb44 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | AVFCameraFocusControl - focus control for iOS / OS XTimur Pocheptsov2015-02-056-3/+474
| | | | | | | | | | | | | | Camera focus control for AVFoundation plugin (iOS/OS X). Change-Id: I0a79e7057ecbb66413debb8eac0f48ff679fc7ba Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Rename camera classes to avoid name clash.James Turner2015-01-159-56/+59
| | | | | | | | | | | | | | Change-Id: I08fe8f7e75bdbf2c4975863642072061741b5bc6 Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | AVFImageCaptureControl - invalid connectionTimur Pocheptsov2015-01-081-17/+8
| | | | | | | | | | | | | | | | | | AVCaptureConnection from AVCaptureStillImageOutput becomes invalid as we remove/add AVCaptureDevice. Change-Id: I698ffcc0b91b76cd5d7c25e4b244eaa0aa459159 Task-number: QTBUG-42035 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-10-091-2/+2
|\| | | | | | | Change-Id: I8b9177d90afac8b834d333efc6c22b6b35dceaf8
| * Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-011-2/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gsttools/qgstreamervideoinputdevicecontrol.cpp src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp Change-Id: Ic854589562d2deeaa0ebf75840cb8a2ee32e99de
| | * AVFoundation: fix some controls not being correctly destroyed on iOS.Yoann Lopes2014-08-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | implement QVideoProbe for iOS cameraLudger Krämer2014-09-127-2/+174
|/ / | | | | | | | | | | | | | | | | | | | | 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>
* / Update license headers and add new license filesAntti Kokko2014-08-2413-246/+142
|/ | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Ied06887225df341064c12bcc14c259ae74116f2e Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* AVFoundation: correctly pass output URLs to AVCaptureMovieFileOutput.Yoann Lopes2014-07-101-4/+2
| | | | | | | | | | 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>
* Prevent crash when there is no camera device availableAndy Shaw2014-03-191-2/+3
| | | | | | | | | If you try to use QAudioInputSelectorControl with the iOS Simulator then it would crash as there is no camera device available. This prevents a crash from happening in that case. Change-Id: I3904f3d299a11a6df21e66a1138a4319cc0b8a5c Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* AVFoundation: fix crash when no camera is available on the system.Yoann Lopes2014-03-071-3/+5
| | | | | Change-Id: I0b473babae4d1fae605667957deca21ba1dc0c09 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* AVFoundation: Cleanup AVCaptureSession with proper reference countingAndy Nichols2014-03-041-0/+17
| | | | | | | | | | | | The reference counting was not being done for AVCaptureSession so it was being destroyed before we got a chance to properly clean it up (which lead to crashes). We also make sure to remove any observers from AVCaptureSession now before destroying it. Task-number: QTBUG-37109 Task-number: QTBUG-29955 Change-Id: Ia9b49ad1eab01b4f7424e2a1c699d903cd9bf902 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* AVFoundation: implement QCameraInfoControl.Yoann Lopes2014-03-0411-66/+258
| | | | | Change-Id: I05f3daa5c4acb90e046e26d6d577ae40dfed0e30 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* New QCameraInfo class.Yoann Lopes2014-02-284-2/+30
| | | | | | | | | | | | | | | | | | | | The class allows to get the list of available cameras on the system as well as getting some static information about them such as their unique ID, display name, physical position and sensor orientation. This makes QCamera::availableDevices() and QCamera::deviceDescription() obsolete. This patch contains the API, documentation and auto-tests but not the actual implementation by each backend (except for retrieving the default camera device). [ChangeLog][QtMultimedia] Added new QCameraInfo class [ChangeLog][QtMultimedia] QCamera: availableDevices() and deviceDescription() are deprecated, use QCameraInfo instead Change-Id: I64fd65729ab26a789468979ed5444ee90bb82cd0 Reviewed-by: Christian Stromme <christian.stromme@digia.com>
* AVFoundation: mirror viewfinder frames of front-facing cameras.Yoann Lopes2014-02-144-7/+56
| | | | | Change-Id: I95920aa459ff0931819cb6f8278ab296db542601 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Use QStringRef instead of QString whenever possible.Jędrzej Nowacki2014-01-151-1/+1
| | | | | | | That way we reduce count of temporary QString instances. Change-Id: Id806c68ea616828c2355c07b8576616fa6a8da17 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* AVFoundation: Basic camera support for iOSAndy Nichols2013-08-271-3/+7
| | | | | | | Enables basic software rendering support for iOS. Change-Id: Icd29076ea627295819ede6d9680de576ba39b34e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Multimedia plugins now have a unique JSON metadata 'Keys' property.Yoann Lopes2013-06-211-1/+2
| | | | | | | | | | | | | | | | | | | | | They previously had the multimedia services they provided as keys. This was a problem when several plugins were available on the same platform, providing the same multimedia service, but with different features or capabilities. Since they had the same key, only the first plugin in the directory was loaded. Nevertheless, it was actually working until commit 732dcfe7 in qtbase, as all plugins were loaded even when sharing the same key. The services a multimedia plugin provides are now declared in the 'Services' property. To preserve compatibility with third-party plugins, if that new property doesn't exist it falls back to the 'Keys' property. Task-number: QTBUG-31868 Task-number: QTBUG-31476 Change-Id: Ic3ba32eeef21b69b922bd3d4feb111101559d132 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>