- private final File convertedVideoFile;
- private final ConvertProfile ffmpeg;
-
- Convert(ConvertProfile ffmpeg, File commentFile, File videoFile, File convertedVideoFile) throws IOException {
- this.commentFile = commentFile;
- this.videoFile = videoFile;
- this.convertedVideoFile = convertedVideoFile;
- this.ffmpeg = ffmpeg;
-
- File tmpDir = ffmpeg.getTempDir();
- commentMiddleFile = File.createTempFile("vhk", ".tmp", tmpDir);
- tcommMiddleFile = File.createTempFile("tcom", ".tmp", tmpDir);
- TMP_CWS = File.createTempFile("cws", ".swf", tmpDir);
+ private final File commentFile;
+ private final File outputFile;
+ private File transformedComment;
+
+ /**
+ * 変換ワーカコンストラクタ.
+ * @param profile 変換用プロファイル.
+ * @param video 変換元動画.
+ * @param comment 変換元コメント. コメントを付与しない場合はnull.
+ * @param output 変換後出力動画.
+ * @throws IOException 変換失敗.
+ */
+ public Convert(ConvertProfile profile, File video, File comment, File output) throws IOException {
+ this.profile = profile;
+ this.videoFile = video;
+ this.commentFile = comment;
+ this.outputFile = output;