/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
#ifndef LIBDCP_TYPES_H
#define LIBDCP_TYPES_H
+#include <libcxml/cxml.h>
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
#include <string>
+namespace xmlpp {
+ class Element;
+}
+
namespace dcp
{
int height;
};
+extern bool operator== (Size const & a, Size const & b);
+extern bool operator!= (Size const & a, Size const & b);
+extern std::ostream& operator<< (std::ostream& s, Size const & a);
+
/** Identifier for a sound channel */
enum Channel {
LEFT = 0, ///< left
TEASER,
POLICY,
PUBLIC_SERVICE_ANNOUNCEMENT,
- ADVERTISEMENT
+ ADVERTISEMENT,
+ EPISODE,
+ PROMO
};
+extern std::string content_kind_to_string (ContentKind kind);
+extern ContentKind content_kind_from_string (std::string kind);
+
enum Effect
{
NONE,
enum Formulation {
MODIFIED_TRANSITIONAL_1,
+ MULTIPLE_MODIFIED_TRANSITIONAL_1,
DCI_ANY,
- DCI_SPECIFIC
+ DCI_SPECIFIC,
+ /** For testing: adds no AuthorizedDeviceInfo tag */
+ MODIFIED_TRANSITIONAL_TEST
};
/** @class Colour
*/
const float ALIGN_EPSILON = 1e-3;
+enum 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);
+extern std::ostream& operator<< (std::ostream& s, Rating const & r);
+
}
#endif