Question

I have a QTCaptureSession set up which has as its input a QTCaptureDeviceInput (initialized with a QTCaptureDevice corresponding to a webcam); a QTCaptureLayer has had its session set to be this QTCaptureSession. This all works swimmingly.

I would like, however, to vertically reflect (i.e. "mirror") the captured video. Rather than using a QTCaptureVideoPreviewOutput, a CAOpenGLLayer, and a custom kernel, is there a way built-in to QTKit to do this?

Was it helpful?

Solution

Since QTCaptureLayer is a subclass of CALayer, we can just set the affine transform on the QTCaptureLayer to achieve this effect.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top