diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-09-03 14:49:25 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-09-03 17:12:34 +0200 |
| commit | 0a5d3c77247d3e68a144bfc077c29fbcf3819735 (patch) | |
| tree | ea2668d75f078d6fd290e038d5d5a9ed09c13bd9 /src/lib | |
| parent | 34eb57979b5293ac3b864310f8fc8c77c26343e2 (diff) | |
Bump libdcp for better ContentKind support, and libsub
for fixes to \c tags in SSA files.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/dcp_content.cc | 4 | ||||
| -rw-r--r-- | src/lib/dcp_content.h | 1 | ||||
| -rw-r--r-- | src/lib/dcp_content_type.cc | 6 | ||||
| -rw-r--r-- | src/lib/dcp_content_type.h | 1 | ||||
| -rw-r--r-- | src/lib/dcp_examiner.h | 5 | ||||
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 3 | ||||
| -rw-r--r-- | src/lib/log_entry.cc | 1 | ||||
| -rw-r--r-- | src/lib/spl_entry.h | 4 |
8 files changed, 17 insertions, 8 deletions
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc index 62b74be90..193c9995a 100644 --- a/src/lib/dcp_content.cc +++ b/src/lib/dcp_content.cc @@ -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 ()); diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index 1b73e8fc7..efdfe30f7 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -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> diff --git a/src/lib/dcp_content_type.cc b/src/lib/dcp_content_type.cc index f3cd02e9f..ce54ce01c 100644 --- a/src/lib/dcp_content_type.cc +++ b/src/lib/dcp_content_type.cc @@ -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")), }; } diff --git a/src/lib/dcp_content_type.h b/src/lib/dcp_content_type.h index 117ff3b16..f08db883a 100644 --- a/src/lib/dcp_content_type.h +++ b/src/lib/dcp_content_type.h @@ -28,6 +28,7 @@ */ +#include <dcp/content_kind.h> #include <dcp/dcp.h> #include <string> #include <vector> diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h index ac4380597..6b88a3c0d 100644 --- a/src/lib/dcp_examiner.h +++ b/src/lib/dcp_examiner.h @@ -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; diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 82eccb576..331ab313d 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -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)) { diff --git a/src/lib/log_entry.cc b/src/lib/log_entry.cc index 2980e438b..d5065e03a 100644 --- a/src/lib/log_entry.cc +++ b/src/lib/log_entry.cc @@ -22,6 +22,7 @@ #include "log_entry.h" #include <inttypes.h> #include <cstdio> +#include <ctime> #include "i18n.h" diff --git a/src/lib/spl_entry.h b/src/lib/spl_entry.h index b2977c8aa..6fa3dd32c 100644 --- a/src/lib/spl_entry.h +++ b/src/lib/spl_entry.h @@ -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: |
