summaryrefslogtreecommitdiff
path: root/src/lib/playlist.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-21 15:16:18 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-21 15:16:18 +0100
commitcbd4450197a083bf58bda510e626f73ba583cb66 (patch)
tree2be308772512539570beab36beab02bde72d6d4b /src/lib/playlist.cc
parent1013175d5f6adfa0e6a7442e4c9aebb893787748 (diff)
Basics of multiple captions per content so that DCPContent can
hold subs and closed captions.
Diffstat (limited to 'src/lib/playlist.cc')
-rw-r--r--src/lib/playlist.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc
index a5451bafa..6c7fd7f4e 100644
--- a/src/lib/playlist.cc
+++ b/src/lib/playlist.cc
@@ -131,11 +131,11 @@ Playlist::maybe_sequence ()
placed.push_back (i);
}
- /* Subtitles */
+ /* Captions */
DCPTime next;
BOOST_FOREACH (shared_ptr<Content> i, _content) {
- if (!i->caption || find (placed.begin(), placed.end(), i) != placed.end()) {
+ if (i->caption.empty() || find (placed.begin(), placed.end(), i) != placed.end()) {
continue;
}
@@ -155,7 +155,13 @@ Playlist::video_identifier () const
string t;
BOOST_FOREACH (shared_ptr<const Content> i, _content) {
- if (i->video || (i->caption && i->caption->burn())) {
+ bool burn = false;
+ BOOST_FOREACH (shared_ptr<CaptionContent> j, i->caption) {
+ if (j->burn()) {
+ burn = true;
+ }
+ }
+ if (i->video || burn) {
t += i->identifier ();
}
}
@@ -362,11 +368,11 @@ Playlist::video_end () const
}
DCPTime
-Playlist::subtitle_end () const
+Playlist::caption_end () const
{
DCPTime end;
BOOST_FOREACH (shared_ptr<Content> i, _content) {
- if (i->caption) {
+ if (!i->caption.empty ()) {
end = max (end, i->end ());
}
}