-
Notifications
You must be signed in to change notification settings - Fork 106
[WIP] Swift 4 and some new api is available here #90
Comments
The link to your Swift 4.1 version of Camera Engine is no longer working. Can you update it please? |
@JohnFlint sorry for the delayed response. Here is the link to the repo I made these changes - https://github.com/oozou/CameraEngine Or alternatively, you can install fork with cocoapods pointing to our repo and specific commit using following command:
It's a bit hacky, but better than nothing. Hope I will find a time to clean it up and make a PR to origin repo. |
@freemansion thank you for the update! Your implementation works for me up to the point of terminating with "[AVAssetWriterInput markAsFinished] Cannot call method when status is 0'", at pressing the "stop recording" button. In my own Swift 4 implementation of CameraEngine I have the same issue even though I have (as you) implemented the suggestion from issue #55. Do you think this is due to an api update since you converted the CameraEngine? |
@JohnFlint does this issue reproducible at the repo example app? |
For me the error is reproduced in the example app from https://github.com/oozou/CameraEngine. Using Xcode Version 10.2 (10E125) and after only changing developer team, each time I run the app, select mode Video, switch camera twice (as the view does not show camera input before the first switch), press start recording, and press stop recording it terminates as described. I fetched https://github.com/bartleby/CameraEngine and converted from 4.0 to 4.2 and was actually able to run the example as described and save video, and here without the need for switching camera. However this app did not allow to take more than one photo and at the second terminated with "[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] Settings may not be re-used". As video is my main use of this framework I am at the moment limping on with this version. |
@JohnFlint a change as at this commit probably is the fix for error |
If anyone needs Swift 4.1 version of Camera Engine it is available here
This branch also contains some code refactoring per specific project requirements, which you might find helpful for your projects as well. It allows you specify requested device outputs, such as
camera
andmicrophone
and provides callback which gives you detailed information about current device access request state and an ability to send back an action to be handled.Device access request states:
A list of actions can be applied after retrieving device access state:
Usage example:
CameraEngineSessionPreset was updated to match with the native Apple's naming:
before:
After
Though some things are still needs to be finished. Such as getting rid of redundancy like:
I'm a bit busy at the moment with main work at another project, will try to finish this and make PR asap, when I get a chance. Feel free to message me here I you found something wrong or you want to add or change.
And many thanks to @remirobert for writing and sharing this library.
The text was updated successfully, but these errors were encountered: