Coder Social home page Coder Social logo

Comments (4)

zubco avatar zubco commented on July 23, 2024

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.

unwosu avatar unwosu commented on July 23, 2024

I tried this technique and it didnt seem to work the canera was still facing the back

from gpuimage2.

nateemma avatar nateemma commented on July 23, 2024

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.

joshbernfeld avatar joshbernfeld commented on July 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.