X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_subtitle_decoder.h;h=9d085125382e82f55d237e52414585f3e3930cf4;hb=4401895dfbb25834d4385621824e72ae19c8962c;hp=5bf6363ad282630005a81067e0ac1940179e5cd9;hpb=c4403784febdbdd42e9c32e67fadb147f11fe566;p=dcpomatic.git diff --git a/src/lib/dcp_subtitle_decoder.h b/src/lib/dcp_subtitle_decoder.h index 5bf6363ad..9d0851253 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,34 @@ */ -#include "text_decoder.h" + #include "dcp_subtitle.h" +#include "font_id_allocator.h" +#include "text_decoder.h" + class DCPSubtitleContent; + class DCPSubtitleDecoder : public DCPSubtitle, public Decoder { public: - DCPSubtitleDecoder (boost::shared_ptr film, boost::shared_ptr); + DCPSubtitleDecoder (std::shared_ptr film, std::shared_ptr); + + bool pass () override; + void seek (dcpomatic::ContentTime time, bool accurate) override; - bool pass (); - void seek (dcpomatic::ContentTime time, bool accurate); + boost::optional first () const; private: - dcpomatic::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; + + dcp::SubtitleStandard _subtitle_standard; - std::list > _subtitles; - std::list >::const_iterator _next; + std::shared_ptr _asset; + FontIDAllocator _font_id_allocator; };