import org.apache.commons.lang.StringUtils;
import saccubus.ConvertStopFlag;
import saccubus.conv.ConvertToVideoHook;
-import yukihane.saccubus.converter.profile.NgSetting;
-import yukihane.saccubus.converter.profile.Ffmpeg;
-import yukihane.saccubus.converter.profile.FfmpegOption;
-import yukihane.saccubus.converter.profile.GeneralSetting;
+import yukihane.saccubus.converter.profile.ConvertProfile;
+import yukihane.saccubus.converter.profile.FfmpegProfile;
+import yukihane.saccubus.converter.profile.GeneralProfile;
import saccubus.net.TextProgressListener;
import yukihane.mediainfowrapper.Info;
import yukihane.mediainfowrapper.MediaInfo;
import yukihane.mediainfowrapper.Size;
+import yukihane.saccubus.converter.profile.ConvertProfile.HideCondition;
import yukihane.swf.Cws2Fws;
/**
private final File tcommMiddleFile;
private final File TMP_CWS;
private final File commentFile;
- private final File tcommFile;
private final File videoFile;
private final File convertedVideoFile;
- private final Ffmpeg ffmpeg;
+ private final ConvertProfile ffmpeg;
- FfmpegCommand(TextProgressListener listener, ConvertStopFlag flag, File commentFile, File tcommFile,
- File videoFile, File convertedVideoFile, Ffmpeg ffmpeg, GeneralSetting general) throws IOException {
+ FfmpegCommand(TextProgressListener listener, ConvertStopFlag flag, File commentFile,
+ File videoFile, File convertedVideoFile, ConvertProfile ffmpeg, GeneralProfile general) throws IOException {
super(listener, flag);
this.commentFile = commentFile;
- this.tcommFile = tcommFile;
this.videoFile = videoFile;
this.convertedVideoFile = convertedVideoFile;
this.ffmpeg = ffmpeg;
}
private boolean exec() throws InterruptedException, IOException {
- final NgSetting ngSetting = getFfmpeg().getNgSetting();
+ final HideCondition ngSetting = getFfmpeg().getNgSetting();
if (commentFile != null) {
sendText("コメントの中間ファイルへの変換中");
boolean conv = ConvertToVideoHook.convert(commentFile, commentMiddleFile, ngSetting.getId(), ngSetting.
}
}
stopFlagReturn();
- if (tcommFile != null) {
- sendText("投稿者コメントの中間ファイルへの変換中");
- boolean conv = ConvertToVideoHook.convert(tcommFile, tcommMiddleFile, ngSetting.getId(), ngSetting.getWord());
- if (!conv) {
- sendText("コメント変換に失敗。ファイル名に使用できない文字が含まれているか正規表現の間違い?");
- return false;
- }
- }
+// if (tcommFile != null) {
+// sendText("投稿者コメントの中間ファイルへの変換中");
+// boolean conv = ConvertToVideoHook.convert(tcommFile, tcommMiddleFile, ngSetting.getId(), ngSetting.getWord());
+// if (!conv) {
+// sendText("コメント変換に失敗。ファイル名に使用できない文字が含まれているか正規表現の間違い?");
+// return false;
+// }
+// }
stopFlagReturn();
sendText("動画の変換を開始");
int code;
if ((code = converting_video(videoFile, convertedVideoFile, (commentFile != null), commentMiddleFile.getPath(),
- (tcommFile
- != null), tcommMiddleFile.getPath(), getFfmpeg().getFfmpegOption())) == 0) {
+ false, tcommMiddleFile.getPath(), getFfmpeg().getFfmpegOption())) == 0) {
sendText("変換が正常に終了しました。");
return true;
} else {
}
private int converting_video(File videoFile, File convertedVideoFile, boolean addComment, String commPath,
- boolean addTcomment, String tcommPath, FfmpegOption ov) throws InterruptedException, IOException {
+ boolean addTcomment, String tcommPath, FfmpegProfile ov) throws InterruptedException, IOException {
File fwsFile = Cws2Fws.createFws(videoFile, TMP_CWS);
List<String> cmdList = new ArrayList<String>();
sb.append("--enable-show-video");
sb.append("|");
}
- if (getFfmpeg().isSelfAdjustFontSize()) {
+ if (!getFfmpeg().isDisableFontSizeArrange()) {
sb.append("--enable-fix-font-size");
sb.append("|");
}
return sb.toString();
}
- private Ffmpeg getFfmpeg() {
+ private ConvertProfile getFfmpeg() {
return ffmpeg;
}
}