From 6aa2d3a4893264c1aa98be315be9264b5c56f384 Mon Sep 17 00:00:00 2001 From: Philippe Banwarth Date: Thu, 7 Jan 2021 17:19:44 +0100 Subject: [PATCH 1/2] Log errors when writing the image to a file (#960) Co-authored-by: Mattia Iavarone --- .../src/main/java/com/otaliastudios/cameraview/CameraUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/cameraview/src/main/java/com/otaliastudios/cameraview/CameraUtils.java b/cameraview/src/main/java/com/otaliastudios/cameraview/CameraUtils.java index 17e06cf2..bbfdf5fb 100644 --- a/cameraview/src/main/java/com/otaliastudios/cameraview/CameraUtils.java +++ b/cameraview/src/main/java/com/otaliastudios/cameraview/CameraUtils.java @@ -94,6 +94,7 @@ public class CameraUtils { stream.flush(); return file; } catch (IOException e) { + LOG.e("writeToFile:", "could not write file.", e); return null; } } From a9fcd6506ec00992892b3eb18c6a985fa25c9a69 Mon Sep 17 00:00:00 2001 From: Billy Sutomo Date: Thu, 7 Jan 2021 23:21:06 +0700 Subject: [PATCH 2/2] Update frame-processing.md (#941) add parentheses and semi colon to cameraView.addFrameProcessor code example Co-authored-by: Mattia Iavarone --- docs/_docs/frame-processing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_docs/frame-processing.md b/docs/_docs/frame-processing.md index efef2694..16412493 100644 --- a/docs/_docs/frame-processing.md +++ b/docs/_docs/frame-processing.md @@ -29,7 +29,7 @@ cameraView.addFrameProcessor(new FrameProcessor() { // Process android.media.Image... } } -} +}); ``` For your convenience, the `FrameProcessor` method is run in a background thread so you can do your job