Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

add portrait transform, doesn't work frontend though

roryclear1653f45997cc
diff --git a/clearcam/ViewController.m b/clearcam/ViewController.m
index 6e9e06e..f32b3d3 100644
--- a/clearcam/ViewController.m
+++ b/clearcam/ViewController.m
@@ -198,6 +198,9 @@ NSMutableDictionary *classColorMap;
};
self.videoWriterInput = [AVAssetWriterInput assetWriterInputWithMediaType:AVMediaTypeVideo outputSettings:videoSettings];
self.videoWriterInput.expectsMediaDataInRealTime = YES;
+ if(self.previewLayer.connection.videoOrientation == AVCaptureVideoOrientationPortrait){
+ self.videoWriterInput.transform = CGAffineTransformMakeRotation(M_PI_2);//does this work?
+ }
NSDictionary *sourcePixelBufferAttributes = @{
(NSString *)kCVPixelBufferPixelFormatTypeKey: @(kCVPixelFormatType_32BGRA),