iphone Programming Glossary: lockforconfiguration
Turn on torch/flash on iPhone 4 http://stackoverflow.com/questions/3190034/turn-on-torch-flash-on-iphone-4
Activate the LED for a flashlight app http://stackoverflow.com/questions/3253187/activate-the-led-for-a-flashlight-app device AVCaptureDevice defaultDeviceWithMediaType AVMediaTypeVideo if device hasTorch device hasFlash device lockForConfiguration nil device setTorchMode AVCaptureTorchModeOn device setFlashMode AVCaptureFlashModeOn device unlockForConfiguration AVCaptureDeviceInput.. lockForConfiguration nil device setTorchMode AVCaptureTorchModeOn device setFlashMode AVCaptureFlashModeOn device unlockForConfiguration AVCaptureDeviceInput flashInput AVCaptureDeviceInput deviceInputWithDevice device error nil if flashInput session addInput..
How can I make the iPhone 4 LED light fire instantly? http://stackoverflow.com/questions/3983032/how-can-i-make-the-iphone-4-led-light-fire-instantly alloc init AVCaptureSession session AVCaptureSession alloc init session beginConfiguration device lockForConfiguration nil device setTorchMode AVCaptureTorchModeOn device setFlashMode AVCaptureFlashModeOn session addInput flashInput session.. device setFlashMode AVCaptureFlashModeOn session addInput flashInput session addOutput output device unlockForConfiguration output release session commitConfiguration session startRunning self setTorchSession session session release else.. app init or view load. Then just set torch mode on when you want to turn the LED on. Something like self.myDevice lockForConfiguration nil self.myDevice setTorchMode AVCaptureTorchModeOn self.myDevice setFlashMode AVCaptureFlashModeOn self.myDevice unlockForConfiguration..
AVAssetWritter does not work with audio http://stackoverflow.com/questions/5200077/avassetwritter-does-not-work-with-audio AVCaptureDevice defaultDeviceWithMediaType AVMediaTypeAudio menu camera camera session beginConfiguration camera lockForConfiguration nil if camera isExposureModeSupported AVCaptureExposureModeContinuousAutoExposure camera.exposureMode AVCaptureExposureModeContinuousAutoExposure.. hasTorch if camera isTorchModeSupported AVCaptureTorchModeOn camera setTorchMode AVCaptureTorchModeOn camera unlockForConfiguration session commitConfiguration AVCaptureDeviceInput camera_input AVCaptureDeviceInput deviceInputWithDevice camera error nil.. video didFinishSavingWithError contextInfo nil start_time release temp_url release av_adaptor release microphone lockForConfiguration nil session beginConfiguration session removeInput microphone_input session removeOutput audio_output session commitConfiguration..
IPhone iOS 4.3 camera focus square - removeable programatically? http://stackoverflow.com/questions/5402461/iphone-ios-4-3-camera-focus-square-removeable-programatically device in devices if device hasMediaType AVMediaTypeVideo device position AVCaptureDevicePositionBack device lockForConfiguration error if device isFocusModeSupported AVCaptureFocusModeLocked device.focusMode AVCaptureFocusModeLocked NSLog @ Focus..
|