using std::map;
using std::list;
using std::cout;
+using std::make_pair;
/** Construct a SubtitleStream from a value returned from to_string().
* @param t String returned from to_string().
)
);
}
+
+ BOOST_FOREACH (cxml::NodePtr i, node->node_children ("Colour")) {
+ _colours[RGBA(i->node_child("From"))] = RGBA (i->node_child("To"));
+ }
}
}
as_xml (root, _image_subtitles, "ImageSubtitle");
as_xml (root, _text_subtitles, "TextSubtitle");
+
+ for (map<RGBA, RGBA>::const_iterator i = _colours.begin(); i != _colours.end(); ++i) {
+ xmlpp::Node* node = root->add_child("Colour");
+ i->first.as_xml (node->add_child("From"));
+ i->second.as_xml (node->add_child("To"));
+ }
}
void
i->second.to += offset;
}
}
+
+map<RGBA, RGBA>
+FFmpegSubtitleStream::colours () const
+{
+ return _colours;
+}
+
+void
+FFmpegSubtitleStream::set_colour (RGBA from, RGBA to)
+{
+ _colours[from] = to;
+}