summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-09-13 23:43:12 +0200
committerCarl Hetherington <cth@carlh.net>2024-09-13 23:43:12 +0200
commitc1d3f6f4f645e76302ca4262de3517497fa1e14b (patch)
tree1e12c089628be8bb798b425ef78865773b6b7e2e
parent73747a031e35ab8884aa16ebd3c8721dfb0391bc (diff)
parent4f850f9958beacd8d2b39fda1941b68ffb94b2f0 (diff)
Merge remote-tracking branch 'origin/main' into v2.17.x
-rw-r--r--cscript15
-rw-r--r--src/lib/file_group.cc10
-rw-r--r--src/lib/film.cc2
-rw-r--r--src/lib/film.h5
-rw-r--r--src/lib/string_text_file.cc2
-rw-r--r--src/lib/util.cc10
-rw-r--r--src/lib/writer.cc2
-rw-r--r--src/wx/config_dialog.cc12
-rw-r--r--src/wx/supporters.cc11
-rw-r--r--test/j2k_encoder_test.cc12
-rw-r--r--test/job_manager_test.cc2
-rw-r--r--waf-tools/clang_compilation_database.py2
12 files changed, 59 insertions, 26 deletions
diff --git a/cscript b/cscript
index 6aa46ffde..c83bb8b64 100644
--- a/cscript
+++ b/cscript
@@ -45,7 +45,7 @@ for v in ['22.04']:
for v in ['23.04', '23.10']:
deb_build_depends[v] = copy.deepcopy(deb_build_depends_base)
deb_build_depends[v].extend(['libssh-dev', 'python3.11'])
-for v in ['24.04']:
+for v in ['24.04', '24.10']:
deb_build_depends[v] = copy.deepcopy(deb_build_depends_base)
deb_build_depends[v].extend(['libssh-dev', 'python3.12'])
for v in ['9', '10']:
@@ -218,6 +218,7 @@ def debs(boost, icu, x264):
return output
deb_depends['24.04'] = debs(boost='1.83.0', icu='74', x264='164')
+deb_depends['24.10'] = debs(boost='1.83.0', icu='74', x264='164')
deb_depends['9'] = copy.deepcopy(deb_depends_base)
deb_depends['9'].extend(['libboost-filesystem1.62.0',
@@ -534,8 +535,8 @@ def make_spec(filename, version, target, options, requires=None):
print('/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :', file=f)
def dependencies(target, options):
- deps = [('libdcp', 'v1.9.19', {'c++17': target.platform.startswith('osx')})]
- deps.append(('libsub', 'v1.6.51'))
+ deps = [('libdcp', 'v1.9.20', {'c++17': target.platform.startswith('osx')})]
+ deps.append(('libsub', 'v1.6.52'))
deps.append(('leqm-nrt', '30dcaea1373ac62fba050e02ce5b0c1085797a23'))
deps.append(('rtaudio', 'f619b76'))
# We get our OpenSSL libraries from the environment, but we
@@ -766,8 +767,16 @@ def package_debian(target, cpu, version, options):
target.set('CDIST_DIRECTORY', target.directory)
target.set('CDIST_CONFIGURE', '"' + configure_options(target, options, for_package=True) + '"')
+<<<<<<< HEAD
target.set('CDIST_PACKAGE', f'{name}{suffix}')
target.set('CDIST_WX_VERSION', "3.2" if target.version in ("23.04", "23.10", "24.04") else "3.1")
+||||||| e96f917d5
+ target.set('CDIST_PACKAGE', f'dcpomatic{suffix}')
+ target.set('CDIST_WX_VERSION', "3.2" if target.version in ("23.04", "23.10", "24.04") else "3.1")
+=======
+ target.set('CDIST_PACKAGE', f'dcpomatic{suffix}')
+ target.set('CDIST_WX_VERSION', "3.1" if target.version in ("16.04", "18.04", "20.04", "22.04") else "3.2")
+>>>>>>> origin/main
if not target.debug:
target.set('CDIST_DEBUG_PACKAGE_FLAG', '--no-ddebs')
diff --git a/src/lib/file_group.cc b/src/lib/file_group.cc
index 228faa74d..56a5c2c59 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[p], "rb");
+ if (!file) {
+ throw OpenFileError(_paths[p], file.open_error(), OpenFileError::READ);
}
+
+ _current_path = p;
+ _current_file = std::move(file);
_current_size = dcp::filesystem::file_size(_paths[_current_path]);
}
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 2e7df9cf8..835719868 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -2196,7 +2196,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/film.h b/src/lib/film.h
index 12872caf1..815c6ae74 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -89,6 +89,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;
}
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<const StringTextFileContent> 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 2e3485075..bf753d04d 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -566,7 +566,7 @@ digest_head_tail (vector<boost::filesystem::path> 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]));
@@ -585,7 +585,7 @@ digest_head_tail (vector<boost::filesystem::path> 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]));
@@ -691,7 +691,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"
);
}
@@ -954,11 +954,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 4b6f70f21..971085046 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -732,7 +732,7 @@ Writer::write_cover_sheet()
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 bd8582ea6..19d23c6cc 100644
--- a/src/wx/config_dialog.cc
+++ b/src/wx/config_dialog.cc
@@ -475,7 +475,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);
@@ -500,7 +500,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();
@@ -621,7 +621,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 ();
@@ -739,7 +739,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();
@@ -773,7 +773,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;
@@ -838,7 +838,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);
diff --git a/src/wx/supporters.cc b/src/wx/supporters.cc
index 36cffa34d..a7afac7ff 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"));
@@ -740,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"));
@@ -790,6 +795,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,9 +1213,11 @@ 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"));
+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"));
@@ -1240,6 +1248,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 +1335,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 +1375,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"));
diff --git a/test/j2k_encoder_test.cc b/test/j2k_encoder_test.cc
index 083a61cf8..358ccf435 100644
--- a/test/j2k_encoder_test.cc
+++ b/test/j2k_encoder_test.cc
@@ -44,19 +44,25 @@ BOOST_AUTO_TEST_CASE(j2k_encoder_deadlock_test)
auto film = new_test_film("j2k_encoder_deadlock_test");
+ auto constexpr threads = 4;
+
/* Don't call ::start() on this Writer, so it can never write anything */
Writer writer(film, {}, {});
- writer.set_encoder_threads(4);
+ writer.set_encoder_threads(threads);
/* We want to test the case where the writer queue fills, and this can't happen unless there
* are enough encoding threads (each of which will end up waiting for the writer to empty,
* which will never happen).
*/
- Config::instance()->set_master_encoding_threads(4);
+ Config::instance()->set_master_encoding_threads(threads);
J2KEncoder encoder(film, writer);
encoder.begin();
- for (int i = 0; i < 26; ++i) {
+ /* The queue will be full when we write another frame when there are already
+ * more than (threads * frames_in_memory_multiplier [i.e. 3])
+ * in the queue, so to fill the queue we must add threads * 3 + 2.
+ */
+ for (int i = 0; i < (threads * 3) + 2; ++i) {
auto image = make_shared<Image>(AV_PIX_FMT_RGB24, dcp::Size(1998, 1080), Image::Alignment::PADDED);
auto image_proxy = make_shared<RawImageProxy>(image);
encoder.encode(
diff --git a/test/job_manager_test.cc b/test/job_manager_test.cc
index 4a2f8bde5..abbbf5c4b 100644
--- a/test/job_manager_test.cc
+++ b/test/job_manager_test.cc
@@ -155,7 +155,7 @@ BOOST_AUTO_TEST_CASE(cancel_job_test)
jobs[1]->cancel();
jobs[0]->cancel();
- dcpomatic_sleep_seconds(1);
+ dcpomatic_sleep_seconds(5);
BOOST_CHECK(jobs[0]->finished_cancelled());
BOOST_CHECK(jobs[1]->finished_cancelled());
diff --git a/waf-tools/clang_compilation_database.py b/waf-tools/clang_compilation_database.py
index 189de1eb6..982e150f3 100644
--- a/waf-tools/clang_compilation_database.py
+++ b/waf-tools/clang_compilation_database.py
@@ -14,7 +14,7 @@ Usage:
conf.load('clang_compilation_database')
"""
-import sys, os, json, shlex, pipes
+import sys, os, json, shlex
from waflib import Logs, TaskGen, Task
Task.Task.keep_last_cmd = True