summaryrefslogtreecommitdiff
path: root/src/lib/reel_writer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-01-10 22:17:00 +0100
committerCarl Hetherington <cth@carlh.net>2025-01-12 02:05:06 +0100
commit5d9b8579950a4440b43a649c27fa36082144773d (patch)
tree97d30c04417b9b3e901c5cfc8fffed9d3bce8443 /src/lib/reel_writer.cc
parent08e5e4e27d9ac58050f9ebe77a5679157c0ee891 (diff)
Put open captions into subtitles and closed subtitles into captions.
We could write them separately (libdcp supports this, AFAIK) but the Deluxe guidelines suggest not to use ClosedSubtitle or MainCaption.
Diffstat (limited to 'src/lib/reel_writer.cc')
-rw-r--r--src/lib/reel_writer.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/reel_writer.cc b/src/lib/reel_writer.cc
index a66ac00a7..ec7fc9e39 100644
--- a/src/lib/reel_writer.cc
+++ b/src/lib/reel_writer.cc
@@ -900,9 +900,15 @@ ReelWriter::write(PlayerText subs, TextType type, optional<DCPTextTrack> track,
switch (type) {
case TextType::OPEN_SUBTITLE:
+ case TextType::OPEN_CAPTION:
+ /* We could create a separate MainCaption instead of merging these, but the Deluxe guidelines
+ * suggest not to use MainCaption.
+ */
asset = _subtitle_asset;
break;
case TextType::CLOSED_CAPTION:
+ case TextType::CLOSED_SUBTITLE:
+ /* Similarly it is advised by Deluxe not to use ClosedSubtitle */
DCPOMATIC_ASSERT (track);
asset = _closed_caption_assets[*track];
break;
@@ -916,9 +922,11 @@ ReelWriter::write(PlayerText subs, TextType type, optional<DCPTextTrack> track,
switch (type) {
case TextType::OPEN_SUBTITLE:
+ case TextType::OPEN_CAPTION:
_subtitle_asset = asset;
break;
case TextType::CLOSED_CAPTION:
+ case TextType::CLOSED_SUBTITLE:
DCPOMATIC_ASSERT (track);
_closed_caption_assets[*track] = asset;
break;