Skip to content

Commit

Permalink
Merge pull request #69 from TH3steven/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Ettatabe committed Jun 3, 2016
2 parents e6f56ae + 09bf862 commit 4216b01
Show file tree
Hide file tree
Showing 46 changed files with 2,408 additions and 1,176 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
/.settings/
/bin/
/target/
/*.iml
/*.iml
.pmd
6 changes: 6 additions & 0 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>net.sourceforge.pmd.eclipse.plugin.pmdBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
<nature>net.sourceforge.pmd.eclipse.plugin.pmdNature</nature>
</natures>
</projectDescription>
354 changes: 354 additions & 0 deletions .ruleset

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ The software is made for the Windows operating system and might not work as inte

###IDE
This software can be developed with both Eclipse and IntelliJ, though they require a different process to set up.

###Note about preset creation/editing
For now, VLC is required to make the connection to the camera or to the mocked live feed. It is important to have the same VLC version as your java version, e.g. 32bit java requires 32bit VLC, and 64bit java requires 64bit VLC. Also, other systems than Windows are untested and might not work with the current implementation.
Binary file modified doc/Architecture Design.pdf
Binary file not shown.
Binary file added doc/Sprint plans/Sprintplan7.pdf
Binary file not shown.
Binary file not shown.
39 changes: 39 additions & 0 deletions pmd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="Custom ruleset"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd">

<description>
Custom rules for PMD.
</description>

<rule ref="rulesets/java/basic.xml"/>
<rule ref="rulesets/java/unusedcode.xml">
<exclude name="UnusedPrivateField"/>
<exclude name="UnusedFormalParameter"/>
</rule>
<rule ref="rulesets/java/imports.xml"/>
<rule ref="rulesets/java/strings.xml"/>
<rule ref="rulesets/java/codesize.xml">
<exclude name="CyclomaticComplexity"/>
<exclude name="ExcessiveClassLength"/>
<exclude name="ExcessivePublicCount"/>
<exclude name="TooManyFields"/>
<exclude name="TooManyMethods"/>
</rule>
<rule ref="rulesets/java/braces.xml"/>
<rule ref="rulesets/java/clone.xml">
<exclude name="ProperCloneImplementation"/>
</rule>
<rule ref="rulesets/java/empty.xml"/>
<rule ref="rulesets/java/junit.xml">
<exclude name="JUnitAssertionsShouldIncludeMessage"/>
<exclude name="JUnitTestContainsTooManyAsserts" />
</rule>
<rule ref="rulesets/java/junit.xml/JUnitTestContainsTooManyAsserts">
<properties>
<property name="maximumAsserts" value="5" />
</properties>
</rule>
</ruleset>
34 changes: 33 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>nl.tudelft</groupId>
<artifactId>Context-TFP</artifactId>
<version>0.5</version>
<version>0.6</version>
<name>Team Free Pizza</name>
<description>TU Delft Contextproject Multi-Media 2016 from Team Free Pizza</description>

Expand Down Expand Up @@ -77,6 +77,18 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>

Expand All @@ -92,6 +104,26 @@
<artifactId>mockito-core</artifactId>
<version>2.0.53-beta</version>
</dependency>
<dependency>
<groupId>uk.co.caprica</groupId>
<artifactId>vlcj</artifactId>
<version>3.10.1</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>4.2.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>4.2.2</version>
</dependency>
</dependencies>

<reporting>
Expand Down
30 changes: 24 additions & 6 deletions src/main/java/nl/tudelft/contextproject/ContextTFP.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@
package nl.tudelft.contextproject;

import javafx.application.Application;
import javafx.application.Platform;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;

import nl.tudelft.contextproject.camera.Camera;
import nl.tudelft.contextproject.camera.CameraSettings;
import nl.tudelft.contextproject.camera.LiveCameraConnection;
import nl.tudelft.contextproject.camera.MockedCameraConnection;
import nl.tudelft.contextproject.gui.MenuController;
import nl.tudelft.contextproject.presets.InstantPreset;
import nl.tudelft.contextproject.script.Script;
Expand Down Expand Up @@ -45,9 +47,11 @@ public class ContextTFP extends Application {
private Stage primaryStage;

@Override
public void start(Stage primaryStage) throws Exception {
this.primaryStage = primaryStage;
this.primaryStage.setTitle("TFP Camera Control");
public void start(Stage pStage) throws Exception {
primaryStage = pStage;
primaryStage.setTitle("TFP Camera Control");
primaryStage.minWidthProperty().set(800);
primaryStage.minHeightProperty().set(575);

// Create the script to be used by the application.
script = new Script(new ArrayList<Shot>());
Expand All @@ -60,6 +64,17 @@ public void start(Stage primaryStage) throws Exception {
Camera e = new Camera();
Camera f = new Camera();

LiveCameraConnection live = new LiveCameraConnection("192.168.0.13");
live.setUpConnection();
a.setConnection(live);

MockedCameraConnection mocked = new MockedCameraConnection();
b.setConnection(mocked);

MockedCameraConnection mocked2 = new MockedCameraConnection();
mocked2.setStreamLink("http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8");
c.setConnection(mocked2);

List<Camera> list = new ArrayList<Camera>();
list.addAll(Arrays.asList(a, b, c, d, e, f));

Expand All @@ -69,14 +84,13 @@ public void start(Stage primaryStage) throws Exception {
cam.addPreset(new InstantPreset(new CameraSettings(), 2, "awesome"));
cam.addPreset(new InstantPreset(new CameraSettings(), 3, "wuq"));
}
//

initRootLayout();
MenuController.show();
}

/**
* Initializes the root layout of the application.
* Initialises the root layout of the application.
*/
public void initRootLayout() {
try {
Expand All @@ -87,6 +101,10 @@ public void initRootLayout() {
Scene scene = new Scene(rootLayout);
primaryStage.setScene(scene);
primaryStage.show();
primaryStage.setOnCloseRequest(e -> {
Platform.exit();
System.exit(0);
});
} catch (IOException e) {
e.printStackTrace();
}
Expand Down
Loading

0 comments on commit 4216b01

Please sign in to comment.