1 package net.osdn.gokigen.gr2control.camera.ricohgr2.operation;
3 import android.support.annotation.NonNull;
5 import net.osdn.gokigen.gr2control.camera.ICameraStatus;
6 import net.osdn.gokigen.gr2control.camera.ICaptureControl;
7 import net.osdn.gokigen.gr2control.camera.ricohgr2.operation.takepicture.RicohGr2MovieShotControl;
8 import net.osdn.gokigen.gr2control.camera.ricohgr2.operation.takepicture.RicohGr2SingleShotControl;
9 import net.osdn.gokigen.gr2control.liveview.IAutoFocusFrameDisplay;
15 public class RicohGr2CameraCaptureControl implements ICaptureControl
17 private final RicohGr2SingleShotControl singleShotControl;
18 private final RicohGr2MovieShotControl movieShotControl;
19 private final ICameraStatus cameraStatus;
20 private final boolean useGrCommand;
21 private final boolean captureAfterAf;
27 public RicohGr2CameraCaptureControl(boolean useGrCommand, boolean captureAfterAf, @NonNull IAutoFocusFrameDisplay frameDisplayer, @NonNull ICameraStatus cameraStatus)
29 this.useGrCommand = useGrCommand;
30 this.captureAfterAf = captureAfterAf;
31 this.cameraStatus = cameraStatus;
32 singleShotControl = new RicohGr2SingleShotControl(frameDisplayer);
33 movieShotControl = new RicohGr2MovieShotControl(frameDisplayer);
41 public void doCapture(int kind)
45 if (cameraStatus.getStatus(ICameraStatus.TAKE_MODE).contains(ICameraStatus.TAKE_MODE_MOVIE))
47 movieShotControl.toggleMovie();
51 singleShotControl.singleShot(useGrCommand, captureAfterAf);