googlearchive / android-Camera2Basic

Migrated:
https://github.com/android/camera
Apache License 2.0
2.89k stars 1.53k forks source link

Preview Dark in Sony device limited hardware Camera level #137

Closed yudikarma closed 5 years ago

yudikarma commented 5 years ago

i have same isuue and was solve that to other device with this method from stackoverflow for capture : //set brignest captureBuilder.set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE,(getRange())); for preview : //set brignes mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_TARGET_FPS_RANGE,getRange());

and this method for getrange() ` /**

private Range getRange() { CameraCharacteristics chars = null; CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE); try { chars = manager.getCameraCharacteristics(mCameraId); Range[] ranges = chars.get(CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES); Range result = null; for (Range range : ranges) { int upper = range.getUpper(); // 10 - min range upper for my needs if (upper >= 10) { if (result == null || upper < result.getUpper().intValue()) { result = range; } } Log.e("Avaliable frame fps :",""+range); } if (result == null) { result = ranges[0]; }

    Log.e("frame fps :",""+result);
    return result;
} catch (CameraAccessException e) {
    e.printStackTrace();
    return null;
}

}` this work for any device , but i get complaint from client if this method not work in some device "Sony" but not all sony device.

please give me some action if you have news idea for solve this issue. thanks

yudikarma commented 5 years ago

please help

perracodex commented 5 years ago

Please post the list of ranges you get by querying characteristics.get(CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES);

Also, are you using some scene mode? and which CameraDevice TEMPLATE are you using to create the session?

codingjeremy commented 5 years ago

This sample has been migrated to a new location where we can accept Pull Requests (check README for more information).

As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.

If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!