libsub
 All Classes Files Functions Variables
stl_binary_reader.h
1 /*
2  Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
3 
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.
8 
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.
13 
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.
17 
18 */
19 
20 #ifndef LIBSUB_STL_BINARY_READER_H
21 #define LIBSUB_STL_BINARY_READER_H
22 
23 #include "reader.h"
24 #include "stl_binary_tables.h"
25 #include <map>
26 
27 namespace sub {
28 
32 class STLBinaryReader : public Reader
33 {
34 public:
35  STLBinaryReader (std::istream &);
36  ~STLBinaryReader ();
37 
38  std::map<std::string, std::string> metadata () const;
39 
40  int code_page_number;
41  int frame_rate;
42  DisplayStandard display_standard;
43  LanguageGroup language_group;
44  Language language;
45  std::string original_programme_title;
46  std::string original_episode_title;
47  std::string translated_programme_title;
48  std::string translated_episode_title;
49  std::string translator_name;
50  std::string translator_contact_details;
51  std::string subtitle_list_reference_code;
52  std::string creation_date;
53  std::string revision_date;
54  std::string revision_number;
55  int tti_blocks;
56  int number_of_subtitles;
57  int subtitle_groups;
58  int maximum_characters;
59  int maximum_rows;
60  TimecodeStatus timecode_status;
61  std::string start_of_programme;
62  std::string first_in_cue;
63  int disks;
64  int disk_sequence_number;
65  std::string country_of_origin;
66  std::string publisher;
67  std::string editor_name;
68  std::string editor_contact_details;
69 
70 private:
71  std::string get_string (int, int) const;
72  int get_int (int, int) const;
73  Time get_timecode (int) const;
74 
75  STLBinaryTables _tables;
76  unsigned char* _buffer;
77 };
78 
79 }
80 
81 #endif
A class to read binary STL files.
Definition: stl_binary_reader.h:32
Definition: collect.h:26
Definition: sub_time.h:43
A set of conversion tables for STL binary files.
Definition: stl_binary_tables.h:197
Parent for classes which can read particular subtitle formats.
Definition: reader.h:35