Revert useless logs

pull/97/head
Mattia Iavarone 8 years ago
parent 519a39bee7
commit 49c222419d
  1. 19
      cameraview/src/main/java/com/otaliastudios/cameraview/Camera1.java

@ -475,15 +475,14 @@ class Camera1 extends CameraController implements Camera.PreviewCallback, Camera
@Override @Override
void capturePicture() { void capturePicture() {
LOG.v("capturePicture: scheduling");
schedule(null, true, new Runnable() { schedule(null, true, new Runnable() {
@Override @Override
public void run() { public void run() {
LOG.v("capturePicture: performing.", mIsCapturingImage);
if (mIsCapturingImage) return; if (mIsCapturingImage) return;
if (mSessionType == SessionType.VIDEO && mIsCapturingVideo) { if (mIsCapturingVideo && !mOptions.isVideoSnapshotSupported()) return;
if (!mOptions.isVideoSnapshotSupported()) return;
}
// Set boolean to wait for image callback
mIsCapturingImage = true; mIsCapturingImage = true;
final int exifRotation = computeExifRotation(); final int exifRotation = computeExifRotation();
final boolean exifFlip = computeExifFlip(); final boolean exifFlip = computeExifFlip();
@ -521,11 +520,11 @@ class Camera1 extends CameraController implements Camera.PreviewCallback, Camera
@Override @Override
void captureSnapshot() { void captureSnapshot() {
LOG.i("captureSnapshot: scheduling"); LOG.v("captureSnapshot: scheduling");
schedule(null, true, new Runnable() { schedule(null, true, new Runnable() {
@Override @Override
public void run() { public void run() {
LOG.i("captureSnapshot: performing.", mIsCapturingImage); LOG.v("captureSnapshot: performing.", mIsCapturingImage);
if (mIsCapturingImage) return; if (mIsCapturingImage) return;
// This won't work while capturing a video. // This won't work while capturing a video.
// Switch to capturePicture. // Switch to capturePicture.
@ -534,11 +533,9 @@ class Camera1 extends CameraController implements Camera.PreviewCallback, Camera
return; return;
} }
mIsCapturingImage = true; mIsCapturingImage = true;
LOG.i("captureSnapshot: add preview callback.");
mCamera.setOneShotPreviewCallback(new Camera.PreviewCallback() { mCamera.setOneShotPreviewCallback(new Camera.PreviewCallback() {
@Override @Override
public void onPreviewFrame(final byte[] data, Camera camera) { public void onPreviewFrame(final byte[] data, Camera camera) {
LOG.i("captureSnapshot: onShutter.");
mCameraCallbacks.onShutter(true); mCameraCallbacks.onShutter(true);
// Got to rotate the preview frame, since byte[] data here does not include // Got to rotate the preview frame, since byte[] data here does not include
@ -553,17 +550,15 @@ class Camera1 extends CameraController implements Camera.PreviewCallback, Camera
final int postWidth = flip ? preHeight : preWidth; final int postWidth = flip ? preHeight : preWidth;
final int postHeight = flip ? preWidth : preHeight; final int postHeight = flip ? preWidth : preHeight;
final int format = mPreviewFormat; final int format = mPreviewFormat;
LOG.i("captureSnapshot: to worker handler.");
WorkerHandler.run(new Runnable() { WorkerHandler.run(new Runnable() {
@Override @Override
public void run() { public void run() {
LOG.i("captureSnapshot: rotating."); LOG.v("captureSnapshot: rotating.");
final boolean consistentWithView = (sensorToDevice + sensorToDisplay + 180) % 180 == 0; final boolean consistentWithView = (sensorToDevice + sensorToDisplay + 180) % 180 == 0;
byte[] rotatedData = RotationHelper.rotate(data, preWidth, preHeight, sensorToDevice); byte[] rotatedData = RotationHelper.rotate(data, preWidth, preHeight, sensorToDevice);
LOG.i("captureSnapshot: rotated."); LOG.v("captureSnapshot: rotated.");
YuvImage yuv = new YuvImage(rotatedData, format, postWidth, postHeight, null); YuvImage yuv = new YuvImage(rotatedData, format, postWidth, postHeight, null);
LOG.i("captureSnapshot: dispatching to listeners.");
mCameraCallbacks.processSnapshot(yuv, consistentWithView, exifFlip); mCameraCallbacks.processSnapshot(yuv, consistentWithView, exifFlip);
mIsCapturingImage = false; mIsCapturingImage = false;
} }

Loading…
Cancel
Save