#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"
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<const libdcp::Signer> ());
-
- 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<const dcp::Signer> 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
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);