summaryrefslogtreecommitdiff
path: root/src/subrip_reader.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-10-06 00:58:02 +0100
committerCarl Hetherington <cth@carlh.net>2014-10-06 00:58:02 +0100
commitd68bb2ae0e6a3a19c627f9005eed7aca206349cd (patch)
tree4217b30f04131f6a4b14dbe6dbdc1edd9758c264 /src/subrip_reader.h
parent385a64deea15f8cf360d342fbc62c17ce86c2859 (diff)
Basic and scruffy Subrip read support.
Diffstat (limited to 'src/subrip_reader.h')
-rw-r--r--src/subrip_reader.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/subrip_reader.h b/src/subrip_reader.h
new file mode 100644
index 0000000..2c69971
--- /dev/null
+++ b/src/subrip_reader.h
@@ -0,0 +1,36 @@
+/*
+ Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "reader.h"
+#include "time_pair.h"
+
+namespace sub {
+
+class SubripReader : public Reader
+{
+public:
+ SubripReader (FILE* f);
+
+private:
+ TimePair convert_time (std::string t);
+ void convert_line (std::string t, int line_number, TimePair from, TimePair to);
+ void maybe_content (RawSubtitle& p);
+};
+
+}