X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_content.cc;h=dd4ed7063f91199c6232dc4d3f684059c1c11312;hb=27b83475435dda4e84a90cf59a52f150905c4ab1;hp=e18977944648fc1faff37e83987d8018a63fe473;hpb=9cb73fbc0fa4643612f01665bc6d9fc430656f32;p=dcpomatic.git diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index e18977944..dd4ed7063 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -32,7 +32,7 @@ #include "log.h" #include "exceptions.h" #include "frame_rate_change.h" -#include "text_content.h" +#include "caption_content.h" #include #include extern "C" { @@ -85,7 +85,7 @@ FFmpegContent::FFmpegContent (shared_ptr film, cxml::ConstNodePtr no { video = VideoContent::from_xml (this, node, version); audio = AudioContent::from_xml (this, node, version); - subtitle = TextContent::from_xml (this, node, version); + caption = CaptionContent::from_xml (this, node, version); list c = node->node_children ("SubtitleStream"); for (list::const_iterator i = c.begin(); i != c.end(); ++i) { @@ -135,12 +135,12 @@ FFmpegContent::FFmpegContent (shared_ptr film, vector ((*i)->video); need_audio = static_cast ((*i)->audio); - need_subtitle = static_cast ((*i)->subtitle); + need_caption = static_cast ((*i)->caption); } while (i != c.end ()) { @@ -150,8 +150,8 @@ FFmpegContent::FFmpegContent (shared_ptr film, vector ((*i)->audio)) { throw JoinError (_("Content to be joined must all have or not have audio")); } - if (need_subtitle != static_cast ((*i)->subtitle)) { - throw JoinError (_("Content to be joined must all have or not have subtitles")); + if (need_caption != static_cast ((*i)->caption)) { + throw JoinError (_("Content to be joined must all have or not have captions")); } ++i; } @@ -162,8 +162,8 @@ FFmpegContent::FFmpegContent (shared_ptr film, vector ref = dynamic_pointer_cast (c[0]); @@ -171,7 +171,7 @@ FFmpegContent::FFmpegContent (shared_ptr film, vector fc = dynamic_pointer_cast (c[i]); - if (fc->subtitle && fc->subtitle->use() && *(fc->_subtitle_stream.get()) != *(ref->_subtitle_stream.get())) { + if (fc->caption && fc->caption->use() && *(fc->_subtitle_stream.get()) != *(ref->_subtitle_stream.get())) { throw JoinError (_("Content to be joined must use the same subtitle stream.")); } } @@ -209,8 +209,8 @@ FFmpegContent::as_xml (xmlpp::Node* node, bool with_paths) const } } - if (subtitle) { - subtitle->as_xml (node); + if (caption) { + caption->as_xml (node); } boost::mutex::scoped_lock lm (_mutex); @@ -303,7 +303,7 @@ FFmpegContent::examine (shared_ptr job) _subtitle_streams = examiner->subtitle_streams (); if (!_subtitle_streams.empty ()) { - subtitle.reset (new TextContent (this)); + caption.reset (new CaptionContent (this)); _subtitle_stream = _subtitle_streams.front (); } @@ -426,8 +426,8 @@ FFmpegContent::identifier () const s += "_" + video->identifier(); } - if (subtitle && subtitle->use() && subtitle->burn()) { - s += "_" + subtitle->identifier(); + if (caption && caption->use() && caption->burn()) { + s += "_" + caption->identifier(); } boost::mutex::scoped_lock lm (_mutex);