-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Importing the initial implementation for hero 3 plus cameras only.
- Loading branch information
Luis Topiltzin Dominguez
authored and
Luis Topiltzin Dominguez
committed
Sep 17, 2015
0 parents
commit 8161cc3
Showing
49 changed files
with
1,858 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>gopro</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.m2e.core.maven2Builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
eclipse.preferences.version=1 | ||
encoding//src/main/java=UTF-8 | ||
encoding//src/test/java=UTF-8 | ||
encoding/<project>=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve | ||
org.eclipse.jdt.core.compiler.compliance=1.8 | ||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate | ||
org.eclipse.jdt.core.compiler.debug.localVariable=generate | ||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.source=1.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
resolveWorkspaceProjects=true | ||
version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.topiltzin.shibumi</groupId> | ||
<artifactId>gopro</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
|
||
<name>gopro</name> | ||
<url>http://maven.apache.org</url> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<java-version>1.8</java-version> | ||
<org.apache.httpclient>4.2.1</org.apache.httpclient> | ||
</properties> | ||
|
||
<dependencies> | ||
|
||
<!-- HTTP client --> | ||
<dependency> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpclient</artifactId> | ||
<version>${org.apache.httpclient}</version> | ||
</dependency> | ||
|
||
<!-- Testing --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.8.2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-all</artifactId> | ||
<version>1.9.5</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
package org.topiltzin.shibumi.gopro; | ||
|
||
import org.topiltzin.shibumi.gopro.client.GoProClient; | ||
import org.topiltzin.shibumi.gopro.client.impl.GoProClientPojoImpl; | ||
import org.topiltzin.shibumi.gopro.dto.GoProCamera; | ||
import org.topiltzin.shibumi.gopro.dto.Mode; | ||
import org.topiltzin.shibumi.gopro.exception.GoProException; | ||
|
||
public class App { | ||
|
||
public static void main(String[] args) throws GoProException { | ||
|
||
GoProClient goProClient = new GoProClientPojoImpl(); | ||
GoProCamera goProCamera = new GoProCamera("goprotopy"); | ||
|
||
String dummyCommand = "http://10.5.5.9/bacpac/se?t=goprotopy"; | ||
// TEST DUMMY OR DIRECT COMMAND | ||
goProClient.executeCommandDummy(dummyCommand); | ||
|
||
// POWER | ||
// goProClient.turnOff(goProCamera); | ||
goProClient.turnOn(goProCamera); | ||
// goProClient.changeMode(goProCamera); | ||
// goProClient.changeMode(goProCamera, Mode.BURST); | ||
// goProClient.changeMode(goProCamera, Mode.PHOTO); | ||
// goProClient.changeMode(goProCamera, Mode.CAMERA); | ||
|
||
// CAPTURE | ||
// goProClient.stopCapture(goProCamera); | ||
// goProClient.startCapture(goProCamera); | ||
|
||
// PREVIEW | ||
// goProClient.stopPreview(goProCamera); | ||
// goProClient.startPreview(goProCamera); | ||
|
||
|
||
// AUTO POWER OFF | ||
// goProClient.setAutoPowerNever(goProCamera); | ||
// goProClient.setAutoPower60Sec(goProCamera); | ||
// goProClient.setAutoPower120Sec(goProCamera); | ||
// goProClient.setAutoPower300Sec(goProCamera); | ||
|
||
// BEEP SOUND VOLUME | ||
// goProClient.setNoBeep(goProCamera); | ||
// goProClient.setBeep70(goProCamera); | ||
// goProClient.setBeep100(goProCamera); | ||
|
||
// BURST RATE | ||
// goProClient.setBurstRate3Over1Sec(goProCamera); | ||
// goProClient.setBurstRate5Over1Sec(goProCamera); | ||
// goProClient.setBurstRate10Over1Sec(goProCamera); | ||
// goProClient.setBurstRate10Over2Sec(goProCamera); //no | ||
// goProClient.setBurstRate30Over1Sec(goProCamera); //no | ||
// goProClient.setBurstRate30Over2Sec(goProCamera); //no | ||
// goProClient.setBurstRate30Over3Sec(goProCamera); //no | ||
|
||
// CAMERA MODE | ||
// goProClient.setVideoMode(goProCamera); | ||
// goProClient.setPhotoMode(goProCamera); | ||
// goProClient.setBurstMode(goProCamera); | ||
// goProClient.setTimelapseMode(goProCamera); | ||
// goProClient.setTimerMode(goProCamera); //no supported hero 3+ | ||
|
||
// VIDEO MODE | ||
// goProClient.setCameraVideoModeNTSC(goProCamera); | ||
// goProClient.setCameraVideoModePAL(goProCamera); | ||
|
||
// CONTINUOUS SHOT | ||
// goProClient.setPhotoMode(goProCamera); // to be able to see it on screen | ||
// goProClient.setContinuousShotSingle(goProCamera); | ||
// goProClient.setContinuousShot3PerSec(goProCamera); | ||
// goProClient.setContinuousShot5PerSec(goProCamera); // resets camera | ||
// goProClient.setContinuousShot10PerSec(goProCamera); // resets camera | ||
|
||
// DEFAULT MODE | ||
// goProClient.setDefaultModeVideo(goProCamera); | ||
// goProClient.setDefaultModePhoto(goProCamera); | ||
// goProClient.setDefaultModeBurst(goProCamera); | ||
// goProClient.setDefaultModeTimeLapse(goProCamera); | ||
|
||
// FIELD OF VIEW | ||
// requires certain types of resolution per FoV | ||
// goProClient.setFieldOfViewWide(goProCamera); | ||
// goProClient.setFieldOfViewMeduim(goProCamera); | ||
// goProClient.setFieldOfViewNarrow(goProCamera); | ||
|
||
// FRAMES PER SECOND | ||
// goProClient.setFramesPerSecond12(goProCamera); | ||
// goProClient.setFramesPerSecond15(goProCamera); | ||
// goProClient.setFramesPerSecond24(goProCamera); | ||
// goProClient.setFramesPerSecond25(goProCamera); | ||
// goProClient.setFramesPerSecond30(goProCamera); | ||
// goProClient.setFramesPerSecond48(goProCamera); | ||
// goProClient.setFramesPerSecond50(goProCamera); | ||
// goProClient.setFramesPerSecond60(goProCamera); | ||
// goProClient.setFramesPerSecond100(goProCamera); | ||
// goProClient.setFramesPerSecond120(goProCamera); | ||
// goProClient.setFramesPerSecond240(goProCamera); | ||
|
||
// LED BLINK | ||
// goProClient.turnOn(goProCamera); | ||
// goProClient.setLEDNoBlink(goProCamera); | ||
// goProClient.setLEDBlink2(goProCamera); | ||
// goProClient.setLEDBlink4(goProCamera); | ||
|
||
// LOCALIZATION | ||
// goProClient.stopLocalization(goProCamera); | ||
// goProClient.startLocalization(goProCamera); | ||
|
||
// LOOP VIDEO | ||
// goProClient.setLoopVideoOff(goProCamera); | ||
// goProClient.setLoopVideo5Min(goProCamera); | ||
// goProClient.setLoopVideo20Min(goProCamera); | ||
// goProClient.setLoopVideo60Min(goProCamera); | ||
// goProClient.setLoopVideoMax(goProCamera); | ||
|
||
// ORIENTATION | ||
// goProClient.setOrientationUp(goProCamera); | ||
// goProClient.setOrientationDown(goProCamera); | ||
|
||
// PHOTO RESOLUTION | ||
// goProClient.setPhotoResolution11MPW(goProCamera); | ||
// goProClient.setPhotoResolution8MPW(goProCamera); | ||
// goProClient.setPhotoResolution5MPW(goProCamera); | ||
// goProClient.setPhotoResolution3MPW(goProCamera); | ||
|
||
// PROTUNE | ||
// goProClient.setProtuneOff(goProCamera); | ||
// goProClient.setProtuneOn(goProCamera); | ||
|
||
// SPOT METER | ||
// goProClient.setSpotMeterOff(goProCamera); | ||
// goProClient.setSpotMeterOn(goProCamera); | ||
|
||
// TIMELAPSE INTERVAL | ||
// goProClient.setTimelapseInterval05Sec(goProCamera); | ||
// goProClient.setTimelapseInterval1Sec(goProCamera); | ||
// goProClient.setTimelapseInterval5Sec(goProCamera); | ||
// goProClient.setTimelapseInterval10Sec(goProCamera); | ||
// goProClient.setTimelapseInterval30Sec(goProCamera); | ||
// goProClient.setTimelapseInterval60Sec(goProCamera); | ||
|
||
// VIDEO RESOLUTION | ||
// goProClient.setVideoResolutionWVGA60(goProCamera); | ||
// goProClient.setVideoResolutionWVGA120(goProCamera); | ||
// goProClient.setVideoResolution720_30(goProCamera); | ||
// goProClient.setVideoResolution720_60(goProCamera); | ||
// goProClient.setVideoResolution960_30(goProCamera); | ||
// goProClient.setVideoResolution960_60(goProCamera); | ||
// goProClient.setVideoResolution1080_30(goProCamera); | ||
// goProClient.setVideoResolutionProtune1080_30(goProCamera); | ||
// goProClient.setVideoResolutionProtune1080_24(goProCamera); | ||
// goProClient.setVideoResolutionProtune960_60(goProCamera); | ||
// goProClient.setVideoResolutionProtune1080_25(goProCamera); | ||
|
||
// WHITE BALANCE (ONLY IF PRO-TUNE IS ON) | ||
// goProClient.setWhiteBalanceProtuneAuto(goProCamera); | ||
// goProClient.setWhiteBalanceProtune3000K(goProCamera); | ||
// goProClient.setWhiteBalanceProtune5000K(goProCamera); | ||
// goProClient.setWhiteBalanceProtune6500K(goProCamera); | ||
// goProClient.setWhiteBalanceProtuneCamRaw(goProCamera); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package org.topiltzin.shibumi.gopro; | ||
|
||
import org.topiltzin.shibumi.gopro.client.GoProClient; | ||
import org.topiltzin.shibumi.gopro.client.impl.GoProClientPojoImpl; | ||
import org.topiltzin.shibumi.gopro.dto.GoProCamera; | ||
import org.topiltzin.shibumi.gopro.exception.GoProException; | ||
|
||
public class GoPro { | ||
|
||
public static void main(String[] args) throws GoProException, InterruptedException { | ||
|
||
GoProClient goProClient = new GoProClientPojoImpl(); | ||
GoProCamera goProCamera = new GoProCamera("goprotopy"); | ||
|
||
/** | ||
* This example executes this sequence: | ||
* 1. CAMERA ON | ||
* 2. START RECORDING | ||
* 3. STOP RECORDING | ||
* 4. CAMERA OFF | ||
* | ||
*/ | ||
|
||
System.out.println("1. Turning camera on"); | ||
goProClient.turnOn(goProCamera); | ||
Thread.sleep(3000); | ||
|
||
System.out.println("2. Start recording"); | ||
goProClient.startCapture(goProCamera); | ||
Thread.sleep(5000); | ||
|
||
System.out.println("3. Stop recording"); | ||
goProClient.stopCapture(goProCamera); | ||
Thread.sleep(3000); | ||
|
||
System.out.println("4. Turning camera off"); | ||
goProClient.turnOff(goProCamera); | ||
|
||
} | ||
|
||
} |
34 changes: 34 additions & 0 deletions
34
src/main/java/org/topiltzin/shibumi/gopro/client/GoProCameraMode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.topiltzin.shibumi.gopro.client; | ||
|
||
import org.topiltzin.shibumi.gopro.dto.GoProCamera; | ||
import org.topiltzin.shibumi.gopro.exception.GoProException; | ||
|
||
public interface GoProCameraMode { | ||
|
||
// GoPro Camera Mode | ||
void setVideoMode(GoProCamera goProCamera) throws GoProException; | ||
|
||
void setPhotoMode(GoProCamera goProCamera) throws GoProException; | ||
|
||
void setBurstMode(GoProCamera goProCamera) throws GoProException; | ||
|
||
void setTimelapseMode(GoProCamera goProCamera) throws GoProException; | ||
|
||
void setTimerMode(GoProCamera goProCamera) throws GoProException; | ||
|
||
// GoPro Camera Video Mode | ||
|
||
void setCameraVideoModeNTSC(GoProCamera goProCamera) throws GoProException; | ||
|
||
void setCameraVideoModePAL(GoProCamera goProCamera) throws GoProException; | ||
|
||
// GoPro Default Mode | ||
void setDefaultModeVideo(GoProCamera goProCamera) throws GoProException; | ||
|
||
void setDefaultModePhoto(GoProCamera goProCamera) throws GoProException; | ||
|
||
void setDefaultModeBurst(GoProCamera goProCamera) throws GoProException; | ||
|
||
void setDefaultModeTimeLapse(GoProCamera goProCamera) throws GoProException; | ||
|
||
} |
Oops, something went wrong.