summaryrefslogtreecommitdiff
path: root/src/lib/render_text.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-12-12 00:51:56 +0100
committerCarl Hetherington <cth@carlh.net>2023-02-27 14:47:25 +0100
commit5e7ec41119961114a9b4df90d1c9ced580667f54 (patch)
tree2fae629b2b2177fadf0dc9e8cd83bad7e88c1789 /src/lib/render_text.cc
parent54a17f662b3ce226fd1116e68013d6608d5f6602 (diff)
Support the 2014 version of SMPTE 428-7 in render_text.cc and use it
when placing subtitles (e.g. SRT). Also default to outputting 2014-era alignment.
Diffstat (limited to 'src/lib/render_text.cc')
-rw-r--r--src/lib/render_text.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/render_text.cc b/src/lib/render_text.cc
index 702f848ac..99c4c06a8 100644
--- a/src/lib/render_text.cc
+++ b/src/lib/render_text.cc
@@ -253,7 +253,8 @@ y_position (StringText const& first, int target_height, int baseline_to_bottom,
{
int y = 0;
switch (first.valign_standard) {
- case dcp::Standard::INTEROP:
+ case dcp::SubtitleStandard::INTEROP:
+ case dcp::SubtitleStandard::SMPTE_2014:
switch (first.v_align()) {
case dcp::VAlign::TOP:
/* v_position is distance from top of frame to subtitle baseline */
@@ -269,7 +270,8 @@ y_position (StringText const& first, int target_height, int baseline_to_bottom,
break;
}
break;
- case dcp::Standard::SMPTE:
+ case dcp::SubtitleStandard::SMPTE_2007:
+ case dcp::SubtitleStandard::SMPTE_2010:
switch (first.v_align()) {
case dcp::VAlign::TOP:
/* v_position is distance from top of frame to top of subtitle */