summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_content.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/ffmpeg_content.cc
parent1013175d5f6adfa0e6a7442e4c9aebb893787748 (diff)
Basics of multiple captions per content so that DCPContent can
hold subs and closed captions.
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
-rw-r--r--src/lib/ffmpeg_content.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index 7a821a04e..ddf4548b4 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -148,8 +148,8 @@ FFmpegContent::as_xml (xmlpp::Node* node, bool with_paths) const
}
}
- if (caption) {
- caption->as_xml (node);
+ if (only_caption()) {
+ only_caption()->as_xml (node);
}
boost::mutex::scoped_lock lm (_mutex);
@@ -242,7 +242,8 @@ FFmpegContent::examine (shared_ptr<Job> job)
_subtitle_streams = examiner->subtitle_streams ();
if (!_subtitle_streams.empty ()) {
- caption.reset (new CaptionContent (this));
+ caption.clear ();
+ caption.push_back (shared_ptr<CaptionContent> (new CaptionContent (this)));
_subtitle_stream = _subtitle_streams.front ();
}
@@ -365,8 +366,8 @@ FFmpegContent::identifier () const
s += "_" + video->identifier();
}
- if (caption && caption->use() && caption->burn()) {
- s += "_" + caption->identifier();
+ if (only_caption() && only_caption()->use() && only_caption()->burn()) {
+ s += "_" + only_caption()->identifier();
}
boost::mutex::scoped_lock lm (_mutex);