X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_content.cc;h=05b6ae8ea8a9105952c858d3ae3bc5a116be2030;hb=1fe6bd7f8ba059322b8357b2210f0fd590567ce2;hp=ebcbcc47ea008bcf1245f020af6483b4cde77cbb;hpb=24dcab1d4d8d7a28a939c7c4d786197684f155f6;p=dcpomatic.git diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index ebcbcc47e..05b6ae8ea 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -251,6 +251,9 @@ FFmpegContent::as_xml (xmlpp::Node* node, bool with_paths) const void FFmpegContent::examine (shared_ptr job) { + ContentChange cc1 (this, FFmpegContentProperty::SUBTITLE_STREAMS); + ContentChange cc2 (this, FFmpegContentProperty::SUBTITLE_STREAM); + job->set_progress_unknown (); Content::examine (job); @@ -313,9 +316,6 @@ FFmpegContent::examine (shared_ptr job) if (examiner->has_video ()) { set_default_colour_conversion (); } - - signal_changed (FFmpegContentProperty::SUBTITLE_STREAMS); - signal_changed (FFmpegContentProperty::SUBTITLE_STREAM); } string @@ -369,12 +369,12 @@ FFmpegContent::technical_summary () const void FFmpegContent::set_subtitle_stream (shared_ptr s) { + ContentChange cc (this, FFmpegContentProperty::SUBTITLE_STREAM); + { boost::mutex::scoped_lock lm (_mutex); _subtitle_stream = s; } - - signal_changed (FFmpegContentProperty::SUBTITLE_STREAM); } bool @@ -410,12 +410,12 @@ FFmpegContent::full_length () const void FFmpegContent::set_filters (vector const & filters) { + ContentChange cc (this, FFmpegContentProperty::FILTERS); + { boost::mutex::scoped_lock lm (_mutex); _filters = filters; } - - signal_changed (FFmpegContentProperty::FILTERS); } string @@ -629,7 +629,8 @@ FFmpegContent::add_properties (list& p) const void FFmpegContent::signal_subtitle_stream_changed () { - signal_changed (FFmpegContentProperty::SUBTITLE_STREAM); + /* XXX: this is too late; really it should be before the change */ + ContentChange cc (this, FFmpegContentProperty::SUBTITLE_STREAM); } vector >