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 enum CumulativeStatus {
177 CUMULATIVE_STATUS_NOT_CUMULATIVE,
178 CUMULATIVE_STATUS_FIRST,
179 CUMULATIVE_STATUS_INTERMEDIATE,
180 CUMULATIVE_STATUS_LAST
186 JUSTIFICATION_CENTRE,
195 int code_page_number;
197 DisplayStandard display_standard;
198 LanguageGroup language_group;
200 std::string original_programme_title;
201 std::string original_episode_title;
202 std::string translated_programme_title;
203 std::string translated_episode_title;
204 std::string translator_name;
205 std::string translator_contact_details;
206 std::string subtitle_list_reference_code;
207 std::string creation_date;
208 std::string revision_date;
209 std::string revision_number;
211 int number_of_subtitles;
213 int maximum_characters;
215 TimecodeStatus timecode_status;
216 std::string start_of_programme;
217 std::string first_in_cue;
219 int disk_sequence_number;
220 std::string country_of_origin;
221 std::string publisher;
222 std::string editor_name;
223 std::string editor_contact_details;
226 std::string get_string (int, int) const;
227 int get_int (int, int) const;
228 FrameTime get_timecode (int) const;
230 void create_tables ();
232 std::map<std::string, STLCode<DisplayStandard> > _display_standard_map;
233 std::map<std::string, STLCode<LanguageGroup> > _language_group_map;
234 std::map<std::string, STLCode<Language> > _language_map;
235 std::map<std::string, STLCode<TimecodeStatus> > _timecode_status_map;
236 std::map<int, STLCode<CumulativeStatus> > _cumulative_status_map;
237 std::map<int, STLCode<Justification> > _justification_map;
238 std::map<int, STLCode<Comment> > _comment_map;
240 unsigned char* _buffer;