iphone Programming Glossary: previewlayer
Upload live streaming video from iPhone like Ustream or Qik http://stackoverflow.com/questions/1960782/upload-live-streaming-video-from-iphone-like-ustream-or-qik outputDevice make preview layer and add so that camera's view is displayed on screen AVCaptureVideoPreviewLayer previewLayer AVCaptureVideoPreviewLayer layerWithSession captureSession previewLayer.frame view.bounds view.layer addSublayer previewLayer.. displayed on screen AVCaptureVideoPreviewLayer previewLayer AVCaptureVideoPreviewLayer layerWithSession captureSession previewLayer.frame view.bounds view.layer addSublayer previewLayer go captureSession startRunning Then the output device's delegate here.. AVCaptureVideoPreviewLayer layerWithSession captureSession previewLayer.frame view.bounds view.layer addSublayer previewLayer go captureSession startRunning Then the output device's delegate here self has to implement the callback void captureOutput..
How to properly release an AVCaptureSession http://stackoverflow.com/questions/3741121/how-to-properly-release-an-avcapturesession that the AVCaptureSession has finished Here's my code Declarations AVCaptureSession session AVCaptureVideoPreviewLayer previewLayer UIView view Setup of instances AVCaptureDevice camera AVCaptureDevice defaultDeviceWithMediaType AVMediaTypeVideo session.. queue dispatch_queue_create augm_reality NULL output setSampleBufferDelegate self queue queue dispatch_release queue previewLayer AVCaptureVideoPreviewLayer layerWithSession session retain previewLayer.frame view.bounds view.layer addSublayer previewLayer.. self queue queue dispatch_release queue previewLayer AVCaptureVideoPreviewLayer layerWithSession session retain previewLayer.frame view.bounds view.layer addSublayer previewLayer session startRunning Cleanup previewLayer removeFromSuperlayer previewLayer..
AVFoundation, how to turn off the shutter sound when captureStillImageAsynchronouslyFromConnection? http://stackoverflow.com/questions/4401232/avfoundation-how-to-turn-off-the-shutter-sound-when-capturestillimageasynchrono so that your screenshot looks good AVCaptureSession captureSession yourcapturesession AVCaptureVideoPreviewLayer previewLayer AVCaptureVideoPreviewLayer layerWithSession captureSession UIView aView theViewYouWantTheLayerIn previewLayer.frame aView.bounds.. previewLayer AVCaptureVideoPreviewLayer layerWithSession captureSession UIView aView theViewYouWantTheLayerIn previewLayer.frame aView.bounds Assume you want the preview layer to fill the view. aView.layer addSublayer previewLayer share improve..
Uploading live streaming video from iPhone [duplicate] http://stackoverflow.com/questions/5062266/uploading-live-streaming-video-from-iphone outputDevice make preview layer and add so that camera's view is displayed on screen AVCaptureVideoPreviewLayer previewLayer AVCaptureVideoPreviewLayer layerWithSession captureSession previewLayer.frame view.bounds view.layer addSublayer previewLayer.. displayed on screen AVCaptureVideoPreviewLayer previewLayer AVCaptureVideoPreviewLayer layerWithSession captureSession previewLayer.frame view.bounds view.layer addSublayer previewLayer go captureSession startRunning Then the output device's delegate here.. AVCaptureVideoPreviewLayer layerWithSession captureSession previewLayer.frame view.bounds view.layer addSublayer previewLayer go captureSession startRunning Then the output device's delegate here self has to implement the callback void captureOutput..
How can I get autofocus to work in a second AVCaptureSession without recreating the sessions? http://stackoverflow.com/questions/5427561/how-can-i-get-autofocus-to-work-in-a-second-avcapturesession-without-recreating _device AVCaptureSession _topSession AVCaptureStillImageOutput _outputTopSession AVCaptureVideoPreviewLayer _previewLayerTopSession AVCaptureDeviceInput _inputTopSession AVCaptureSession _bottomSession AVCaptureStillImageOutput _outputBottomSession.. AVCaptureSession _bottomSession AVCaptureStillImageOutput _outputBottomSession AVCaptureVideoPreviewLayer _previewLayerBottomSession AVCaptureDeviceInput _inputBottomSession IBAction switchSessions id sender @end Implementation file #import.. void setupCaptureSession AVCaptureSession session output AVCaptureStillImageOutput output previewLayer AVCaptureVideoPreviewLayer previewLayer input AVCaptureDeviceInput input view UIView view void tearDownSession AVCaptureSession..
Avfoundation - Play and record video (along with audio and preview) simultaneously http://stackoverflow.com/questions/6991452/avfoundation-play-and-record-video-along-with-audio-and-preview-simultaneous AVCaptureSessionPresetLow error error self setCaptureManager captureManager AVCaptureVideoPreviewLayer previewLayer AVCaptureVideoPreviewLayer alloc initWithSession captureManager session self.captureVideoPreviewLayer previewLayer UIView.. previewLayer AVCaptureVideoPreviewLayer alloc initWithSession captureManager session self.captureVideoPreviewLayer previewLayer UIView view self cameraView CALayer viewLayer view layer viewLayer setMasksToBounds YES CGRect bounds view bounds captureVideoPreviewLayer..
Capturing zoomed preview view in AVFoundation http://stackoverflow.com/questions/8150148/capturing-zoomed-preview-view-in-avfoundation previewView CGRect layerRect CGRectMake 0 0 320 430 self avCaptureVideoPreviewLayer setBounds layerRect self previewLayer setPosition CGPointMake CGRectGetMidX layerRect CGRectGetMidY layerRect add the video previewview layer to the preview view..
iPhone take augmented reality screenshot with AVCaptureVideoPreviewLayer http://stackoverflow.com/questions/8980847/iphone-take-augmented-reality-screenshot-with-avcapturevideopreviewlayer self queue queue captureOutput setVideoSettings videoSettings dispatch_release queue else handle failure previewLayer AVCaptureVideoPreviewLayer layerWithSession captureSession UIView aView arOverlayView previewLayer.frame CGRectMake 0 0.. else handle failure previewLayer AVCaptureVideoPreviewLayer layerWithSession captureSession UIView aView arOverlayView previewLayer.frame CGRectMake 0 0 arOverlayView.frame.size.width arOverlayView.frame.size.height Assume you want the preview layer to.. arOverlayView.frame.size.height Assume you want the preview layer to fill the view. aView.layer addSublayer previewLayer captureSession startRunning ask the entire window to draw itself in a graphics context. This call will not render the AVCaptureVideoPreviewLayer..
AVCaptureSession specify resolution and quality of captured images obj-c iphone app http://stackoverflow.com/questions/9312832/avcapturesession-specify-resolution-and-quality-of-captured-images-obj-c-iphone AVCaptureSession session NSLog @ setting session... self.captureSession session NSLog @ setting camera view self.previewLayer AVCaptureVideoPreviewLayer layerWithSession session UIView aView self.view CGRect videoRect CGRectMake 20.0 20.0 280.0 255.0.. layerWithSession session UIView aView self.view CGRect videoRect CGRectMake 20.0 20.0 280.0 255.0 previewLayer.frame videoRect Assume you want the preview layer to fill the view. previewLayer setBackgroundColor UIColor grayColor CGColor.. CGRectMake 20.0 20.0 280.0 255.0 previewLayer.frame videoRect Assume you want the preview layer to fill the view. previewLayer setBackgroundColor UIColor grayColor CGColor self.view.layer addSublayer previewLayer aView.layer addSublayer previewLayer..
|