X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_decoder.h;h=1abe39a27d7e56bf74bb8a58be4ec557f7b7d301;hb=ca981c8cfa23111e92be329f1c2dfbe3a07b4247;hp=84deab10143f741a7dd4029dc0ee94e6e1586801;hpb=de2af791bdfdcd653752cba970e59efc7bf810c7;p=dcpomatic.git diff --git a/src/lib/dcp_decoder.h b/src/lib/dcp_decoder.h index 84deab101..1abe39a27 100644 --- a/src/lib/dcp_decoder.h +++ b/src/lib/dcp_decoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2016 Carl Hetherington + Copyright (C) 2014-2020 Carl Hetherington This file is part of DCP-o-matic. @@ -22,11 +22,13 @@ * @brief A decoder of existing DCPs. */ +#include "atmos_metadata.h" #include "decoder.h" #include "dcp.h" #include #include #include +#include namespace dcp { class Reel; @@ -39,25 +41,48 @@ struct dcp_subtitle_within_dcp_test; class DCPDecoder : public DCP, public Decoder { public: - DCPDecoder (boost::shared_ptr, boost::shared_ptr log); + DCPDecoder ( + boost::shared_ptr film, + boost::shared_ptr, + bool fast, + bool tolerant, + boost::shared_ptr old + ); std::list > reels () const { return _reels; } - void set_decode_referenced (); + void set_decode_referenced (bool r); + void set_forced_reduction (boost::optional reduction); - void pass (); - void seek (ContentTime t, bool accurate); + bool pass (); + void seek (dcpomatic::ContentTime t, bool accurate); + + std::string lazy_digest () const { + return _lazy_digest; + } + + dcpomatic::ContentTime position () const; private: friend struct dcp_subtitle_within_dcp_test; void next_reel (); void get_readers (); + void pass_texts (dcpomatic::ContentTime next, dcp::Size size); + void pass_texts ( + dcpomatic::ContentTime next, + boost::shared_ptr asset, + bool reference, + int64_t entry_point, + boost::shared_ptr decoder, + dcp::Size size + ); + std::string calculate_lazy_digest (boost::shared_ptr) const; /** Time of next thing to return from pass relative to the start of _reel */ - ContentTime _next; + dcpomatic::ContentTime _next; std::list > _reels; std::list >::iterator _reel; @@ -69,6 +94,11 @@ private: boost::shared_ptr _stereo_reader; /** Reader for current sound asset, if applicable */ boost::shared_ptr _sound_reader; + boost::shared_ptr _atmos_reader; + boost::optional _atmos_metadata; bool _decode_referenced; + boost::optional _forced_reduction; + + std::string _lazy_digest; };