summaryrefslogtreecommitdiff
path: root/src/dcp_reader.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-12 17:20:54 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-12 17:20:54 +0000
commitfd1d21f713e9b0abd8afebcbab36d70aac9b6cce (patch)
treec6c8a1907a64550fb2e6b6d7f4757c0a4d85fb17 /src/dcp_reader.h
parent94399f35aea4e37c699918f06eddfa931e4aaefc (diff)
Un-compiling work-in-progress.
Diffstat (limited to 'src/dcp_reader.h')
-rw-r--r--src/dcp_reader.h43
1 files changed, 40 insertions, 3 deletions
diff --git a/src/dcp_reader.h b/src/dcp_reader.h
index 6d4fa71..5f65a94 100644
--- a/src/dcp_reader.h
+++ b/src/dcp_reader.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2015 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
@@ -26,17 +26,54 @@
namespace cxml {
class Node;
+ class Document;
}
namespace sub {
+namespace dcp {
+ class Font;
+ class Text;
+ class Subtitle;
+}
+
/** @class DCPReader
* @brief A class which reads DCP subtitles.
*/
class DCPReader : public Reader
{
-public:
- DCPReader (boost::filesystem::path file);
+protected:
+
+ virtual int timecode_rate () const = 0;
+
+ struct ParseState {
+ std::list<boost::shared_ptr<dcp::Font> > font_nodes;
+ std::list<boost::shared_ptr<dcp::Text> > text_nodes;
+ std::list<boost::shared_ptr<dcp::Subtitle> > subtitle_nodes;
+ };
+
+ void parse_common (boost::shared_ptr<cxml::Document> xml, std::list<boost::shared_ptr<dcp::Font> > font_nodes);
+
+ void maybe_add_subtitle (std::string text, ParseState const & parse_state);
+
+ void examine_font_nodes (
+ boost::shared_ptr<const cxml::Node> xml,
+ std::list<boost::shared_ptr<dcp::Font> > const & font_nodes,
+ ParseState& parse_state
+ );
+
+ void examine_text_nodes (
+ boost::shared_ptr<const cxml::Node> xml,
+ std::list<boost::shared_ptr<dcp::Text> > const & text_nodes,
+ ParseState& parse_state
+ );
+
+protected:
+ std::string _id;
+
+private:
+ std::string _reel_number;
+ std::string _language;
};
}