Another try at sorting out the thorny question of timing.
[dcpomatic.git] / src / lib / types.h
index c2bb9d8531d2ee1f8c5761ebd2f1827119a5d372..33f8239d88cbee89ace3e07b51acd94d67b27fd9 100644 (file)
 #define DCPOMATIC_TYPES_H
 
 #include <vector>
+#include <stdint.h>
 #include <boost/shared_ptr.hpp>
 #include <libdcp/util.h>
 
 class Content;
 
-typedef std::vector<boost::shared_ptr<Content> > ContentList;
-typedef int64_t ContentAudioFrame;
-typedef int ContentVideoFrame;
+typedef int64_t Time;
+#define TIME_MAX INT64_MAX
+#define TIME_HZ  ((Time) 96000)
+typedef int64_t OutputAudioFrame;
+typedef int     OutputVideoFrame;
 
 /** @struct Crop
  *  @brief A description of the crop of an image or video.
@@ -71,6 +74,8 @@ struct Position
        int y;
 };
 
+namespace dcpomatic {
+
 /** @struct Rect
  *  @brief A rectangle.
  */
@@ -104,6 +109,10 @@ struct Rect
        }
 
        Rect intersection (Rect const & other) const;
+
+       bool contains (Position) const;
 };
 
+}
+
 #endif