New versions are released through GitHub, so the reference page is the GitHub Releases page.
Starting from 2.4.0, you can now support development through the GitHub Sponsors program. Companies can share a tiny part of their revenue and get private support hours in return. Thanks!
https://github.com/natario1/CameraView/compare/v2.7.1...v2.7.2
https://github.com/natario1/CameraView/compare/v2.7.0...v2.7.1
https://github.com/natario1/CameraView/compare/v2.6.4...v2.7.0
https://github.com/natario1/CameraView/compare/v2.6.3...v2.6.4
setAudioCodec and app:cameraAudioCodec to choose the audio encoding format, thanks to @EverydayPineapple (#861)setLifecycleOwner is now nullable and will unbind the lifecycle, thanks to @Namazed (#798)CameraPreview APIs are much more friendly for subclassing (#816)https://github.com/natario1/CameraView/compare/v2.6.2...v2.6.3
frame.getRotationToUser() and frame.getRotationToView() APIs to help with processing vs. rendering (#745)cameraPreviewFrameRateExact="true|false" to tell whether the desired preview frame rate should be as exact as possible, thanks to [@hualong-shen][hualong-shenn] (#754)CameraLogger is now thread safe, thanks to @Namazed (#779)setRequestPermissions() that matches the XML attribute, thanks to @Namazed (#775)https://github.com/natario1/CameraView/compare/v2.6.1...v2.6.2
takeVideo(FileDescriptor) for file descriptors, thanks to @sewar (#732)https://github.com/natario1/CameraView/compare/v2.6.0...v2.6.1
startAutoFocus(RectF) will start 3A metering to a given rect instead of a spot (#724)app:cameraRequestPermissions flag to disable the automatic activity permission request (#718)setFrameProcessingPoolSize() to set the number of Frame instances that can exist at any given time. Useful in conjunction with setFrameProcessingExecutors(). Please read docs (#716)setFrameProcessingExecutors() to set the number of threads involved in frame processing. Useful in conjunction with setFrameProcessingPoolSize(). Please read docs (#716)https://github.com/natario1/CameraView/compare/v2.5.0...v2.6.0
setPictureFormat() and CameraOptions.getSupportedPictureFormats(). Contains a breaking change: PictureResult.getFormat() is not an integer anymore but rather a PictureFormat. This API had no real purpose so this might not affect you (#691)setFrameProcessingMaxWidth() and setFrameProcessingMaxHeight(). This can improve processing performance (#691)setFrameProcessingFormat() and CameraOptions.getSupportedFrameProcessingFormats() (#691)The new frame processing approach will force you to update your code, because Frame.getData() is
not a a byte[] anymore. The class of this object now depends on the engine being used. You can use
frame.getDataClass() (or instanceof) to check.
If you are using the Camera1 engine, you will still receive byte arrays, so you can just cast frame.getData() to
byte[], assuming it’s not done already by the compiler.
If you are using the experimental Camera2 engine, you will receive android.media.Images instead.
This object will likely be accepted by frame processing libraries, and also offers access to raw byte data.
This change greatly improved the FPS performance, which is what matters the most at the library level.
https://github.com/natario1/CameraView/compare/v2.4.0...v2.5.0
previewFrameRate. Controls preview FPS, snapshot FPS, processor FPS, thanks to @vaibhavbhandula (#653)previewFrameRate for Camera1 (#661)https://github.com/natario1/CameraView/compare/v2.3.1...v2.4.0
onVideoRecordingStart() thanks to @agrawalsuneet (#632)GL_SURFACE (#630)https://github.com/natario1/CameraView/compare/v2.3.0...v2.3.1
startAutoFocus is much more powerful and does 3A metering (AF, AE, AWB) (#574)setPictureMetering(boolean) decides whether to do metering before takePicture(). Defaults to true to improve quality. (#580)setPictureSnapshotMetering(boolean) decides whether to do metering before takePictureSnapshot(). Defaults to false to improve latency. However, you can set this to true to greatly improve the snapshot quality, for example to support Flash. (#580)startAutoFocus or the focus gesture (#574)onAutoFocusEnd is now guaranteed to be called (#574)Filter interface signatures now accept timestamps for animations (#588)addView() and removeView() to add or remove overlays at runtime (see docs) (#588)https://github.com/natario1/CameraView/compare/v2.2.0...v2.3.0
SimpleFilter class accepts a fragment shader in the constructor (#552)MultiFilter to apply more than one filter at the same time (#559)takeVideoSnapshot not working unless you set a max duration (#551)takeVideo crashing on Camera2 LEGACY devices (#551)CameraView appearance in the layout editor (#564)https://github.com/natario1/CameraView/compare/v2.1.0...v2.2.0
This release adds experimental support for real-time filters thanks to @agrawalsuneet. Please read the documentation page for usage instructions.
https://github.com/natario1/CameraView/compare/v2.0.0...v2.1.0
https://github.com/natario1/CameraView/compare/v2.0.0-rc2...v2.0.0
https://github.com/natario1/CameraView/compare/v2.0.0-rc1...v2.0.0-rc2
This is likely to be the last release before v2.0.0.
onVideoRecordingStart() to be notified when video recording starts, thanks to @agrawalsuneet (#498)onVideoRecordingEnd() to be notified when video recording ends (#506)Audio.MONO and Audio.STEREO to control the channel count for videos and video snapshots (#506)cameraUseDeviceOrientation to choose whether picture and video outputs should consider the device orientation or not (#497)https://github.com/natario1/CameraView/compare/v2.0.0-beta06...v2.0.0-rc1
cameraExperimental="true" and cameraEngine="camera2" to test this out. (#490)onFocusStart and onFocusEnd are now called onAutoFocusStart and onAutoFocusEnd. (#484)focus and focusWithMarker have been removed and replaced by autoFocus, which shows no marker. (#484)setAutoFocusMarker() lets you choose your own marker. (#484)If you were using focus, just switch to autoFocus.
If you were using focusWithMarker, you can add back the old marker.
https://github.com/natario1/CameraView/compare/v2.0.0-beta05...v2.0.0-beta06
FrameProcessor freeze and release behavior, was broken (#431)setAutoFocusResetDelay to control the delay to reset the focus after autofocus was performed, thanks to @cneuwirt (#435)https://github.com/natario1/CameraView/compare/v2.0.0-beta04...v2.0.0-beta05
setSnapshotMaxWidth and setSnapshotMaxHeight (#393). You can now have a good looking preview but still take low-res snapshots using these snapshot constraints. Before this, the two sizes were coupled.https://github.com/natario1/CameraView/compare/v2.0.0-beta03...v2.0.0-beta04
https://github.com/natario1/CameraView/compare/v2.0.0-beta02...v2.0.0-beta03
PictureResult.getFacing() and VideoResult.getFacing() (#360)https://github.com/natario1/CameraView/compare/v2.0.0-beta01...v2.0.0-beta02
This is the first beta release. For changes with respect to v1, please take a look at the migration guide.
This is the last release before v2.
https://github.com/natario1/CameraView/compare/v1.6.0...v1.6.1
setLifecycleOwner instead of calling start, stop and destroy (#265)https://github.com/natario1/CameraView/compare/v1.5.1...v1.6.0
https://github.com/natario1/CameraView/compare/v1.5.0...v1.5.1
cameraVideoCodec (#174)cameraVideoMaxDuration (#172)https://github.com/natario1/CameraView/compare/v1.4.2...v1.5.0
videoMaxSize API and XML attribute, to set max size video in bytes, thanks to @chaitanyaraghav (#104)https://github.com/natario1/CameraView/compare/v1.4.1...v1.4.2
CameraOptions APIs: o.getSupportedPictureSizes() and o.getSupportedPictureAspectRatios() (#101)Most controls (video quality, hdr, grid, session type, audio, white balance, flash, facing) now inherit
from a base Control class (#105). This let us add new APIs:
CameraView.set(Control): sets the control to the given value, e.g. set(Flash.AUTO)CameraOptions.supports(Control): returns true if the control is supportedCameraOptions.getSupportedControls(Class<? extends Control>): returns list of supported controls of a given kindhttps://github.com/natario1/CameraView/compare/v1.4.0...v1.4.1
get methods (e.g., getWhiteBalance) might
not return the correct value while it is being changed. So don’t trust them right after you have changed the value.
Instead, always check the CameraOptions to see if the value you want is supported.CameraListener.onCameraError(CameraException).
At the moment, all exceptions there are unrecoverable. When the method is called, the camera is showing
a black preview. This is a good moment to show an error dialog to the user.
You can also try to start() again but that is not guaranteed to work.CameraView.setPictureSize() or through new XML attributes starting with cameraPictureSize.
Please refer to docs about it.toggleFacing. It was unreliable and will be removed.getCaptureSize. Use getPictureSize instead.https://github.com/natario1/CameraView/compare/v1.3.2...v1.4.0
https://github.com/natario1/CameraView/compare/v1.3.1...v1.3.2
https://github.com/natario1/CameraView/compare/v1.3.0...v1.3.1
https://github.com/natario1/CameraView/compare/v1.2.3...v1.3.0