From: Carl Hetherington Date: Fri, 17 May 2024 13:03:15 +0000 (+0200) Subject: Emit no audio from DCPs if none is mapped X-Git-Tag: v2.16.85 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=HEAD;hp=ff12ccdde76c54d3b9e69799a63750db9edf0023 Emit no audio from DCPs if none is mapped This makes DCP content behave the same as FFmpeg. --- diff --git a/cscript b/cscript index dd7f9c44a..eb2c8e436 100644 --- a/cscript +++ b/cscript @@ -535,7 +535,7 @@ def dependencies(target, options): # Use distro-provided FFmpeg on Arch deps = [] - deps.append(('libdcp', 'v1.8.99')) + deps.append(('libdcp', 'v1.8.100')) deps.append(('libsub', 'v1.6.47')) deps.append(('leqm-nrt', '30dcaea1373ac62fba050e02ce5b0c1085797a23')) deps.append(('rtaudio', 'f619b76')) @@ -788,6 +788,8 @@ def package_rpm(target, cpu, version, options): make_spec('dcpomatic2.spec', version, target, options, requires) cmd = 'rpmbuild --define "_topdir %s" -bb dcpomatic2.spec' % topdir + # On Centos 7 we build and install boost ourselves, so we must look for it in the right place + target.set('LINKFLAGS', '-L/usr/local/lib') target.command(cmd) rpms = [] @@ -923,7 +925,11 @@ def test(target, options, test): if target.platform == 'windows': cmd = 'run\\tests ' else: - cmd = 'run/tests --check --log_level=test_suite ' + cmd = 'run/tests ' + if target.environment_prefix: + cmd += '-e %s ' % target.environment_prefix + if target.platform != 'windows': + cmd += ' --check --log_level=test_suite ' if target.debug: cmd += '--backtrace ' if test is not None: diff --git a/run/environment b/run/environment index aa4f77187..dac7bef55 100644 --- a/run/environment +++ b/run/environment @@ -4,6 +4,6 @@ export LD_LIBRARY_PATH=$build/src/lib:$build/src/wx:/usr/local/lib64:/usr/local/ if [[ $(readlink -f $DIR/..) =~ (.*build/[^/]*) ]]; then export LD_LIBRARY_PATH=${BASH_REMATCH[1]}/lib:$LD_LIBRARY_PATH fi -export DYLD_LIBRARY_PATH=$build/src/lib:$build/src/wx:$build/src/asdcplib/src:/Users/ci/osx-environment/x86_64/10.10/lib:/Users/ci/workspace/lib +export DYLD_LIBRARY_PATH=$build/src/lib:$build/src/wx:/Users/ci/workspace/lib export DCPOMATIC_GRAPHICS=$DIR/../graphics diff --git a/run/tests b/run/tests index bf4c5732e..5db647af4 100755 --- a/run/tests +++ b/run/tests @@ -5,12 +5,52 @@ set -e PRIVATE_GIT="881c48805e352dfe150993814757ca974282be18" -if [ "$1" == "--check" ]; then - shift 1 - check=1 -else - check=0 -fi +type="" +check=0 +while [[ $# -gt 0 ]]; do + case $1 in + -e) + environment=$2 + shift + shift + ;; + --debug) + type="debug" + shift + ;; + --backtrace) + type="backtrace" + shift + ;; + --valgrind) + type="valgrind" + shift + ;; + --callgrind) + type="callgrind" + shift + ;; + --quiet) + type="quiet" + shift + ;; + --drd) + type="drd" + shift + ;; + --helgrind) + type="helgrind" + shift + ;; + --check) + check=1 + shift + ;; + *) + break + ;; + esac +done if [ "$(uname)" == "Linux" ]; then export LD_LIBRARY_PATH=build/src/lib:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH @@ -42,7 +82,7 @@ if [ "$(uname)" == "Darwin" ]; then rm -f build/test/openssl ln -s ../../../openssl/apps/openssl build/test/openssl # SIP stops this being passed in from the caller's environment - export DYLD_LIBRARY_PATH=/Users/ci/osx-environment/x86_64/10.10/lib:/Users/ci/workspace/lib + export DYLD_LIBRARY_PATH=$environment/x86_64/10.10/lib:/Users/ci/workspace/lib # We need to find ffcmp in here export PATH=$PATH:/Users/ci/workspace/bin fi @@ -61,27 +101,20 @@ if [ "$check" == "1" ]; then popd fi -if [ "$1" == "--debug" ]; then - shift; +if [ "$type" == "debug" ]; then gdb --args build/test/unit-tests --catch_system_errors=no --log_level=test_suite $* -elif [ "$1" == "--backtrace" ]; then - shift; +elif [ "$type" == "backtrace" ]; then gdb -batch -ex "run" -ex "thread apply all bt" -return-child-result --args build/test/unit-tests --catch_system_errors=yes $* -elif [ "$1" == "--valgrind" ]; then - shift; +elif [ "$type" == "valgrind" ]; then # valgrind --tool="memcheck" --vgdb=yes --vgdb-error=0 build/test/unit-tests $* valgrind --tool="memcheck" --suppressions=suppressions build/test/unit-tests $* -elif [ "$1" == "--callgrind" ]; then - shift; +elif [ "$type" == "callgrind" ]; then valgrind --tool="callgrind" build/test/unit-tests $* -elif [ "$1" == "--quiet" ]; then - shift; +elif [ "$type" == "quiet" ]; then build/test/unit-tests --catch_system_errors=no $* -elif [ "$1" == "--drd" ]; then - shift; +elif [ "$type" == "drd" ]; then valgrind --tool="drd" build/test/unit-tests $* -elif [ "$1" == "--helgrind" ]; then - shift; +elif [ "$type" == "helgrind" ]; then valgrind --tool="helgrind" build/test/unit-tests $* else ulimit -c unlimited diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index 165b5bfb5..17f0e73b5 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -77,7 +77,7 @@ DCPDecoder::DCPDecoder (shared_ptr film, shared_ptrvideo) { video = make_shared(this, content); } - if (content->audio) { + if (content->audio && !content->audio->mapping().mapped_output_channels().empty()) { audio = make_shared(this, content->audio, fast); } for (auto i: content->text) { diff --git a/src/lib/dcp_encoder.cc b/src/lib/dcp_encoder.cc index 9a840c8ab..a4bc133f8 100644 --- a/src/lib/dcp_encoder.cc +++ b/src/lib/dcp_encoder.cc @@ -107,7 +107,14 @@ DCPEncoder::go () _writer.write(_player.get_subtitle_fonts()); } - while (!_player.pass()) {} + int passes = 0; + while (!_player.pass()) { + if ((++passes % 8) == 0) { + auto job = _job.lock(); + DCPOMATIC_ASSERT(job); + job->set_progress(_player.progress()); + } + } for (auto i: get_referenced_reel_assets(_film, _film->playlist())) { _writer.write(i); @@ -128,10 +135,6 @@ void DCPEncoder::audio (shared_ptr data, DCPTime time) { _writer.write(data, time); - - auto job = _job.lock (); - DCPOMATIC_ASSERT (job); - job->set_progress (float(time.get()) / _film->length().get()); } void @@ -159,5 +162,5 @@ DCPEncoder::current_rate () const Frame DCPEncoder::frames_done () const { - return _j2k_encoder.video_frames_enqueued(); + return _player.frames_done(); } diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 6130d8e5f..e0d9918b2 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -89,7 +89,7 @@ FFmpegDecoder::FFmpegDecoder (shared_ptr film, shared_ptraudio) { + if (c->audio && !c->audio->mapping().mapped_output_channels().empty()) { audio = make_shared(this, c->audio, fast); } @@ -240,7 +240,7 @@ FFmpegDecoder::pass () decode_and_process_video_packet (packet); } else if (fc->subtitle_stream() && fc->subtitle_stream()->uses_index(_format_context, si) && !only_text()->ignore()) { decode_and_process_subtitle_packet (packet); - } else { + } else if (audio) { decode_and_process_audio_packet (packet); } diff --git a/src/lib/ffmpeg_encoder.cc b/src/lib/ffmpeg_encoder.cc index 60241b233..c1170f098 100644 --- a/src/lib/ffmpeg_encoder.cc +++ b/src/lib/ffmpeg_encoder.cc @@ -102,7 +102,7 @@ FFmpegEncoder::stereo_map() const map.set(dcp::Channel::CENTRE, 1, overall_gain * minus_3dB); map.set(dcp::Channel::LS, 0, overall_gain); break; - case 6: + default: map.set(dcp::Channel::LEFT, 0, overall_gain); map.set(dcp::Channel::RIGHT, 1, overall_gain); map.set(dcp::Channel::CENTRE, 0, overall_gain * minus_3dB); @@ -111,7 +111,6 @@ FFmpegEncoder::stereo_map() const map.set(dcp::Channel::RS, 1, overall_gain); break; } - /* XXX: maybe we should do something better for >6 channel DCPs */ return map; } diff --git a/src/lib/j2k_encoder.cc b/src/lib/j2k_encoder.cc index 7c9777c16..32d2fefc2 100644 --- a/src/lib/j2k_encoder.cc +++ b/src/lib/j2k_encoder.cc @@ -69,6 +69,16 @@ J2KEncoder::~J2KEncoder () { _server_found_connection.disconnect(); + /* One of our encoder threads may be waiting on Writer::write() to return, if that method + * is blocked with the writer queue full waiting for _full_condition. In that case, the + * attempt to terminate the encoder threads below (in terminate_threads()) will fail because + * the encoder thread waiting for ::write() will have interruption disabled. + * + * To work around that, make the writer into a zombie to unblock any pending write()s and + * not block on any future ones. + */ + _writer.zombify(); + boost::mutex::scoped_lock lm (_threads_mutex); terminate_threads (); } diff --git a/src/lib/player.cc b/src/lib/player.cc index c03cb97a5..27c89a2fa 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -251,7 +251,7 @@ have_video (shared_ptr content) bool have_audio (shared_ptr content) { - return static_cast(content->audio) && content->can_be_played(); + return static_cast(content->audio) && !content->audio->mapping().mapped_output_channels().empty() && content->can_be_played(); } @@ -688,6 +688,39 @@ Player::set_play_referenced () } +pair, optional> +Player::earliest_piece_and_time() const +{ + auto film = _film.lock(); + DCPOMATIC_ASSERT(film); + + shared_ptr earliest_content; + optional earliest_time; + + for (auto const& piece: _pieces) { + if (piece->done) { + continue; + } + + auto const t = content_time_to_dcp(piece, max(piece->decoder->position(), piece->content->trim_start())); + if (t > piece->content->end(film)) { + piece->done = true; + } else { + + /* Given two choices at the same time, pick the one with texts so we see it before + the video. + */ + if (!earliest_time || t < *earliest_time || (t == *earliest_time && !piece->decoder->text.empty())) { + earliest_time = t; + earliest_content = piece; + } + } + } + + return { earliest_content, earliest_time }; +} + + bool Player::pass () { @@ -711,26 +744,7 @@ Player::pass () shared_ptr earliest_content; optional earliest_time; - - for (auto i: _pieces) { - if (i->done) { - continue; - } - - auto const t = content_time_to_dcp (i, max(i->decoder->position(), i->content->trim_start())); - if (t > i->content->end(film)) { - i->done = true; - } else { - - /* Given two choices at the same time, pick the one with texts so we see it before - the video. - */ - if (!earliest_time || t < *earliest_time || (t == *earliest_time && !i->decoder->text.empty())) { - earliest_time = t; - earliest_content = i; - } - } - } + std::tie(earliest_content, earliest_time) = earliest_piece_and_time(); bool done = false; @@ -1644,3 +1658,30 @@ Player::set_disable_audio_processor() _disable_audio_processor = true; } + +Frame +Player::frames_done() const +{ + auto film = _film.lock(); + DCPOMATIC_ASSERT(film); + + shared_ptr earliest_content; + optional earliest_time; + std::tie(earliest_content, earliest_time) = earliest_piece_and_time(); + + return earliest_time.get_value_or({}).frames_round(film->video_frame_rate()); +} + + +float +Player::progress() const +{ + auto film = _film.lock(); + DCPOMATIC_ASSERT(film); + + shared_ptr earliest_content; + optional earliest_time; + std::tie(earliest_content, earliest_time) = earliest_piece_and_time(); + + return static_cast(earliest_time.get_value_or({}).get()) / film->length().get(); +} diff --git a/src/lib/player.h b/src/lib/player.h index 94e41bbca..48f6f97ca 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -90,6 +90,8 @@ public: bool pass (); void seek (dcpomatic::DCPTime time, bool accurate); + Frame frames_done() const; + float progress() const; std::vector> get_subtitle_fonts (); @@ -155,6 +157,7 @@ private: dcpomatic::ContentTime dcp_to_content_time (std::shared_ptr piece, dcpomatic::DCPTime t) const; dcpomatic::DCPTime content_time_to_dcp (std::shared_ptr piece, dcpomatic::ContentTime t) const; std::shared_ptr black_player_video_frame (Eyes eyes) const; + std::pair, boost::optional> earliest_piece_and_time() const; void video (std::weak_ptr, ContentVideo); void audio (std::weak_ptr, AudioStreamPtr, ContentAudio); diff --git a/src/lib/po/cs_CZ.po b/src/lib/po/cs_CZ.po index ebd22c194..c94799d7d 100644 --- a/src/lib/po/cs_CZ.po +++ b/src/lib/po/cs_CZ.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-01-12 00:54+0100\n" -"PO-Revision-Date: 2023-05-15 09:32+0200\n" +"PO-Revision-Date: 2024-05-02 15:01+0200\n" "Last-Translator: Tomáš Begeni \n" "Language-Team: \n" "Language: cs_CZ\n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.4.2\n" #: src/lib/video_content.cc:503 #, c-format @@ -352,15 +352,14 @@ msgstr "" "se, aby mezera mezi titulky byla alespoň 2 snímky." #: src/lib/hints.cc:685 -#, fuzzy msgid "" "At least one piece of subtitle content has no specified language. It is " "advisable to set the language for each piece of subtitle content in the " "\"Content→Timed text\" or \"Content→Open subtitles\" tab." msgstr "" -"Jedna část titulků nebo skrytých titulků nemá zadaný jazyk. Je vhodné " -"nastavit jazyk pro každý část titulků nebo skrytých titulků na kartě „Obsah " -"→ Časovat text“, „Obsah → Otevřít titulky“ nebo „Obsah → Skryté titulky“." +"Alespoň jedna část obsahu titulků nemá specifikovaný jazyk. Je vhodné " +"nastavit jazyk pro každou část obsahu titulků v záložce „Obsah→Časovaný " +"text“ nebo „Obsah→Otevřít titulky“." #: src/lib/audio_content.cc:277 msgid "Audio will be resampled from %1Hz to %2Hz" @@ -913,9 +912,8 @@ msgid "Event" msgstr "Událost" #: src/lib/hints.cc:397 -#, fuzzy msgid "Examining audio" -msgstr "Zkoumání titulků" +msgstr "Zkoumání zvuku" #: src/lib/hints.cc:399 msgid "Examining audio, subtitles and closed captions" @@ -1062,15 +1060,14 @@ msgid "If you do use 25fps you should change your DCP standard to SMPTE." msgstr "Používáte-li 25fps, měli byste změnit váš standard DCP na SMPTE." #: src/lib/hints.cc:249 -#, fuzzy msgid "" "In general it is now advisable to make SMPTE DCPs unless you have a " "particular reason to use Interop. It is advisable to set your DCP to use " "the SMPTE standard in the \"DCP\" tab." msgstr "" -"Obecně je nyní vhodné dělat SMPTE DCP, pokud nemáte konkrétní důvod používat " -"Interop. Na kartě „DCP“ se doporučuje nastavit DCP tak, aby používalo " -"standard SMPTE." +"Obecně je nyní vhodné vytvořit SMPTE DCP, pokud nemáte konkrétní důvod " +"používat Interop. Je vhodné nastavit váš DCP tak, aby používal standard " +"SMPTE v záložce „DCP“." #: src/lib/release_notes.cc:53 msgid "" @@ -1215,14 +1212,13 @@ msgid "No CPLs found in DCP." msgstr "V DCP nebyla nalezena žádná CPLs." #: src/lib/kdm_with_metadata.cc:217 -#, fuzzy msgid "No from address configured in the KDM Email tab of preferences" -msgstr "Žádný KDM z adresy nakonfigurované v předvolbách" +msgstr "Ne z adresy nakonfigurované na kartě E-mail KDM v předvolbách" #: src/lib/kdm_with_metadata.cc:213 src/lib/send_notification_email_job.cc:70 -#, fuzzy msgid "No outgoing mail server configured in the Email tab of preferences" -msgstr "V konfiguraci není nastaven emailový server" +msgstr "" +"Na kartě E-mail v předvolbách není nakonfigurován žádný server odchozí pošty" #: src/lib/image_content.cc:131 msgid "No valid image files were found in the folder." @@ -1238,12 +1234,11 @@ msgstr "Žádný" #: src/lib/job.cc:607 msgid "OK" -msgstr "" +msgstr "OK" #: src/lib/job.cc:612 -#, fuzzy msgid "OK (ran for %1 from %2 to %3)" -msgstr "OK (hotovo za %1)" +msgstr "OK (spuštěno od %1 do %2 to %3)" #: src/lib/job.cc:610 msgid "OK (ran for %1)" @@ -1292,7 +1287,7 @@ msgstr "Policy" #: src/lib/filter.cc:106 msgid "Premultiply alpha channel" -msgstr "" +msgstr "Předem násobit alfa kanál" #: src/lib/content.cc:494 msgid "Prepared for video frame rate" @@ -1561,7 +1556,6 @@ msgid "The certificate chain for signing is invalid (%1)" msgstr "Řetěz certifikátů pro podepisování je neplatný (%1)" #: src/lib/hints.cc:721 -#, fuzzy msgid "" "The certificate chain that DCP-o-matic uses for signing DCPs and KDMs " "contains a small error which will prevent DCPs from being validated " @@ -1569,14 +1563,13 @@ msgid "" "certificate chain by clicking the \"Re-make certificates and key...\" button " "in the Keys page of Preferences." msgstr "" -"Řetězec certifikátů, který DCP-o-matic používá pro podepisování DCP a KDM, " -"obsahuje malou chybu, která v některých systémech brání správnému ověření " -"DCP. Doporučujeme vám znovu vytvořit řetězec podpisových certifikátů " -"kliknutím na tlačítko „Re-make certificates and key…“ (Znovu vytvořit " -"certifikáty a klíče…) na stránce Keys (Klíče) v Předvolbách." +"Řetězec certifikátů, který DCP-o-matic používá k podepisování DCP a KDM, " +"obsahuje malou chybu, která zabrání správnému ověření DCP na některých " +"systémech. Je vhodné znovu vytvořit řetězec podpisových certifikátů " +"kliknutím na tlačítko „Znovu vytvořit certifikáty a klíč…“ na stránce Klíče " +"v Předvolbách." #: src/lib/hints.cc:727 -#, fuzzy msgid "" "The certificate chain that DCP-o-matic uses for signing DCPs and KDMs has a " "validity period that is too long. This will cause problems playing back " @@ -1584,12 +1577,11 @@ msgid "" "chain by clicking the \"Re-make certificates and key...\" button in the Keys " "page of Preferences." msgstr "" -"Řetězec certifikátů, který DCP-o-matic používá pro podepisování DCP a KDM, " -"má příliš dlouhou dobu platnosti. To způsobuje problémy s přehráváním DCP " -"na některých systémech. Doporučujeme znovu vytvořit řetězec podpisových " -"certifikátů kliknutím na tlačítko „Re-make certificates and key…“ (Znovu " -"vytvořit certifikáty a klíč…) na stránce Keys (Klíče) v okně Preferences " -"(Předvolby)." +"Řetěz certifikátů, který DCP-o-matic používá k podepisování DCP a KDM, má " +"příliš dlouhou dobu platnosti. To způsobí problémy s přehráváním DCP na " +"některých systémech. Je vhodné znovu vytvořit řetězec podpisových " +"certifikátů kliknutím na tlačítko „Znovu vytvořit certifikáty a klíč…“ na " +"stránce Klíče v Předvolbách." #: src/lib/video_decoder.cc:81 msgid "" @@ -1626,7 +1618,6 @@ msgid "The file %1 has been trimmed by %2 milliseconds more." msgstr "Soubor %1 byl oříznut o %2 milisekund více." #: src/lib/hints.cc:239 -#, fuzzy msgid "" "There is a large difference between the frame rate of your DCP and that of " "some of your content. This will cause your audio to play back at a much " @@ -1634,11 +1625,11 @@ msgid "" "rate to one closer to your content, provided that your target projection " "systems support your chosen DCP rate." msgstr "" -"Mezi rámcovou frekvencí vašeho DCP a některým z vašich obsahů je velký " -"rozdíl. To způsobí, že se váš zvuk přehrává na mnohem nižším nebo vyšším " -"rozstupu, než by měl. Doporučuje se, abyste nastavili frekvenci snímků DCP " -"tak, aby se přiblížila vašemu obsahu za předpokladu, že vaše cílové " -"projekční systémy podporují zvolenou rychlost DCP." +"Mezi snímkovou frekvencí vašeho DCP a některého vašeho obsahu je velký " +"rozdíl. To způsobí, že se váš zvuk bude přehrávat s mnohem nižší nebo vyšší " +"výškou, než by měl. Je vhodné nastavit snímkovou frekvenci DCP na takovou, " +"která je blíže vašemu obsahu, za předpokladu, že vaše cílové projekční " +"systémy podporují vámi zvolenou rychlost DCP." #: src/lib/dcp_content.cc:675 msgid "There is no video in this DCP" @@ -1822,7 +1813,6 @@ msgid "Yet Another Deinterlacing Filter" msgstr "Ještě další deinterlacing filter" #: src/lib/hints.cc:199 -#, fuzzy msgid "" "You are set up for a DCP at a frame rate of %1 fps. This frame rate is not " "supported by all projectors. It is advisable to change the DCP frame rate " @@ -1910,6 +1900,9 @@ msgid "" "distributors to raise QC errors when they check your DCP. To avoid this, " "set the DCP audio channels to 8 or 16." msgstr "" +"Váš DCP má %1 zvukových kanálů, spíše než 8 nebo 16. To může způsobit, že " +"někteří distributoři při kontrole vašeho DCP zvýší chyby kontroly kvality. " +"Abyste tomu zabránili, nastavte zvukové kanály DCP na 8 nebo 16." #: src/lib/hints.cc:110 msgid "" @@ -2142,7 +2135,6 @@ msgid "still" msgstr "stále" #: src/lib/dcp_content.cc:779 -#, fuzzy msgid "they overlap other text content; remove the other content." msgstr "překrývá se s jiným textovým obsahem; odeberte další obsah." diff --git a/src/lib/util.cc b/src/lib/util.cc index fe6602de3..fdc647fba 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -840,6 +840,8 @@ audio_channel_types (list mapped, int channels) case dcp::Channel::BSR: ++non_lfe; break; + case dcp::Channel::LC: + case dcp::Channel::RC: case dcp::Channel::HI: case dcp::Channel::VI: case dcp::Channel::MOTION_DATA: diff --git a/src/lib/writer.cc b/src/lib/writer.cc index fbe2d248d..7b9defd73 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -144,6 +144,10 @@ Writer::write (shared_ptr encoded, Frame frame, Eyes eyes) { boost::mutex::scoped_lock lock (_state_mutex); + if (_zombie) { + return; + } + while (_queued_full_in_memory > _maximum_frames_in_memory) { /* There are too many full frames in memory; wake the main writer thread and wait until it sorts everything out */ @@ -377,6 +381,9 @@ try while (true) { boost::mutex::scoped_lock lock (_state_mutex); + if (_zombie) { + return; + } while (true) { @@ -1042,3 +1049,17 @@ Writer::write_hanging_text (ReelWriter& reel) } _hanging_texts = new_hanging_texts; } + + +/** Set the writer so that it has no queue and drops any pending or future requests to write images */ +void +Writer::zombify() +{ + boost::mutex::scoped_lock lock(_state_mutex); + + _queue.clear(); + _queued_full_in_memory = 0; + _zombie = true; + _full_condition.notify_all(); +} + diff --git a/src/lib/writer.h b/src/lib/writer.h index efb6a17d8..f0f1fe69a 100644 --- a/src/lib/writer.h +++ b/src/lib/writer.h @@ -34,6 +34,8 @@ #include "exception_store.h" #include "font_id_map.h" #include "player_text.h" +#include "text_type.h" +#include "types.h" #include "weak_film.h" #include #include @@ -125,6 +127,8 @@ public: void set_encoder_threads (int threads); + void zombify(); + private: friend struct ::writer_disambiguate_font_ids1; friend struct ::writer_disambiguate_font_ids2; @@ -227,6 +231,8 @@ private: }; std::vector _hanging_texts; + + bool _zombie = false; }; diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 1b1ef0629..584ebd27d 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -47,7 +47,6 @@ #include "wx/report_problem_dialog.h" #include "wx/save_template_dialog.h" #include "wx/self_dkdm_dialog.h" -#include "wx/send_i18n_dialog.h" #include "wx/servers_list_dialog.h" #include "wx/standard_controls.h" #include "wx/system_information_dialog.h" @@ -241,7 +240,6 @@ enum { ID_tools_encoding_servers, ID_tools_manage_templates, ID_tools_check_for_updates, - ID_tools_send_translations, ID_tools_system_information, ID_tools_restore_default_preferences, ID_tools_export_preferences, @@ -353,7 +351,6 @@ public: Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_encoding_servers, this), ID_tools_encoding_servers); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_manage_templates, this), ID_tools_manage_templates); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_check_for_updates, this), ID_tools_check_for_updates); - Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_send_translations, this), ID_tools_send_translations); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_system_information, this),ID_tools_system_information); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_restore_default_preferences, this), ID_tools_restore_default_preferences); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_export_preferences, this), ID_tools_export_preferences); @@ -1107,35 +1104,6 @@ private: UpdateChecker::instance()->run(); } - void tools_send_translations () - { - SendI18NDialog dialog(this); - if (dialog.ShowModal() != wxID_OK) { - return; - } - - string body; - body += dialog.name() + "\n"; - body += dialog.language() + "\n"; - body += string(dcpomatic_version) + " " + string(dcpomatic_git_commit) + "\n"; - body += "--\n"; - auto translations = I18NHook::translations (); - for (auto i: translations) { - body += i.first + "\n" + i.second + "\n\n"; - } - if (dialog.email().find("@") == string::npos) { - error_dialog (this, _("You must enter a valid email address when sending translations, " - "otherwise the DCP-o-matic maintainers cannot credit you or contact you with questions.")); - } else { - Email email(dialog.email(), { "carl@dcpomatic.com" }, "DCP-o-matic translations", body); - try { - email.send("main.carlh.net", 2525, EmailProtocol::STARTTLS); - } catch (NetworkError& e) { - error_dialog (this, _("Could not send translations"), std_to_wx(e.what())); - } - } - } - void help_about () { AboutDialog dialog(this); @@ -1399,7 +1367,6 @@ private: add_item (tools, _("Encoding servers..."), ID_tools_encoding_servers, 0); add_item (tools, _("Manage templates..."), ID_tools_manage_templates, 0); add_item (tools, _("Check for updates"), ID_tools_check_for_updates, 0); - add_item (tools, _("Send translations..."), ID_tools_send_translations, 0); add_item (tools, _("System information..."), ID_tools_system_information, 0); tools->AppendSeparator (); add_item (tools, _("Restore default preferences"), ID_tools_restore_default_preferences, ALWAYS); diff --git a/src/tools/po/cs_CZ.po b/src/tools/po/cs_CZ.po index 42e7c19e0..ef5985c5b 100644 --- a/src/tools/po/cs_CZ.po +++ b/src/tools/po/cs_CZ.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-01-12 00:54+0100\n" -"PO-Revision-Date: 2023-05-15 09:26+0200\n" +"PO-Revision-Date: 2024-05-02 14:01+0200\n" "Last-Translator: Tomáš Begeni \n" "Language-Team: \n" "Language: cs_CZ\n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.4.2\n" #: src/tools/dcpomatic_combiner.cc:171 msgid "%1 already exists as a file, so you cannot use it for a DCP." @@ -276,7 +276,7 @@ msgstr "Text názvu obsahu" #: src/tools/dcpomatic_disk.cc:161 msgid "Copy DCP" -msgstr "" +msgstr "Kopírovat DCP" #: src/tools/dcpomatic.cc:1339 msgid "Copy settings\tCtrl-C" @@ -293,9 +293,8 @@ msgid "" msgstr "Nelze dešifrovat DKDM. Možná nebylo vytvořeno správným certifikátem." #: src/tools/dcpomatic.cc:632 src/tools/dcpomatic.cc:649 -#, fuzzy msgid "Could not duplicate project." -msgstr "Nemohu najít přehrávač." +msgstr "Projekt nelze duplikovat." #: src/tools/dcpomatic.cc:913 msgid "Could not find batch converter." @@ -310,6 +309,8 @@ msgid "" "Could not listen for new batch jobs. Perhaps another instance of the DCP-o-" "matic Batch Converter is running." msgstr "" +"Nelze načíst nové dávkové úlohy. Možná běží další instance DCP-o-matic Batch " +"Converter." #: src/tools/dcpomatic_editor.cc:336 msgid "Could not load DCP" @@ -380,22 +381,19 @@ msgstr "" #: src/tools/dcpomatic.cc:771 msgid "Could not remove existing preferences file" -msgstr "" +msgstr "Stávající soubor předvoleb nelze odstranit" #: src/tools/dcpomatic.cc:605 src/tools/dcpomatic.cc:1278 -#, fuzzy msgid "Could not save project." -msgstr "Nemohu vytvořit DCP." +msgstr "Projekt nelze uložit." #: src/tools/dcpomatic.cc:616 -#, fuzzy msgid "Could not save template." -msgstr "Nemohu najít přehrávač." +msgstr "Šablonu nelze uložit." #: src/tools/dcpomatic.cc:1123 -#, fuzzy msgid "Could not send translations" -msgstr "Nemohu spustit nautilus" +msgstr "Překlady se nepodařilo odeslat" #: src/tools/dcpomatic.cc:1039 msgid "Could not show DCP." @@ -440,12 +438,11 @@ msgstr "Vytvořit KDMs" #: src/tools/dcpomatic_editor.cc:208 msgid "Creator" -msgstr "" +msgstr "Tvůrce" #: src/tools/dcpomatic_disk.cc:132 src/tools/dcpomatic_disk.cc:136 -#, fuzzy msgid "DCP" -msgstr "CPL" +msgstr "DCP" #: src/tools/dcpomatic.cc:1537 src/tools/dcpomatic.cc:1634 #: src/tools/dcpomatic.cc:1673 @@ -458,26 +455,22 @@ msgstr "DCP-o-matic konvertor" #: src/tools/dcpomatic_combiner.cc:178 src/tools/dcpomatic_combiner.cc:222 #: src/tools/dcpomatic_combiner.cc:256 -#, fuzzy msgid "DCP-o-matic Combiner" -msgstr "DCP-o-matic přehrávač" +msgstr "DCP-o-matic Combiner" #: src/tools/dcpomatic_disk.cc:315 src/tools/dcpomatic_disk.cc:323 #: src/tools/dcpomatic_disk.cc:356 src/tools/dcpomatic_disk.cc:444 #: src/tools/dcpomatic_disk.cc:490 -#, fuzzy msgid "DCP-o-matic Disk Writer" -msgstr "DCP-o-matic KDM Creator" +msgstr "DCP-o-matic Disk Writer" #: src/tools/dcpomatic_editor.cc:293 src/tools/dcpomatic_editor.cc:447 -#, fuzzy msgid "DCP-o-matic Editor" -msgstr "DCP-o-matic Playlist Editor" +msgstr "DCP-o-matic Editor" #: src/tools/dcpomatic_editor.cc:498 -#, fuzzy msgid "DCP-o-matic Editor could not start." -msgstr "DCP-o-matic nelze spustit" +msgstr "DCP-o-matic Editor nelze spustit." #: src/tools/dcpomatic_server.cc:152 msgid "DCP-o-matic Encode Server" @@ -507,7 +500,7 @@ msgstr "DCP-o-matic nelze spustit" #: src/tools/dcpomatic_combiner.cc:188 msgid "DCPs combined successfully." -msgstr "" +msgstr "DCP se úspěšně spojily." #: src/tools/dcpomatic_kdm.cc:170 msgid "DKDM" @@ -516,7 +509,7 @@ msgstr "DKDM" #: src/tools/dcpomatic_kdm.cc:577 #, c-format msgid "DKDM %s is already in the DKDM list and will not be added again." -msgstr "" +msgstr "DKDM %s je již v seznamu DKDM a nebude znovu přidán." #: src/tools/dcpomatic_player.cc:599 msgid "Decode at full resolution" @@ -539,6 +532,8 @@ msgid "" "Did you install the DCP-o-matic Disk Writer.pkg from the .dmg? Please check " "and try again." msgstr "" +"Nainstalovali jste DCP-o-matic Disk Writer.pkg z .dmg? Zkontrolujte prosím a " +"zkuste to znovu." #: src/tools/dcpomatic.cc:1874 src/tools/dcpomatic.cc:1889 #: src/tools/dcpomatic.cc:1931 @@ -550,6 +545,8 @@ msgid "" "Do you see a 'User Account Control' dialogue asking about " "dcpomatic2_disk_writer.exe? If so, click 'Yes', then try again." msgstr "" +"Vidíte dialog „Řízení uživatelských účtů“ s dotazem na " +"dcpomatic2_disk_writer.exe? Pokud ano, klikněte na ‚Ano‘ a zkuste to znovu." #: src/tools/dcpomatic.cc:819 #, c-format @@ -570,7 +567,7 @@ msgstr "Dolů" #: src/tools/dcpomatic_disk.cc:148 msgid "Drive" -msgstr "" +msgstr "Disk" #: src/tools/dcpomatic_player.cc:593 msgid "Dual screen\tShift+F11" @@ -594,11 +591,11 @@ msgstr "Duplikovat…" #: src/tools/dcpomatic_editor.cc:89 msgid "Duration" -msgstr "" +msgstr "Délka" #: src/tools/dcpomatic_editor.cc:149 msgid "Edit reel" -msgstr "" +msgstr "Upravit reel" #: src/tools/dcpomatic_batch.cc:100 src/tools/dcpomatic.cc:1388 msgid "Encoding servers..." @@ -610,12 +607,11 @@ msgstr "Šifrované" #: src/tools/dcpomatic_editor.cc:84 msgid "Entry point" -msgstr "" +msgstr "Vstupní bod" #: src/tools/dcpomatic.cc:1396 -#, fuzzy msgid "Export preferences..." -msgstr "Obnovit původní nastavení" +msgstr "Předvolby exportu…" #: src/tools/dcpomatic.cc:1368 msgid "Export subtitles..." @@ -641,9 +637,9 @@ msgid "Film changed" msgstr "Film byl změněn" #: src/tools/dcpomatic_kdm.cc:323 -#, fuzzy, c-format +#, c-format msgid "Folder %s already exists. Do you want to overwrite it?" -msgstr "Soubor %s již existuje. Chcete soubor přepsat?" +msgstr "Složka %s již existuje. Chcete jej přepsat?" #: src/tools/dcpomatic_server.cc:163 msgid "Frames per second" @@ -659,15 +655,15 @@ msgstr "Tipy…" #: src/tools/dcpomatic_combiner.cc:101 msgid "Input DCP" -msgstr "" +msgstr "Vstup DCP" #: src/tools/dcpomatic_editor.cc:94 msgid "Intrinsic duration" -msgstr "" +msgstr "Vnitřní doba trvání" #: src/tools/dcpomatic_editor.cc:203 msgid "Issuer" -msgstr "" +msgstr "Vydavatel" #: src/tools/dcpomatic.cc:483 msgid "" @@ -738,6 +734,8 @@ msgid "" "No ASSETMAP or ASSETMAP.xml found in this folder. Please choose a DCP " "folder." msgstr "" +"V této složce nebyl nalezen žádný ASSETMAP nebo ASSETMAP.xml. Vyberte prosím " +"složku DCP." #: src/tools/dcpomatic_playlist.cc:245 msgid "" @@ -753,7 +751,7 @@ msgstr "Otevřít DCP v &player" #: src/tools/dcpomatic_editor.cc:281 msgid "Open a DCP using File -> Open" -msgstr "" +msgstr "Otevřete DCP pomocí Soubor -> Otevřít" #: src/tools/dcpomatic_kdm.cc:222 msgid "Output" @@ -761,7 +759,7 @@ msgstr "Výstup" #: src/tools/dcpomatic_combiner.cc:120 msgid "Output DCP folder" -msgstr "" +msgstr "Složka pro uložení DCP" #: src/tools/dcpomatic.cc:1341 msgid "Paste settings...\tCtrl-V" @@ -769,15 +767,15 @@ msgstr "Vložit nastavení…\tCtrl-V" #: src/tools/dcpomatic_batch.cc:175 msgid "Pause or resume conversion" -msgstr "" +msgstr "Pozastavit nebo obnovit konverzi" #: src/tools/dcpomatic_batch.cc:175 msgid "Pause/resume" -msgstr "" +msgstr "Pozastavit/obnovit" #: src/tools/dcpomatic_editor.cc:167 msgid "Picture" -msgstr "" +msgstr "Obrázek" #: src/tools/dcpomatic.cc:567 msgid "" @@ -806,15 +804,15 @@ msgstr "Znovu vytvořit podpisové certifikáty" #: src/tools/dcpomatic_editor.cc:218 msgid "Reels" -msgstr "" +msgstr "Reels" #: src/tools/dcpomatic_disk.cc:152 msgid "Refresh" -msgstr "" +msgstr "Obnovit" #: src/tools/dcpomatic.cc:1720 msgid "Release notes" -msgstr "" +msgstr "Poznámky k vydání" #: src/tools/dcpomatic_kdm.cc:213 src/tools/dcpomatic_playlist.cc:340 msgid "Remove" @@ -842,9 +840,8 @@ msgid "S&how DCP in Finder" msgstr "Zobrazit DCP ve Findieru" #: src/tools/dcpomatic_playlist.cc:319 -#, fuzzy msgid "Save" -msgstr "&Speichern" +msgstr "Uložit" #: src/tools/dcpomatic.cc:1317 msgid "Save as &template..." @@ -870,7 +867,7 @@ msgstr "Uložit film a duplikovat" #: src/tools/dcpomatic_player.cc:732 msgid "Save frame to file" -msgstr "" +msgstr "Uložit snímek do souboru" #: src/tools/dcpomatic_kdm.cc:157 msgid "Screens" @@ -918,15 +915,15 @@ msgstr "Nastavit rozlišení dekódování tak, aby odpovídalo zobrazení" #: src/tools/dcpomatic_editor.cc:170 msgid "Sound" -msgstr "" +msgstr "Zvuk" #: src/tools/dcpomatic.cc:761 msgid "Specify ZIP file" -msgstr "" +msgstr "Zadejte soubor ZIP" #: src/tools/dcpomatic_editor.cc:173 msgid "Subtitle" -msgstr "" +msgstr "Titulky" #: src/tools/dcpomatic.cc:1392 src/tools/dcpomatic_player.cc:608 msgid "System information..." @@ -978,16 +975,21 @@ msgid "" "certificates' validity period. Either use an earlier end time for this KDM " "or re-create your signing certificates in the DCP-o-matic preferences window." msgstr "" +"Koncové období KDM je po (nebo blízko) konci doby platnosti podpisových " +"certifikátů. Buď použijte dřívější čas ukončení tohoto KDM, nebo znovu " +"vytvořte své podpisové certifikáty v okně předvoleb DCP-o-matic." #: src/tools/dcpomatic_kdm.cc:461 msgid "" "The KDM start period is before (or close to) the start of the signing " "certificate's validity period. Use a later start time for this KDM." msgstr "" +"Počáteční období KDM je před (nebo blízko) začátku doby platnosti " +"podpisového certifikátu. Použijte pozdější čas zahájení pro tento KDM." #: src/tools/dcpomatic.cc:963 msgid "The certificate chain for signing is invalid" -msgstr "" +msgstr "Řetěz certifikátů pro podepisování je neplatný" #: src/tools/dcpomatic.cc:1912 msgid "" @@ -1022,7 +1024,6 @@ msgstr "" "řetězec certifikátů pro podepisování DCP a KDM?" #: src/tools/dcpomatic.cc:1927 -#, fuzzy msgid "" "The certificate chain that DCP-o-matic uses for signing DCPs and KDMs " "contains a small error\n" @@ -1032,14 +1033,15 @@ msgid "" "the certificate chain\n" "for signing DCPs and KDMs?" msgstr "" -"Řetězec certifikátů, který DCP-o-matic používá pro podepisování DCP a KDM, " +"Řetěz certifikátů, který DCP-o-matic používá k podepisování DCP a KDM, " "obsahuje malou chybu\n" -"což zabrání tomu, aby byly DCP v některých systémech správně ověřeny. Chcete " -"znovu vytvořit\n" -"řetězec certifikátů pro podepisování DCP a KDM?" +"což zabrání správnému ověření DCP na některých systémech. Tato chyba byla " +"způsobena\n" +"chybou v DCP-o-matic, která byla nyní opravena. Chcete znovu vytvořit " +"řetězec certifikátů\n" +"pro podepisování DCP a KDM?" #: src/tools/dcpomatic.cc:1886 -#, fuzzy msgid "" "The certificate chain that DCP-o-matic uses for signing DCPs and KDMs has a " "validity period\n" @@ -1047,11 +1049,11 @@ msgid "" "systems.\n" "Do you want to re-create the certificate chain for signing DCPs and KDMs?" msgstr "" -"Řetězec certifikátů, který DCP-o-matic používá pro podepisování DCP a KDM, " -"obsahuje malou chybu\n" -"což zabrání tomu, aby byly DCP v některých systémech správně ověřeny. Chcete " -"znovu vytvořit\n" -"řetězec certifikátů pro podepisování DCP a KDM?" +"Řetěz certifikátů, který DCP-o-matic používá k podepisování DCP a KDM, má " +"dobu platnosti\n" +"to je příliš dlouhé. To způsobí problémy s přehráváním DCP na některých " +"systémech.\n" +"Chcete znovu vytvořit řetězec certifikátů pro podepisování DCP a KDM?" #: src/tools/dcpomatic.cc:1898 msgid "" @@ -1075,7 +1077,7 @@ msgstr "Složka %1 již existuje a není prázdná. Chcete pokračovat?" #: src/tools/dcpomatic_disk.cc:279 msgid "The disk you selected is no longer available. Please choose another." -msgstr "" +msgstr "Vybraný disk již není k dispozici. Vyberte prosím jiný." #: src/tools/dcpomatic_disk.cc:358 #, c-format @@ -1083,6 +1085,8 @@ msgid "" "The drive %s could not be unmounted.\n" "Close any application that is using it, then try again. (%s)" msgstr "" +"Disk %s nelze odpojit.\n" +"Zavřete všechny aplikace, které jej používají, a zkuste to znovu. (%s)" #: src/tools/dcpomatic_disk.cc:531 src/tools/dcpomatic_player.cc:1364 msgid "" @@ -1110,14 +1114,13 @@ msgstr "" "fungovat správně. Prosím, zkontrolujte nastavení filmu." #: src/tools/dcpomatic_player.cc:414 -#, fuzzy msgid "" "This looks like a DCP-o-matic project folder, which cannot be loaded into " "the player. Choose the DCP folder inside the DCP-o-matic project folder if " "that's what you want to play." msgstr "" "Vypadá to jako složka projektu DCP-o-matic, kterou nelze načíst do " -"přehrávače. Pokud chcete přehrávat, vyberte adresář DCP ve složce projektu " +"přehrávače. Pokud jí chcete přehrát, vyberte složku DCP ve složce projektu " "DCP-o-matic." #: src/tools/dcpomatic_player.cc:607 @@ -1125,9 +1128,8 @@ msgid "Timing..." msgstr "Časování…" #: src/tools/dcpomatic_disk.cc:116 -#, fuzzy msgid "Tools" -msgstr "&Nástroje" +msgstr "Nástroje" #: src/tools/dcpomatic.cc:565 #, c-format @@ -1145,7 +1147,7 @@ msgstr "Nedokončené úlohy" #: src/tools/dcpomatic_disk.cc:115 msgid "Uninstall..." -msgstr "" +msgstr "Odinstalovat…" #: src/tools/dcpomatic_playlist.cc:337 msgid "Up" @@ -1218,12 +1220,16 @@ msgid "" "You did not correctly confirm that you read the warning that was just " "shown. DCP-o-matic Disk Writer will close now. Please try again." msgstr "" +"Nepotvrdili jste správně, že jste si přečetli právě zobrazené varování. DCP-" +"o-matic Disk Writer se nyní uzavře. Prosím zkuste to znovu." #: src/tools/dcpomatic_disk.cc:374 msgid "" "You did not correctly confirm that you read the warning that was just " "shown. Please try again." msgstr "" +"Nepotvrdili jste správně, že jste si přečetli právě zobrazené varování. " +"Prosím zkuste to znovu." #: src/tools/dcpomatic_batch.cc:340 src/tools/dcpomatic.cc:589 #: src/tools/dcpomatic_editor.cc:381 src/tools/dcpomatic_player.cc:640 @@ -1240,6 +1246,8 @@ msgid "" "You must enter a valid email address when sending translations, otherwise " "the DCP-o-matic maintainers cannot credit you or contact you with questions." msgstr "" +"Při odesílání překladů musíte zadat platnou e-mailovou adresu, jinak vám " +"správci DCP-o-matic nemohou připsat kredit ani vás kontaktovat s dotazy." #, fuzzy #~ msgid "DCP-o-matic DCP Combiner" diff --git a/src/wx/po/cs_CZ.po b/src/wx/po/cs_CZ.po index a7c91982c..27d0893ab 100644 --- a/src/wx/po/cs_CZ.po +++ b/src/wx/po/cs_CZ.po @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2024-01-12 00:54+0100\n" -"PO-Revision-Date: 2023-05-15 09:25+0200\n" +"PO-Revision-Date: 2024-05-02 14:12+0200\n" "Last-Translator: Tomáš Begeni \n" "Language-Team: DCP-o-matic translators\n" "Language: cs_CZ\n" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.2.2\n" +"X-Generator: Poedit 3.4.2\n" "X-Poedit-Bookmarks: -1,-1,-1,-1,369,-1,-1,-1,-1,-1\n" #: src/wx/player_information.cc:112 @@ -80,12 +80,11 @@ msgid "%s %s" msgstr "%s %s" #: src/wx/about_dialog.cc:89 -#, fuzzy msgid "" "(C) 2012-2024 Carl Hetherington, Terrence Meiczinger\n" " Ole Laursen" msgstr "" -"© 2012-2023 Carl Hetherington, Terrence Meiczinger\n" +"© 2012-2024 Carl Hetherington, Terrence Meiczinger\n" " Ole Laursen" #: src/wx/file_picker_ctrl.cc:51 src/wx/file_picker_ctrl.cc:66 @@ -210,7 +209,7 @@ msgstr " má neplatnou hodnotu %n" #: src/wx/verify_dcp_dialog.cc:417 #, c-format msgid " describes incorrect number of channels (%n)" -msgstr "" +msgstr " popisuje nesprávný počet kanálů (%n)" #: src/wx/subtitle_appearance_dialog.cc:118 msgid "New colour" @@ -313,6 +312,8 @@ msgid "" "A subtitle or closed caption refers to a font with ID %id that does not have " "a corresponding node." msgstr "" +"Titulky nebo skryté titulky odkazují na písmo s ID %id, které nemá " +"odpovídající node ." #: src/wx/config_dialog.cc:996 msgid "ALSA" @@ -399,9 +400,8 @@ msgid "Add recipient" msgstr "Přidat adresáta" #: src/wx/content_panel.cc:264 -#, fuzzy msgid "Add video, image, sound or subtitle files to the film (Ctrl+A)." -msgstr "Přidat video, obrázek zvuk nebo titulky do filmu." +msgstr "Přidejte do filmu soubory videa, obrázků, zvuku nebo titulků (Ctrl+A)." #: src/wx/config_dialog.cc:301 src/wx/recipients_panel.cc:69 #: src/wx/editable_list.h:141 @@ -720,14 +720,12 @@ msgid "Certificate downloaded" msgstr "Certifikát stažen" #: src/wx/invalid_certificate_period_dialog.cc:63 -#, fuzzy msgid "Certificate end" -msgstr "Řetěz certifikátoů" +msgstr "Konec certifikátu" #: src/wx/invalid_certificate_period_dialog.cc:55 -#, fuzzy msgid "Certificate start" -msgstr "Řetěz certifikátoů" +msgstr "Začátek certifikátu" #: src/wx/metadata_dialog.cc:298 msgid "Chain" @@ -786,9 +784,8 @@ msgid "Christie" msgstr "Christie" #: src/wx/invalid_certificate_period_dialog.cc:39 -#, fuzzy msgid "Cinema" -msgstr "kino" +msgstr "Kino" #: src/wx/full_config_dialog.cc:122 msgid "Cinema and screen database file" @@ -914,9 +911,8 @@ msgid "Could not load certificate (%s)" msgstr "Nelze načíst certifikát (%s)" #: src/wx/simple_video_view.cc:176 -#, fuzzy msgid "Could not play content" -msgstr "Nelze načíst KDM" +msgstr "Obsah nelze přehrát" #: src/wx/gl_video_view.cc:139 #, c-format @@ -961,9 +957,8 @@ msgid "Cover Sheet" msgstr "Titulní stránka" #: src/wx/invalid_certificate_period_dialog.cc:98 -#, fuzzy msgid "Create KDMs anyway" -msgstr "Přesto vytvořit DCP" +msgstr "Přesto vytvořit KDM" #: src/wx/film_name_location_dialog.cc:51 msgid "Create in folder" @@ -1464,6 +1459,8 @@ msgid "" "Frame %frame has an image component that is too large (component %component " "is %size bytes in size)." msgstr "" +"Snímek %frame obsahuje komponentu obrázku, která je příliš velká (komponenta " +"%component má velikost %size bytů)." #: src/wx/dcp_panel.cc:827 msgid "Frame Rate" @@ -1601,9 +1598,8 @@ msgid "IP address / host name" msgstr "IP adresa / host name" #: src/wx/full_config_dialog.cc:1551 -#, fuzzy msgid "ISDCF name part length" -msgstr "ISDCF název" +msgstr "Délka části názvu ISDCF" #: src/wx/full_config_dialog.cc:1387 msgid "Identifiers" @@ -1737,13 +1733,12 @@ msgid "Intermediate common name" msgstr "Intermediate common name" #: src/wx/metadata_dialog.cc:208 -#, fuzzy msgid "International texted" -msgstr "CPL anotace textu" +msgstr "Mezinárodní textové zprávy" #: src/wx/metadata_dialog.cc:209 msgid "International textless" -msgstr "" +msgstr "Mezinárodní bez textu" #: src/wx/dcp_panel.cc:173 src/wx/full_config_dialog.cc:414 msgid "Interop" @@ -1754,9 +1749,8 @@ msgid "Invalid DCP-o-matic export file" msgstr "Neplatný soubor exportu DCP-o-matic" #: src/wx/invalid_certificate_period_dialog.cc:33 -#, fuzzy msgid "Invalid certificates" -msgstr "Stáhnout certifikát" +msgstr "Neplatné certifikáty" #: src/wx/colour_conversion_editor.cc:215 msgid "Inverse 2.6 gamma correction on output" @@ -2210,9 +2204,8 @@ msgid "Open console window" msgstr "Otevřít okno s konzolou" #: src/wx/content_panel.cc:288 -#, fuzzy msgid "Open the timeline for the film (Ctrl+T)." -msgstr "Otevřít časovou osu pro film." +msgstr "Otevřete časovou osu filmu (Ctrl+T)." #: src/wx/full_config_dialog.cc:1774 src/wx/player_config_dialog.cc:113 msgid "OpenGL (faster)" @@ -2538,9 +2531,8 @@ msgid "Remove Screen" msgstr "Odstranit obraz" #: src/wx/content_panel.cc:276 -#, fuzzy msgid "Remove the selected piece of content from the film (Delete)." -msgstr "Odstranit vybranou část obsahu z filmu." +msgstr "Odstraňte vybranou část obsahu z filmu (Smazat)." #: src/wx/rename_template_dialog.cc:26 msgid "Rename template" @@ -2673,9 +2665,8 @@ msgid "Scale" msgstr "Měřítko" #: src/wx/invalid_certificate_period_dialog.cc:47 -#, fuzzy msgid "Screen" -msgstr "Obraz" +msgstr "Obrazovka" #: src/wx/kdm_dialog.cc:81 msgid "Screens" @@ -2816,9 +2807,8 @@ msgid "Set project DCP settings from this DCP" msgstr "Nastavit DCP projekt z tohoto DCP" #: src/wx/content_menu.cc:113 -#, fuzzy msgid "Set project markers from this DCP" -msgstr "Nastavit DCP projekt z tohoto DCP" +msgstr "Nastavte značky projektu z tohoto DCP" #: src/wx/custom_scale_dialog.cc:42 msgid "Set ratio and fit to DCP container" @@ -2855,11 +2845,11 @@ msgstr "Zobrazit graf zvukových hladin…" #: src/wx/screens_panel.cc:763 #, c-format msgid "Show only %d checked" -msgstr "" +msgstr "Zobrazit pouze %d zaškrtnutých" #: src/wx/screens_panel.cc:65 src/wx/screens_panel.cc:761 msgid "Show only checked" -msgstr "" +msgstr "Zobrazit pouze zaškrtnuté" #: src/wx/text_panel.cc:170 msgid "Show subtitle area" @@ -2903,14 +2893,12 @@ msgid "Snap" msgstr "Přichytit k objektům" #: src/wx/invalid_certificate_period_dialog.cc:83 -#, fuzzy msgid "" "Some KDMs would have validity periods which are outside the recipient " "certificate validity periods. What do you want to do?" msgstr "" -"Některé KDM by měly doby platnosti, které jsou zcela mimo doby platnosti " -"certifikátu příjemce. Je velmi nepravděpodobné, že by takové KDM fungovaly, " -"a proto nebudou vytvořeny." +"Některé KDM by měly doby platnosti, které jsou mimo období platnosti " +"certifikátu příjemce. Co chceš dělat?" #: src/wx/verify_dcp_dialog.cc:384 msgid "" @@ -2933,16 +2921,15 @@ msgstr "Zvuk" #: src/wx/verify_dcp_dialog.cc:414 msgid "Sound assets do not all have the same channel count." -msgstr "" +msgstr "Všechny zvuková assety nemají stejný počet kanálů." #: src/wx/gain_calculator_dialog.cc:32 msgid "Sound processor" msgstr "Zvukový procesor" #: src/wx/metadata_dialog.cc:207 -#, fuzzy msgid "Specific" -msgstr "Nespecifikováno" +msgstr "Specifický" #: src/wx/dcp_panel.cc:150 msgid "Split by video content" @@ -3068,9 +3055,8 @@ msgid "Temporary version" msgstr "Dočasočná verze" #: src/wx/metadata_dialog.cc:205 -#, fuzzy msgid "Territory type" -msgstr "Území (např. SK)" +msgstr "Typ území" #: src/wx/full_config_dialog.cc:994 src/wx/full_config_dialog.cc:997 msgid "Test email sending failed." @@ -3095,7 +3081,7 @@ msgstr "Čas 'do' musí být po čase 'od’." #: src/wx/verify_dcp_dialog.cc:438 #, c-format msgid "The in a in CPL %id is empty" -msgstr "" +msgstr " v v CPL %id je prázdný" #: src/wx/verify_dcp_dialog.cc:399 msgid "" @@ -3236,14 +3222,13 @@ msgstr "" "DCP je funkce, ale nemá žádnou značku FFMC (první snímek úvodních titulků)." #: src/wx/dkdm_dialog.cc:173 src/wx/kdm_dialog.cc:206 -#, fuzzy msgid "" "The KDM end period is after (or close to) the end of the signing " "certificates' validity period. Either use an earlier end time for this KDM " "or re-create your signing certificates in the DCP-o-matic preferences window." msgstr "" -"Konec období KDM je po (nebo blízkém) konci doby platnosti podpisových " -"certifikátů. Použijte pro tento KDM dřívější čas ukončení nebo znovu " +"Koncové období KDM je po (nebo blízko) konci doby platnosti podpisových " +"certifikátů. Buď použijte dřívější čas ukončení tohoto KDM, nebo znovu " "vytvořte své podpisové certifikáty v okně předvoleb DCP-o-matic." #: src/wx/dkdm_dialog.cc:171 src/wx/kdm_dialog.cc:204 @@ -3291,7 +3276,7 @@ msgstr "ID prostředku v časované textové mxf neodpovídá ID obsaženého XM #: src/wx/verify_dcp_dialog.cc:432 #, c-format msgid "The SMPTE subtitle asset %id has nodes but no node" -msgstr "" +msgstr "Titulky SMPTE %id má uzly , ale žádný uzel " #: src/wx/verify_dcp_dialog.cc:160 #, c-format @@ -3315,7 +3300,7 @@ msgstr "" #, c-format msgid "" "The XML in the subtitle asset %n has more than one namespace declaration." -msgstr "" +msgstr "XML v aktivu titulků %n má více než jednu deklaraci jmenného prostoru." #: src/wx/verify_dcp_dialog.cc:182 #, c-format @@ -3349,7 +3334,7 @@ msgstr "Datový zdroj %n nemá v CPL." #: src/wx/verify_dcp_dialog.cc:435 #, c-format msgid "The asset with ID %id in the asset map actually has an id of %other_id" -msgstr "" +msgstr "Dílo s ID %id v mapě aktiv má ve skutečnosti id %other_id" #: src/wx/verify_dcp_dialog.cc:272 #, c-format @@ -3406,6 +3391,8 @@ msgid "" "The font file for font ID \"%n\" was not found, or was not referred to in " "the ASSETMAP." msgstr "" +"Soubor fontu pro ID fontu „%n“ nebyl nalezen nebo na něj nebyl odkaz v " +"ASSETMAP." #: src/wx/verify_dcp_dialog.cc:209 #, c-format @@ -4232,9 +4219,8 @@ msgid "full screen" msgstr "celá obrazovka" #: src/wx/player_config_dialog.cc:99 -#, fuzzy msgid "full screen with separate advanced controls" -msgstr "celá obrazovka s ovládacími prvky na jiném monitoru" +msgstr "celá obrazovka se samostatnými pokročilými ovládacími prvky" #. TRANSLATORS: this is an abbreviation for "hours" #: src/wx/timing_panel.cc:85 diff --git a/src/wx/send_i18n_dialog.cc b/src/wx/send_i18n_dialog.cc deleted file mode 100644 index 6efcf993c..000000000 --- a/src/wx/send_i18n_dialog.cc +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (C) 2018-2021 Carl Hetherington - - This file is part of DCP-o-matic. - - DCP-o-matic is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - DCP-o-matic is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DCP-o-matic. If not, see . - -*/ - - -#include "i18n_hook.h" -#include "send_i18n_dialog.h" -#include "wx_util.h" -#include -LIBDCP_DISABLE_WARNINGS -#include -LIBDCP_ENABLE_WARNINGS - - -using std::string; -using std::map; - - -SendI18NDialog::SendI18NDialog (wxWindow* parent) - : wxDialog (parent, wxID_ANY, _("Send translations")) -{ - auto overall_sizer = new wxBoxSizer (wxVERTICAL); - - auto table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); - table->AddGrowableCol (1, 1); - - add_label_to_sizer (table, this, _("Your name"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); - _name = new wxTextCtrl (this, wxID_ANY); - table->Add (_name, 0, wxEXPAND); - - add_label_to_sizer (table, this, _("Your email"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); - _email = new wxTextCtrl (this, wxID_ANY); - table->Add (_email, 0, wxEXPAND); - - add_label_to_sizer (table, this, _("Language"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); - _language = new wxTextCtrl (this, wxID_ANY); - table->Add (_language, 0, wxEXPAND); - - auto list = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxSize(800, -1), wxLC_REPORT | wxLC_NO_HEADER); - list->AppendColumn(wxT(""), wxLIST_FORMAT_LEFT, 400); - list->AppendColumn(wxT(""), wxLIST_FORMAT_LEFT, 400); - - auto translations = I18NHook::translations (); - int N = 0; - for (auto const& i: translations) { - wxListItem it; - it.SetId(N); - it.SetColumn(0); - it.SetText(std_to_wx(i.first)); - list->InsertItem(it); - it.SetColumn(1); - it.SetText(std_to_wx(i.second)); - list->SetItem(it); - ++N; - } - - overall_sizer->Add (table, 0, wxEXPAND | wxALL, DCPOMATIC_SIZER_GAP); - overall_sizer->Add (list, 1, wxEXPAND | wxALL, DCPOMATIC_SIZER_GAP); - - auto buttons = CreateSeparatedButtonSizer (wxOK | wxCANCEL); - if (buttons) { - overall_sizer->Add (buttons, wxSizerFlags().Expand().DoubleBorder()); - } - - SetSizerAndFit (overall_sizer); -} diff --git a/src/wx/send_i18n_dialog.h b/src/wx/send_i18n_dialog.h deleted file mode 100644 index 4651fb811..000000000 --- a/src/wx/send_i18n_dialog.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - Copyright (C) 2018 Carl Hetherington - - This file is part of DCP-o-matic. - - DCP-o-matic is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - DCP-o-matic is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DCP-o-matic. If not, see . - -*/ - - -#include "wx_util.h" -#include -LIBDCP_DISABLE_WARNINGS -#include -LIBDCP_ENABLE_WARNINGS - - -class SendI18NDialog : public wxDialog -{ -public: - SendI18NDialog (wxWindow* parent); - - std::string name () { - return wx_to_std (_name->GetValue()); - } - - std::string email () { - return wx_to_std (_email->GetValue()); - } - - std::string language () { - return wx_to_std (_language->GetValue()); - } - -private: - wxTextCtrl* _name; - wxTextCtrl* _email; - wxTextCtrl* _language; -}; diff --git a/src/wx/supporters.cc b/src/wx/supporters.cc index 514b53d7b..baeba2da9 100644 --- a/src/wx/supporters.cc +++ b/src/wx/supporters.cc @@ -61,6 +61,7 @@ supported_by.Add (wxT ("BFI National Archive")); supported_by.Add (wxT ("Cristian Arias Arévalo")); supported_by.Add (wxT ("Alex Argoitia")); supported_by.Add (wxT ("Esteban Arrangoiz")); +supported_by.Add (wxT ("The Boscov Theater at GoggleWorks Center for the Arts")); supported_by.Add (wxT ("Gunnar Ásgeir Ásgeirsson")); supported_by.Add (wxT ("Andrea Ashton")); supported_by.Add (wxT ("Georges Asmar")); @@ -102,6 +103,7 @@ supported_by.Add (wxT ("Kenneth Biswabic")); supported_by.Add (wxT ("Mike Blakesley")); supported_by.Add (wxT ("Cyrille Blanc")); supported_by.Add (wxT ("Stijn De Blieck")); +supported_by.Add (wxT ("Nathan Block")); supported_by.Add (wxT ("Félix Blume")); supported_by.Add (wxT ("Theodor Boder")); supported_by.Add (wxT ("Thorsten Boehnke")); @@ -272,6 +274,7 @@ supported_by.Add (wxT ("Greg Delmage")); supported_by.Add (wxT ("Diemiruaya Deniran")); supported_by.Add (wxT ("Larin Denis")); supported_by.Add (wxT ("Michael Denner")); +supported_by.Add (wxT ("denverdisc.com")); supported_by.Add (wxT ("Nicholas Deppe")); supported_by.Add (wxT ("Alexey Derevyanko")); supported_by.Add (wxT ("Olivier Dermine")); @@ -318,6 +321,7 @@ supported_by.Add (wxT ("Guy Edmonds")); supported_by.Add (wxT ("Simon Edwards")); supported_by.Add (wxT ("Arthur Edwards")); supported_by.Add (wxT ("Si Edwards")); +supported_by.Add (wxT ("NEU-Deli Einbeck")); supported_by.Add (wxT ("Thomas Eingartner")); supported_by.Add (wxT ("Gabriel Eiriz")); supported_by.Add (wxT ("Chris Eller")); @@ -551,6 +555,7 @@ supported_by.Add (wxT ("Mason Hunsicker")); supported_by.Add (wxT ("Markus Hüsgen")); supported_by.Add (wxT ("Maurice Huvelin")); supported_by.Add (wxT ("Robin Hyden")); +supported_by.Add (wxT ("IAFilm")); supported_by.Add (wxT ("Dayton Movies Inc")); supported_by.Add (wxT ("Buttons Sound Inc")); supported_by.Add (wxT ("Paramount Twin Inc")); @@ -655,6 +660,7 @@ supported_by.Add (wxT ("Dieter Kovacic")); supported_by.Add (wxT ("Filip Kovcin")); supported_by.Add (wxT ("Alan Kraemer")); supported_by.Add (wxT ("Joel Krantz")); +supported_by.Add (wxT ("Oliver Krause")); supported_by.Add (wxT ("Ralph-Raimund Krause")); supported_by.Add (wxT ("Christian Kreil")); supported_by.Add (wxT ("Sebastian Kreis")); @@ -683,6 +689,8 @@ supported_by.Add (wxT ("Angela En-yu Lao")); supported_by.Add (wxT ("Daniel Martinez Lara")); supported_by.Add (wxT ("Gabriel Montagné Láscaris-Comneno")); supported_by.Add (wxT ("Marga Laube")); +supported_by.Add (wxT ("James Lauchlan")); +supported_by.Add (wxT ("Luc Lavergne")); supported_by.Add (wxT ("Nicholas Lavigne")); supported_by.Add (wxT ("Philip Lawrence")); supported_by.Add (wxT ("David Lawrence")); @@ -861,6 +869,7 @@ supported_by.Add (wxT ("Rigoberto Mora")); supported_by.Add (wxT ("Pierre-Jean Moreau")); supported_by.Add (wxT ("Stanislas Moreau")); supported_by.Add (wxT ("Ted Morée")); +supported_by.Add (wxT ("Daniel Morez")); supported_by.Add (wxT ("Paolo Morini")); supported_by.Add (wxT ("Lars Moritz")); supported_by.Add (wxT ("Lindsay Morris")); @@ -956,6 +965,7 @@ supported_by.Add (wxT ("Jason Phelps")); supported_by.Add (wxT ("John Phillips")); supported_by.Add (wxT ("Nat Phong")); supported_by.Add (wxT ("Phonotone")); +supported_by.Add (wxT ("Kari Layland Photography")); supported_by.Add (wxT ("MelRish Photos And Films")); supported_by.Add (wxT ("Paolo Piccioli")); supported_by.Add (wxT ("Peccadillo Pictures")); diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc index 859c0a886..e065f9bb4 100644 --- a/src/wx/video_panel.cc +++ b/src/wx/video_panel.cc @@ -108,7 +108,11 @@ VideoPanel::create () int const link_height = 32; #elif defined(DCPOMATIC_OSX) int const crop_width = 56; +#if wxCHECK_VERSION(3, 2, 0) int const link_width = 8 + 15 / dpi_scale_factor(this); +#else + int const link_width = 23; +#endif int const link_height = 28; #else int const crop_width = 56; diff --git a/src/wx/wscript b/src/wx/wscript index 9c6ea6b84..a6eefa69f 100644 --- a/src/wx/wscript +++ b/src/wx/wscript @@ -139,7 +139,6 @@ sources = """ screen_dialog.cc screens_panel.cc self_dkdm_dialog.cc - send_i18n_dialog.cc send_test_email_dialog.cc server_dialog.cc servers_list_dialog.cc diff --git a/test/j2k_encoder_test.cc b/test/j2k_encoder_test.cc new file mode 100644 index 000000000..bc3bd97b2 --- /dev/null +++ b/test/j2k_encoder_test.cc @@ -0,0 +1,83 @@ +/* + Copyright (C) 2024 Carl Hetherington + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see . + +*/ + + +#include "lib/config.h" +#include "lib/cross.h" +#include "lib/image.h" +#include "lib/j2k_encoder.h" +#include "lib/player_video.h" +#include "lib/raw_image_proxy.h" +#include "lib/writer.h" +#include "test.h" +extern "C" { +#include +} +#include + + +using std::make_shared; +using std::weak_ptr; +using boost::optional; + + +BOOST_AUTO_TEST_CASE(j2k_encoder_deadlock_test) +{ + ConfigRestorer cr; + + auto film = new_test_film2("j2k_encoder_deadlock_test"); + + /* Don't call ::start() on this Writer, so it can never write anything */ + Writer writer(film, {}); + writer.set_encoder_threads(4); + + /* 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); + J2KEncoder encoder(film, writer); + encoder.begin(); + + for (int i = 0; i < 26; ++i) { + auto image = make_shared(AV_PIX_FMT_RGB24, dcp::Size(1998, 1080), Image::Alignment::PADDED); + auto image_proxy = make_shared(image); + encoder.encode( + std::make_shared( + image_proxy, + Crop(), + optional(), + dcp::Size(1998, 1080), + dcp::Size(1998, 1080), + Eyes::BOTH, + Part::WHOLE, + optional(), + VideoRange::VIDEO, + weak_ptr(), + optional(), + false + ), + {} + ); + } + + dcpomatic_sleep_seconds(10); +} + diff --git a/test/player_test.cc b/test/player_test.cc index 5120c0180..a13b50352 100644 --- a/test/player_test.cc +++ b/test/player_test.cc @@ -30,6 +30,7 @@ #include "lib/butler.h" #include "lib/compose.hpp" #include "lib/config.h" +#include "lib/constants.h" #include "lib/content_factory.h" #include "lib/cross.h" #include "lib/dcp_content.h" @@ -710,3 +711,21 @@ BOOST_AUTO_TEST_CASE(three_d_in_two_d_chooses_left) while (!player->pass()) {} } + +BOOST_AUTO_TEST_CASE(unmapped_audio_does_not_raise_buffer_error) +{ + auto content = content_factory(TestPaths::private_data() / "arrietty_JP-EN.mkv")[0]; + auto film = new_test_film2("unmapped_audio_does_not_raise_buffer_error", { content }); + + content->audio->set_mapping(AudioMapping(6 * 2, MAX_DCP_AUDIO_CHANNELS)); + + Player player(film, Image::Alignment::COMPACT); + Butler butler(film, player, AudioMapping(), 2, bind(PlayerVideo::force, AV_PIX_FMT_RGB24), VideoRange::FULL, Image::Alignment::PADDED, true, false, Butler::Audio::ENABLED); + + /* Wait for the butler thread to run for a while; in the case under test it will throw an exception because + * the video buffers are filled but no audio comes. + */ + dcpomatic_sleep_seconds(10); + butler.rethrow(); +} + diff --git a/test/wscript b/test/wscript index bb66d1a5f..cd23badc0 100644 --- a/test/wscript +++ b/test/wscript @@ -112,6 +112,7 @@ def build(bld): interrupt_encoder_test.cc isdcf_name_test.cc j2k_bandwidth_test.cc + j2k_encoder_test.cc job_manager_test.cc kdm_cli_test.cc kdm_naming_test.cc diff --git a/wscript b/wscript index e5164cc52..305dc8c72 100644 --- a/wscript +++ b/wscript @@ -35,20 +35,20 @@ except ImportError: from waflib import Logs, Context APPNAME = 'dcpomatic' -libdcp_version = '1.8.73' +libdcp_version = '1.8.100' libsub_version = '1.6.42' -this_version = subprocess.Popen(shlex.split('git tag -l --points-at HEAD'), stdout=subprocess.PIPE).communicate()[0] -last_version = subprocess.Popen(shlex.split('git describe --tags --match v* --abbrev=0'), stdout=subprocess.PIPE).communicate()[0] +this_version = subprocess.Popen(['git', 'tag', '-l', '--points-at', 'HEAD'], stdout=subprocess.PIPE).communicate()[0] +git_head = subprocess.Popen(['git', 'rev-parse', '--short=9', 'HEAD'], stdout=subprocess.PIPE).communicate()[0] # Python 2/3 compatibility; I don't really understand what's going on here if not isinstance(this_version, str): this_version = this_version.decode('utf-8') -if not isinstance(last_version, str): - last_version = last_version.decode('utf-8') +if not isinstance(git_head, str): + git_head = git_head.decode('utf-8') -if this_version == '' or this_version == 'merged-to-main': - VERSION = '%sdevel' % last_version[1:].strip() +if this_version == '': + VERSION = git_head.strip() else: VERSION = this_version[1:].strip() @@ -196,7 +196,6 @@ def configure(conf): int main() { std::locale::global (boost::locale::generator().generate ("")); }\n """, msg='Checking for boost locale library', - libpath='/usr/local/lib', lib=['boost_locale%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix], uselib_store='BOOST_LOCALE') @@ -249,7 +248,7 @@ def configure(conf): mandatory=True, msg='Checking for libicu', okmsg='yes', - libpath=['/usr/local/lib', '/usr/lib', '/usr/lib/x86_64-linux-gnu'], + libpath=['/usr/lib', '/usr/lib/x86_64-linux-gnu'], lib=['icuio', 'icui18n', 'icudata', 'icuuc'], uselib_store='ICU') @@ -399,7 +398,6 @@ def configure(conf): int main() { struct jpeg_compress_struct compress; jpeg_create_compress (&compress); return 0; } """, msg='Checking for libjpeg', - libpath='/usr/local/lib', lib=['jpeg'], uselib_store='JPEG') @@ -410,7 +408,6 @@ def configure(conf): int main() { ext4_mount("ext4_fs", "/mp/", false); }\n """, msg='Checking for lwext4 library', - libpath='/usr/local/lib', lib=['lwext4', 'blockdev'], uselib_store='LWEXT4') @@ -549,7 +546,6 @@ def configure(conf): int main() { boost::thread t; }\n """, msg='Checking for boost threading library', - libpath='/usr/local/lib', lib=[boost_thread, 'boost_system%s' % boost_lib_suffix], uselib_store='BOOST_THREAD') @@ -558,7 +554,6 @@ def configure(conf): int main() { boost::filesystem::copy_file ("a", "b"); }\n """, msg='Checking for boost filesystem library', - libpath='/usr/local/lib', lib=['boost_filesystem%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix], uselib_store='BOOST_FILESYSTEM') @@ -567,7 +562,6 @@ def configure(conf): int main() { boost::gregorian::day_clock::local_day(); }\n """, msg='Checking for boost datetime library', - libpath='/usr/local/lib', lib=['boost_date_time%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix], uselib_store='BOOST_DATETIME')