X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_subtitle_decoder.h;h=3eed4ad24cd5863dddd9197972c3773693c7b7dd;hb=9726a58f44d52d235b027225ddd68c6acf83c733;hp=0756a278f4b475212e2313b2efe40c2dbf76d7d1;hpb=64a6a87dd4a3fd43665242b8a8b2b35a675a7839;p=dcpomatic.git diff --git a/src/lib/dcp_subtitle_decoder.h b/src/lib/dcp_subtitle_decoder.h index 0756a278f..3eed4ad24 100644 --- a/src/lib/dcp_subtitle_decoder.h +++ b/src/lib/dcp_subtitle_decoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington + Copyright (C) 2014-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,22 +18,30 @@ */ -#include "subtitle_decoder.h" + +#include "text_decoder.h" #include "dcp_subtitle.h" + class DCPSubtitleContent; + class DCPSubtitleDecoder : public DCPSubtitle, public Decoder { public: - DCPSubtitleDecoder (boost::shared_ptr, boost::shared_ptr log); + DCPSubtitleDecoder (std::shared_ptr film, std::shared_ptr); - bool pass (); - void seek (ContentTime time, bool accurate); + bool pass () override; + void seek (dcpomatic::ContentTime time, bool accurate) override; + + boost::optional first () const; private: - ContentTimePeriod content_time_period (boost::shared_ptr s) const; + dcpomatic::ContentTimePeriod content_time_period (std::shared_ptr s) const; + void update_position(); + + std::vector> _subtitles; + std::vector>::const_iterator _next; - std::list > _subtitles; - std::list >::const_iterator _next; + dcp::Standard _standard; };