+ struct ParseState {
+ boost::optional<std::string> font_id;
+ boost::optional<int64_t> size;
+ boost::optional<float> aspect_adjust;
+ boost::optional<bool> italic;
+ boost::optional<bool> bold;
+ boost::optional<bool> underline;
+ boost::optional<Colour> colour;
+ boost::optional<Effect> effect;
+ boost::optional<Colour> effect_colour;
+ boost::optional<float> h_position;
+ boost::optional<HAlign> h_align;
+ boost::optional<float> v_position;
+ boost::optional<VAlign> v_align;
+ boost::optional<Direction> direction;
+ boost::optional<Time> in;
+ boost::optional<Time> out;
+ boost::optional<Time> fade_up_time;
+ boost::optional<Time> fade_down_time;
+ enum Type {
+ TEXT,
+ IMAGE
+ };
+ boost::optional<Type> type;
+ };
+
+ void parse_subtitles (xmlpp::Element const * node, std::list<ParseState>& state, boost::optional<int> tcr, Standard standard);
+ ParseState font_node_state (xmlpp::Element const * node, Standard standard) const;
+ ParseState text_node_state (xmlpp::Element const * node) const;
+ ParseState image_node_state (xmlpp::Element const * node) const;
+ ParseState subtitle_node_state (xmlpp::Element const * node, boost::optional<int> tcr) const;
+ Time fade_time (xmlpp::Element const * node, std::string name, boost::optional<int> tcr) const;
+ void position_align (ParseState& ps, xmlpp::Element const * node) const;
+