X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_subtitle_decoder.h;h=3eed4ad24cd5863dddd9197972c3773693c7b7dd;hb=ff639b3cf30afcc097bfd21d39c8d15f466cadd6;hp=7e832241e82fa211e2572091c6ca2ef52fd9e1f2;hpb=254b3044d72de6b033d7c584f5abd2b9aa70aad5;p=dcpomatic.git diff --git a/src/lib/dcp_subtitle_decoder.h b/src/lib/dcp_subtitle_decoder.h index 7e832241e..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 "text_decoder.h" #include "dcp_subtitle.h" + class DCPSubtitleContent; + class DCPSubtitleDecoder : public DCPSubtitle, public Decoder { public: - DCPSubtitleDecoder (boost::shared_ptr); + DCPSubtitleDecoder (std::shared_ptr film, std::shared_ptr); - bool pass (boost::shared_ptr film); - void seek (boost::shared_ptr film, 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; };