OSDN Git Service

パディングオプションを削除
authoryukihane <yukihane.feather@gmail.com>
Tue, 2 Aug 2011 07:27:12 +0000 (16:27 +0900)
committeryukihane <yukihane.feather@gmail.com>
Tue, 2 Aug 2011 07:27:12 +0000 (16:27 +0900)
frontend/src/saccubus/MainFrame.java
frontend/src/saccubus/converter/profile/FfmpegOption.java
frontend/src/saccubus/prompt/Prompt.java
frontend/src/saccubus/properties/MovieSetting.java

index 41f590a..989ad55 100644 (file)
@@ -131,8 +131,6 @@ public class MainFrame extends JFrame {
         resizeHeigitField.setEnabled(resizable);
         adjustRatioCheckBox.setEnabled(resizable);
 
-        boolean adjustable = (adjustRatioCheckBox.isEnabled() && adjustRatioCheckBox.isSelected());
-        paddingCheckBox.setEnabled(adjustable);
     }
 
     private void setNames() {
@@ -472,7 +470,7 @@ public class MainFrame extends JFrame {
                         .addComponent(adjustRatioCheckBox))
                     .addGroup(layout.createSequentialGroup()
                         .addGap(20)
-                    .addComponent(paddingCheckBox))
+                    )
                 );
 
         layout.setVerticalGroup(layout.createSequentialGroup()
@@ -497,11 +495,11 @@ public class MainFrame extends JFrame {
                         .addComponent(resizeHeightLabel)
                         .addComponent(resizeHeigitField))
                     .addComponent(adjustRatioCheckBox)
-                    .addComponent(paddingCheckBox)));
+                    )
+                );
 
         resizeCheckBox.addActionListener(ffmpegOptionCheckBoxListener);
         adjustRatioCheckBox.addActionListener(ffmpegOptionCheckBoxListener);
-        paddingCheckBox.addActionListener(ffmpegOptionCheckBoxListener);
         setFFMpegOptionCheckbox();
 
 
@@ -787,7 +785,6 @@ public class MainFrame extends JFrame {
         resizeWidthField.setText(Integer.toString(movie.getFfmpegOption().getResizeWidth()));
         resizeHeigitField.setText(Integer.toString(movie.getFfmpegOption().getResizeHeight()));
         adjustRatioCheckBox.setSelected(movie.getFfmpegOption().isAdjustRatio());
-        paddingCheckBox.setSelected(movie.getFfmpegOption().isPadding());
         FFmpegOptionModel.reload(movie.getOptionFile());
 
         // 変換設定
@@ -852,7 +849,6 @@ public class MainFrame extends JFrame {
     private final JLabel resizeHeightLabel = new JLabel("縦");
     private final JTextField resizeHeigitField = new NumberFormattedTextField();
     private final JCheckBox adjustRatioCheckBox = new JCheckBox("アスペクト比を維持");
-    private final JCheckBox paddingCheckBox = new JCheckBox("黒幕を付与");
     // FFmpegの設定 ここまで
     private JLabel FontIndexLabel = new JLabel();
     private JTextField fontIndexField = new JTextField();
@@ -1238,7 +1234,6 @@ public class MainFrame extends JFrame {
                     resizeWidthField.setEnabled(enable);
                     resizeHeigitField.setEditable(enable);
                     adjustRatioCheckBox.setEnabled(enable);
-                    paddingCheckBox.setEnabled(enable);
                 }
             });
         }
@@ -1422,10 +1417,9 @@ public class MainFrame extends JFrame {
         String width = resizeWidthField.getText();
         String height = resizeHeigitField.getText();
         boolean adjust = adjustRatioCheckBox.isSelected();
-        boolean pad = paddingCheckBox.isSelected();
         File optionFile = FFmpegOptionModel.getSelectedFile();
 
-        FfmpegOption opt = new FfmpegOption(ext, main, in, out, avfilter, resize, width, height, adjust, pad);
+        FfmpegOption opt = new FfmpegOption(ext, main, in, out, avfilter, resize, width, height, adjust);
         return new MovieSetting(new File(ffmpeg), new File(vhook), optionFile, opt);
     }
 
index f92617c..34ea3fc 100644 (file)
@@ -22,7 +22,6 @@ public class FfmpegOption {
     private final int resizeWidth;
     private final int resizeHeight;
     private final boolean adjustRatio;
-    private final boolean padding;
 
     public static FfmpegOption load(File file) throws IOException {
         Properties prop = new Properties();
@@ -36,17 +35,16 @@ public class FfmpegOption {
         String width = prop.getProperty("WIDTH", "");
         String height = prop.getProperty("HEIGHT", "");
         boolean adjust =  Boolean.getBoolean(prop.getProperty("ADJST_RATIO", "true"));
-        boolean pad =  Boolean.getBoolean(prop.getProperty("ADJST_RATIO", "false"));
 
         if (StringUtils.isBlank(ext)) {
             throw new IOException("変換オプションファイル書式誤り ext: "
                     + ext + ", main: " + main + ", in: " + in + ", out: " + out + ", avfilter: " + avfilter);
         }
-        return new FfmpegOption(ext, main, in, out, avfilter, resize, width, height, adjust, pad);
+        return new FfmpegOption(ext, main, in, out, avfilter, resize, width, height, adjust);
     }
 
     public FfmpegOption(String extOption, String mainOption, String inOption, String outOption, String avfilterOption,
-            boolean resize, String width, String height, boolean adjust, boolean pad) {
+            boolean resize, String width, String height, boolean adjust) {
         this.extOption = (extOption.startsWith(".")) ? extOption : "." + extOption;
         this.mainOption = mainOption;
         this.inOption = inOption;
@@ -56,7 +54,6 @@ public class FfmpegOption {
         this.resizeWidth = (width.isEmpty()) ? 0 : Integer.parseInt(width);
         this.resizeHeight = (height.isEmpty()) ? 0 : Integer.parseInt(height);
         this.adjustRatio = adjust;
-        this.padding = pad;
     }
 
 
@@ -95,9 +92,4 @@ public class FfmpegOption {
     public boolean isAdjustRatio() {
         return adjustRatio;
     }
-
-    public boolean isPadding() {
-        return padding;
-    }
-
 }
index 94458fa..458320d 100644 (file)
@@ -138,7 +138,7 @@ public class Prompt {
         Ffmpeg ffmpeg = p.getFfmpeg();
 
         FfmpegOption newFfmpegOption = new FfmpegOption(ffmpeg.getFfmpegOption().getExtOption(), "", "", ff, "", false,
-                "", "", false, false);
+                "", "", false);
         InputFileSetting newVideoSetting = new InputFileSetting(new SFile(true, new File(video)), false, false);
         InputFileSetting newCommentSetting = new InputFileSetting(new SFile(true, new File(comm)), false, false);
         InputFileSetting newTcommentSetting = new InputFileSetting(new SFile(true, new File(tcomm)), false, false);
index 5a84c9a..e4a5e49 100644 (file)
@@ -23,7 +23,6 @@ public class MovieSetting {
     private static final String PROP_RESIZE_WIDTH = "CMD_RESIZE_WIDTH";
     private static final String PROP_RESIZE_HEIGHT = "CMD_RESIZE_HEIGHT";
     private static final String PROP_ADJUST_RATIO = "CMD_ADJUST_RATIO";
-    private static final String PROP_PADDING = "CMD_PADDING";
     private final File ffmpeg;
     private final File vhook;
     private final File optionFile;
@@ -64,7 +63,6 @@ public class MovieSetting {
         prop.setProperty(PROP_RESIZE_WIDTH, Integer.toString(getFfmpegOption().getResizeWidth()));
         prop.setProperty(PROP_RESIZE_HEIGHT, Integer.toString(getFfmpegOption().getResizeHeight()));
         prop.setProperty(PROP_ADJUST_RATIO, Boolean.toString(getFfmpegOption().isAdjustRatio()));
-        prop.setProperty(PROP_PADDING, Boolean.toString(getFfmpegOption().isPadding()));
         if (getOptionFile() != null) {
             prop.setProperty(PROP_OPTION_FILE, getOptionFile().getPath());
         } else {
@@ -91,8 +89,7 @@ public class MovieSetting {
         String width = prop.getProperty(PROP_RESIZE_WIDTH, "512");
         String height = prop.getProperty(PROP_RESIZE_HEIGHT, "384");
         boolean adjust = Boolean.getBoolean(prop.getProperty(PROP_ADJUST_RATIO, "false"));
-        boolean pad = Boolean.getBoolean(prop.getProperty(PROP_PADDING, "false"));
-        FfmpegOption opt = new FfmpegOption(ext, main, in, out, avfilter, resize, width, height, adjust, pad);
+        FfmpegOption opt = new FfmpegOption(ext, main, in, out, avfilter, resize, width, height, adjust);
 
         return new MovieSetting(new File(ffmpeg), new File(vhook), optionFile, opt);
     }