summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-08-04 00:15:08 +0200
committerCarl Hetherington <cth@carlh.net>2024-08-17 12:57:31 +0200
commit3400e2d9ca9176289b581e72eac493909a0bbce1 (patch)
treecd3e53b7c1baeed3992f4c36d25dea21128fbf91 /src
parent54b46b7630c06044a121d70d9035384126f6e7b3 (diff)
Rename TextType::SUBTITLE -> OPEN_SUBTITLE and CAPTION -> CLOSED_CAPTION.
Diffstat (limited to 'src')
-rw-r--r--src/reel.cc2
-rw-r--r--src/reel_interop_text_asset.cc8
-rw-r--r--src/reel_smpte_text_asset.cc10
-rw-r--r--src/reel_text_asset.cc4
-rw-r--r--src/text_type.h4
5 files changed, 14 insertions, 14 deletions
diff --git a/src/reel.cc b/src/reel.cc
index fa20cba9..a35216bf 100644
--- a/src/reel.cc
+++ b/src/reel.cc
@@ -356,7 +356,7 @@ Reel::add (shared_ptr<ReelAsset> asset)
} else if (auto so = dynamic_pointer_cast<ReelSoundAsset>(asset)) {
_main_sound = so;
} else if (auto te = dynamic_pointer_cast<ReelTextAsset>(asset)) {
- if (te->type() == TextType::SUBTITLE) {
+ if (te->type() == TextType::OPEN_SUBTITLE) {
_main_subtitle = te;
} else {
_closed_captions.push_back(te);
diff --git a/src/reel_interop_text_asset.cc b/src/reel_interop_text_asset.cc
index 4e0f45c8..c43cf37b 100644
--- a/src/reel_interop_text_asset.cc
+++ b/src/reel_interop_text_asset.cc
@@ -70,9 +70,9 @@ string
ReelInteropTextAsset::cpl_node_name() const
{
switch (_type) {
- case TextType::SUBTITLE:
+ case TextType::OPEN_SUBTITLE:
return "MainSubtitle";
- case TextType::CAPTION:
+ case TextType::CLOSED_CAPTION:
return "cc-cpl:MainClosedCaption";
}
@@ -85,9 +85,9 @@ pair<string, string>
ReelInteropTextAsset::cpl_node_namespace() const
{
switch (_type) {
- case TextType::SUBTITLE:
+ case TextType::OPEN_SUBTITLE:
return {};
- case TextType::CAPTION:
+ case TextType::CLOSED_CAPTION:
return make_pair("http://www.digicine.com/PROTO-ASDCP-CC-CPL-20070926#", "cc-cpl");
}
diff --git a/src/reel_smpte_text_asset.cc b/src/reel_smpte_text_asset.cc
index 76efab44..7950dfd2 100644
--- a/src/reel_smpte_text_asset.cc
+++ b/src/reel_smpte_text_asset.cc
@@ -72,9 +72,9 @@ string
ReelSMPTETextAsset::cpl_node_name() const
{
switch (_type) {
- case TextType::SUBTITLE:
+ case TextType::OPEN_SUBTITLE:
return "MainSubtitle";
- case TextType::CAPTION:
+ case TextType::CLOSED_CAPTION:
return "tt:ClosedCaption";
}
@@ -87,9 +87,9 @@ pair<string, string>
ReelSMPTETextAsset::cpl_node_namespace() const
{
switch (_type) {
- case TextType::SUBTITLE:
+ case TextType::OPEN_SUBTITLE:
return {};
- case TextType::CAPTION:
+ case TextType::CLOSED_CAPTION:
return make_pair("http://www.smpte-ra.org/schemas/429-12/2008/TT", "tt");
}
@@ -102,7 +102,7 @@ xmlpp::Element *
ReelSMPTETextAsset::write_to_cpl(xmlpp::Element* node, Standard standard) const
{
auto asset = ReelFileAsset::write_to_cpl (node, standard);
- string const ns = _type == TextType::CAPTION ? "tt" : "";
+ string const ns = _type == TextType::CLOSED_CAPTION ? "tt" : "";
if (_language) {
cxml::add_child(asset, "Language", ns)->add_child_text(*_language);
}
diff --git a/src/reel_text_asset.cc b/src/reel_text_asset.cc
index 09749946..248a2ab3 100644
--- a/src/reel_text_asset.cc
+++ b/src/reel_text_asset.cc
@@ -72,9 +72,9 @@ ReelTextAsset::ReelTextAsset(std::shared_ptr<const cxml::Node> node)
: ReelFileAsset (node)
{
if (node->name() == "MainSubtitle") {
- _type = TextType::SUBTITLE;
+ _type = TextType::OPEN_SUBTITLE;
} else if (node->name() == "MainClosedCaption" || node->name() == "ClosedCaption") {
- _type = TextType::CAPTION;
+ _type = TextType::CLOSED_CAPTION;
} else {
DCP_ASSERT(false);
}
diff --git a/src/text_type.h b/src/text_type.h
index daac36c8..3f4f43c8 100644
--- a/src/text_type.h
+++ b/src/text_type.h
@@ -37,8 +37,8 @@ namespace dcp {
enum class TextType
{
- SUBTITLE,
- CAPTION
+ OPEN_SUBTITLE,
+ CLOSED_CAPTION
};