Search in sources :

Example 1 with OutputSizeLimiter

use of de.serviceflow.frankenstein.vf.global.OutputSizeLimiter 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);
}
Also used : TestImageInput(de.serviceflow.frankenstein.vf.input.TestImageInput) VideoInput(de.serviceflow.frankenstein.vf.input.VideoInput) CameraInput(de.serviceflow.frankenstein.vf.input.CameraInput) LDelay(de.serviceflow.frankenstein.vf.global.LDelay) LR2VR180(de.serviceflow.frankenstein.vf.global.LR2VR180) OU2LR(de.serviceflow.frankenstein.vf.global.OU2LR) VideoFilter(de.serviceflow.frankenstein.vf.VideoFilter) StreamInput(de.serviceflow.frankenstein.vf.input.StreamInput) RL2LR(de.serviceflow.frankenstein.vf.global.RL2LR) OutputSizeLimiter(de.serviceflow.frankenstein.vf.global.OutputSizeLimiter) Anaglyph2LR(de.serviceflow.frankenstein.vf.global.Anaglyph2LR) SlideShowInput(de.serviceflow.frankenstein.vf.input.SlideShowInput) CloneLR(de.serviceflow.frankenstein.vf.global.CloneLR) FXML(javafx.fxml.FXML)

Aggregations

VideoFilter (de.serviceflow.frankenstein.vf.VideoFilter)1 Anaglyph2LR (de.serviceflow.frankenstein.vf.global.Anaglyph2LR)1 CloneLR (de.serviceflow.frankenstein.vf.global.CloneLR)1 LDelay (de.serviceflow.frankenstein.vf.global.LDelay)1 LR2VR180 (de.serviceflow.frankenstein.vf.global.LR2VR180)1 OU2LR (de.serviceflow.frankenstein.vf.global.OU2LR)1 OutputSizeLimiter (de.serviceflow.frankenstein.vf.global.OutputSizeLimiter)1 RL2LR (de.serviceflow.frankenstein.vf.global.RL2LR)1 CameraInput (de.serviceflow.frankenstein.vf.input.CameraInput)1 SlideShowInput (de.serviceflow.frankenstein.vf.input.SlideShowInput)1 StreamInput (de.serviceflow.frankenstein.vf.input.StreamInput)1 TestImageInput (de.serviceflow.frankenstein.vf.input.TestImageInput)1 VideoInput (de.serviceflow.frankenstein.vf.input.VideoInput)1 FXML (javafx.fxml.FXML)1