Remove the strange tolerant flag in Film.
authorCarl Hetherington <cth@carlh.net>
Sun, 19 Jan 2025 23:33:57 +0000 (00:33 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 20 Jan 2025 19:36:46 +0000 (20:36 +0100)
Instead, we now pass it in directly to Content::examine() and the
Player.

src/lib/dcp_content.cc
src/lib/film.cc
src/lib/film.h
src/tools/dcpomatic_player.cc

index ae2a08c29b90a69e660a55c1ec71ab9d52933220..32b97b06f1b9443e7eb5b10d9ff3a4d5e867ea47 100644 (file)
@@ -608,8 +608,8 @@ DCPContent::reels (shared_ptr<const Film> film) const
        if (reel_lengths.empty()) {
                /* Old metadata with no reel lengths; get them here instead */
                try {
-                       scoped_ptr<DCPExaminer> examiner (new DCPExaminer(shared_from_this(), film->tolerant()));
-                       reel_lengths = examiner->reel_lengths ();
+                       DCPExaminer examiner(shared_from_this(), true);
+                       reel_lengths = examiner.reel_lengths();
                } catch (...) {
                        /* Could not examine the DCP; guess reels */
                        reel_lengths.push_back (length_after_trim(film).frames_round(film->video_frame_rate()));
index dd702a3fddf86b6402c59e2ca54cb1af62e789f4..abe8f4c3b42d3dc99b56dfbe7a798ec97d7eac0c 100644 (file)
@@ -192,7 +192,6 @@ Film::Film (optional<boost::filesystem::path> dir)
        , _audio_language(Config::instance()->default_audio_language())
        , _state_version (current_state_version)
        , _dirty (false)
-       , _tolerant (false)
 {
        set_isdcf_date_today ();
 
index aeb389cde6d4ae9a6138d5c1df5be1713d9fa5a4..7b3e2872b64de3ded04fbadc3ff9eccfc0e9c259 100644 (file)
@@ -196,14 +196,6 @@ public:
        bool references_dcp_audio () const;
        bool contains_atmos_content () const;
 
-       void set_tolerant (bool t) {
-               _tolerant = t;
-       }
-
-       bool tolerant () const {
-               return _tolerant;
-       }
-
        bool last_written_by_earlier_than(int major, int minor, int micro) const;
 
        /* GET */
@@ -571,11 +563,6 @@ private:
        /** film being used as a template, or 0 */
        std::shared_ptr<Film> _template_film;
 
-       /** Be tolerant of errors in content (currently applies to DCP only).
-           Not saved as state.
-       */
-       bool _tolerant;
-
        std::map<std::string, std::string> _ui_state;
 
        boost::signals2::scoped_connection _playlist_change_connection;
index 30318175b6938e6b4d14dba357766d78e905969d..a3bb1693a4608bdb156f7d304ec3ffa6c36016f7 100644 (file)
@@ -478,7 +478,6 @@ public:
        void reset_film (shared_ptr<Film> film = shared_ptr<Film>(new Film(optional<boost::filesystem::path>())))
        {
                _film = film;
-               _film->set_tolerant (true);
                _film->set_audio_channels (MAX_DCP_AUDIO_CHANNELS);
                _viewer.set_film(_film);
                _controls->set_film (_film);