final String name = pattern.createFileName(movieId, true);
final File file = new File(profile.getCommentSetting().getDir(), name);
- commentFile = client.getCommentFile(vi, file.getPath(), wbi, profile.getCommentSetting().getBackComment(),
- profile.getCommentSetting().isReduceComment());
+ commentFile = client.getCommentFile(vi, file.getPath(), wbi, profile.getCommentSetting().getLengthRelatedCommentSize(),
+ profile.getCommentSetting().isDisablePerMinComment());
} else {
commentFile = profile.getCommentSetting().getLocalFile();
}
sb.append("--enable-show-video");
sb.append("|");
}
- if (getFfmpeg().isSelfAdjustFontSize()) {
+ if (!getFfmpeg().isDisableFontSizeArrange()) {
sb.append("--enable-fix-font-size");
sb.append("|");
}
return commentOpaque;
}
- public boolean isSelfAdjustFontSize() {
- return selfAdjustFontSize;
+ @Override
+ public boolean isDisableFontSizeArrange() {
+ return !selfAdjustFontSize;
}
public int getShadowIndex() {
return delete;
}
- @Override
- public boolean isSelfAdjustCommentNum() {
+ private boolean isSelfAdjustCommentNum() {
return commentGetInfo.isSelfAdjustCommentNum();
}
@Override
- public int getBackComment() {
- return commentGetInfo.getBackComment();
+ public int getLengthRelatedCommentSize() {
+ if (isSelfAdjustCommentNum()) {
+ return commentGetInfo.getBackComment();
+ }
+ return -1;
}
@Override
- public boolean isReduceComment() {
+ public boolean isDisablePerMinComment() {
return commentGetInfo.isReduceComment();
}
public File getLocalFile() {
throw new UnsupportedOperationException("Not supported yet.");
}
+
+ @Override
+ public int getPerMinCommentSize() {
+ return -1;
+ }
}
return convert;
}
- @Override
public boolean isAppendPrefixVideoId() {
return appendPrefixVideoId;
}
return addComment;
}
- @Override
public boolean isAddTcomment() {
return addTcomment;
}
package yukihane.saccubus.converter.profile;
/**
- *
+ * 変換対象となるコメントファイル情報を保持するためのプロファイルです.
* @author yuki
*/
public interface CommentProfile extends Inputable {
- boolean isSelfAdjustCommentNum();
+ /**
+ * @return {@link #isDownload()}がtrueの場合に
+ * 取得する「再生時間に応じたコメント」数. 負値の場合は再生時間に応じた
+ * 既定数を取得します.
+ * {@link #isDownload()}がfalseの場合未定義.
+ */
+ int getLengthRelatedCommentSize();
- int getBackComment();
+ /**
+ * @return {@link #isDownload()}がtrueの場合に,
+ * 昔の仕様でコメントダウンロードを行う場合はtrue. 現在の仕様で行う場合はfalse.
+ * {@link #isDownload()}がfalseの場合未定義.
+ */
+ boolean isDisablePerMinComment();
/**
- * @return 昔の仕様でコメントダウンロードを行う場合はtrue. 現在の仕様で行う場合はfalse.
- * {@link #isDownload()}がtrueの場合のみ必要です.
+ * @return {@link #isDownload()}がtrue, かつ
+ * {@link #isDisablePerMinComment()}がfalseの場合に
+ * 取得する「1分当たりコメント」数. 負値の場合は再生時間に応じた
+ * 既定数を取得します.
+ * {@link #isDownload()}がfalse, または
+ * {@link #isDisablePerMinComment()}がtrueの場合未定義.
*/
- boolean isReduceComment();
+ int getPerMinCommentSize();
/**
- * @return 過去ログを取得する時点. 1970/1/1 00:00:00 GMT からの経過秒数(ミリ秒ではない).
- * マイナス値指定の場合は過去ログ取得ではない.
+ * @return {@link #isDownload()}がtrueの場合に,過去ログを取得する時点.
+ * 1970/1/1 00:00:00 GMT からの経過秒数(ミリ秒ではない).
+ * 負値の場合は過去ログ取得ではない.
+ * {@link #isDownload()}がfalseの場合未定義.
*/
long getBackLogPoint();
}
FfmpegOption getFfmpegOption();
+ /** @return ffmpeg実行ファイル. */
File getFfmpeg();
- int getFontIndex();
+ /** @return 拡張ライブラリを無効にするのであればtrue. */
+ boolean isVhookDisabled();
+ /** @return 拡張ライブラリファイル. */
+ File getVhook();
+
+ /** @return 使用するフォントファイル. */
File getFont();
+ /** @return フォント番号. */
+ int getFontIndex();
+
+ /** @return 全てのコメントを不透明にするのであればtrue. */
boolean isCommentOpaque();
- boolean isSelfAdjustFontSize();
+ /** @return コメントのフォントサイズを自動調整するのであればfalse. */
+ boolean isDisableFontSizeArrange();
+ /** @return 影の種類 */
int getShadowIndex();
+ /** @return 変換中に変換中画像を画面に表示するのであればtrue. */
boolean isShowConverting();
- boolean isVhookDisabled();
-
- File getVhook();
-
+ /** @return 1画面中に表示する最大コメント数. 負値の場合は既定値(30)と同等. */
int getMaxNumOfComment();
NgSetting getNgSetting();
import java.io.File;
/**
- *
+ * 一般的な設定を保持するプロファイル.
* @author yuki
*/
public interface GeneralProfile {
*/
String getReplaceTo();
+ /** @return 作業用一時ディレクトリ. */
File getTempDir();
}
import java.io.File;
/**
- *
+ * 変換元情報(入力情報)のプロファイルが実現すべきインタフェースです.
* @author yuki
*/
interface Inputable {
+ /**
+ * @return 変換する動画ファイルをニコニコ動画サービスから取得するのであればtrue.
+ * ローカルにあるファイルを使用するのであればfalse.
+ */
boolean isDownload();
+ /**
+ * @return {@link #isDownload()}がtrueの場合に, 取得したファイルを保存するディレクトリを返します.
+ * falseの場合は未定義.
+ */
File getDir();
+ /**
+ * @return {@link #isDownload()}がtrueの場合に, 取得したファイルを保存するファイル名のパターンを返します.
+ * falseの場合は未定義.
+ */
String getFileName();
/**
- * @return {@link #isDownload()}ã\81\8cfalseã\81®å ´å\90\88ã\80\81使用するローカルファイルを返します.
- * trueの場合はnull.
+ * @return {@link #isDownload()}ã\81\8cfalseã\81®å ´å\90\88ã\81«, 使用するローカルファイルを返します.
+ * trueの場合は未定義.
*/
File getLocalFile();
}
package yukihane.saccubus.converter.profile;
/**
- *
+ * ニコニコ動画サービスへのログイン情報を保持するためのプロファイルです.
* @author yuki
*/
public interface LoinProfile {
+ /** @return ログインID(メールアドレス). */
public String getMail();
+ /** @return ログインパスワード. */
public String getPass();
}
import java.io.File;
+/**
+ * 変換後の動画ファイルに関する情報を保持するプロファイル.
+ * @author yuki
+ */
public interface OutputProfile {
/** @return 動画変換処理を行う必要があればtrue. */
boolean isConvert();
- boolean isAppendPrefixVideoId();
-
+ /**
+ * @return {@link #isConvert()}がtrueの場合に
+ * コメントを付与して変換を行うのであればtrue.
+ * {@link #isConvert()}がfalseの場合未定義.
+ */
boolean isAddComment();
- boolean isAddTcomment();
-
+ /**
+ * @return {@link #isConvert()}がtrueの場合に
+ * 変換した動画を保存するディレクトリ.
+ * {@link #isConvert()}がfalseの場合未定義.
+ */
public File getDir();
+ /**
+ * @return {@link #isConvert()}がtrueの場合に
+ * 変換した動画のファイル名パターン.
+ * {@link #isConvert()}がfalseの場合未定義.
+ */
public String getFileName();
}
package yukihane.saccubus.converter.profile;
/**
- *
+ * {@link saccubus.converter.Converter.Converter}が必要とするプロファイルです.
+ * Converterを使用するクライアントは, このインタフェースを実装するクラスのインスタンスで
+ * Converterへ処理させる内容を通知します.
* @author yuki
*/
public interface Profile {
package yukihane.saccubus.converter.profile;
/**
- *
+ * プロキシ設定を保持するためのプロファイルです.
* @author yuki
*/
public interface ProxyProfile {
+ /**
+ * @return プロキシを使用してインターネット接続(ニコニコ動画サービスへの接続)を
+ * 行うのであればtrue. 直接接続するのであればfalse.
+ */
boolean use();
+ /**
+ * @return プロキシサーバホスト名.
+ */
String getHost();
+ /**
+ * @return プロキシサーバポート番号.
+ */
int getPort();
}
package yukihane.saccubus.converter.profile;
/**
- *
+ * 変換対象となる動画ファイル情報を保持するためのプロファイルです.
* @author yuki
*/
public interface VideoProfile extends Inputable {