X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_subtitle_decoder.h;h=95e783d0612a9876ec5f40050240bbd1e3bb03af;hb=0330b684fe616b465e65b67f7d995e659fa83fca;hp=4b52a1ac418d25582d9f6a70c9ad4e30c48e1c5b;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/src/lib/dcp_subtitle_decoder.h b/src/lib/dcp_subtitle_decoder.h index 4b52a1ac4..95e783d06 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,25 +18,30 @@ */ -#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); + DCPSubtitleDecoder (std::shared_ptr film, std::shared_ptr); -protected: - bool pass (PassReason, bool accurate); - void seek (ContentTime time, bool accurate); + bool pass (); + void seek (dcpomatic::ContentTime time, bool accurate); + + std::vector fonts () const; private: - std::list image_subtitles_during (ContentTimePeriod, bool starting) const; - std::list text_subtitles_during (ContentTimePeriod, bool starting) const; - ContentTimePeriod content_time_period (dcp::SubtitleString s) const; + dcpomatic::ContentTimePeriod content_time_period (std::shared_ptr s) const; + + std::vector> _subtitles; + std::vector>::const_iterator _next; - std::list _subtitles; - std::list::const_iterator _next; + std::vector _fonts; };