summaryrefslogtreecommitdiff
path: root/src/subtitle_asset.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-14 09:05:13 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-14 09:05:13 +0000
commitb0a9bc81744440404d68bcbdc8bda925a8a64597 (patch)
tree0861022624056676003c0ecc292e7bb0d79f08ef /src/subtitle_asset.h
parent287d8bb5eb247e8746718a919091fff09b0b624d (diff)
Fix subtitle parser to cope with
<Text>Hello this is some <Font italic="yes">italic</Font> text</Text>. The data structures are unable to cope, so hack it to use Pango markup in those cases (formatting changes during a line).
Diffstat (limited to 'src/subtitle_asset.h')
-rw-r--r--src/subtitle_asset.h16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/subtitle_asset.h b/src/subtitle_asset.h
index d7976bef..a5014307 100644
--- a/src/subtitle_asset.h
+++ b/src/subtitle_asset.h
@@ -180,21 +180,11 @@ private:
std::list<boost::shared_ptr<parse::Font> > font_nodes;
std::list<boost::shared_ptr<parse::Text> > text_nodes;
std::list<boost::shared_ptr<parse::Subtitle> > subtitle_nodes;
+ boost::shared_ptr<Subtitle> current;
};
- 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<parse::Font> > const & font_nodes,
- ParseState& parse_state
- );
-
- void examine_text_nodes (
- boost::shared_ptr<const cxml::Node> xml,
- std::list<boost::shared_ptr<parse::Text> > const & text_nodes,
- ParseState& parse_state
- );
+ void parse_node (xmlpp::Node* node, ParseState& parse_state, boost::optional<int> tcr);
+ void maybe_add_subtitle (std::string text, ParseState& parse_state);
boost::optional<std::string> _movie_title;
/* strangely, this is sometimes a string */