Comments (4)
For front camera, your "Camera" object should be initialized with
do { videoCamera = try Camera(sessionPreset:AVCaptureSessionPreset640x480, location:.frontFacing) videoCamera!.runBenchmark = true } catch { videoCamera = nil print("Couldn't initialize camera with error: \(error)") }
For zoom and flash features you should look into AVCaptureDevice
, and override some Camera
class properties. It doesn't have this kind of functionality.
from gpuimage2.
I tried this technique and it didnt seem to work the canera was still facing the back
from gpuimage2.
If you already had the back camera active, then you need to call removeAllTargets() on both the camera and any active filters before reassigning the camera to be front facing (then re-assign the filter).
Brad, it would be useful to either expose the underlying AVCaptureDevice or provide a getter for it.
from gpuimage2.
For flash features I would follow this tutorial https://medium.com/@rizwanm/swift-camera-part-2-c6de440a9404, and use the publicly exposed self.camera?.captureSession
from gpuimage2.
Related Issues (20)
- exc_bad_access occurs when build with xcode11.4 in release mode HOT 5
- "Problem appending pixel buffer at time" with the SimpleVideoRecorder example
- Framebuffer method cannot render the texture image. HOT 1
- pointer being freed was not allocated
- SimpleMovieFilter when run demo crash how to do HOT 3
- Value of type 'AVCaptureVideoDataOutput' has no member 'availableVideoPixelFormatTypes' after update Xcode12 HOT 5
- Value of type 'AVCaptureVideoDataOutput' has no member 'availableVideoPixelFormatTypes' HOT 1
- Crashing when PictureInput(imageName: "lookup2") is called . HOT 2
- Video Brightness issue on iPhone 12 pro max HOT 1
- Crash while compile shaders for GaussianBlur
- Improving mask edges
- Memory Leak
- Normal Blend black outs base image
- Focus Stacking
- GPUImage framework always crashes on release iOS app
- Thread Performance Checker: -[AVCaptureSession startRunning] should be called from background thread. Calling it on the main thread can lead to UI unresponsiveness PID: 26281, TID: 578576
- Running on Simulator
- strange distorted lines appear in view in higher viersions of iphone and os HOT 1
- After loading GPUImage2 through CocoaPods, the project will report some errors
- I encountered a crash problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpuimage2.