diff --git a/README.md b/README.md index 5362cea1..2947bcff 100644 --- a/README.md +++ b/README.md @@ -27,13 +27,14 @@ compile 'com.otaliastudios:cameraview:2.0.0-beta05' - Fast & reliable - Gestures support +- Camera1 or Camera2 powered engine - Frame processing support - OpenGL powered preview - Take high-quality content with `takePicture` and `takeVideo` - Take super-fast snapshots with `takePictureSnapshot` and `takeVideoSnapshot` - Smart sizing: create a `CameraView` of any size - Control HDR, flash, zoom, white balance, exposure, location, grid drawing & more -- Lightweight: the only dep. is support `ExifInterface` +- Lightweight - Works down to API level 15 - Well tested diff --git a/docs/_posts/2018-12-20-changelog.md b/docs/_posts/2018-12-20-changelog.md index 0efface3..1f8c0aed 100644 --- a/docs/_posts/2018-12-20-changelog.md +++ b/docs/_posts/2018-12-20-changelog.md @@ -10,6 +10,7 @@ New versions are released through GitHub, so the reference page is the [GitHub R ### v2.0.0-beta06 (to be released) +- New: Full featured Camera2 integration! Use `cameraExperimental="true"` and `cameraEngine="camera2"` to test this out. ([#490][490]) - Improvement: we now choose a video recording profile that is compatible with the chosen size. Should fix some video recording issues. ([#477][477]) - **Breaking change**: some public classes have been moved to different packages. See [table here](../extra/v1-migration-guide.html#repackaging). ([#482][482]) - **Breaking change**: the listener methods `onFocusStart` and `onFocusEnd` are now called `onAutoFocusStart` and `onAutoFocusEnd`. ([#484][484]) @@ -61,4 +62,5 @@ This is the first beta release. For changes with respect to v1, please take a lo [435]: https://github.com/natario1/CameraView/pull/435 [477]: https://github.com/natario1/CameraView/pull/477 [482]: https://github.com/natario1/CameraView/pull/482 -[484]: https://github.com/natario1/CameraView/pull/484 \ No newline at end of file +[484]: https://github.com/natario1/CameraView/pull/484 +[490]: https://github.com/natario1/CameraView/pull/490 \ No newline at end of file diff --git a/docs/_posts/2018-12-20-previews.md b/docs/_posts/2018-12-20-previews.md index 3df4ba44..5e185e9f 100644 --- a/docs/_posts/2018-12-20-previews.md +++ b/docs/_posts/2018-12-20-previews.md @@ -1,27 +1,45 @@ --- layout: page -title: "Previews" -subtitle: "Camera preview implementations" -description: "Camera preview implementations" +title: "Engine and previews" +subtitle: "Camera engine and preview implementations" +description: "Camera engine and preview implementations" category: docs order: 6 date: 2018-12-20 21:58:16 disqus: 1 --- +### Engine + +CameraView can interact with the camera sensor through the old Android interface typically referred +as `CAMERA1`, and more recently, also through the more modern interface called `CAMERA2`, for API level 21 (Lollipop). + +Being more recent, the latter received less testing and feedback. As such, to enable it, you +are required to also set the experimental flag on: `app:cameraExperimental="true"`. On devices older +than Lollipop, the engine will always be `Engine.CAMERA1`. + +|Engine|API Level|Info| +|------|---------|----| +|`Engine.CAMERA1`|All|Highly tested and reliable. Currently supports the full set of features.| +|`Engine.CAMERA2`|API 21+|Experimental, but will be the key focus for the future. New controls might be available only for this engine.| + + +### Previews + CameraView supports different types of previews, configurable either through the `cameraPreview` XML attribute or programmatically with the `Preview` control class. -This defaults to the new `GL_SURFACE` and it is highly recommended that you do not change this -to use all the features available. However, experienced user might prefer a different solution. +All previews are supported in all conditions, regardless, for example, of the `Engine` that you +choose. -### Options +This parameter defaults to the OpenGL `GL_SURFACE` and it is highly recommended that you do not change this +to use all the features available. However, experienced user might prefer a different solution. |Preview|Backed by|Info| |-------|---------|----| -|`Preview.SURFACE`|A `SurfaceView`|This might be better for battery, but will not work well (AFAIR) with dynamic layout changes and similar things. No support for video snapshots.| +|`Preview.SURFACE`|A `SurfaceView`|Can be good for battery, but will not work well with dynamic layout changes and similar things. No support for video snapshots.| |`Preview.TEXTURE`|A `TextureView`|Better. Requires hardware acceleration. No support for video snapshots.| -|`Preview.GL_SURFACE`|A `GLSurfaceView`|Supports video snapshots. Might support GL real time filters in the future.| +|`Preview.GL_SURFACE`|A `GLSurfaceView`|Recommended. Supports video snapshots. Might support GL real time filters in the future.| The GL surface, as an extra benefit, has a much more efficient way of capturing picture snapshots, that avoids OOM errors, rotating the image on the fly, reading EXIF, and other horrible things belonging to v1. @@ -32,6 +50,7 @@ These picture snapshots will also work while taking videos. ```xml ``` @@ -40,6 +59,9 @@ These picture snapshots will also work while taking videos. The preview method should only be called once and if the `CameraView` was never added to a window, for example if you just created it programmatically. Otherwise, it has no effect. +The engine method should only be called when the `CameraView` is closed. Otherwise, it has no effect. + |Method|Description| |------|-----------| |`setPreview(Preview)`|Sets the preview implementation.| +|`setEngine(Engine)`|Sets the engine implementation.| diff --git a/docs/index.md b/docs/index.md index 2ddd704a..8df56286 100644 --- a/docs/index.md +++ b/docs/index.md @@ -10,13 +10,14 @@ addressing most of the common issues and needs, and still leaving you with flexi - Fast & reliable - Gestures support +- Camera1 or Camera2 powered engine - Frame processing support - OpenGL powered preview - Take high-quality content with `takePicture` and `takeVideo` - Take super-fast snapshots with `takePictureSnapshot` and `takeVideoSnapshot` - Smart sizing: create a `CameraView` of any size - Control HDR, flash, zoom, white balance, exposure, location, grid drawing & more -- Lightweight: the only dep. is support `ExifInterface` +- Lightweight - Works down to API level 15 - Well tested