cdcyd / cccamera Goto Github PK
View Code? Open in Web Editor NEWAVFoundation 自定义相机
AVFoundation 自定义相机
`// 当前设备取向
为什么默认是AVCaptureVideoOrientationLandscapeRight
,有点不理解,帮忙解释下,谢谢
提2个小问题,
1.在设置自动聚焦和曝光的设置point代码应该放置在设置mode前面:
if (canResetFocus) {
device.focusPointOfInterest = point;
device.focusMode = focusMode;
}
if (canResetExposure) {
device.exposurePointOfInterest = point;
device.exposureMode = exposureMode;
}
2.开始录制时,应该把_recording = YES;放在最后,否则可能会出现提前先写入再删除文件的情况:
_movieManager.currentDevice = [self activeCamera];
_movieManager.currentOrientation = [self currentVideoOrientation];
[_movieManager start:^(NSError * _Nonnull error) {
if (error) {
[self.view showError:error];
}else{
dispatch_sync(dispatch_get_main_queue(), ^{
self->_recording = YES;
});
}
}];
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.