Merge master.
[dcpomatic.git] / src / lib / subtitle.h
index e3a853695f0fb313f2f20f2f5e6775e359eada92..1151bc01d29379f4c8af291177be90cddf672ccd 100644 (file)
@@ -1,3 +1,5 @@
+/* -*- c-basic-offset: 8; default-tab-width: 8; -*- */
+
 /*
     Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
 
@@ -23,7 +25,7 @@
 
 #include <list>
 #include <boost/shared_ptr.hpp>
-#include "util.h"
+#include "types.h"
 
 struct AVSubtitle;
 class Image;
@@ -46,17 +48,17 @@ public:
                return _image;
        }
 
-       dvdomatic::Rect area () const;
+       dcpomatic::Rect area () const;
        
 private:
        Position _position;
        boost::shared_ptr<Image> _image;
 };
 
-dvdomatic::Rect
+dcpomatic::Rect
 subtitle_transformed_area (
        float target_x_scale, float target_y_scale,
-       dvdomatic::Rect sub_area, int subtitle_offset, float subtitle_scale
+       dcpomatic::Rect sub_area, int subtitle_offset, float subtitle_scale
        );
 
 /** A Subtitle class with details of the time over which it should be shown */
@@ -65,7 +67,7 @@ class TimedSubtitle
 public:
        TimedSubtitle (AVSubtitle const &);
 
-       bool displayed_at (double t) const;
+       bool displayed_at (Time) const;
        
        boost::shared_ptr<Subtitle> subtitle () const {
                return _subtitle;
@@ -74,8 +76,8 @@ public:
 private:
        /** the subtitle */
        boost::shared_ptr<Subtitle> _subtitle;
-       /** display from time in seconds from the start of the film */
-       double _from;
-       /** display to time in seconds from the start of the film */
-       double _to;
+       /** display from time from the start of the content */
+       Time _from;
+       /** display to time from the start of the content */
+       Time _to;
 };