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
4
votes
1 answer

Why does autoFocusRangeRestriction have no effect?

You can tell the iPhone camera to focus on near or far objects by doing: try! device.lockForConfiguration() defer { device.unlockForConfiguration() } device.autoFocusRangeRestriction = .near But whether I set near, far or leave it unset makes…
Kartick Vaddadi
  • 4,818
  • 6
  • 39
  • 55
4
votes
1 answer

How do I record a video on iOS without using a preset?

The simpler way to record a video on iOS is by setting a AVCaptureSession.sessionPreset. But that doesn't work for me since I want to control parameters like binning, stabilization (cinematic, standard, or none) and ISO. I find the format I want and…
4
votes
1 answer

AVCaptureDevice isInUseByAnotherApplication always returns false

I'm doing a basic application on Objective-C and the AVFoundation framework, I wanna detect if the built in camera for Mac is being used by another application, I have managed to do it, but it always returns false even when I'm using the camera with…
Victor Castillo Torres
  • 10,581
  • 7
  • 40
  • 50
4
votes
2 answers

What is the role of AVCaptureDeviceType.builtInDualCamera

I am playing with swift and an iPhone 7 Plus. I am working with builtInWideAngleCamera and builtInTelephotoCamera. This is great, even if i cannot get the 2 images simultaneously. I saw in apple documentation that AVCaptureDeviceType contains a…
Bob5421
  • 7,757
  • 14
  • 81
  • 175
4
votes
2 answers

AVCaptureDevice: comparing samplebuffer timestamps

I have a video AVCaptureDevice (AVMediaTypeVideo), am decreasing the exposure briefly using setExposureTargetBias:completionHandler and then restoring it again. I need to know exactly which buffer in…
Dickson
  • 211
  • 1
  • 11
4
votes
2 answers

GPUImage - Focusing and Exposure on tap does not work properly - Missing something?

I had starter project that used AVFoundation to set up the Camera and it worked perfectly. Now I needed to convert the Camera mechanism into GPUImage. I'm using the same focus and exposure method in both projects (which worked prefect at the…
Roi Mulia
  • 5,626
  • 11
  • 54
  • 105
4
votes
3 answers

iOS 9 - Request Camera authorisation for photos

I have an app which needs to be able to take photos (not videos). I was looking online to find out how to detect if the user has granted permission to the camera. After a while I found that you could use AVAuthorizationStatus to figure this out.…
Supertecnoboff
  • 6,406
  • 11
  • 57
  • 98
4
votes
1 answer

AVCaptureSession rotate | orientation while video transmitting

I am developing video streaming application, in which i need to capture front camera video frame and encode then transfer to other end, a typical flow is like this AVCaptureSession -> AVCaptureDeviceInput -> AVCaptureVideoDataOutput -> capture…
Amitg2k12
  • 3,765
  • 10
  • 48
  • 97
4
votes
1 answer

Red audio recording status bar "flashes" while app in *foreground*

There are many questions (here, here) regarding the double height red audio recording status bar, but all of them reference flashes when the app resigns into the background. I'm getting a flash, I'm assuming from an AVCaptureSession setup, while the…
Ryan Romanchuk
  • 10,819
  • 6
  • 37
  • 41
4
votes
1 answer

AVCaptureDevice's isLowLightBoostSupported always returns false on 5S iOS7.1 (for automaticallyEnablesLowLightBoostWhenAvailable)

I'm attempting to enable AVCaptureDevice's automaticallyEnablesLowLightBoostWhenAvailable in an iOS camera app, but I've been utterly unable to make AVCaptureDevice's isLowLightBoostSupported return true. Question: Is there anything that needs to be…
adamz
  • 353
  • 3
  • 10
4
votes
4 answers

Why is scanning barcodes using the new iOS 7 API really slow?

I'm currently trying to use iOS 7's newest api's to scan code 39 barcodes, but it's driving me crazy. I have to hold the phone a specific way really still for like 10 seconds in order for it to detect it. I compared it to Red Laser, Zbar, etc and…
KingPolygon
  • 4,753
  • 7
  • 43
  • 72
4
votes
1 answer

AVAudioSessionInterruptionNotification not triggered when capture device active

I'm having a problem with "AVAudioSessionInterruptionNotification" on iOS 7.0.4. I sign up for it on the NSNotificationCenter, and I activate AVAudioSession. Everything works fine, but if a camera is activated, that particular notification is not…
Axel83
  • 197
  • 2
  • 13
4
votes
3 answers

iPhone How to Set Frame Rate and Slow Down AVCapture didOutputSampleBuffer Delegate

I want to slow down the frame rate of the video device on an iPhone 4S so that the didOutputSampleBuffer delegate is called less frequently. This is to improve performance since I process each frame and need a large frame for the detail. I tried to…
PhilBot
  • 748
  • 18
  • 85
  • 173
4
votes
1 answer

How to take a photo automatically at focus in iPhone SDK?

I am creating an app in which user takes the picture of a image with text and upload to server. I have used AVCaptureSession to open camera and placed a bar button which captures the latest frame and uploads it to the server. In this app, user can…
Pankaj Kainthla
  • 2,439
  • 5
  • 31
  • 61
3
votes
1 answer

iPhone Camera Focussing

I used the below code for focusing the iphone camera. But it is not working. I take this code from the AVCam sample code of Apple. Am I doing anything wrong? Is there any method to detect if the iPhone did focussing? -(void)…
isarathg
  • 858
  • 1
  • 19
  • 37