-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
android 8.1 (XA2) compatibility + zoom implementation #115
base: camera2
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we return max-zoom also for older devices?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@@ -1352,7 +1359,11 @@ int param_key_string_to_enum(const char *key) | |||
!strcmp(key, android::CameraParameters::KEY_METERING_AREAS) ? | |||
ACAMERA_CONTROL_AE_REGIONS : | |||
!strcmp(key, android::CameraParameters::KEY_ZOOM) ? | |||
ACAMERA_CONTROL_ZOOM_RATIO : | |||
#if ANDORID_MAJOR >= 9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo
@@ -19,13 +19,13 @@ | |||
#include "droidmediacamera.h" | |||
|
|||
#include <camera/CameraParameters.h> | |||
#include <camera/NdkCaptureRequest.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these were sorted alphabetically before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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