From d38764c3986bad80a667a70b13d5fafcbcefaae3 Mon Sep 17 00:00:00 2001 From: Dmitry Naymushin Date: Mon, 25 Jul 2022 21:31:30 +0300 Subject: [PATCH] fix typos and add minor details to the docs --- docs/_docs/capturing-media.md | 6 +++--- docs/_docs/filters.md | 2 +- docs/_docs/frame-processing.md | 2 +- docs/_docs/metering.md | 2 +- docs/_docs/preview-size.md | 4 ++-- docs/_extra/v1-migration-guide.md | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/_docs/capturing-media.md b/docs/_docs/capturing-media.md index 94c573d6..0af85595 100644 --- a/docs/_docs/capturing-media.md +++ b/docs/_docs/capturing-media.md @@ -46,9 +46,9 @@ resulting snapshots are square as well, no matter what the sensor available size |`takePictureSnapshot()`|Pictures|Snapshot|`yes`|`yes`|`yes`|That of the preview stream, [or less](snapshot-size)| |`takeVideoSnapshot(File)`|Videos|Snapshot|`yes`|`yes`|`yes`|That of the preview stream, [or less](snapshot-size)| -> Please note that the video snaphot features requires: -> - API 18. If called before, it throws -> - An OpenGL preview (see [previews](previews)). If not, it throws +> Please note that the video snapshot features require: +> - API 18. If called on earlier versions, it throws an `IllegalStateException` +> - An OpenGL preview (see [previews](previews)). If not, it throws an `IllegalStateException` ### Capturing pictures while recording diff --git a/docs/_docs/filters.md b/docs/_docs/filters.md index 6842b78a..e3c02e3f 100644 --- a/docs/_docs/filters.md +++ b/docs/_docs/filters.md @@ -25,7 +25,7 @@ flag to use it. The only condition is to use the `Preview.GL_SURFACE` preview. Real-time filters are applied at creation time, through the `app:cameraFilter` XML attribute, or anytime during the camera lifecycle using `cameraView.setFilter()`. -We offers a reasonable amount of filters through the `Filters` class, for example: +We offer a reasonable amount of filters through the `Filters` class, for example: ```java cameraView.setFilter(Filters.BLACK_AND_WHITE.newInstance()); diff --git a/docs/_docs/frame-processing.md b/docs/_docs/frame-processing.md index 16412493..a4e30997 100644 --- a/docs/_docs/frame-processing.md +++ b/docs/_docs/frame-processing.md @@ -120,7 +120,7 @@ You can check which formats are available for use through `CameraOptions.getSupp ### Advanced: Thread Control Starting from `v2.5.1`, you can control the number of background threads that are allocated -for frame processing work. This should further push you into perform processing actions synchronously +for frame processing work. This should further push you into performing processing actions synchronously and can be useful if processing is very slow with respect to the preview frame rate, in order to avoid dropping too many frames. diff --git a/docs/_docs/metering.md b/docs/_docs/metering.md index 06d2faa3..3016b5cd 100644 --- a/docs/_docs/metering.md +++ b/docs/_docs/metering.md @@ -102,7 +102,7 @@ cameraView.setAutoFocusMarker(new DefaultAutoFocusMarker()); ##### Touch Metering Reset Delay -You control control how a touch metering operation is reset after completed. +You control how a touch metering operation is reset after being completed. Setting a negative value (or 0, or `Long.MAX_VALUE`) will not reset the metering values. This is useful for low end devices that have slow auto-focus capabilities. Defaults to 3 seconds. diff --git a/docs/_docs/preview-size.md b/docs/_docs/preview-size.md index e24eec98..33351cef 100644 --- a/docs/_docs/preview-size.md +++ b/docs/_docs/preview-size.md @@ -66,7 +66,7 @@ by the engine. The default selector will do the following: - Constraint 2: match sizes a bit bigger than the View (so there is no upscaling) - Try to match both, or just one, or fallback to the biggest available size -There are not so many reason why you would replace this, other than control the frame processor size +There are not so many reasons why you would replace this, other than to control the frame processor size or, indirectly, the snapshot size. You can, however, hook into the process using `setPreviewStreamSize(SizeSelector)`: ```java @@ -79,7 +79,7 @@ cameraView.setPreviewStreamSize(new SizeSelector() { }); ``` -After the preview stream size is determined, if it has changed since list time, the `CameraView` will receive +After the preview stream size is determined, if it has changed since last time, the `CameraView` will receive another call to `onMeasure` so the `WRAP_CONTENT` magic can take place. To understand how SizeSelectors work and the available utilities, please read the [Capture Size](capture-size) document. diff --git a/docs/_extra/v1-migration-guide.md b/docs/_extra/v1-migration-guide.md index da32dffa..7716c798 100644 --- a/docs/_extra/v1-migration-guide.md +++ b/docs/_extra/v1-migration-guide.md @@ -105,8 +105,8 @@ which means that **square videos** or any other ratio are possible. The video snapshot supports audio and respects the `Audio`, max duration, max size & codec settings, which makes it a powerful tool. The drawback is that it needs: -- API 18. If called before, it throws -- An OpenGL preview (see below). If not, it throws +- API 18. If called on earlier versions, it throws an `IllegalStateException` +- An OpenGL preview (see below). If not, it throws an `IllegalStateException` ##### Video capturing Some new APIs were introduced, which are respected by both standard videos and snapshot videos: @@ -141,7 +141,7 @@ smart enough to - respect the picture/video aspect ratio - be a bit bigger than the view so that there is no upscaling -There are not so many reason why you would use this method, other than, for example, control the frame +There are not so many reasons why you would use this method, other than, for example, to control the frame processor size or, indirectly, the snapshots size. If what you are doing is just assigning an aspect ratio, for instance, please do so using `setPictureSize()` and `setVideoSize()`.