+
+extern bool operator== (Colour const & a, Colour const & b);
+extern bool operator!= (Colour const & a, Colour const & b);
+
+
+typedef boost::function<void (NoteType, std::string)> NoteHandler;
+
+
+/** Maximum absolute difference between dcp::SubtitleString::aspect_adjust values that
+ * are considered equal
+ */
+constexpr float ASPECT_ADJUST_EPSILON = 1e-3;
+
+
+/** Maximum absolute difference between dcp::SubtitleString alignment values that
+ * are considered equal.
+ */
+constexpr float ALIGN_EPSILON = 1e-3;
+
+
+enum class Marker {
+ FFOC, ///< first frame of composition
+ LFOC, ///< last frame of composition
+ FFTC, ///< first frame of title credits
+ LFTC, ///< last frame of title credits
+ FFOI, ///< first frame of intermission
+ LFOI, ///< last frame of intermission
+ FFEC, ///< first frame of end credits
+ LFEC, ///< last frame of end credits
+ FFMC, ///< first frame of moving credits
+ LFMC ///< last frame of moving credits
+};
+
+
+std::string marker_to_string (Marker);
+Marker marker_from_string (std::string);
+
+
+class Rating
+{
+public:
+ Rating (std::string agency_, std::string label_)
+ : agency (agency_)
+ , label (label_)
+ {}
+
+ explicit Rating (cxml::ConstNodePtr node);
+
+ void as_xml (xmlpp::Element* parent) const;
+
+ /** URI of the agency issuing the rating */
+ std::string agency;
+ /** Rating (e.g. PG, PG-13, 12A etc) */
+ std::string label;
+};
+
+
+extern bool operator== (Rating const & a, Rating const & b);
+
+
+enum class Status
+{
+ FINAL, ///< final version
+ TEMP, ///< temporary version (picture/sound unfinished)
+ PRE ///< pre-release (picture/sound finished)
+};
+
+
+extern std::string status_to_string (Status s);
+extern Status string_to_status (std::string s);
+
+
+class ContentVersion
+{
+public:
+ ContentVersion ();
+
+ explicit ContentVersion (cxml::ConstNodePtr node);
+
+ explicit ContentVersion (std::string label_text_);
+
+ ContentVersion (std::string id_, std::string label_text_)
+ : id (id_)
+ , label_text (label_text_)
+ {}
+
+ void as_xml (xmlpp::Element* parent) const;
+
+ std::string id;
+ std::string label_text;
+};
+
+
+class Luminance
+{
+public:
+ enum class Unit {
+ CANDELA_PER_SQUARE_METRE,
+ FOOT_LAMBERT
+ };
+
+ Luminance (cxml::ConstNodePtr node);
+
+ Luminance (float value, Unit unit);
+
+ void set_value (float v);
+ void set_unit (Unit u) {
+ _unit = u;
+ }
+
+ float value () const {
+ return _value;
+ }
+
+ Unit unit () const {
+ return _unit;
+ }
+
+ void as_xml (xmlpp::Element* parent, std::string ns) const;
+
+ static std::string unit_to_string (Unit u);
+ static Unit string_to_unit (std::string u);
+
+private:
+ float _value;
+ Unit _unit;
+};
+
+
+bool operator== (Luminance const& a, Luminance const& b);
+
+
+class MainSoundConfiguration
+{
+public:
+ MainSoundConfiguration (std::string);
+ MainSoundConfiguration (MCASoundField field_, int channels);
+
+ MCASoundField field () const {
+ return _field;
+ }
+
+ int channels () const {
+ return _channels.size();
+ }
+
+ boost::optional<Channel> mapping (int index) const;
+ void set_mapping (int index, Channel channel);
+
+ std::string to_string () const;
+
+private:
+ MCASoundField _field;
+ std::vector<boost::optional<Channel> > _channels;
+};
+