-enum ReelType
-{
- REELTYPE_SINGLE,
- REELTYPE_BY_VIDEO_CONTENT,
- REELTYPE_BY_LENGTH
-};
-
-/** Type of captions.
- * For better or worse DoM has uses two names for text that appears
- * with the DCP:
- *
- * open captions: text that is shown to everybody on-screen (aka subtitles).
- * closed captions: text that is shown to some viewers using some other method.
- *
- * There is also still use of the word `subtitle' in the code; these are the
- * same as open captions in DoM.
- */
-enum CaptionType
-{
- CAPTION_OPEN,
- CAPTION_CLOSED,
- CAPTION_COUNT
-};
-
-extern std::string caption_type_to_string (CaptionType t);
-extern std::string caption_type_to_name (CaptionType t);
-extern CaptionType string_to_caption_type (std::string s);
-
-/** @struct Crop
- * @brief A description of the crop of an image or video.
- */
-struct Crop
-{
- Crop () : left (0), right (0), top (0), bottom (0) {}
- Crop (int l, int r, int t, int b) : left (l), right (r), top (t), bottom (b) {}
- explicit Crop (boost::shared_ptr<cxml::Node>);
-
- /** Number of pixels to remove from the left-hand side */
- int left;
- /** Number of pixels to remove from the right-hand side */
- int right;
- /** Number of pixels to remove from the top */
- int top;
- /** Number of pixels to remove from the bottom */
- int bottom;
-
- dcp::Size apply (dcp::Size s, int minimum = 4) const {
- s.width -= left + right;
- s.height -= top + bottom;
-
- if (s.width < minimum) {
- s.width = minimum;
- }
-
- if (s.height < minimum) {
- s.height = minimum;
- }
-
- return s;
- }
-
- void as_xml (xmlpp::Node *) const;
-};