camera2sample's People
Forkers
chenhaifeng2016 pxluu twp520 tuantuan1997 jimsysu wwtghx haxue voilet0604 mohuaiyuan2015 maxwu2013 xiaobai20181017 zhengyimin hzhandroid zhijunhong 18319557579 majian2510 sixiangjun hantingye michaelzhang5686 flywind2 qricis qiwx2012 zxiiic topbigone fuchun100 victorycklcamera2sample's Issues
非常感谢
很棒的项目!
判断相机的 Hardware Level 是否大于等于指定的 Level-没有看明白
/**
- 判断相机的 Hardware Level 是否大于等于指定的 Level。
*/
fun CameraCharacteristics.isHardwareLevelSupported(requiredLevel: Int): Boolean {
val sortedLevels = intArrayOf(
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY, //2
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED,//0
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL, //1
CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3 //3
)
val deviceLevel = this[CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL]
if (requiredLevel == deviceLevel) {
return true
}
for (sortedLevel in sortedLevels) {
if (requiredLevel == sortedLevel) {
return true
} else if (deviceLevel == sortedLevel) {
return false
}
}
return false
}
代码中
for (sortedLevel in sortedLevels) {
if (requiredLevel == sortedLevel) {
return true
} else if (deviceLevel == sortedLevel) {
return false
}
}
什么意思呢,没有看明白呀。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.