projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Basics of multiple captions per content so that DCPContent can
[dcpomatic.git]
/
src
/
lib
/
playlist.cc
diff --git
a/src/lib/playlist.cc
b/src/lib/playlist.cc
index a5451bafa418e21fedacb48eb319f8dfb8d33bcc..6c7fd7f4e3bf96ca34489b04a453535da3549961 100644
(file)
--- a/
src/lib/playlist.cc
+++ b/
src/lib/playlist.cc
@@
-131,11
+131,11
@@
Playlist::maybe_sequence ()
placed.push_back (i);
}
placed.push_back (i);
}
- /*
Subtitle
s */
+ /*
Caption
s */
DCPTime next;
BOOST_FOREACH (shared_ptr<Content> i, _content) {
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;
}
continue;
}
@@
-155,7
+155,13
@@
Playlist::video_identifier () const
string t;
BOOST_FOREACH (shared_ptr<const Content> i, _content) {
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 ();
}
}
t += i->identifier ();
}
}
@@
-362,11
+368,11
@@
Playlist::video_end () const
}
DCPTime
}
DCPTime
-Playlist::
subtitle
_end () const
+Playlist::
caption
_end () const
{
DCPTime end;
BOOST_FOREACH (shared_ptr<Content> i, _content) {
{
DCPTime end;
BOOST_FOREACH (shared_ptr<Content> i, _content) {
- if (
i->caption
) {
+ if (
!i->caption.empty ()
) {
end = max (end, i->end ());
}
}
end = max (end, i->end ());
}
}