Project import generated by Copybara.

GitOrigin-RevId: f72a0f86c2c2acdb1920973c718a9e26ed3ec4b6
This commit is contained in:
MediaPipe Team
2020-06-08 12:08:33 -04:00
committed by chuoling
parent 5d028d923b
commit cd2b69d58c
315 changed files with 8162 additions and 7502 deletions
+3
View File
@@ -34,6 +34,9 @@
/// Whether to rotate video buffers with device rotation.
@property(nonatomic) BOOL autoRotateBuffers;
/// Whether to mirror the video or not.
@property(nonatomic) BOOL videoMirrored;
/// The camera intrinsic matrix.
@property(nonatomic, readonly) matrix_float3x3 cameraIntrinsicMatrix;
+22
View File
@@ -34,6 +34,7 @@
BOOL _setupDone;
BOOL _useDepth;
BOOL _useCustomOrientation;
BOOL _videoMirrored;
}
- (instancetype)init {
@@ -123,6 +124,22 @@
}
}
- (void)setVideoMirrored:(BOOL)videoMirrored {
if (videoMirrored == _videoMirrored) {
return;
}
BOOL wasRunning = [self isRunning];
if (wasRunning) {
[self stop];
}
_videoMirrored = videoMirrored;
_setupDone = NO;
if (wasRunning) {
[self start];
}
}
- (void)setAutoRotateBuffers:(BOOL)autoRotateBuffers {
if (autoRotateBuffers == _autoRotateBuffers) {
return; // State has not changed.
@@ -252,6 +269,11 @@
}
}
if (_videoMirrored) {
AVCaptureConnection* connection = [_videoDataOutput connectionWithMediaType:AVMediaTypeVideo];
connection.videoMirrored = _videoMirrored;
}
_setupDone = YES;
}