X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdecoder.h;h=7097db88d1b3cf134d35a0dd2725496de8ae4820;hb=a75cac36969942d1fcb43dadfdf60434c840af54;hp=26035d221080a5304cbccdde0bcf4490c78550bf;hpb=eb135e8dcdf36ae82420bcd18e954ad593b3e9a5;p=dcpomatic.git diff --git a/src/lib/decoder.h b/src/lib/decoder.h index 26035d221..7097db88d 100644 --- a/src/lib/decoder.h +++ b/src/lib/decoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2016 Carl Hetherington + Copyright (C) 2012-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,40 +18,56 @@ */ + /** @file src/decoder.h * @brief Decoder class. */ + #ifndef DCPOMATIC_DECODER_H #define DCPOMATIC_DECODER_H -#include "types.h" + #include "dcpomatic_time.h" +#include "weak_film.h" #include -class Decoded; -class VideoDecoder; + +class AtmosDecoder; class AudioDecoder; -class SubtitleDecoder; +class Decoded; class DecoderPart; +class TextDecoder; +class VideoDecoder; + /** @class Decoder. * @brief Parent class for decoders of content. */ -class Decoder : public boost::noncopyable +class Decoder : public WeakConstFilm { public: + Decoder (std::weak_ptr film); virtual ~Decoder () {} - boost::shared_ptr video; - boost::shared_ptr audio; - boost::shared_ptr subtitle; + Decoder (Decoder const&) = delete; + Decoder& operator= (Decoder const&) = delete; - /** @return true if there is no more data to come from this decoder */ + std::shared_ptr video; + std::shared_ptr audio; + std::list> text; + std::shared_ptr atmos; + + 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) = 0; + virtual void seek (dcpomatic::ContentTime time, bool accurate); - ContentTime position () const; + virtual dcpomatic::ContentTime position () const; }; + #endif