2 package saccubus.converter.profile;
5 import java.io.FileInputStream;
6 import java.io.IOException;
7 import java.util.Properties;
13 public class FfmpegOption {
15 private final String extOption;
16 private final String inOption;
17 private final String outOption;
18 private final String mainOption;
20 public static FfmpegOption load(File file) throws IOException {
21 Properties prop = new Properties();
22 prop.loadFromXML(new FileInputStream(file));
23 String ext = prop.getProperty("EXT");
24 String in = prop.getProperty("IN");
25 String out = prop.getProperty("OUT");
26 String main = prop.getProperty("MAIN");
27 if (ext == null || in == null || out == null || main == null) {
28 throw new IOException("
\95Ï
\8a·
\83I
\83v
\83V
\83\87\83\93\83t
\83@
\83C
\83\8b\8f\91\8e®
\8cë
\82è
\81B");
30 return new FfmpegOption(ext, main, in, out);
33 public FfmpegOption(String extOption, String mainOption, String inOption, String outOption) {
34 this.extOption = (extOption.startsWith(".")) ? extOption : "." + extOption;
35 this.inOption = inOption;
36 this.outOption = outOption;
37 this.mainOption = mainOption;
40 public String getExtOption() {
44 public String getInOption() {
48 public String getMainOption() {
52 public String getOutOption() {