X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdecoder.h;h=da5be4af679ccbda8b7c2100e2af3e5ce52b82e6;hb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26;hp=d48df7517814aeb14de7b499f510615dd186d0dc;hpb=cbd4450197a083bf58bda510e626f73ba583cb66;p=dcpomatic.git diff --git a/src/lib/decoder.h b/src/lib/decoder.h index d48df7517..da5be4af6 100644 --- a/src/lib/decoder.h +++ b/src/lib/decoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2018 Carl Hetherington + Copyright (C) 2012-2020 Carl Hetherington This file is part of DCP-o-matic. @@ -26,36 +26,46 @@ #define DCPOMATIC_DECODER_H #include "types.h" +#include "film.h" +#include "font_data.h" #include "dcpomatic_time.h" +#include "weak_film.h" #include class Decoded; class VideoDecoder; class AudioDecoder; -class CaptionDecoder; +class TextDecoder; +class AtmosDecoder; class DecoderPart; /** @class Decoder. * @brief Parent class for decoders of content. */ -class Decoder : public boost::noncopyable +class Decoder : public boost::noncopyable, public WeakConstFilm { public: + Decoder (std::weak_ptr film); virtual ~Decoder () {} - boost::shared_ptr video; - boost::shared_ptr audio; - std::list > caption; + std::shared_ptr video; + std::shared_ptr audio; + std::list > text; + std::shared_ptr atmos; - boost::shared_ptr only_caption () const; + std::shared_ptr only_text () const; /** Do some decoding and perhaps emit video, audio or subtitle data. * @return true if this decoder will emit no more data unless a seek() happens. */ virtual bool pass () = 0; - virtual void seek (ContentTime time, bool accurate); + virtual void seek (dcpomatic::ContentTime time, bool accurate); - ContentTime position () const; + virtual dcpomatic::ContentTime position () const; + + virtual std::vector fonts () const { + return std::vector(); + } }; #endif