-
-void
-AudioMapping::set_from_xml (ContentList const & content, shared_ptr<const cxml::Node> node)
-{
- list<shared_ptr<cxml::Node> > const c = node->node_children ("Map");
- for (list<shared_ptr<cxml::Node> >::const_iterator i = c.begin(); i != c.end(); ++i) {
- string const c = (*i)->string_child ("Content");
- ContentList::const_iterator j = content.begin ();
- while (j != content.end() && (*j)->digest() != c) {
- ++j;
- }
-
- if (j == content.end ()) {
- continue;
- }
-
- shared_ptr<const AudioContent> ac = dynamic_pointer_cast<const AudioContent> (*j);
- assert (ac);
-
- add (AudioMapping::Channel (ac, (*i)->number_child<int> ("ContentIndex")), static_cast<libdcp::Channel> ((*i)->number_child<int> ("DCP")));
- }
-}
-
-bool
-operator== (AudioMapping::Channel const & a, AudioMapping::Channel const & b)
-{
- shared_ptr<const AudioContent> sa = a.content.lock ();
- shared_ptr<const AudioContent> sb = b.content.lock ();
- return sa == sb && a.index == b.index;
-}