-1

I have an app, when it detects (eg CIDetect for face) it will take a picture and upload to server for processing. However during this process I want to stop the camera video feed so it does not continue to take more pictures..I tried

[[videoDataOutput connectionWithMediaType:AVMediaTypeVideo] setEnabled:NO];

(videoDataOutput is a AVCaptureVideoDataOutput object), but it does not seem to work...

James Gu
  • 1,382
  • 4
  • 26
  • 39

1 Answers1

1

You send the AVCaptureSession object the stopRunning message to stop the flow of data. You can also call removeOutput: on the AVCaptureSession object to remove the individual output if you have multiple outputs and you want to keep the others active.

Fruity Geek
  • 7,351
  • 1
  • 32
  • 41