android 8.1 (XA2) compatibility + zoom implementation#115
android 8.1 (XA2) compatibility + zoom implementation#115thigg wants to merge 3 commits intosailfishos:camera2from
Conversation
| #if ANDROID_MAJOR >= 9 | ||
| case ACAMERA_CONTROL_ZOOM_RATIO_RANGE: | ||
| params += "max-zoom="+std::to_string(entry.data.f[1])+";"; | ||
| break; |
There was a problem hiding this comment.
Should we return max-zoom also for older devices?
There was a problem hiding this comment.
I think the parameter means the max zoom of optical zooms. This does not really make sense if zoom is only done by cropping the image
Minimum and maximum zoom ratios supported by this camera device.
https://developer.android.google.cn/ndk/reference/group/camera#group___camera_1gga49cf3e5a3deefe079ad036a8fac14627af00bd3268478899b538e6ae1323720fc
|
I will continue as soon as I find time. If anyone else wants to change something on this branch, feel free to do so/create a new pr if you are faster than i am |
7038d50 to
651bbd2
Compare
droidmediacamera2.cpp
Outdated
| ACAMERA_CONTROL_AE_REGIONS : | ||
| !strcmp(key, android::CameraParameters::KEY_ZOOM) ? | ||
| ACAMERA_CONTROL_ZOOM_RATIO : | ||
| #if ANDORID_MAJOR >= 9 |
| #include "droidmediacamera.h" | ||
|
|
||
| #include <camera/CameraParameters.h> | ||
| #include <camera/NdkCaptureRequest.h> |
There was a problem hiding this comment.
I think these were sorted alphabetically before
There was a problem hiding this comment.
There is an issue with includes in Android versions < 10. In my wip branch I have a comment like this before this include "// This needs to be first because of broken includes in Android < 10"
wip