X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_decoder.h;h=0882bfd097784295e299fdd155c46fe681b284cc;hb=865316f0129c85cdd0248b87502fe97dec94b3f0;hp=887f8ad5ccaa2a4bbb0ad217bc33a53ea94d4027;hpb=cb6729aa79b555b219974207fbe2ff0510f9d3ea;p=dcpomatic.git diff --git a/src/lib/dcp_decoder.h b/src/lib/dcp_decoder.h index 887f8ad5c..0882bfd09 100644 --- a/src/lib/dcp_decoder.h +++ b/src/lib/dcp_decoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2020 Carl Hetherington + Copyright (C) 2014-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,18 +18,20 @@ */ + /** @file src/dcp_decoder.h * @brief A decoder of existing DCPs. */ + #include "atmos_metadata.h" #include "decoder.h" -#include "dcp.h" #include #include #include #include + namespace dcp { class Reel; } @@ -38,12 +40,13 @@ class DCPContent; class Log; struct dcp_subtitle_within_dcp_test; -class DCPDecoder : public DCP, public Decoder + +class DCPDecoder : public Decoder { public: DCPDecoder ( std::shared_ptr film, - std::shared_ptr, + std::shared_ptr content, bool fast, bool tolerant, std::shared_ptr old @@ -56,16 +59,16 @@ public: void set_decode_referenced (bool r); void set_forced_reduction (boost::optional reduction); - bool pass (); - void seek (dcpomatic::ContentTime t, bool accurate); + bool pass () override; + void seek (dcpomatic::ContentTime t, bool accurate) override; - std::vector fonts () const; + std::vector fonts () const override; std::string lazy_digest () const { return _lazy_digest; } - dcpomatic::ContentTime position () const; + dcpomatic::ContentTime position () const override; private: friend struct dcp_subtitle_within_dcp_test; @@ -83,13 +86,15 @@ private: ); std::string calculate_lazy_digest (std::shared_ptr) const; + std::shared_ptr _dcp_content; + /** Time of next thing to return from pass relative to the start of _reel */ dcpomatic::ContentTime _next; std::vector> _reels; std::vector>::iterator _reel; /** Offset of _reel from the start of the content in frames */ - int64_t _offset; + int64_t _offset = 0; /** Reader for current mono picture asset, if applicable */ std::shared_ptr _mono_reader; /** Reader for current stereo picture asset, if applicable */ @@ -99,7 +104,7 @@ private: std::shared_ptr _atmos_reader; boost::optional _atmos_metadata; - bool _decode_referenced; + bool _decode_referenced = false; boost::optional _forced_reduction; std::string _lazy_digest;