X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_subtitle_stream.h;h=85c4df889bdcf7a88165c28200180fd952c1d851;hb=674f59e307919856118d21aa03b53eb6fa82aeb0;hp=61334400a7bce86a303c07b78363d9c6313bfb6b;hpb=de2af791bdfdcd653752cba970e59efc7bf810c7;p=dcpomatic.git diff --git a/src/lib/ffmpeg_subtitle_stream.h b/src/lib/ffmpeg_subtitle_stream.h index 61334400a..85c4df889 100644 --- a/src/lib/ffmpeg_subtitle_stream.h +++ b/src/lib/ffmpeg_subtitle_stream.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2016 Carl Hetherington + Copyright (C) 2013-2017 Carl Hetherington This file is part of DCP-o-matic. @@ -30,28 +30,15 @@ public: : FFmpegStream (n, i) {} - FFmpegSubtitleStream (cxml::ConstNodePtr, int version); + FFmpegSubtitleStream (cxml::ConstNodePtr node, int version); void as_xml (xmlpp::Node *) const; - void add_image_subtitle (std::string id, ContentTimePeriod period); - void add_text_subtitle (std::string id, ContentTimePeriod period); - void set_subtitle_to (std::string id, ContentTime to); - ContentTime find_subtitle_to (std::string id) const; - void add_offset (ContentTime offset); void set_colour (RGBA from, RGBA to); std::map colours () const; - bool has_text () const; - bool has_image () const; - private: - - typedef std::map PeriodMap; - - void as_xml (xmlpp::Node *, PeriodMap const & subs, std::string node) const; - - PeriodMap _image_subtitles; - PeriodMap _text_subtitles; + /** mutex to protect _colours as it can be set from the "examine FFMpeg subtitles" job thread */ + mutable boost::mutex _mutex; std::map _colours; };