From 8a35abc14d53a1e9a0dcaf78d793e0cca8bfeb73 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 2 Sep 2024 15:18:58 +0200 Subject: Recognise .webp as an image file. --- src/lib/util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/lib/util.cc b/src/lib/util.cc index fdc647fba..f637534a9 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -684,7 +684,7 @@ valid_image_file (boost::filesystem::path f) ext == ".tif" || ext == ".tiff" || ext == ".jpg" || ext == ".jpeg" || ext == ".png" || ext == ".bmp" || ext == ".tga" || ext == ".dpx" || ext == ".j2c" || ext == ".j2k" || ext == ".jp2" || ext == ".exr" || - ext == ".jpf" || ext == ".psd" + ext == ".jpf" || ext == ".psd" || ext == ".webp" ); } -- cgit v1.2.3 From 5cbecec37e691976b8855a923a7115e7a974dd3b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 3 Sep 2024 09:54:18 +0200 Subject: Clarify copying of InfoFileHandle. --- src/lib/film.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/lib/film.h b/src/lib/film.h index 43a41ad45..92e224ad1 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -86,6 +86,11 @@ 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; } -- cgit v1.2.3 From 5db3eda9c6f0d6b027263c519000997677253504 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 3 Sep 2024 17:53:24 +0200 Subject: Fix confusion about operator bool() with optional. I think previously no exception would be thrown even if the file weren't open. --- src/lib/file_group.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/lib/file_group.cc b/src/lib/file_group.cc index 228faa74d..469d07702 100644 --- a/src/lib/file_group.cc +++ b/src/lib/file_group.cc @@ -84,11 +84,13 @@ FileGroup::ensure_open_path (size_t p) const _current_file->close(); } - _current_path = p; - _current_file = dcp::File(_paths[_current_path], "rb"); - if (!_current_file) { - throw OpenFileError (_paths[_current_path], errno, OpenFileError::READ); + auto file = dcp::File(_paths[_current_path], "rb"); + if (!file) { + throw OpenFileError(_paths[_current_path], errno, OpenFileError::READ); } + + _current_path = p; + _current_file = std::move(file); _current_size = dcp::filesystem::file_size(_paths[_current_path]); } -- cgit v1.2.3 From 4049ec5e8bdddbc48689521a26bf47236c2b490d Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 3 Sep 2024 17:55:11 +0200 Subject: Fix a few places where we should use dcp::File::open_error() to get a more accurate error number on Windows. --- src/lib/file_group.cc | 2 +- src/lib/film.cc | 2 +- src/lib/string_text_file.cc | 2 +- src/lib/util.cc | 8 ++++---- src/lib/writer.cc | 2 +- src/wx/config_dialog.cc | 12 ++++++------ 6 files changed, 14 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/lib/file_group.cc b/src/lib/file_group.cc index 469d07702..27137196e 100644 --- a/src/lib/file_group.cc +++ b/src/lib/file_group.cc @@ -86,7 +86,7 @@ FileGroup::ensure_open_path (size_t p) const auto file = dcp::File(_paths[_current_path], "rb"); if (!file) { - throw OpenFileError(_paths[_current_path], errno, OpenFileError::READ); + throw OpenFileError(_paths[_current_path], file.open_error(), OpenFileError::READ); } _current_path = p; diff --git a/src/lib/film.cc b/src/lib/film.cc index d9ab6e2a3..674add78f 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -2092,7 +2092,7 @@ InfoFileHandle::InfoFileHandle (boost::mutex& mutex, boost::filesystem::path pat , _file(path, read ? "rb" : (dcp::filesystem::exists(path) ? "r+b" : "wb")) { if (!_file) { - throw OpenFileError(path, errno, read ? OpenFileError::READ : (dcp::filesystem::exists(path) ? OpenFileError::READ_WRITE : OpenFileError::WRITE)); + throw OpenFileError(path, _file.open_error(), read ? OpenFileError::READ : (dcp::filesystem::exists(path) ? OpenFileError::READ_WRITE : OpenFileError::WRITE)); } } diff --git a/src/lib/string_text_file.cc b/src/lib/string_text_file.cc index 9b43b35a6..f5d5e0d2a 100644 --- a/src/lib/string_text_file.cc +++ b/src/lib/string_text_file.cc @@ -57,7 +57,7 @@ StringTextFile::StringTextFile (shared_ptr content) if (ext == ".stl") { dcp::File f(content->path(0), "rb"); if (!f) { - throw OpenFileError (f.path(), errno, OpenFileError::READ); + throw OpenFileError(f.path(), f.open_error(), OpenFileError::READ); } try { reader.reset(new sub::STLBinaryReader(f.get())); diff --git a/src/lib/util.cc b/src/lib/util.cc index f637534a9..8b767cd15 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -559,7 +559,7 @@ digest_head_tail (vector files, boost::uintmax_t size) while (i < int64_t (files.size()) && to_do > 0) { dcp::File f(files[i], "rb"); if (!f) { - throw OpenFileError (files[i].string(), errno, OpenFileError::READ); + throw OpenFileError(files[i].string(), f.open_error(), OpenFileError::READ); } auto this_time = min(to_do, dcp::filesystem::file_size(files[i])); @@ -578,7 +578,7 @@ digest_head_tail (vector files, boost::uintmax_t size) while (i >= 0 && to_do > 0) { dcp::File f(files[i], "rb"); if (!f) { - throw OpenFileError (files[i].string(), errno, OpenFileError::READ); + throw OpenFileError(files[i].string(), f.open_error(), OpenFileError::READ); } auto this_time = min(to_do, dcp::filesystem::file_size(files[i])); @@ -956,11 +956,11 @@ copy_in_bits (boost::filesystem::path from, boost::filesystem::path to, std::fun { dcp::File f(from, "rb"); if (!f) { - throw OpenFileError (from, errno, OpenFileError::READ); + throw OpenFileError(from, f.open_error(), OpenFileError::READ); } dcp::File t(to, "wb"); if (!t) { - throw OpenFileError (to, errno, OpenFileError::WRITE); + throw OpenFileError(to, t.open_error(), OpenFileError::WRITE); } /* on the order of a second's worth of copying */ diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 7b9defd73..37b8e4ccb 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -728,7 +728,7 @@ Writer::write_cover_sheet (boost::filesystem::path output_dcp) auto const cover = film()->file("COVER_SHEET.txt"); dcp::File file(cover, "w"); if (!file) { - throw OpenFileError (cover, errno, OpenFileError::WRITE); + throw OpenFileError(cover, file.open_error(), OpenFileError::WRITE); } auto text = Config::instance()->cover_sheet (); diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index 12e914742..da39c443a 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -473,7 +473,7 @@ CertificateChainEditor::export_certificate () } dcp::File f(path, "w"); if (!f) { - throw OpenFileError(path, errno, OpenFileError::WRITE); + throw OpenFileError(path, f.open_error(), OpenFileError::WRITE); } string const s = j->certificate(true); @@ -498,7 +498,7 @@ CertificateChainEditor::export_chain () } dcp::File f(path, "w"); if (!f) { - throw OpenFileError(path, errno, OpenFileError::WRITE); + throw OpenFileError(path, f.open_error(), OpenFileError::WRITE); } auto const s = _get()->chain(); @@ -619,7 +619,7 @@ CertificateChainEditor::export_private_key () } dcp::File f(path, "w"); if (!f) { - throw OpenFileError (path, errno, OpenFileError::WRITE); + throw OpenFileError(path, f.open_error(), OpenFileError::WRITE); } auto const s = _get()->key().get (); @@ -737,7 +737,7 @@ KeysPage::export_decryption_chain_and_key () boost::filesystem::path path(wx_to_std(d->GetPath())); dcp::File f(path, "w"); if (!f) { - throw OpenFileError(path, errno, OpenFileError::WRITE); + throw OpenFileError(path, f.open_error(), OpenFileError::WRITE); } auto const chain = Config::instance()->decryption_chain()->chain(); @@ -771,7 +771,7 @@ KeysPage::import_decryption_chain_and_key () dcp::File f(wx_to_std(d->GetPath()), "r"); if (!f) { - throw OpenFileError(f.path(), errno, OpenFileError::WRITE); + throw OpenFileError(f.path(), f.open_error(), OpenFileError::WRITE); } string current; @@ -836,7 +836,7 @@ KeysPage::export_decryption_certificate () } dcp::File f(path, "w"); if (!f) { - throw OpenFileError(path, errno, OpenFileError::WRITE); + throw OpenFileError(path, f.open_error(), OpenFileError::WRITE); } auto const s = Config::instance()->decryption_chain()->leaf().certificate (true); -- cgit v1.2.3 From 8a5e685080844921d02978f81057d2ac574b0fc6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 6 Sep 2024 13:08:41 +0200 Subject: Supporters update. --- src/wx/supporters.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/wx/supporters.cc b/src/wx/supporters.cc index 36cffa34d..3e1756dce 100644 --- a/src/wx/supporters.cc +++ b/src/wx/supporters.cc @@ -19,6 +19,7 @@ supported_by.Add (wxT ("Paulo Abreu")); supported_by.Add (wxT ("Manuel AC")); supported_by.Add (wxT ("Festival international du cinéma francophone en Acadie")); supported_by.Add (wxT ("le Grand Action")); +supported_by.Add (wxT ("Dollface Actual")); supported_by.Add (wxT ("ed Adamo")); supported_by.Add (wxT ("Scott Adderton")); supported_by.Add (wxT ("Éva Adorján")); @@ -194,6 +195,7 @@ supported_by.Add (wxT ("Jean Luc Chevé")); supported_by.Add (wxT ("David Chien")); supported_by.Add (wxT ("Abundant Health Chiropractic")); supported_by.Add (wxT ("Georgy Cholakov")); +supported_by.Add (wxT ("Lee Christiansen")); supported_by.Add (wxT ("Frank Cianciolo")); supported_by.Add (wxT ("Opificio Ciclope")); supported_by.Add (wxT ("Tahoe Art Haus And Cinema")); @@ -379,6 +381,7 @@ supported_by.Add (wxT ("KulturKino Feuchtwangen")); supported_by.Add (wxT ("Lorenzo Fiale")); supported_by.Add (wxT ("Dean Fick")); supported_by.Add (wxT ("Marc Fiebig")); +supported_by.Add (wxT ("Aglaja Filipovic")); supported_by.Add (wxT ("Moshel Film")); supported_by.Add (wxT ("Juli Film")); supported_by.Add (wxT ("Pató Film")); @@ -599,6 +602,7 @@ supported_by.Add (wxT ("Melinda James")); supported_by.Add (wxT ("Luca Jankovic")); supported_by.Add (wxT ("Andy Jans-Brown")); supported_by.Add (wxT ("Mart Jansink")); +supported_by.Add (wxT ("David Jenkins")); supported_by.Add (wxT ("Scott Jennings")); supported_by.Add (wxT ("Jonathan Jensen")); supported_by.Add (wxT ("Frank Jerkic")); @@ -790,6 +794,7 @@ supported_by.Add (wxT ("Garry Maddison")); supported_by.Add (wxT ("Peter Maddock")); supported_by.Add (wxT ("Mat Made")); supported_by.Add (wxT ("Michael Madigan")); +supported_by.Add (wxT ("Lanterna Magica")); supported_by.Add (wxT ("Peter Magnusson")); supported_by.Add (wxT ("Paolo Magris")); supported_by.Add (wxT ("Andrea Maguolo")); @@ -1207,6 +1212,7 @@ supported_by.Add (wxT ("Raggio Verde Subtitles")); supported_by.Add (wxT ("Michael Suesterhenn")); supported_by.Add (wxT ("Christian Suhren")); supported_by.Add (wxT ("Frans Suijs")); +supported_by.Add (wxT ("Sergey Sushinskiy")); supported_by.Add (wxT ("Spring Sutter")); supported_by.Add (wxT ("Sven")); supported_by.Add (wxT ("Phil Svitek")); @@ -1240,6 +1246,7 @@ supported_by.Add (wxT ("Rodeo Drive-In Theatre")); supported_by.Add (wxT ("Ralph Thiekötter")); supported_by.Add (wxT ("Carlo Thiel")); supported_by.Add (wxT ("Nicholas Thiele")); +supported_by.Add (wxT ("Mark Thomas")); supported_by.Add (wxT ("Jamie Thomas")); supported_by.Add (wxT ("Ade Thompson")); supported_by.Add (wxT ("Thorkell")); @@ -1326,6 +1333,7 @@ supported_by.Add (wxT ("Paul Howard, WeMakeFilms")); supported_by.Add (wxT ("Mike Wendt")); supported_by.Add (wxT ("Frank Wenz")); supported_by.Add (wxT ("Anja Wenz")); +supported_by.Add (wxT ("Olav Werner")); supported_by.Add (wxT ("Maik Wieczorek")); supported_by.Add (wxT ("Ralph Wiegandt")); supported_by.Add (wxT ("Johannes Wilbrand")); @@ -1365,6 +1373,7 @@ supported_by.Add (wxT ("Peter Zeitlinger")); supported_by.Add (wxT ("Pavel Zhdanko")); supported_by.Add (wxT ("Chenliang Zhu")); supported_by.Add (wxT ("Daniel Židek")); +supported_by.Add (wxT ("Hens Zimmerman")); supported_by.Add (wxT ("Ernst Zimmerman")); supported_by.Add (wxT ("Roberto Zin")); supported_by.Add (wxT ("Matthieu Zingle")); -- cgit v1.2.3 From 179e362688a5a533f771942cde5126c0b11c7d08 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 11 Sep 2024 23:08:32 +0200 Subject: Fix stupid bug introduced in 5db3eda9c6f0 --- src/lib/file_group.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/file_group.cc b/src/lib/file_group.cc index 27137196e..56a5c2c59 100644 --- a/src/lib/file_group.cc +++ b/src/lib/file_group.cc @@ -84,9 +84,9 @@ FileGroup::ensure_open_path (size_t p) const _current_file->close(); } - auto file = dcp::File(_paths[_current_path], "rb"); + auto file = dcp::File(_paths[p], "rb"); if (!file) { - throw OpenFileError(_paths[_current_path], file.open_error(), OpenFileError::READ); + throw OpenFileError(_paths[p], file.open_error(), OpenFileError::READ); } _current_path = p; -- cgit v1.2.3 From 4f850f9958beacd8d2b39fda1941b68ffb94b2f0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 13 Sep 2024 23:34:11 +0200 Subject: Supporters update. --- src/wx/supporters.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/wx/supporters.cc b/src/wx/supporters.cc index 3e1756dce..a7afac7ff 100644 --- a/src/wx/supporters.cc +++ b/src/wx/supporters.cc @@ -744,6 +744,7 @@ supported_by.Add (wxT ("Pedja Ljubojevic")); supported_by.Add (wxT ("Moon Atlas LLC")); supported_by.Add (wxT ("Pilotkino LLC")); supported_by.Add (wxT ("No Blood Of Mine LLC")); +supported_by.Add (wxT ("Moving Picture Boys LLC")); supported_by.Add (wxT ("Pelidom LLC")); supported_by.Add (wxT ("Renaissance Entertainment LLC")); supported_by.Add (wxT ("Power Of Pearl Movie LLC")); @@ -1216,6 +1217,7 @@ supported_by.Add (wxT ("Sergey Sushinskiy")); supported_by.Add (wxT ("Spring Sutter")); supported_by.Add (wxT ("Sven")); supported_by.Add (wxT ("Phil Svitek")); +supported_by.Add (wxT ("Marcin Świerczyński")); supported_by.Add (wxT ("Jürgen Swoboda")); supported_by.Add (wxT ("SymmetryFilms")); supported_by.Add (wxT ("Advanced Projection Systems")); -- cgit v1.2.3