X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_subtitle_stream.h;h=8f56d1975e5e7eb5defa7b529af64af4909fef06;hb=001ba1644fc6aa54f91fcaaa62ae7e5de2313bc1;hp=8b0274a5d5f16032378bff390557d6371a3e1740;hpb=67a68bd971ebe1b35daa3f75873b4ccb53c00ba0;p=dcpomatic.git diff --git a/src/lib/ffmpeg_subtitle_stream.h b/src/lib/ffmpeg_subtitle_stream.h index 8b0274a5d..8f56d1975 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-2019 Carl Hetherington This file is part of DCP-o-matic. @@ -21,6 +21,7 @@ #include "dcpomatic_time.h" #include "rgba.h" #include "ffmpeg_stream.h" +#include #include class FFmpegSubtitleStream : public FFmpegStream @@ -34,25 +35,11 @@ public: 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; - bool unknown_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; };