From: Carl Hetherington Date: Sun, 31 Aug 2014 23:06:19 +0000 (+0100) Subject: Merge master. X-Git-Tag: v2.0.48~630 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=cf8bbea2de38c4e9ac140f55b27311b7b6dcd814 Merge master. --- cf8bbea2de38c4e9ac140f55b27311b7b6dcd814 diff --cc src/lib/writer.cc index eda82f277,dd2e98eee..a023d5cd2 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@@ -42,9 -37,8 +42,10 @@@ #include "config.h" #include "job.h" #include "cross.h" +#include "audio_buffers.h" #include "md5_digester.h" +#include "encoded_data.h" + #include "version.h" #include "i18n.h" @@@ -479,30 -465,50 +480,32 @@@ Writer::finish ( assert (job); job->sub (_("Computing image digest")); - _picture_asset->compute_digest (boost::bind (&Job::set_progress, job.get(), _1, false)); + _picture_mxf->hash (boost::bind (&Job::set_progress, job.get(), _1, false)); - if (_sound_asset) { + if (_sound_mxf) { job->sub (_("Computing audio digest")); - _sound_asset->compute_digest (boost::bind (&Job::set_progress, job.get(), _1, false)); + _sound_mxf->hash (boost::bind (&Job::set_progress, job.get(), _1, false)); } - dcp::XMLMetadata meta = Config::instance()->dcp_metadata (); - libdcp::XMLMetadata meta; ++ dcp::XMLMetadata meta; + meta.issuer = Config::instance()->dcp_issuer (); + meta.creator = String::compose ("DCP-o-matic %1 %2", dcpomatic_version, dcpomatic_git_commit); meta.set_issue_date_now (); - dcp.write_xml (_film->interop (), meta, _film->is_signed() ? make_signer () : shared_ptr ()); - - LOG_GENERAL ( - N_("Wrote %1 FULL, %2 FAKE, %3 REPEAT; %4 pushed to disk"), _full_written, _fake_written, _repeat_written, _pushed_to_disk - ); -} -/** Tell the writer that frame `f' should be a repeat of the frame before it */ -void -Writer::repeat (int f, Eyes e) -{ - boost::mutex::scoped_lock lock (_mutex); - - while (_queued_full_in_memory > _maximum_frames_in_memory) { - /* The queue is too big; wait until that is sorted out */ - _full_condition.wait (lock); - } - - QueueItem qi; - qi.type = QueueItem::REPEAT; - qi.frame = f; - if (_film->three_d() && e == EYES_BOTH) { - qi.eyes = EYES_LEFT; - _queue.push_back (qi); - qi.eyes = EYES_RIGHT; - _queue.push_back (qi); - } else { - qi.eyes = e; - _queue.push_back (qi); + shared_ptr signer; + if (_film->is_signed ()) { + signer = Config::instance()->signer (); + /* We did check earlier, but check again here to be on the safe side */ + if (!signer->valid ()) { + throw InvalidSignerError (); + } } - /* Now there's something to do: wake anything wait()ing on _empty_condition */ - _empty_condition.notify_all (); + dcp.write_xml (_film->interop () ? dcp::INTEROP : dcp::SMPTE, meta, signer); + + LOG_GENERAL ( + N_("Wrote %1 FULL, %2 FAKE, %3 pushed to disk"), _full_written, _fake_written, _pushed_to_disk + ); } bool diff --cc src/wx/video_panel.cc index cd831baed,b33a97591..a5d197c2a --- a/src/wx/video_panel.cc +++ b/src/wx/video_panel.cc @@@ -363,18 -363,19 +363,19 @@@ VideoPanel::edit_colour_conversion_clic void VideoPanel::content_selection_changed () { - VideoContentList sel = _parent->selected_video (); - bool const single = sel.size() == 1; - - _left_crop->set_content (sel); - _right_crop->set_content (sel); - _top_crop->set_content (sel); - _bottom_crop->set_content (sel); - _frame_type->set_content (sel); - _scale->set_content (sel); - - /* Things that are only allowed with single selections */ - _filters_button->Enable (single); - VideoContentList video_sel = _editor->selected_video_content (); - FFmpegContentList ffmpeg_sel = _editor->selected_ffmpeg_content (); ++ VideoContentList video_sel = _parent->selected_video (); ++ FFmpegContentList ffmpeg_sel = _parent->selected_ffmpeg (); + + bool const single = video_sel.size() == 1; + + _left_crop->set_content (video_sel); + _right_crop->set_content (video_sel); + _top_crop->set_content (video_sel); + _bottom_crop->set_content (video_sel); + _frame_type->set_content (video_sel); + _scale->set_content (video_sel); + + _filters_button->Enable (single && !ffmpeg_sel.empty ()); _colour_conversion_button->Enable (single); film_content_changed (VideoContentProperty::VIDEO_CROP);