Merge master.
[dcpomatic.git] / src / lib / types.h
index 35c7a91f9785865e1dada8d2449fa725f4149ae4..e858d1e1feb6b7827ce09d79822e5817b4fa3df0 100644 (file)
@@ -34,11 +34,19 @@ class SubtitleContent;
 class FFmpegContent;
 class AudioBuffers;
 
+namespace cxml {
+       class Node;
+}
+
+namespace xmlpp {
+       class Node;
+}
+
 /** The version number of the protocol used to communicate
  *  with servers.  Intended to be bumped when incompatibilities
  *  are introduced.
  */
-#define SERVER_LINK_VERSION 1
+#define SERVER_LINK_VERSION 2
 
 typedef std::vector<boost::shared_ptr<Content> > ContentList;
 typedef std::vector<boost::shared_ptr<VideoContent> > VideoContentList;
@@ -85,6 +93,15 @@ enum Eyes
        EYES_COUNT
 };
 
+enum Part
+{
+       PART_LEFT_HALF,
+       PART_RIGHT_HALF,
+       PART_TOP_HALF,
+       PART_BOTTOM_HALF,
+       PART_WHOLE
+};
+
 /** @struct Crop
  *  @brief A description of the crop of an image or video.
  */
@@ -92,6 +109,7 @@ 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) {}
+       Crop (boost::shared_ptr<cxml::Node>);
 
        /** Number of pixels to remove from the left-hand side */
        int left;
@@ -116,6 +134,8 @@ struct Crop
                
                return s;
        }
+
+       void as_xml (xmlpp::Node *) const;
 };
 
 extern bool operator== (Crop const & a, Crop const & b);