Some boost::filesystem::path cleanups; tweak for changes to libdcp.
[dcpomatic.git] / src / lib / types.h
index 458a2ecf3a21377b1bc4e3f91cb5186416741360..01560ba81fdedbd9eb643a816adb002b45acaace 100644 (file)
 #include <libdcp/util.h>
 
 class Content;
+class AudioBuffers;
+
+/** The version number of the protocol used to communicate
+ *  with servers.  Intended to be bumped when incompatibilities
+ *  are introduced.
+ */
+#define SERVER_LINK_VERSION 1
 
 typedef int64_t Time;
 #define TIME_MAX INT64_MAX
@@ -34,12 +41,43 @@ typedef int64_t OutputAudioFrame;
 typedef int    OutputVideoFrame;
 typedef std::vector<boost::shared_ptr<Content> > ContentList;
 
+template<class T>
+struct TimedAudioBuffers
+{
+       TimedAudioBuffers ()
+               : time (0)
+       {}
+       
+       TimedAudioBuffers (boost::shared_ptr<AudioBuffers> a, T t)
+               : audio (a)
+               , time (t)
+       {}
+       
+       boost::shared_ptr<AudioBuffers> audio;
+       T time;
+};
+
+enum VideoFrameType
+{
+       VIDEO_FRAME_TYPE_2D,
+       VIDEO_FRAME_TYPE_3D_LEFT_RIGHT
+};
+
+enum Eyes
+{
+       EYES_BOTH,
+       EYES_LEFT,
+       EYES_RIGHT,
+       EYES_COUNT
+};
+
 /** @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) {}
 
        /** Number of pixels to remove from the left-hand side */
        int left;