Control commit
This commit is contained in:
parent
35a3f6cba3
commit
986cf8cf9a
1 changed files with 6 additions and 9 deletions
|
@ -131,8 +131,6 @@ public class SegpassCamera {
|
|||
*/
|
||||
private ImageReader mImageReader;
|
||||
|
||||
private ImageReader mCaptureImageReader;
|
||||
|
||||
/**
|
||||
* This is the resulting image encoded to Base64
|
||||
*/
|
||||
|
@ -250,12 +248,11 @@ public class SegpassCamera {
|
|||
|
||||
/**
|
||||
* This a callback object for the {@link ImageReader}. "onImageAvailable" will be called when a
|
||||
* still image is ready to be saved.
|
||||
* still image is ready to be saved (or sent to be encoded to base64)
|
||||
*/
|
||||
private final ImageReader.OnImageAvailableListener mOnImageAvailableListener = reader -> {
|
||||
// Post the image to the thread so it can be converted to base64
|
||||
private final ImageReader.OnImageAvailableListener mOnImageAvailableListener = reader ->
|
||||
mBackgroundHandler.post(new ImageSaver(reader.acquireNextImage(), base64Callback));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Starts a background thread and its {@link Handler}.
|
||||
|
@ -629,7 +626,7 @@ public class SegpassCamera {
|
|||
(float) viewHeight / mPreviewSize.getHeight(),
|
||||
(float) viewWidth / mPreviewSize.getWidth());
|
||||
matrix.postScale(scale, scale, centerX, centerY);
|
||||
matrix.postRotate(90L * (rotation - 2), centerX, centerY);
|
||||
matrix.postRotate(90f * (rotation - 2), centerX, centerY);
|
||||
} else if (Surface.ROTATION_180 == rotation) {
|
||||
matrix.postRotate(180, centerX, centerY);
|
||||
}
|
||||
|
@ -664,7 +661,7 @@ public class SegpassCamera {
|
|||
}
|
||||
|
||||
// Set a new instance of ImageReader
|
||||
mCaptureImageReader = getCaptureImageReader(width, height);
|
||||
ImageReader mCaptureImageReader = getCaptureImageReader(width, height);
|
||||
|
||||
// Set the output surfaces (from where the picture is taken)
|
||||
List<Surface> outputSurfaces = new ArrayList<>(2);
|
||||
|
|
Loading…
Reference in a new issue