summaryrefslogtreecommitdiffstats
path: root/src/plugins/avfoundation/camera/avfcamerasession.mm
Commit message (Collapse)AuthorAgeFilesLines
* AVFoundation: Use 90 for the front facing camera's orientationAndy Shaw2017-12-121-1/+1
| | | | | | | | | | | | Since the information is not available as to what the orientation is from the AVFoundation API then we need to rely on common sense. Since the back facing camera is 270, then it stands to reason that the front one would be 90. This has been tested on macOS and iOS and all three cameras behave correctly. Task-number: QTBUG-37955 Change-Id: I1ab079cb5d4337948541e58321df51efbadf3e39 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Remove deprecated QSysInfo APIs and dead code from macOS/iOS backendJake Petroules2016-09-231-11/+5
| | | | | | | Deployment targets are currently macOS 10.9 and iOS 7.0. Change-Id: I500a95c00eb3be6e693e38f0f2205941f7bc9601 Reviewed-by: Yoann Lopes <yoann.lopes@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-301-8/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Blacklisted a few functions in tst_QAudioInput. Conflicts: .qmake.conf src/plugins/avfoundation/camera/avfcameracontrol.mm src/plugins/avfoundation/camera/avfcameraservice.h src/plugins/avfoundation/camera/avfcameraservice.mm src/plugins/avfoundation/camera/avfcamerasession.h src/plugins/avfoundation/camera/avfcamerasession.mm src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.h src/plugins/avfoundation/camera/avfcameraviewfindersettingscontrol.mm src/plugins/avfoundation/camera/avfimagecapturecontrol.mm src/plugins/avfoundation/camera/avfimageencodercontrol.mm src/plugins/avfoundation/camera/avfmediarecordercontrol.h src/plugins/avfoundation/camera/avfmediarecordercontrol.mm tests/auto/integration/qaudioinput/BLACKLIST Task-number: QTBUG-54459 Task-number: QTBUG-49736 Change-Id: I3a1fe8cef50b44d5c2785aaf4cf69fe3f16728e6
| * AVFoundation: re-apply viewfinder settings on mode changes.Yoann Lopes2016-06-131-5/+17
| | | | | | | | | | | | | | | | | | 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: implement QVideoEncoderSettingsControl.Yoann Lopes2016-06-031-4/+2
| | | | | | | | | | | | Task-number: QTBUG-40338 Change-Id: Ic23dabaad94d7b293019460710ae1a097002e227 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
* | Updated license headersAntti Kokko2016-01-191-14/+20
| | | | | | | | | | | | | | | | | | | | | | 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-151-8/+26
|\| | | | | | | | | | | | | | | 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-071-8/+26
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/android/src/wrappers/jni/androidcamera.cpp Change-Id: Ibb34f710b1dfb9a23b378462f31432581c6c26f4
| | * AVFoundation: correctly set the activeFormat on the AVCaptureDevice.Yoann Lopes2015-12-101-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 the camera viewfinder resolution.Yoann Lopes2015-12-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: replace foreach with range-based forAnton Kudryavtsev2016-01-151-1/+1
|/ / | | | | | | | | Change-Id: I7a2f563f74fc67b55ea9b00f0e87d8ddaa2659c4 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | AVFoundation: fix camera capture previews.Yoann Lopes2015-10-201-0/+4
| | | | | | | | | | | | | | | | | | | | 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>
* | Doc: minor correctionsNico Vertriest2015-09-071-1/+1
|/ | | | | | Change-Id: Idcaac01294642e7e79f6e2b8bcfd2c9559274790 Task-number: QTBUG-43810 Reviewed-by: Martin Smith <martin.smith@digia.com>
* AVFoundation: fix default camera viewfinder pixel format.Yoann Lopes2015-05-291-4/+3
| | | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.4' into 5.5Yoann Lopes2015-05-051-34/+4
|\ | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/avfoundation/camera/avfcamerasession.h src/plugins/avfoundation/camera/avfcamerasession.mm Change-Id: Ib2e25d907a7069591920d2f69e007f314cc0fd85
| * AVFoundation: fix microphone permission when using the camera.Yoann Lopes2015-04-231-34/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-04-151-23/+36
|\| | | | | | | | | | | | | | | Conflicts: src/multimedia/playback/playlistfileparser.cpp src/plugins/windowsaudio/qwindowsaudiodeviceinfo.cpp Change-Id: I52950def2b8283ae15797d05d4ead6a1256eba19
| * AVFoundation: fix QCameraInfo::availableCameras() on OS X.Yoann Lopes2015-04-101-23/+36
| | | | | | | | | | | | | | | | | | | | 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>
* | AVCaptureDeviceFormat - avoid duplicates (OS X/iOS)Timur Pocheptsov2015-03-101-0/+23
| | | | | | | | | | | | | | | | | | | | | | 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-021-4/+21
| | | | | | | | | | | | | | | | 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 (2) - version for iOS/OS XTimur Pocheptsov2015-03-021-0/+11
| | | | | | | | | | | | | | | | QCameraViewfinderSettingsControl2 - version for AV foundation plugin (the new settings control interface implemented). Change-Id: I3fbfb87925e57c914d43eb711fa5422e26981207 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
* | Update copyright headersAntti Kokko2015-02-121-22/+14
| | | | | | | | | | | | | | | | | | 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>
* | Rename camera classes to avoid name clash.James Turner2015-01-151-3/+3
| | | | | | | | | | | | | | 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>
* | implement QVideoProbe for iOS cameraLudger Krämer2014-09-121-0/+27
|/ | | | | | | | | | | 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>
* 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-041-0/+72
| | | | | Change-Id: I05f3daa5c4acb90e046e26d6d577ae40dfed0e30 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* AVFoundation: mirror viewfinder frames of front-facing cameras.Yoann Lopes2014-02-141-1/+9
| | | | | Change-Id: I95920aa459ff0931819cb6f8278ab296db542601 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: Ia8c1c38aba1544603fada8c414cc856f365fd15b Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-241-24/+24
| | | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Id77334cfb15de096941c88e32d04ca07b4eb4709 Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Initial implementation of Mac camera backendDmytro Poplavskiy2012-08-271-0/+277
Based on AVFoundation framework Change-Id: If4cfd105a592f50b42606624548b9ffc870e3e47 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>