OSDN Git Service

画面でプロファイル構築時にffmpegオプションをコンフィグからでなく画面設定から読むように変更
authoryukihane <yukihane.feather@gmail.com>
Wed, 31 Aug 2011 07:20:57 +0000 (16:20 +0900)
committeryukihane <yukihane.feather@gmail.com>
Wed, 31 Aug 2011 07:20:57 +0000 (16:20 +0900)
frontend/src/yukihane/inqubus/gui/MainFrame.java

index 082b46a..4643fea 100644 (file)
@@ -1287,11 +1287,8 @@ public class MainFrame extends JFrame {
         private final boolean adjustRatio;
 
         private InqubusFfmpegProfile() throws IOException {
         private final boolean adjustRatio;
 
         private InqubusFfmpegProfile() throws IOException {
-            // TODO FFMPEGオプションは、後でメイン画面でも設定できるようにするかも
-            final Config p = Config.INSTANCE;
-            final String opf = p.getFfmpegOptionFile();
-            if (StringUtils.isNotEmpty(opf)) {
-                final File file = new File(opf);
+            final File file = pnlInputFfmpeg.mdlFfmpegOption.getSelectedFile();
+            if (file != null) {
                 final FfmpegOption ffop = FfmpegOption.load(file);
                 this.extOption = ffop.getExtOption();
                 this.inOption = ffop.getInOption();
                 final FfmpegOption ffop = FfmpegOption.load(file);
                 this.extOption = ffop.getExtOption();
                 this.inOption = ffop.getInOption();
@@ -1302,17 +1299,17 @@ public class MainFrame extends JFrame {
                 this.resizeWidth = ffop.getResizeWidth();
                 this.resizeHeight = ffop.getResizeHeight();
                 this.adjustRatio = ffop.isAdjustRatio();
                 this.resizeWidth = ffop.getResizeWidth();
                 this.resizeHeight = ffop.getResizeHeight();
                 this.adjustRatio = ffop.isAdjustRatio();
-                return;
+            } else {
+                this.extOption = pnlInputFfmpeg.fldFfmpegOptionExtension.getText();
+                this.inOption = pnlInputFfmpeg.fldFfmpegOptionIn.getText();
+                this.mainOption = pnlInputFfmpeg.fldFfmpegOptionMain.getText();
+                this.outOption = pnlInputFfmpeg.fldFfmpegOptionOut.getText();
+                this.avOption = pnlInputFfmpeg.fldFfmpegOptionAv.getText();
+                this.resize = pnlInputFfmpeg.cbFfmpegOptionResize.isSelected();
+                this.resizeWidth = Integer.parseInt(pnlInputFfmpeg.fldFfmpegOptionResizeWidth.getText());
+                this.resizeHeight = Integer.parseInt(pnlInputFfmpeg.fldFfmpegOptionResizeHeight.getText());
+                this.adjustRatio = pnlInputFfmpeg.cbFfmpegOptionKeepAspect.isSelected();
             }
             }
-            this.extOption = p.getFfmpegExtension();
-            this.inOption = p.getFfmpegInOption();
-            this.mainOption = p.getFfmpegMainOption();
-            this.outOption = p.getFfmpegOutOption();
-            this.avOption = p.getFfmpegAvOption();
-            this.resize = p.getFfmpegResizeEnable();
-            this.resizeWidth = Integer.parseInt(p.getFfmpegResizeWidth());
-            this.resizeHeight = Integer.parseInt(p.getFfmpegResizeHeight());
-            this.adjustRatio = p.getFfmpegKeepAspect();
         }
 
         @Override
         }
 
         @Override