Skip to content
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

Camera2: more locale issues #119

Open
simonschmeisser opened this issue Dec 10, 2023 · 1 comment · May be fixed by #123
Open

Camera2: more locale issues #119

simonschmeisser opened this issue Dec 10, 2023 · 1 comment · May be fixed by #123

Comments

@simonschmeisser
Copy link

Using std::stof will truncate floats if the decimal separator of the current locale is not .

if (float value = std::stof(value_s)) {

std::to_string will print a localized decimal separator , in my case
https://github.com/sailfishos/droidmedia/blob/camera2-test3/droidmediacamera2.cpp#L1881

I'm a bit confused why I'm not seeing this in logs:

DroidMediaCamera: get_parameters result: video-size=-1x-1;video-frame-format=android-opaque;antibanding-values=off,50hz,60hz,auto;preview-fps-range-values=(15000,30000);preview-frame-rate=30;min-exposure-compensation=-12;max-exposure-compensation=12;exposure-compensation-step=0.166667;focus-mode-values=infinity,auto,macro,continuous-video,continuous-picture;effect-values=none,mono,negative,solarize,sepia,posterize,aqua,blackboard,whiteboard;scene-mode-values=auto,auto,action,portrait,landscape,night,night-portrait,theatre,beach,snow,sunset,fireworks,sports,party,candlelight,hdr;whitebalance-values=auto,incandescent,fluorescent,warm-fluorescent,daylight,cloudy-daylight,twilight,shade,;max-num-focus-areas=0;max-num-metering-areas=1;auto-exposure-lock-supported=true;auto-exposure-lock=false;auto-whitebalance-lock-supported=true;auto-whitebalance-lock=false;flash-mode-values=off,auto,on,torch;picture-size-values=4000x3000,3840x2160,3264x2448,3200x2400,2976x2976,2688x1512,2592x1944,2048x1536,1920x1440,1920x1080,1600x1200,1440x1080

because I assume I'm compiling for android 11: ANDROID_VERSION_MAJOR="11"

@mlehtima
Copy link
Contributor

I think in some cases the log messages get truncated so some parts could be missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants