2 Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 STLCode (T v, std::string d)
39 std::string description;
42 class STLBinaryReader : public Reader
45 STLBinaryReader (std::istream &);
48 std::map<std::string, std::string> metadata () const;
50 enum DisplayStandard {
51 DISPLAY_STANDARD_UNDEFINED,
52 DISPLAY_STANDARD_OPEN_SUBTITLING,
53 DISPLAY_STANDARD_LEVEL_1_TELETEXT,
54 DISPLAY_STANDARD_LEVEL_2_TELETEXT
59 LANGUAGE_GROUP_LATIN_CYRILLIC,
60 LANGUAGE_GROUP_LATIN_ARABIC,
61 LANGUAGE_GROUP_LATIN_GREEK,
62 LANGUAGE_GROUP_LATIN_HEBREW
91 LANGUAGE_LUXEMBORGIAN,
114 LANGUAGE_AZERBAIJANI,
116 LANGUAGE_BIELORUSSIAN,
153 LANGUAGE_SERBO_CROAT,
157 LANGUAGE_SRANAN_TONGO,
171 enum TimecodeStatus {
172 TIMECODE_STATUS_NOT_INTENDED_FOR_USE,
173 TIMECODE_STATUS_INTENDED_FOR_USE
176 int code_page_number;
178 DisplayStandard display_standard;
179 LanguageGroup language_group;
181 std::string original_programme_title;
182 std::string original_episode_title;
183 std::string translated_programme_title;
184 std::string translated_episode_title;
185 std::string translator_name;
186 std::string translator_contact_details;
187 std::string subtitle_list_reference_code;
188 std::string creation_date;
189 std::string revision_date;
190 std::string revision_number;
192 int number_of_subtitles;
194 int maximum_characters;
196 TimecodeStatus timecode_status;
197 std::string start_of_programme;
198 std::string first_in_cue;
200 int disk_sequence_number;
201 std::string country_of_origin;
202 std::string publisher;
203 std::string editor_name;
204 std::string editor_contact_details;
207 std::string fixed_string (int, int) const;
210 std::map<std::string, STLCode<DisplayStandard> > _display_standard_map;
211 std::map<std::string, STLCode<LanguageGroup> > _language_group_map;
212 std::map<std::string, STLCode<Language> > _language_map;
213 std::map<std::string, STLCode<TimecodeStatus> > _timecode_status_map;
215 unsigned char* _buffer;