Bump libdcp for better ContentKind support, and libsub
authorCarl Hetherington <cth@carlh.net>
Sat, 3 Sep 2022 12:49:25 +0000 (14:49 +0200)
committerCarl Hetherington <cth@carlh.net>
Sat, 3 Sep 2022 15:12:34 +0000 (17:12 +0200)
for fixes to \c tags in SSA files.

12 files changed:
cscript
src/lib/dcp_content.cc
src/lib/dcp_content.h
src/lib/dcp_content_type.cc
src/lib/dcp_content_type.h
src/lib/dcp_examiner.h
src/lib/ffmpeg_decoder.cc
src/lib/log_entry.cc
src/lib/spl_entry.h
src/tools/dcpomatic_playlist.cc
src/wx/content_view.cc
src/wx/verify_dcp_dialog.cc

diff --git a/cscript b/cscript
index 475a67aaea6c3d0dd843b9cedc74f7bdf1a5ab08..55d2759e165e18efc8ecc378d2e7c3d97b402ef5 100644 (file)
--- a/cscript
+++ b/cscript
@@ -427,8 +427,8 @@ def dependencies(target, options):
         # Use distro-provided FFmpeg on Arch
         deps = []
 
-    deps.append(('libdcp', 'v1.8.25'))
-    deps.append(('libsub', 'v1.6.28'))
+    deps.append(('libdcp', 'v1.8.26'))
+    deps.append(('libsub', 'v1.6.29'))
     deps.append(('leqm-nrt', '93ae9e6'))
     deps.append(('rtaudio', 'f619b76'))
     # We get our OpenSSL libraries from the environment, but we
index 62b74be90cb7765db19ad34a2ad51656da271abf..193c9995aee57516e15a6a5143237c352282ef63 100644 (file)
@@ -148,7 +148,7 @@ DCPContent::DCPContent (cxml::ConstNodePtr node, int version)
 
        auto ck = node->optional_string_child("ContentKind");
        if (ck) {
-               _content_kind = dcp::content_kind_from_string (*ck);
+               _content_kind = dcp::ContentKind::from_name(*ck);
        }
        _cpl = node->optional_string_child("CPL");
        for (auto i: node->node_children("ReelLength")) {
@@ -388,7 +388,7 @@ DCPContent::as_xml (xmlpp::Node* node, bool with_paths) const
        }
        node->add_child("ThreeD")->add_child_text (_three_d ? "1" : "0");
        if (_content_kind) {
-               node->add_child("ContentKind")->add_child_text(dcp::content_kind_to_string(*_content_kind));
+               node->add_child("ContentKind")->add_child_text(_content_kind->name());
        }
        if (_cpl) {
                node->add_child("CPL")->add_child_text (_cpl.get ());
index 1b73e8fc71740c698aac7374b6f264388801636f..efdfe30f705e84c5b6abcdaa4df88b9195283253 100644 (file)
@@ -31,6 +31,7 @@
 #include "content.h"
 #include "font.h"
 #include <libcxml/cxml.h>
+#include <dcp/content_kind.h>
 #include <dcp/encrypted_kdm.h>
 #include <dcp/rating.h>
 
index f3cd02e9f2e998c4bf0e1d61ad635bcecbebb19b..ce54ce01ce9aac72c956d7c8c2387c0d3b327861 100644 (file)
@@ -58,8 +58,12 @@ DCPContentType::setup_dcp_content_types ()
                DCPContentType(_("Policy"), dcp::ContentKind::POLICY, N_("POL")),
                DCPContentType(_("Public Service Announcement"), dcp::ContentKind::PUBLIC_SERVICE_ANNOUNCEMENT, N_("PSA")),
                DCPContentType(_("Advertisement"), dcp::ContentKind::ADVERTISEMENT, N_("ADV")),
+               DCPContentType(_("Clip"), dcp::ContentKind::CLIP, N_("CLP")),
+               DCPContentType(_("Promo"), dcp::ContentKind::PROMO, N_("PRO")),
+               DCPContentType(_("Stereo card"), dcp::ContentKind::STEREOCARD, N_("STR")),
                DCPContentType(_("Episode"), dcp::ContentKind::EPISODE, N_("EPS")),
-               DCPContentType(_("Promo"), dcp::ContentKind::PROMO, N_("PRO"))
+               DCPContentType(_("Highlights"), dcp::ContentKind::HIGHLIGHTS, N_("HLT")),
+               DCPContentType(_("Event"), dcp::ContentKind::EVENT, N_("EVT")),
        };
 }
 
index 117ff3b16d79a0b3029c3d7ac3a9656fef0ea831..f08db883a867ba17ff2772e389ce7761389200d7 100644 (file)
@@ -28,6 +28,7 @@
  */
 
 
+#include <dcp/content_kind.h>
 #include <dcp/dcp.h>
 #include <string>
 #include <vector>
index ac43805977c98f75d5cc9eea1a0c6e94a8871c64..6b88a3c0d412d13d2cf636b7ac49854a28dca682 100644 (file)
@@ -131,7 +131,8 @@ public:
        }
 
        dcp::ContentKind content_kind () const {
-               return _content_kind;
+               DCPOMATIC_ASSERT(_content_kind);
+               return *_content_kind;
        }
 
        std::string cpl () const {
@@ -194,7 +195,7 @@ private:
        bool _kdm_valid = false;
        boost::optional<dcp::Standard> _standard;
        bool _three_d = false;
-       dcp::ContentKind _content_kind;
+       boost::optional<dcp::ContentKind> _content_kind;
        std::string _cpl;
        std::list<int64_t> _reel_lengths;
        std::map<dcp::Marker, dcp::Time> _markers;
index 82eccb576d5df8248926315b72f6748406e9daaf..331ab313d762c99d6b1d383d3606953ac384ba35 100644 (file)
@@ -791,7 +791,8 @@ FFmpegDecoder::process_ass_subtitle (string ass, ContentTime from)
                base,
                text,
                _ffmpeg_content->video->size().width,
-               _ffmpeg_content->video->size().height
+               _ffmpeg_content->video->size().height,
+               sub::Colour(1, 1, 1)
                );
 
        for (auto const& i: sub::collect<vector<sub::Subtitle>>(raw)) {
index 2980e438b084555d5718ddb52900355fc3e79280..d5065e03a30cf79e768172a4f3aebd3dbcc1a225 100644 (file)
@@ -22,6 +22,7 @@
 #include "log_entry.h"
 #include <inttypes.h>
 #include <cstdio>
+#include <ctime>
 
 #include "i18n.h"
 
index b2977c8aa2d2b7ca6deea67c49ac97ba9825aaaf..6fa3dd32cacc22887f6d71419735ee832f838c4d 100644 (file)
@@ -24,7 +24,7 @@
 
 
 #include <libcxml/cxml.h>
-#include <dcp/types.h>
+#include <dcp/content_kind.h>
 
 
 namespace xmlpp {
@@ -47,7 +47,7 @@ public:
        std::string digest;
        /** CPL ID */
        std::string id;
-       dcp::ContentKind kind;
+       boost::optional<dcp::ContentKind> kind;
        bool encrypted;
 
 private:
index dea8e81d5b84b6204e51ee0fefbca05552684261..c327a8603d1f11a0c87c73da8ab0f69b7298dbf4 100644 (file)
@@ -360,7 +360,7 @@ private:
        {
                _list->SetItem (N, 0, std_to_wx(e.name));
                _list->SetItem (N, 1, std_to_wx(e.id));
-               _list->SetItem (N, 2, std_to_wx(dcp::content_kind_to_string(e.kind)));
+               _list->SetItem (N, 2, std_to_wx(e.kind->name()));
                _list->SetItem (N, 3, e.encrypted ? S_("Question|Y") : S_("Question|N"));
        }
 
index 95b481e0b75d5a74a56b1d5f4a0decadd44c7898..468b3bf97c0e4b324984d9c295c1939858f75a2d 100644 (file)
@@ -155,7 +155,7 @@ ContentView::add (shared_ptr<Content> content)
        if (dcp && dcp->content_kind()) {
                it.SetId(N);
                it.SetColumn(1);
-               it.SetText(std_to_wx(dcp::content_kind_to_string(*dcp->content_kind())));
+               it.SetText(std_to_wx(dcp->content_kind()->name()));
                SetItem(it);
        }
 
index 6d1d157c1704cfa585a253eb5929786dfcc38a91..bb51baeace6ba87b2508f300a8610c955fb1338f 100644 (file)
@@ -377,6 +377,9 @@ VerifyDCPDialog::VerifyDCPDialog (wxWindow* parent, shared_ptr<VerifyDCPJob> job
                case dcp::VerificationNote::Code::UNEXPECTED_DURATION:
                        add(i, _("There is a <Duration> tag inside a <MainMarkers>."));
                        break;
+               case dcp::VerificationNote::Code::INVALID_CONTENT_KIND:
+                       add(i, _("An invalid <ContentKind> %n has been used."));
+                       break;
                }
        }