Make jump-to-first-subtitle also work with DCP subs.
[dcpomatic.git] / src / lib / dcp_subtitle_decoder.h
index a9540c3cf05e6896901683d1eaf5c9a20f770889..d1237b2761c337a9b629b3baad7383e6b3e4ce19 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014-2020 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 
 */
 
+
 #include "text_decoder.h"
 #include "dcp_subtitle.h"
 #include "font_data.h"
 
+
 class DCPSubtitleContent;
 
+
 class DCPSubtitleDecoder : public DCPSubtitle, public Decoder
 {
 public:
        DCPSubtitleDecoder (std::shared_ptr<const Film> film, std::shared_ptr<const DCPSubtitleContent>);
 
-       bool pass ();
-       void seek (dcpomatic::ContentTime time, bool accurate);
+       bool pass () override;
+       void seek (dcpomatic::ContentTime time, bool accurate) override;
+
+       std::vector<dcpomatic::FontData> fonts () const override;
 
-       std::vector<dcpomatic::FontData> fonts () const;
+       boost::optional<dcpomatic::ContentTime> first () const;
 
 private:
        dcpomatic::ContentTimePeriod content_time_period (std::shared_ptr<const dcp::Subtitle> s) const;