I'm having trouble  getting AVCaptureVideoPreviewLayer to work in OSX 10.8, 
XCode 4.4 . I'm trying to use the NSView mMovieView as the port. 

        @property (nonatomic, strong) IBOutlet NSView               *mMovieView;
        @property (nonatomic, strong) IBOutlet CALayer              *movieLayer;

        movieLayer = [[self mMovieView] layer];
        [movieLayer setBackgroundColor:CGColorGetConstantColor(kCGColorBlack)];
        AVCaptureVideoPreviewLayer *newPreviewLayer = 
[[AVCaptureVideoPreviewLayer alloc] initWithSession:[self captureSession]];
        [newPreviewLayer setFrame:[movieLayer bounds]];
        [movieLayer addSublayer:newPreviewLayer];

        DLog(@"captureSession inputs are %@",captureSession.inputs);
        DLog(@"captureSession outputs are %@",captureSession.outputs);
        
        [captureSession startRunning];

        DLog(@"AVCapture Session Started");

At the console, I see:
2012-08-01 17:32:53.919 Roboplasm[15629:303] -[MovieController setupAVCapture] 
captureSession inputs are (
    "<AVCaptureDeviceInput: 0x10e889390 [FaceTime HD Camera (Built-in)]>",
    "<AVCaptureDeviceInput: 0x101af69b0 [Built-in Input]>"
)
2012-08-01 17:32:53.920 Roboplasm[15629:303] -[MovieController setupAVCapture] 
captureSession outputs are (
)
2012-08-01 17:33:04.973 Roboplasm[15629:303] __37-[MovieController 
captureSessionInit]_block_invoke_085 did start running
2012-08-01 17:33:04.974 Roboplasm[15629:303] -[MovieController setupAVCapture] 
AVCapture Session Started

But no video preview. Any idea what's up.

Thanks,
Joseph Ayers
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to