use of de.serviceflow.frankenstein.vf.global.LR2VR180 in project Frankenstein by olir.
the class ConfigurationSceneController method doneButtonPressed.
@FXML
public void doneButtonPressed(ActionEvent event) {
List<VideoFilter> filters = configuration.getFilters();
filters.clear();
if (rVideoFileInput.isSelected()) {
configuration.setSource(new VideoInput(configuration.getInputVideo()));
configuration.doInput = true;
} else if (rSlideshowGenerator.isSelected()) {
configuration.setSource(new SlideShowInput(configuration.getInputDir()));
filters.add((VideoFilter) configuration.getSource());
} else if (rTestVideoGenerator.isSelected()) {
configuration.setSource(new TestImageInput(configuration.testScreenWidth, configuration.testScreenHeight));
filters.add((VideoFilter) configuration.getSource());
} else if (rCameraInput.isSelected()) {
configuration.setSource(new CameraInput(0));
} else if (rStreamInput.isSelected()) {
configuration.setSource(new StreamInput(configuration.getInputStreamURL(), configuration.getRecordingVideo()));
configuration.doInput = true;
} else {
throw new Error("No Input Method.");
}
if (rAnaglyph.isSelected())
filters.add(new Anaglyph2LR(configuration.anaglyphKeepWidth ? Anaglyph2LR.KEEP_WIDTH : Anaglyph2LR.DOUBLE_WIDTH));
if (rOverUnder.isSelected())
filters.add(new OU2LR(configuration.ouAdjustSize ? OU2LR.ADJUST_SIZE : OU2LR.REDUCE_SIZE));
if (rDelay.isSelected())
filters.add(new LDelay(configuration.delayLeft));
if (rCloneLR.isSelected())
filters.add(new CloneLR());
if (rSwapLR.isSelected())
filters.add(new RL2LR());
if (rVRConverter.isSelected())
filters.add(new LR2VR180(configuration.vrModeShrinkOnly, configuration.vrModeShrinkFactor));
configuration.doOutput = rVideoFileOutput.isSelected();
if (configuration.doOutput) {
filters.add(new OutputSizeLimiter(2880));
}
main.showProcessing(configuration);
}
Aggregations