Questions tagged [avcapturedevice]

AVCaptureDevice represents a physical capture device and the properties associated with that device. You use a capture device to configure the properties of the underlying hardware.

A capture device also provides input data (such as audio or video) to an AVCaptureSession object.

API reference

347 questions
0
votes
1 answer

AV Foundation in relation to Camera issue

I am trying to be able to use a custom camera, and I am converting code from swift 2 to swift 3; I am pretty much complete; but I am getting this error in relation to devices; I want to have a rear and front facing camera and before in swift 2 you…
0
votes
1 answer

How can i synchronize AVCaptureDevice setFocusModeLockedWithLensPosition call

I want to synchronize setFocusModeLockedWithLensPosition, setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains and setExposureModeCustomWithDuration calls. Is there a logic order to call thoses functions ? What i want to do is to start Running…
Bob5421
  • 7,757
  • 14
  • 81
  • 175
0
votes
1 answer

What possible solution to set custom exposure in duo camera device?

My code was setting AVCaptureExposureModeCustom for AVCaptureDevicePositionBack however while adding support for iPhone 7 Plus I am able to set it for AVCaptureDeviceTypeBuiltInTelephotoCamera but not on AVCaptureDeviceTypeBuiltInDuoCamera. What…
khunshan
  • 2,662
  • 4
  • 28
  • 34
0
votes
2 answers

AVCaptureDeviceTypeBuiltInWideAngleCamera giving error

I am using Socket scanner sdk in my application. I am using xcode 7.3. The sdk provided by Socket scanner it self. when i tried to run their sample, it is giving error below: Undefined symbols for architecture…
jaydeep darji
  • 45
  • 1
  • 8
0
votes
0 answers

Video mode in my app gives a fuzzy image

In my app I'm using iPhone's camera video mode to do some scanning. I implemented the scanner, but I noticed that in my app the video image is kind of fuzzy comparing to the video image of other apps when I use the same phone. Below are the image…
Eugene Gordin
  • 4,047
  • 3
  • 47
  • 80
0
votes
0 answers

AVCaptureDevice flashmode for front camera is not bright like iPhone camera app

Here's the code I'm working with: func toggleflash(On on: Bool){ guard let session = captureSession where session.running == true else { return } session.beginConfiguration() let input = session.inputs[0]…
user5194501
0
votes
0 answers

How to do auto focus when user moves mobile in iOS?

What I was trying is when user moves I want to do auto focus ,Here I was created camera with , AVCaptureSession place because if I open camera through UIImagePickerController then auto focus is not possible so I preferred AVCaptureSession. …
Kishore Kumar
  • 4,265
  • 3
  • 26
  • 47
0
votes
1 answer

Display AVCaptureDevice live stream video in Mac Os with Swift

I would like to display a live stream video from my iSight camera. I was able to detect the AVCaptureDevice that match with the iSight camera, but I don't know how can display the iSight live stream. I found some examples for iOS…
Juan Lago
  • 960
  • 1
  • 10
  • 20
0
votes
2 answers

iPhone 6+ (Wrong scale?)

I have an iOS app using the camera to take pictures. It uses a path(CGPath) drawn on the screen (for example a rectangle), and it takes a photo within that path. The app supports only portrait orientation. For that to happen I use: AVCaptureSession,…
Michel
  • 10,303
  • 17
  • 82
  • 179
0
votes
1 answer

iOS : AVAssetWriterInput not store audio in video recording

I am developing an application which required to record video. video frame will be stored after processing faces from image. I can successfully record video. But audio is not playing into it. My code for this is following. - (void)setupAVCapture { …
girish_pro
  • 838
  • 9
  • 18
0
votes
0 answers

Can't flash with the right timing

I am having trouble firing the flash in an iOS app using the camera to take pictures. Here is the function I call when I want to make the flash work: func litFlash() { if !captureDevice.hasFlash || !captureDevice.isFlashModeSupported(.On)…
Michel
  • 10,303
  • 17
  • 82
  • 179
0
votes
0 answers

Swift AVFoundation Camera close open button action error

I have working barcode scanner codes and it have auto opening camera with viewDidAppear i want to change it with button actions open and close i try but i dont resolve it my codes under below. ( Also i added closeCamera and openCamera actions…
SwiftDeveloper
  • 7,244
  • 14
  • 56
  • 85
0
votes
0 answers

Saving UIImage created from CGImage to Saved Photos album crashes my app

I'm trying to implement uncompressed photos in a little practice app of mine, but I can't get it to work for the life of me. This is how I capture a photo: print("Shutter!") if let videoConnection =…
Peter W.
  • 2,323
  • 4
  • 22
  • 42
0
votes
1 answer

AVAssetWriter Recording Audio 2 times slower?

I am trying to record the Audio using AVAssetWriter. But when in plays the File it plays 2 times slower than the origninal audio. What i have done is creating a AVAssetWriter in Following way.. _writer = [AVAssetWriter assetWriterWithURL:url…
0
votes
1 answer

Cannot assign to videoZoomFactor of AVCaptureDevice

Hi I'm trying to set the zoomFactor of my camera to 1.0 so it display as much of what a camera could take in as possible as I realized that the iPhone's camera app can "see" more than what my camera can see built using AVFoundation. However, when…
user3526002
  • 537
  • 2
  • 8
  • 19