Skip to content

Commit

Permalink
TTML
Browse files Browse the repository at this point in the history
  • Loading branch information
Sami32 committed Jun 9, 2018
1 parent 65fffbd commit 7018290
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
2 changes: 2 additions & 0 deletions src/main/java/net/pms/dlna/DLNAMediaInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -1358,6 +1358,8 @@ public void parseFFmpegInfo(List<String> lines, String input) {
lang.setType(SubtitleType.DIVX);
} else if (line.contains("mov_text")) {
lang.setType(SubtitleType.TX3G);
} else if (line.contains("ttml")) {
lang.setType(SubtitleType.TTML);
} else if (line.contains("webvtt")) {
lang.setType(SubtitleType.WEBVTT);
} else if (line.contains("dvb_subtitle")) {
Expand Down
41 changes: 21 additions & 20 deletions src/main/java/net/pms/formats/v2/SubtitleType.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,27 @@ public enum SubtitleType {
// http://mediainfo.svn.sourceforge.net/viewvc/mediainfo/MediaInfoLib/trunk/Source/Resource/Text/DataBase/

// SubtitleType(int index, String description, List<String> fileExtensions, List<String> libMediaInfoCodecs, int category)
UNKNOWN (0, "Unknown", list(), list("Unknown"), type.UNDEF),
SUBRIP (1, "SubRip", list("srt"), list("S_TEXT/UTF8", "S_UTF8", "UTF-8", "Subrip"), type.TEXT),
TEXT (2, "Text", list("txt"), list(), type.TEXT),
MICRODVD (3, "MicroDVD", list("sub"), list(), type.TEXT),
SAMI (4, "SAMI", list("smi"), list(), type.TEXT),
ASS (5, "ASS/SSA", list("ass", "ssa"), list("S_TEXT/SSA", "S_TEXT/ASS", "S_SSA", "S_ASS", "SSA", "ASS"), type.TEXT),
VOBSUB (6, "VobSub", list("idx"), list("S_VOBSUB", "subp", "mp4s", "E0", "RLE"), type.PICTURE), // TODO: "RLE" may also apply to other formats
UNSUPPORTED (7, "Unsupported", list(), list(), type.UNDEF),
USF (8, "USF", list(), list("S_TEXT/USF", "S_USF", "USF"), type.TEXT),
BMP (9, "Bitmap", list(), list("S_IMAGE/BMP"), type.PICTURE),
DIVX (10, "XSUB", list(), list("DXSB"), type.PICTURE),
TX3G (11, "TX3G", list(), list("Timed Text", "tx3g"), type.TEXT),
PGS (12, "PGS", list("pgs", "sup"), list("S_HDMV/PGS", "PGS", "144"), type.PICTURE),
WEBVTT (13, "WebVTT", list("vtt"), list("WebVTT", "S_TEXT/WEBVTT"), type.TEXT),
TEXTST (14, "HDMV Text", list(), list("S_HDMV/TEXTST"), type.TEXT),
DVBSUB (15, "DVB Subtitle", list(), list("S_DVBSUB", "DVB Subtitle", "6"), type.PICTURE),
EIA608 (16, "EIA-608", list(), list("EIA-608", "c608"), type.TEXT),
EIA708 (17, "EIA-708", list(), list("EIA-708", "c708"), type.TEXT),
KATE (18, "Kate", list(), list("Kate"), type.TEXT),
TELETEXT (19, "Teletext", list(), list("Teletext", "Teletext Subtitle"), type.TEXT);
UNKNOWN (0, "Unknown", list(), list("Unknown"), type.UNDEF),
SUBRIP (1, "SubRip", list("srt"), list("S_TEXT/UTF8", "S_UTF8", "UTF-8", "Subrip"), type.TEXT),
TEXT (2, "Text", list("txt"), list(), type.TEXT),
MICRODVD (3, "MicroDVD", list("sub"), list(), type.TEXT),
SAMI (4, "SAMI", list("smi"), list(), type.TEXT),
ASS (5, "ASS/SSA", list("ass", "ssa"), list("S_TEXT/SSA", "S_TEXT/ASS", "S_SSA", "S_ASS", "SSA", "ASS"), type.TEXT),
VOBSUB (6, "VobSub", list("idx"), list("S_VOBSUB", "subp", "mp4s", "E0", "RLE"), type.PICTURE), // TODO: "RLE" may also apply to other formats
UNSUPPORTED (7, "Unsupported", list(), list(), type.UNDEF),
USF (8, "USF", list(), list("S_TEXT/USF", "S_USF", "USF"), type.TEXT),
BMP (9, "Bitmap", list(), list("S_IMAGE/BMP"), type.PICTURE),
DIVX (10, "XSUB", list(), list("DXSB"), type.PICTURE),
TX3G (11, "TX3G", list(), list("Timed Text", "tx3g"), type.TEXT),
PGS (12, "PGS", list("pgs", "sup"), list("S_HDMV/PGS", "PGS", "144"), type.PICTURE),
WEBVTT (13, "WebVTT", list("vtt"), list("WebVTT", "S_TEXT/WEBVTT"), type.TEXT),
TEXTST (14, "HDMV Text", list(), list("S_HDMV/TEXTST"), type.TEXT),
DVBSUB (15, "DVB Subtitle", list(), list("S_DVBSUB", "DVB Subtitle", "6"), type.PICTURE),
EIA608 (16, "EIA-608", list(), list("EIA-608", "c608"), type.TEXT),
EIA708 (17, "EIA-708", list(), list("EIA-708", "c708"), type.TEXT),
KATE (18, "Kate", list(), list("Kate"), type.TEXT),
TELETEXT (19, "Teletext", list(), list("Teletext", "Teletext Subtitle"), type.TEXT),
TTML (20, "TTML", list("dfxp", "ttml"), list("dfxp", "TTML"), type.TEXT);

public enum type {TEXT, PICTURE, UNDEF}
private final int index;
Expand Down

0 comments on commit 7018290

Please sign in to comment.