projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
43f83b3
)
Bump libdcp for some API improvements.
author
Carl Hetherington
<cth@carlh.net>
Mon, 12 Apr 2021 20:18:47 +0000
(22:18 +0200)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 12 Apr 2021 20:18:47 +0000
(22:18 +0200)
cscript
patch
|
blob
|
history
src/lib/dcp_examiner.cc
patch
|
blob
|
history
src/lib/film.cc
patch
|
blob
|
history
src/lib/reel_writer.cc
patch
|
blob
|
history
src/lib/types.cc
patch
|
blob
|
history
src/lib/writer.cc
patch
|
blob
|
history
diff --git
a/cscript
b/cscript
index 04b1a89f4c706065293f1ebedeea8c1f42ac1e6d..b8ff23e9ddcb4cb47ef6f5415081fc9098e6026a 100644
(file)
--- a/
cscript
+++ b/
cscript
@@
-385,8
+385,8
@@
def dependencies(target, options):
# Use distro-provided FFmpeg on Arch
deps = []
# Use distro-provided FFmpeg on Arch
deps = []
- deps.append(('libdcp', '
c59e6c0
'))
- deps.append(('libsub', '
3fd82fc
'))
+ deps.append(('libdcp', '
ee23803
'))
+ deps.append(('libsub', '
e88528d
'))
deps.append(('leqm-nrt', '131f971'))
deps.append(('rtaudio', 'f619b76'))
# We get our OpenSSL libraries from the environment, but we
deps.append(('leqm-nrt', '131f971'))
deps.append(('rtaudio', 'f619b76'))
# We get our OpenSSL libraries from the environment, but we
diff --git
a/src/lib/dcp_examiner.cc
b/src/lib/dcp_examiner.cc
index ad2220fc08b856644872a938060585d124e79ea8..b431cec26b94a3fc13d0504a2ff6e4329c949a3a 100644
(file)
--- a/
src/lib/dcp_examiner.cc
+++ b/
src/lib/dcp_examiner.cc
@@
-277,8
+277,7
@@
DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
_kdm_valid = false;
}
_kdm_valid = false;
}
- DCPOMATIC_ASSERT (cpl->standard ());
- _standard = cpl->standard().get();
+ _standard = cpl->standard();
_three_d = !cpl->reels().empty() && cpl->reels().front()->main_picture() &&
dynamic_pointer_cast<dcp::StereoPictureAsset> (cpl->reels().front()->main_picture()->asset());
_ratings = cpl->ratings();
_three_d = !cpl->reels().empty() && cpl->reels().front()->main_picture() &&
dynamic_pointer_cast<dcp::StereoPictureAsset> (cpl->reels().front()->main_picture()->asset());
_ratings = cpl->ratings();
diff --git
a/src/lib/film.cc
b/src/lib/film.cc
index 50472bf41f3f78a37f0472066d5dc956f1c3cde7..53d91a3788b04131477e4d1f697f7d5a4b614806 100644
(file)
--- a/
src/lib/film.cc
+++ b/
src/lib/film.cc
@@
-65,6
+65,7
@@
#include <dcp/decrypted_kdm.h>
#include <dcp/raw_convert.h>
#include <dcp/reel_file_asset.h>
#include <dcp/decrypted_kdm.h>
#include <dcp/raw_convert.h>
#include <dcp/reel_file_asset.h>
+#include <dcp/reel_encryptable_asset.h>
#include <dcp/reel_asset.h>
#include <libxml++/libxml++.h>
#include <boost/filesystem.hpp>
#include <dcp/reel_asset.h>
#include <libxml++/libxml++.h>
#include <boost/filesystem.hpp>
@@
-1664,9
+1665,9
@@
Film::make_kdm (
}
}
}
}
- map<shared_ptr<const dcp::Reel
Fi
leAsset>, dcp::Key> keys;
+ map<shared_ptr<const dcp::Reel
Encryptab
leAsset>, dcp::Key> keys;
- for (auto i: cpl->reel_
fi
le_assets()) {
+ for (auto i: cpl->reel_
encryptab
le_assets()) {
if (!i->key_id()) {
continue;
}
if (!i->key_id()) {
continue;
}
diff --git
a/src/lib/reel_writer.cc
b/src/lib/reel_writer.cc
index 2d88d71620de995cf326cc2a6f0f4b2bd7f87d86..cd6a1a4b9d54c51d8d360dc3eae3c0823c15bc4e 100644
(file)
--- a/
src/lib/reel_writer.cc
+++ b/
src/lib/reel_writer.cc
@@
-32,24
+32,26
@@
#include "image.h"
#include <dcp/atmos_asset.h>
#include <dcp/atmos_asset_writer.h>
#include "image.h"
#include <dcp/atmos_asset.h>
#include <dcp/atmos_asset_writer.h>
+#include <dcp/certificate_chain.h>
+#include <dcp/cpl.h>
+#include <dcp/dcp.h>
+#include <dcp/interop_subtitle_asset.h>
#include <dcp/mono_picture_asset.h>
#include <dcp/mono_picture_asset.h>
-#include <dcp/stereo_picture_asset.h>
-#include <dcp/sound_asset.h>
-#include <dcp/sound_asset_writer.h>
+#include <dcp/raw_convert.h>
#include <dcp/reel.h>
#include <dcp/reel_atmos_asset.h>
#include <dcp/reel.h>
#include <dcp/reel_atmos_asset.h>
+#include <dcp/reel_interop_closed_caption_asset.h>
+#include <dcp/reel_interop_subtitle_asset.h>
+#include <dcp/reel_markers_asset.h>
#include <dcp/reel_mono_picture_asset.h>
#include <dcp/reel_mono_picture_asset.h>
-#include <dcp/reel_stereo_picture_asset.h>
+#include <dcp/reel_smpte_closed_caption_asset.h>
+#include <dcp/reel_smpte_subtitle_asset.h>
#include <dcp/reel_sound_asset.h>
#include <dcp/reel_sound_asset.h>
-#include <dcp/reel_subtitle_asset.h>
-#include <dcp/reel_closed_caption_asset.h>
-#include <dcp/reel_markers_asset.h>
-#include <dcp/dcp.h>
-#include <dcp/cpl.h>
-#include <dcp/certificate_chain.h>
-#include <dcp/interop_subtitle_asset.h>
+#include <dcp/reel_stereo_picture_asset.h>
#include <dcp/smpte_subtitle_asset.h>
#include <dcp/smpte_subtitle_asset.h>
-#include <dcp/raw_convert.h>
+#include <dcp/sound_asset.h>
+#include <dcp/sound_asset_writer.h>
+#include <dcp/stereo_picture_asset.h>
#include <dcp/subtitle_image.h>
#include "i18n.h"
#include <dcp/subtitle_image.h>
#include "i18n.h"
@@
-438,8
+440,8
@@
ReelWriter::finish (boost::filesystem::path output_dcp)
}
}
}
}
-template <class
T
>
-shared_ptr<
T
>
+template <class
Interop, class SMPTE, class Result
>
+shared_ptr<
Result
>
maybe_add_text (
shared_ptr<dcp::SubtitleAsset> asset,
int64_t picture_duration,
maybe_add_text (
shared_ptr<dcp::SubtitleAsset> asset,
int64_t picture_duration,
@@
-455,7
+457,7
@@
maybe_add_text (
{
Frame const period_duration = period.duration().frames_round(film->video_frame_rate());
{
Frame const period_duration = period.duration().frames_round(film->video_frame_rate());
- shared_ptr<
T
> reel_asset;
+ shared_ptr<
Result
> reel_asset;
if (asset) {
/* Add the font to the subtitle content */
if (asset) {
/* Add the font to the subtitle content */
@@
-463,33
+465,38
@@
maybe_add_text (
asset->add_font (j.id, j.data.get_value_or(default_font));
}
asset->add_font (j.id, j.data.get_value_or(default_font));
}
- if (
dynamic_pointer_cast<dcp::InteropSubtitleAsset>
(asset)) {
- auto directory = output_dcp /
asset
->id ();
+ if (
auto interop = dynamic_pointer_cast<dcp::InteropSubtitleAsset>
(asset)) {
+ auto directory = output_dcp /
interop
->id ();
boost::filesystem::create_directories (directory);
boost::filesystem::create_directories (directory);
- asset->write (directory / ("sub_" + asset->id() + ".xml"));
- } else {
+ interop->write (directory / ("sub_" + interop->id() + ".xml"));
+ reel_asset = make_shared<Interop> (
+ interop,
+ dcp::Fraction(film->video_frame_rate(), 1),
+ picture_duration,
+ 0
+ );
+ } else if (auto smpte = dynamic_pointer_cast<dcp::SMPTESubtitleAsset>(asset)) {
/* All our assets should be the same length; use the picture asset length here
as a reference to set the subtitle one. We'll use the duration rather than
the intrinsic duration; we don't care if the picture asset has been trimmed, we're
just interested in its presentation length.
*/
/* All our assets should be the same length; use the picture asset length here
as a reference to set the subtitle one. We'll use the duration rather than
the intrinsic duration; we don't care if the picture asset has been trimmed, we're
just interested in its presentation length.
*/
- dynamic_pointer_cast<dcp::SMPTESubtitleAsset>(asset)->set_intrinsic_duration (picture_duration);
-
- asset->write (
+ smpte->set_intrinsic_duration(picture_duration);
+ smpte->write (
output_dcp / ("sub_" + asset->id() + ".mxf")
);
output_dcp / ("sub_" + asset->id() + ".mxf")
);
+ reel_asset = make_shared<SMPTE> (
+ smpte,
+ dcp::Fraction(film->video_frame_rate(), 1),
+ picture_duration,
+ 0
+ );
}
}
- reel_asset = make_shared<T> (
- asset,
- dcp::Fraction(film->video_frame_rate(), 1),
- picture_duration,
- 0
- );
} else {
/* We don't have a subtitle asset of our own; hopefully we have one to reference */
for (auto j: refs) {
} else {
/* We don't have a subtitle asset of our own; hopefully we have one to reference */
for (auto j: refs) {
- auto k = dynamic_pointer_cast<
T
> (j.asset);
+ auto k = dynamic_pointer_cast<
Result
> (j.asset);
if (k && j.period == period) {
reel_asset = k;
/* If we have a hash for this asset in the CPL, assume that it is correct */
if (k && j.period == period) {
reel_asset = k;
/* If we have a hash for this asset in the CPL, assume that it is correct */
@@
-622,7
+629,7
@@
ReelWriter::create_reel_text (
set<DCPTextTrack> ensure_closed_captions
) const
{
set<DCPTextTrack> ensure_closed_captions
) const
{
- auto subtitle = maybe_add_text<dcp::ReelSubtitleAsset> (
+ auto subtitle = maybe_add_text<dcp::Reel
InteropSubtitleAsset, dcp::ReelSMPTESubtitleAsset, dcp::Reel
SubtitleAsset> (
_subtitle_asset, duration, reel, refs, fonts, _default_font, film(), _period, output_dcp, _text_only
);
_subtitle_asset, duration, reel, refs, fonts, _default_font, film(), _period, output_dcp, _text_only
);
@@
-633,7
+640,7
@@
ReelWriter::create_reel_text (
}
} else if (ensure_subtitles) {
/* We had no subtitle asset, but we've been asked to make sure there is one */
}
} else if (ensure_subtitles) {
/* We had no subtitle asset, but we've been asked to make sure there is one */
- subtitle = maybe_add_text<dcp::Reel
SubtitleAsset>
(
+ subtitle = maybe_add_text<dcp::Reel
InteropSubtitleAsset, dcp::ReelSMPTESubtitleAsset, dcp::ReelSubtitleAsset>
(
empty_text_asset(TextType::OPEN_SUBTITLE, optional<DCPTextTrack>()),
duration,
reel,
empty_text_asset(TextType::OPEN_SUBTITLE, optional<DCPTextTrack>()),
duration,
reel,
@@
-648,7
+655,7
@@
ReelWriter::create_reel_text (
}
for (auto const& i: _closed_caption_assets) {
}
for (auto const& i: _closed_caption_assets) {
- auto a = maybe_add_text<dcp::ReelClosedCaptionAsset> (
+ auto a = maybe_add_text<dcp::Reel
InteropClosedCaptionAsset, dcp::ReelSMPTEClosedCaptionAsset, dcp::Reel
ClosedCaptionAsset> (
i.second, duration, reel, refs, fonts, _default_font, film(), _period, output_dcp, _text_only
);
DCPOMATIC_ASSERT (a);
i.second, duration, reel, refs, fonts, _default_font, film(), _period, output_dcp, _text_only
);
DCPOMATIC_ASSERT (a);
@@
-662,7
+669,7
@@
ReelWriter::create_reel_text (
/* Make empty tracks for anything we've been asked to ensure but that we haven't added */
for (auto i: ensure_closed_captions) {
/* Make empty tracks for anything we've been asked to ensure but that we haven't added */
for (auto i: ensure_closed_captions) {
- auto a = maybe_add_text<dcp::ReelClosedCaptionAsset> (
+ auto a = maybe_add_text<dcp::Reel
InteropClosedCaptionAsset, dcp::ReelSMPTEClosedCaptionAsset, dcp::Reel
ClosedCaptionAsset> (
empty_text_asset(TextType::CLOSED_CAPTION, i), duration, reel, refs, fonts, _default_font, film(), _period, output_dcp, _text_only
);
DCPOMATIC_ASSERT (a);
empty_text_asset(TextType::CLOSED_CAPTION, i), duration, reel, refs, fonts, _default_font, film(), _period, output_dcp, _text_only
);
DCPOMATIC_ASSERT (a);
diff --git
a/src/lib/types.cc
b/src/lib/types.cc
index b7632a9842a07afb6315b63ca64aef0699893f3d..dbbae3e6a5972ac073246146e8812bcec1c62bf0 100644
(file)
--- a/
src/lib/types.cc
+++ b/
src/lib/types.cc
@@
-26,6
+26,7
@@
#include <dcp/cpl.h>
#include <dcp/dcp.h>
#include <dcp/reel_file_asset.h>
#include <dcp/cpl.h>
#include <dcp/dcp.h>
#include <dcp/reel_file_asset.h>
+#include <dcp/reel_encryptable_asset.h>
#include <dcp/reel_asset.h>
DCPOMATIC_DISABLE_WARNINGS
#include <libxml++/libxml++.h>
#include <dcp/reel_asset.h>
DCPOMATIC_DISABLE_WARNINGS
#include <libxml++/libxml++.h>
@@
-213,7
+214,7
@@
CPLSummary::CPLSummary (boost::filesystem::path p)
encrypted = false;
for (auto j: dcp.cpls()) {
encrypted = false;
for (auto j: dcp.cpls()) {
- for (auto k: j->reel_
fi
le_assets()) {
+ for (auto k: j->reel_
encryptab
le_assets()) {
if (k->key_id()) {
encrypted = true;
}
if (k->key_id()) {
encrypted = true;
}
diff --git
a/src/lib/writer.cc
b/src/lib/writer.cc
index 0285255e0d03be981101c40c0cb3770b5879d3e2..81b77d5cea62a5219257368af0711660e69ccfcf 100644
(file)
--- a/
src/lib/writer.cc
+++ b/
src/lib/writer.cc
@@
-555,7
+555,8
@@
Writer::finish (boost::filesystem::path output_dcp)
auto cpl = make_shared<dcp::CPL>(
film()->dcp_name(),
auto cpl = make_shared<dcp::CPL>(
film()->dcp_name(),
- film()->dcp_content_type()->libdcp_kind()
+ film()->dcp_content_type()->libdcp_kind(),
+ film()->interop() ? dcp::Standard::INTEROP : dcp::Standard::SMPTE
);
dcp.add (cpl);
);
dcp.add (cpl);
@@
-676,7
+677,6
@@
Writer::finish (boost::filesystem::path output_dcp)
}
dcp.write_xml (
}
dcp.write_xml (
- film()->interop() ? dcp::Standard::INTEROP : dcp::Standard::SMPTE,
issuer,
creator,
dcp::LocalTime().as_string(),
issuer,
creator,
dcp::LocalTime().as_string(),