Supporters update. main v2.16.81
authorCarl Hetherington <cth@carlh.net>
Wed, 24 Apr 2024 00:11:29 +0000 (02:11 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 24 Apr 2024 00:11:29 +0000 (02:11 +0200)
13 files changed:
cscript
run/environment
run/tests
src/lib/ffmpeg_content.cc
src/lib/ffmpeg_decoder.cc
src/lib/ffmpeg_examiner.cc
src/lib/video_content.cc
src/lib/video_content.h
src/lib/wscript
src/wx/supporters.cc
src/wx/verify_dcp_dialog.cc
test/subtitle_timing_test.cc
wscript

diff --git a/cscript b/cscript
index 53d2beb7b40bc1901102b270b55cb641b6f50b6e..dd7f9c44a9581449043195557331df1342edb919 100644 (file)
--- a/cscript
+++ b/cscript
@@ -535,7 +535,7 @@ def dependencies(target, options):
         # Use distro-provided FFmpeg on Arch
         deps = []
 
-    deps.append(('libdcp', 'v1.8.98'))
+    deps.append(('libdcp', 'v1.8.99'))
     deps.append(('libsub', 'v1.6.47'))
     deps.append(('leqm-nrt', '30dcaea1373ac62fba050e02ce5b0c1085797a23'))
     deps.append(('rtaudio', 'f619b76'))
@@ -589,7 +589,7 @@ def configure_options(target, options, for_package=False):
         opt += ' --enable-disk'
 
     if target.platform == 'osx' and target.arch == 'arm64':
-        opt += ' --target-macos-arm64 --wx-config=%s/wx-config' % target.bin
+        opt += ' --wx-config=%s/wx-config' % target.bin
 
     return opt
 
index aabb463f366274de186c8e582fbeca08db4849ba..aa4f77187b63c7b96edabeeb37f74aaf39c41bcc 100644 (file)
@@ -1,6 +1,9 @@
 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 build=$DIR/../build
-export LD_LIBRARY_PATH=$build/src/lib:$build/src/wx:$build/src/asdcplib/src:/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH
+export LD_LIBRARY_PATH=$build/src/lib:$build/src/wx:/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH
+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 DCPOMATIC_GRAPHICS=$DIR/../graphics
 
index 6f43290c4f1d56488fd719f7a05b89708c71e78a..bf4c5732edb16d0f5bac2436e1744c5ee6d3c283 100755 (executable)
--- a/run/tests
+++ b/run/tests
@@ -3,7 +3,7 @@
 # e.g. --run_tests=foo
 set -e
 
-PRIVATE_GIT="5298360d6bbae434fb4625fda1cc9dd6be101df3"
+PRIVATE_GIT="881c48805e352dfe150993814757ca974282be18"
 
 if [ "$1" == "--check" ]; then
        shift 1
index c788e7cb1d271296fd201477f9e0e6631de0c32b..4a7c87b341e1046e0efbc4cabe965626d68ce01e 100644 (file)
@@ -295,8 +295,10 @@ FFmpegContent::examine (shared_ptr<const Film> film, shared_ptr<Job> job)
                                        _filters.push_back(*Filter::from_id("hflip"));
                                } else if (fabs (rot - 90) < 1.0) {
                                        _filters.push_back(*Filter::from_id("90clock"));
+                                       video->rotate_size();
                                } else if (fabs (rot - 270) < 1.0) {
                                        _filters.push_back(*Filter::from_id("90anticlock"));
+                                       video->rotate_size();
                                }
                        }
                        if (examiner->has_alpha()) {
index 7f7a078638b540ba81bbbe38c5ad260970232fa0..6130d8e5fb5c59be98c6aec9c6ed7b78e23eeac1 100644 (file)
@@ -668,11 +668,11 @@ FFmpegDecoder::decode_and_process_subtitle_packet (AVPacket* packet)
        */
        ContentTime from;
        from = sub_period.from + _pts_offset;
+       _have_current_subtitle = true;
        if (sub_period.to) {
                _current_subtitle_to = *sub_period.to + _pts_offset;
        } else {
                _current_subtitle_to = optional<ContentTime>();
-               _have_current_subtitle = true;
        }
 
        ContentBitmapText bitmap_text(from);
index 15cb14ad53301605df3e96ec4398f7ffdce55b8c..51ade8e89cb844336baa4dfac51ef56be3f4fbea 100644 (file)
@@ -182,7 +182,6 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
                auto stream = _format_context->streams[*_video_stream];
                auto rotate_tag = av_dict_get (stream->metadata, "rotate", 0, 0);
                uint8_t* displaymatrix = av_stream_get_side_data (stream, AV_PKT_DATA_DISPLAYMATRIX, 0);
-               _rotation = 0;
 
                if (rotate_tag && *rotate_tag->value && strcmp(rotate_tag->value, "0")) {
                        char *tail;
@@ -196,7 +195,9 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
                        _rotation = - av_display_rotation_get ((int32_t*) displaymatrix);
                }
 
-               _rotation = *_rotation - 360 * floor (*_rotation / 360 + 0.9 / 360);
+               if (_rotation) {
+                       _rotation = *_rotation - 360 * floor (*_rotation / 360 + 0.9 / 360);
+               }
        }
 
        LOG_GENERAL("Temporal reference was %1", temporal_reference);
index 91ed1185588d181056d76a8fd78ea11ffaefa8c5..6c027ff114ceaae500adbb3d2c340f94753a2d37 100644 (file)
@@ -722,3 +722,12 @@ VideoContent::actual_crop () const
        );
 }
 
+
+void
+VideoContent::rotate_size()
+{
+       if (_size) {
+               std::swap(_size->width, _size->height);
+       }
+}
+
index e7e8eb1b3d3d6f35c68169bc71677ffddf0632e7..495d000e160401a24059a4f355a92df3acc90f04 100644 (file)
@@ -220,6 +220,8 @@ public:
        void modify_position (std::shared_ptr<const Film> film, dcpomatic::DCPTime& pos) const;
        void modify_trim_start (dcpomatic::ContentTime& pos) const;
 
+       void rotate_size();
+
        static std::shared_ptr<VideoContent> from_xml (Content* parent, cxml::ConstNodePtr node, int version, VideoRange video_range_hint);
 
 private:
index 7dd3bfe358877f7359f88c7c6e3bee0a06310de2..87a1ca7873bfc37697ac53a7a6f2b9dc67f6fdaa 100644 (file)
@@ -228,7 +228,7 @@ def build(bld):
     obj.uselib = """
                  AVCODEC AVUTIL AVFORMAT AVFILTER SWSCALE
                  BOOST_FILESYSTEM BOOST_THREAD BOOST_DATETIME BOOST_SIGNALS2 BOOST_REGEX
-                 SAMPLERATE POSTPROC TIFF SSH DCP CXML GLIB XML++
+                 SAMPLERATE POSTPROC TIFF SSH DCP CXML GLIB LZMA XML++
                  CURL ZIP BZ2 FONTCONFIG PANGOMM CAIROMM XMLSEC SUB ICU NETTLE PNG JPEG LEQM_NRT
                  LIBZ
                  """
index 711b6bbad505179861a4af3ea98c09aac4dae82a..89551cf9dec23bb9789b0a909f3975f9c8d6cd33 100644 (file)
@@ -102,6 +102,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"));
@@ -126,6 +127,7 @@ supported_by.Add (wxT ("Phillip Branford"));
 supported_by.Add (wxT ("Ingebjørg Braseth"));
 supported_by.Add (wxT ("Studio Brauneis"));
 supported_by.Add (wxT ("Thomas Bray"));
+supported_by.Add (wxT ("Thomas Bray"));
 supported_by.Add (wxT ("queerfilm festival Bremen"));
 supported_by.Add (wxT ("Martin Brenneis"));
 supported_by.Add (wxT ("Petra-Puk Bresser"));
@@ -233,6 +235,7 @@ supported_by.Add (wxT ("Adam Cousins"));
 supported_by.Add (wxT ("Aria Covamonas"));
 supported_by.Add (wxT ("Tom Cowan"));
 supported_by.Add (wxT ("Jill Cox"));
+supported_by.Add (wxT ("Tate Cozza"));
 supported_by.Add (wxT ("Stefano Cravero"));
 supported_by.Add (wxT ("Phillip Crawford"));
 supported_by.Add (wxT ("Root && Rust Creative"));
@@ -372,6 +375,7 @@ supported_by.Add (wxT ("Marc Fiebig"));
 supported_by.Add (wxT ("Moshel Film"));
 supported_by.Add (wxT ("Juli Film"));
 supported_by.Add (wxT ("Pató Film"));
+supported_by.Add (wxT ("HisStory Film"));
 supported_by.Add (wxT ("Hoppe Film"));
 supported_by.Add (wxT ("“How to Successfully Fail in Hollywood” Film"));
 supported_by.Add (wxT ("Hamann Film"));
@@ -443,6 +447,7 @@ supported_by.Add (wxT ("Francesca Garau"));
 supported_by.Add (wxT ("Jordi Miró Garcia"));
 supported_by.Add (wxT ("Francisco Montoro Garcia"));
 supported_by.Add (wxT ("Stefano Gariglio"));
+supported_by.Add (wxT ("Tom Garner"));
 supported_by.Add (wxT ("Bethwyn Garswood"));
 supported_by.Add (wxT ("Andris Gauja"));
 supported_by.Add (wxT ("DocCollection GbR"));
@@ -569,6 +574,7 @@ supported_by.Add (wxT ("Shinya Isobe"));
 supported_by.Add (wxT ("Theodore Ivanov"));
 supported_by.Add (wxT ("Julien Ivanowich"));
 supported_by.Add (wxT ("Denis Ivashvkevych"));
+supported_by.Add (wxT ("June Nho Ivers"));
 supported_by.Add (wxT ("Emilia Izquierdo"));
 supported_by.Add (wxT ("Mahboobani Jackie"));
 supported_by.Add (wxT ("Alexzandra Jackson"));
@@ -650,6 +656,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"));
@@ -678,6 +685,7 @@ 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 ("Nicholas Lavigne"));
 supported_by.Add (wxT ("Philip Lawrence"));
 supported_by.Add (wxT ("David Lawrence"));
@@ -813,6 +821,7 @@ supported_by.Add (wxT ("Kenjo McCurtain"));
 supported_by.Add (wxT ("Dawn McElligott"));
 supported_by.Add (wxT ("Caitlin Mcgrath"));
 supported_by.Add (wxT ("Neil McGrath"));
+supported_by.Add (wxT ("Tom Mcintire"));
 supported_by.Add (wxT ("Andrew McKee"));
 supported_by.Add (wxT ("Gordon McLeod"));
 supported_by.Add (wxT ("Britt McTammany"));
@@ -908,6 +917,7 @@ supported_by.Add (wxT ("Didier Oriol"));
 supported_by.Add (wxT ("Kevin Orman"));
 supported_by.Add (wxT ("George Orr"));
 supported_by.Add (wxT ("orwoid.com"));
+supported_by.Add (wxT ("Neil Oseman"));
 supported_by.Add (wxT ("Danilo Marichal Osorio"));
 supported_by.Add (wxT ("Norbert Ostendorf"));
 supported_by.Add (wxT ("Peter Östlund"));
@@ -927,6 +937,7 @@ supported_by.Add (wxT ("Christian Passeri"));
 supported_by.Add (wxT ("Sharad Patel"));
 supported_by.Add (wxT ("Panagiotis Patsiaouras"));
 supported_by.Add (wxT ("Anand Patwardhan"));
+supported_by.Add (wxT ("Tomaz Pavkovic"));
 supported_by.Add (wxT ("Stanko Pavlica"));
 supported_by.Add (wxT ("Konstantinos Pavlidis"));
 supported_by.Add (wxT ("Natalie Peart"));
@@ -985,6 +996,7 @@ supported_by.Add (wxT ("Pentimenti Productions"));
 supported_by.Add (wxT ("Hitman Productions"));
 supported_by.Add (wxT ("WLFK Productions"));
 supported_by.Add (wxT ("Ceridwen Productions"));
+supported_by.Add (wxT ("ZooTime Productions"));
 supported_by.Add (wxT ("A Tractor Productions"));
 supported_by.Add (wxT ("Second Wind Productions"));
 supported_by.Add (wxT ("Locomotive Productions"));
@@ -1060,6 +1072,7 @@ supported_by.Add (wxT ("Objectif 13 S.C.S."));
 supported_by.Add (wxT ("Neil Sadwelkar"));
 supported_by.Add (wxT ("Hakan Sahin"));
 supported_by.Add (wxT ("Sebastien Saint-Cricq"));
+supported_by.Add (wxT ("Milena Salazar"));
 supported_by.Add (wxT ("Lasse Salling"));
 supported_by.Add (wxT ("Community TV Salzburg"));
 supported_by.Add (wxT ("Keith Sanborn"));
index c77f68ea1dc2c7ea1baec1cbbf064d89cfa3963d..c7a32e5dd14f65df759fee5ab14f2ad6549e8404 100644 (file)
@@ -449,6 +449,12 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> job
                case dcp::VerificationNote::Code::EMPTY_CONTENT_VERSION_LABEL_TEXT:
                        add(i, _("The <LabelText> in a <ContentVersion> in CPL %id is empty"));
                        break;
+               case dcp::VerificationNote::Code::INVALID_CPL_NAMESPACE:
+                       add(i, _("The CPL %f has an invalid namespace %n"));
+                       break;
+               case dcp::VerificationNote::Code::MISSING_CPL_CONTENT_VERSION:
+                       add(i, _("The CPL %n has no <ContentVersion> tag"));
+                       break;
                }
        }
 
index 79cc68849499531dfa339e63bfeacd4f16724b9a..8bb18f304c2d77ea2b2702d2077b44f3ee239e8e 100644 (file)
 
 #include "lib/content.h"
 #include "lib/content_factory.h"
+#include "lib/content_text.h"
+#include "lib/dcpomatic_time.h"
 #include "lib/film.h"
+#include "lib/ffmpeg_content.h"
+#include "lib/ffmpeg_decoder.h"
 #include "lib/text_content.h"
+#include "lib/text_decoder.h"
 #include "lib/video_content.h"
 #include "test.h"
 #include <dcp/cpl.h>
@@ -33,6 +38,9 @@
 #include <iostream>
 
 
+using std::dynamic_pointer_cast;
+
+
 BOOST_AUTO_TEST_CASE (test_subtitle_timing_with_frame_rate_change)
 {
        Cleanup cl;
@@ -72,3 +80,66 @@ BOOST_AUTO_TEST_CASE (test_subtitle_timing_with_frame_rate_change)
        cl.run();
 }
 
+
+BOOST_AUTO_TEST_CASE(dvb_subtitles_replace_the_last)
+{
+       /* roh.mkv contains subtitles that come out of FFmpeg with incorrect stop times (30s
+        * after the start, which seems to be some kind of DVB "standard" timeout).
+        * Between actual subtitles it contains blanks that are apparently supposed to clear
+        * the previous subtitle.  Make sure that happens.
+        */
+       auto content = content_factory(TestPaths::private_data() / "roh.mkv");
+       BOOST_REQUIRE(!content.empty());
+       auto film = new_test_film2("dvb_subtitles_replace_the_last", { content[0] });
+
+       FFmpegDecoder decoder(film, dynamic_pointer_cast<FFmpegContent>(content[0]), false);
+       BOOST_REQUIRE(!decoder.text.empty());
+
+       struct Event {
+               std::string type;
+               dcpomatic::ContentTime time;
+
+               bool operator==(Event const& other) const {
+                       return type == other.type && time == other.time;
+               }
+       };
+
+       std::vector<Event> events;
+
+       auto start = [&events](ContentBitmapText text) {
+               events.push_back({"start", text.from()});
+       };
+
+       auto stop = [&events](dcpomatic::ContentTime time) {
+               if (!events.empty() && events.back().type == "stop") {
+                       /* We'll get a bad (too-late) stop time, then the correct one
+                        * when the "clearing" subtitle arrives.
+                        */
+                       events.pop_back();
+               }
+               events.push_back({"stop", time});
+       };
+
+       decoder.text.front()->BitmapStart.connect(start);
+       decoder.text.front()->Stop.connect(stop);
+
+       while (!decoder.pass()) {}
+
+       using dcpomatic::ContentTime;
+
+       std::vector<Event> correct = {
+               { "start", ContentTime(439872) },  // 4.582000s     actual subtitle #1
+               { "stop",  ContentTime(998400) },  // 10.400000s    stop caused by incoming blank
+               { "start", ContentTime(998400) },  // 10.400000s    blank
+               { "stop",  ContentTime(1141248) }, // 11.888000s    stop caused by incoming subtitle #2
+               { "start", ContentTime(1141248) }, // 11.888000s    subtitle #2
+               { "stop",  ContentTime(1455936) }, // 15.166000s    ...
+               { "start", ContentTime(1455936) }, // 15.166000s
+               { "stop",  ContentTime(1626816) }, // 16.946000s
+               { "start", ContentTime(1626816) }, // 16.946000s
+       };
+
+       BOOST_REQUIRE(events.size() > correct.size());
+       BOOST_CHECK(std::vector<Event>(events.begin(), events.begin() + correct.size()) == correct);
+}
+
diff --git a/wscript b/wscript
index f6f73a52a132701aa667dfe169270935e817681e..e5164cc52b6303f0b9a2a4ec2e2300159a275f98 100644 (file)
--- a/wscript
+++ b/wscript
@@ -219,7 +219,6 @@ def configure(conf):
     if conf.env.TARGET_OSX:
         conf.env.append_value('CXXFLAGS', ['-DDCPOMATIC_OSX', '-DGL_SILENCE_DEPRECATION'])
         conf.env.append_value('LINKFLAGS', '-headerpad_max_install_names')
-        conf.env.append_value('LINKFLAGS', '-llzma')
 
     #
     # Dependencies.