edsdk.api.commands.LiveViewCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of edsdk4j Show documentation
Show all versions of edsdk4j Show documentation
Canon EDSDK Software Development Kit Java Wrapper
The newest version!
package edsdk.api.commands;
import java.awt.image.BufferedImage;
import edsdk.api.CanonCommand;
import edsdk.utils.CanonUtils;
/**
* Performs a live view command on the camera.
*
* Copyright © 2014 Hansi Raber , Ananta Palani
*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*
* @author hansi
* @author Ananta Palani
*
*/
//TODO: probably a bad idea that Begin/End/Download are static
public class LiveViewCommand {
public static class Begin extends CanonCommand {
@Override
public void run() {
setResult( CanonUtils.beginLiveView( camera.getEdsCamera() ) );
}
}
public static class End extends CanonCommand {
@Override
public void run() {
setResult( CanonUtils.endLiveView( camera.getEdsCamera() ) );
}
}
public static class Download extends CanonCommand {
@Override
public void run() {
setResult( CanonUtils.getLiveViewImage( camera.getEdsCamera() ) );
}
}
public static class IsLiveViewEnabled extends CanonCommand {
@Override
public void run() {
setResult( CanonUtils.isLiveViewEnabled( camera.getEdsCamera(), false ) );
}
}
public static class IsLiveViewActive extends CanonCommand {
@Override
public void run() {
setResult( CanonUtils.isLiveViewEnabled( camera.getEdsCamera(), true ) );
}
}
}