Check _inter_size in ::has_j2k() (fixes #2086).
[dcpomatic.git] / src / lib / dcp_subtitle_decoder.h
index 076dc3f3bb9bd9af3dd28838140c786b6f5543b6..95e783d0612a9876ec5f40050240bbd1e3bb03af 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
-#include "subtitle_decoder.h"
+
+#include "text_decoder.h"
 #include "dcp_subtitle.h"
+#include "font_data.h"
+
 
 class DCPSubtitleContent;
 
+
 class DCPSubtitleDecoder : public DCPSubtitle, public Decoder
 {
 public:
-       DCPSubtitleDecoder (boost::shared_ptr<const DCPSubtitleContent>, boost::shared_ptr<Log> log);
+       DCPSubtitleDecoder (std::shared_ptr<const Film> film, std::shared_ptr<const DCPSubtitleContent>);
 
-       void pass ();
-       void seek (ContentTime time, bool accurate);
+       bool pass ();
+       void seek (dcpomatic::ContentTime time, bool accurate);
+
+       std::vector<dcpomatic::FontData> fonts () const;
 
 private:
-       ContentTimePeriod content_time_period (dcp::SubtitleString s) const;
+       dcpomatic::ContentTimePeriod content_time_period (std::shared_ptr<const dcp::Subtitle> s) const;
+
+       std::vector<std::shared_ptr<const dcp::Subtitle>> _subtitles;
+       std::vector<std::shared_ptr<const dcp::Subtitle>>::const_iterator _next;
 
-       std::list<dcp::SubtitleString> _subtitles;
-       std::list<dcp::SubtitleString>::const_iterator _next;
+       std::vector<dcpomatic::FontData> _fonts;
 };