summaryrefslogtreecommitdiff
path: root/src/reel_smpte_text_asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-08-06 23:56:38 +0200
committerCarl Hetherington <cth@carlh.net>2024-08-17 12:57:31 +0200
commitc8128908da7db78a920452f43b531383bb14c115 (patch)
treee06a72e9b38ddbc0de1bc86d28af0fbd96977b6d /src/reel_smpte_text_asset.cc
parentf037f1cc035a1e81b582cfaba6087e693cca9a26 (diff)
Support open captions and closed subtitles.
Diffstat (limited to 'src/reel_smpte_text_asset.cc')
-rw-r--r--src/reel_smpte_text_asset.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/reel_smpte_text_asset.cc b/src/reel_smpte_text_asset.cc
index 7950dfd2..b1ce34cb 100644
--- a/src/reel_smpte_text_asset.cc
+++ b/src/reel_smpte_text_asset.cc
@@ -74,6 +74,10 @@ ReelSMPTETextAsset::cpl_node_name() const
switch (_type) {
case TextType::OPEN_SUBTITLE:
return "MainSubtitle";
+ case TextType::OPEN_CAPTION:
+ return "tt:MainCaption";
+ case TextType::CLOSED_SUBTITLE:
+ return "ClosedSubtitle";
case TextType::CLOSED_CAPTION:
return "tt:ClosedCaption";
}
@@ -88,7 +92,9 @@ ReelSMPTETextAsset::cpl_node_namespace() const
{
switch (_type) {
case TextType::OPEN_SUBTITLE:
+ case TextType::CLOSED_SUBTITLE:
return {};
+ case TextType::OPEN_CAPTION:
case TextType::CLOSED_CAPTION:
return make_pair("http://www.smpte-ra.org/schemas/429-12/2008/TT", "tt");
}