From 73d73853d184d6207294ec6756f035bceab9cd01 Mon Sep 17 00:00:00 2001 From: Keith Holliday Date: Sun, 16 Dec 2018 05:43:29 -0600 Subject: [PATCH 1/6] Fixed video quality example (#317) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 49815f11..4fadc4fe 100644 --- a/README.md +++ b/README.md @@ -411,7 +411,7 @@ Most camera parameters can be controlled through XML attributes or linked method app:cameraSessionType="picture" app:cameraCropOutput="false" app:cameraJpegQuality="100" - app:cameraVideoQuality="480p" + app:cameraVideoQuality="max480p" app:cameraVideoCodec="deviceDefault" app:cameraWhiteBalance="auto" app:cameraHdr="off" From e0602c7ab66cc9f3e3629b7424f6748b4e08af36 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Mon, 17 Dec 2018 01:54:59 +1100 Subject: [PATCH 2/6] Swallow RuntimeExcpetions on autoFocus (#332) --- .../com/otaliastudios/cameraview/Camera1.java | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/Camera1.java b/cameraview/src/main/java/com/otaliastudios/cameraview/Camera1.java index 9fda44b4..a814e7a8 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/Camera1.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/Camera1.java @@ -823,15 +823,22 @@ class Camera1 extends CameraController implements Camera.PreviewCallback, Camera mCamera.setParameters(params); mCameraCallbacks.dispatchOnFocusStart(gesture, p); // TODO this is not guaranteed to be called... Fix. - mCamera.autoFocus(new Camera.AutoFocusCallback() { - @Override - public void onAutoFocus(boolean success, Camera camera) { - // TODO lock auto exposure and white balance for a while - mCameraCallbacks.dispatchOnFocusEnd(gesture, success, p); - mHandler.get().removeCallbacks(mPostFocusResetRunnable); - mHandler.get().postDelayed(mPostFocusResetRunnable, mPostFocusResetDelay); - } - }); + try { + mCamera.autoFocus(new Camera.AutoFocusCallback() { + @Override + public void onAutoFocus(boolean success, Camera camera) { + // TODO lock auto exposure and white balance for a while + mCameraCallbacks.dispatchOnFocusEnd(gesture, success, p); + mHandler.get().removeCallbacks(mPostFocusResetRunnable); + mHandler.get().postDelayed(mPostFocusResetRunnable, mPostFocusResetDelay); + } + }); + } catch (RuntimeException e) { + // Handling random auto-focus exception on some devices + // See https://github.com/natario1/CameraView/issues/181 + LOG.e("startAutoFocus:", "Error calling autoFocus", e); + mCameraCallbacks.dispatchOnFocusEnd(gesture, false, p); + } } }); } From bf4f636809651b2dd0235a6dfefaeef60875b2d1 Mon Sep 17 00:00:00 2001 From: Mattia Iavarone Date: Sun, 16 Dec 2018 17:50:47 +0100 Subject: [PATCH 3/6] Add stale config --- .github/stale.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000..4fa1ca73 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,26 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 20 + +# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. +daysUntilClose: 7 + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: + - is:bug + - is:enhancement + - is:discussion + +# Label to use when marking as stale +staleLabel: status:stale + +# Comment to post when marking as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + activity in the last 20 days. It will be closed if no further activity + occurs within the next seven days. Thank you for your contributions. + +# Limit to only `issues` or `pulls` +only: issues From 548bab7b9e86531cb79c5338595a07c1a1f91e18 Mon Sep 17 00:00:00 2001 From: Mattia Iavarone Date: Mon, 17 Dec 2018 18:21:40 +0100 Subject: [PATCH 4/6] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 34 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 17 ++++++++++++ .github/ISSUE_TEMPLATE/question.md | 12 ++++++++ 3 files changed, 63 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/question.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..dd6b4428 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +### Describe the bug +A clear and concise description of what the bug is. + +- CameraView version: *version number* +- Reproducible in official demo app: *yes/no* +- Device / Android version: *Pixel, API 28* + +### To Reproduce +Steps to reproduce the behavior, possibly in the demo app: +1. Go to '...' +2. Click on '....' +3. See error + +### Expected behavior +A clear and concise description of what you expected to happen. + +### Screenshots +If applicable, add screenshots to help explain your problem. + +### Logs +Use `CameraLogger.setLogLevel(LEVEL_VERBOSE)` to see all logs into LogCat. +Use `CameraLogger.registerLogger()` to export to file or crash reporting service. + +### APK +Link to a Github repo where the bug is reproducible. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..aadb0e3b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +### Problem to be addressed +A clear and concise description of what the problem is. + +### Describe the solution you'd like +A clear and concise description of what you want to happen. + +### Additional context +Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000..a56b5e59 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,12 @@ +--- +name: Question +about: Question about CameraView usage +title: '' +labels: is:question +assignees: '' + +--- + +### How do I? +Describe your problem here. Please, read the docs first. +Questions not strictly related to CameraView should be asked elsewhere. From 16bee56ef7cb707988f15c4bf8a51bf27886599f Mon Sep 17 00:00:00 2001 From: Mattia Iavarone Date: Mon, 17 Dec 2018 18:22:01 +0100 Subject: [PATCH 5/6] Delete ISSUE_TEMPLATE.md --- ISSUE_TEMPLATE.md | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 ISSUE_TEMPLATE.md diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md deleted file mode 100644 index 25801d86..00000000 --- a/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,28 +0,0 @@ -*If you are trying to report a bug, please file the information below. -Prerequisites:* - - - -- [ ] *I am using the latest version* -- [ ] *I can reproduce the bug in the demo app, and if not...* -- [ ] *I have tried to reproduce the bug in the demo app* - -#### Detailed steps to reproduce the issue: - -1. -2. -3. - -#### Expected behavior: - -#### Actual behavior: - -#### Screenshots: - -#### Interesting logs: - -*You can use `CameraLogger.setLogLevel(LEVEL_VERBOSE)` -to add logs to logcat, and `CameraLogger.registerLogger()` -to handle logs yourself (e.g. export to file or a crash reporting service) -so you can collect data from your users.* - From a8648b6623ae28c5940a294ff7bcc954c521741b Mon Sep 17 00:00:00 2001 From: Mattia Iavarone Date: Mon, 17 Dec 2018 18:36:20 +0100 Subject: [PATCH 6/6] Create pull_request_template.md --- .github/pull_request_template.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..62379506 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,10 @@ +### Before you go +Unless this is a simple fix (typos, bugs with obvious solution), please open an issue first. +If the edited files were covered by tests, updated tests are required for merging. Please look into the tests folders and make sure you cover new code. + +- Fixes ... (*issue number*) +- Tests: ... (*yes/no*) +- Docs updated: ... (*yes/no*) + +### Solution +If applicable, briefly describe how the issue was addressed.