diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-12-16 01:58:57 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-12-26 17:20:25 +0100 |
| commit | 24728b74693bb84d79474e014cdb952abc8a79f2 (patch) | |
| tree | b18a95441b7fcf53232958b364c84bcee67f1695 /src/lib/film.h | |
| parent | d7f6ab91208cb4a562ccd668ca2cc8135f124053 (diff) | |
Give ownership of info files to ReelWriters (#2912).v2.18.2
The motivation here is to stop a pattern where we create a file, close
it, and then re-open it (many times) as I think there are problems on
Windows when a virus scanner sees the new file, opens it for checking,
and then we can't re-open it.
This also makes things a fair bit simpler, as a lock is removed and we
don't try to differentiate read/write cases by opening the file in
different ways; it's now always writeable.
Diffstat (limited to 'src/lib/film.h')
| -rw-r--r-- | src/lib/film.h | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/lib/film.h b/src/lib/film.h index 0c6a1943e..648d9828b 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -84,28 +84,6 @@ struct ov_subs_in_vf_name; struct recover_test_2d_encrypted; -class InfoFileHandle -{ -public: - InfoFileHandle (boost::mutex& mutex, boost::filesystem::path file, bool read); - - InfoFileHandle(InfoFileHandle const&) = delete; - InfoFileHandle& operator=(InfoFileHandle const&) = delete; - InfoFileHandle(InfoFileHandle&&) = delete; - InfoFileHandle& operator=(InfoFileHandle&&) = delete; - - dcp::File& get () { - return _file; - } - -private: - friend class Film; - - boost::mutex::scoped_lock _lock; - dcp::File _file; -}; - - /** @class Film * * @brief A representation of some audio, video, subtitle and closed-caption content, @@ -122,7 +100,6 @@ public: Film (Film const&) = delete; Film& operator= (Film const&) = delete; - std::shared_ptr<InfoFileHandle> info_file_handle (dcpomatic::DCPTimePeriod period, bool read) const; boost::filesystem::path j2c_path (int, Frame, Eyes, bool) const; boost::filesystem::path audio_analysis_path (std::shared_ptr<const Playlist>) const; @@ -594,8 +571,6 @@ private: std::map<std::string, std::string> _ui_state; - mutable boost::mutex _info_file_mutex; - boost::signals2::scoped_connection _playlist_change_connection; boost::signals2::scoped_connection _playlist_order_changed_connection; boost::signals2::scoped_connection _playlist_content_change_connection; |
