Improve audio mapping handling a bit.
[dcpomatic.git] / src / lib / audio_mapping.h
index 248d2570eca8a3eee084bfbfe4df957f85f55bf8..a2de8306bbf376457788bb77884d4a523bbabee0 100644 (file)
 #define DCPOMATIC_AUDIO_MAPPING_H
 
 #include <list>
-#include <string>
 #include <libdcp/types.h>
 #include <boost/shared_ptr.hpp>
-#include "audio_content.h"
+
+namespace xmlpp {
+       class Node;
+}
+
+namespace cxml {
+       class Node;
+}
 
 class AudioMapping
 {
 public:
-       void as_xml (xmlpp::Node *) const;
-       void set_from_xml (ContentList const &, boost::shared_ptr<const cxml::Node>);
+       AudioMapping ();
+       AudioMapping (int);
+       AudioMapping (boost::shared_ptr<const cxml::Node>);
        
-       struct Channel {
-               Channel (boost::weak_ptr<const AudioContent> c, int i)
-                       : content (c)
-                       , index (i)
-               {}
-               
-               boost::weak_ptr<const AudioContent> content;
-               int index;
-       };
-
-       void add (Channel, libdcp::Channel);
-
-       int dcp_channels () const;
-       std::list<Channel> dcp_to_content (libdcp::Channel) const;
-       std::list<std::pair<Channel, libdcp::Channel> > content_to_dcp () const {
+       void as_xml (xmlpp::Node *) const;
+
+       void add (int, libdcp::Channel);
+
+       std::list<int> dcp_to_content (libdcp::Channel) const;
+       std::list<std::pair<int, libdcp::Channel> > content_to_dcp () const {
                return _content_to_dcp;
        }
 
-       std::list<Channel> content_channels () const;
-       std::list<libdcp::Channel> content_to_dcp (Channel) const;
+       std::list<int> content_channels () const;
+       std::list<libdcp::Channel> content_to_dcp (int) const;
 
 private:
-       std::list<std::pair<Channel, libdcp::Channel> > _content_to_dcp;
+       std::list<std::pair<int, libdcp::Channel> > _content_to_dcp;
 };
 
-extern bool operator== (AudioMapping::Channel const &, AudioMapping::Channel const &);
-
 #endif