Fix crashes on x-thread signal emission.
[dcpomatic.git] / src / lib / content_subtitle.h
index 6a28c37bf2c79b19eb3ffde4040f66559c6b277a..36bc22b13e5e5f04d7bd9243f264784eb67ac7cb 100644 (file)
 #ifndef DCPOMATIC_CONTENT_SUBTITLE_H
 #define DCPOMATIC_CONTENT_SUBTITLE_H
 
-#include <list>
-#include <dcp/subtitle_string.h>
 #include "dcpomatic_time.h"
 #include "rect.h"
+#include "image_subtitle.h"
+#include <dcp/subtitle_string.h>
+#include <list>
 
 class Image;
 
@@ -37,8 +38,7 @@ class ContentImageSubtitle : public ContentSubtitle
 {
 public:
        ContentImageSubtitle (ContentTimePeriod p, boost::shared_ptr<Image> im, dcpomatic::Rect<double> r)
-               : image (im)
-               , rectangle (r)
+               : sub (im, r)
                , _period (p)
        {}
 
@@ -46,8 +46,8 @@ public:
                return _period;
        }
 
-       boost::shared_ptr<Image> image;
-       dcpomatic::Rect<double> rectangle;
+       /* Our subtitle, with its rectangle unmodified by any offsets or scales that the content specifies */
+       ImageSubtitle sub;
 
 private:
        ContentTimePeriod _period;