- filesystem::rename (filesystem::path (_fs->file ("video.mxf")), filesystem::path (dcp_path + "/video.mxf"));
- if (have_audio) {
- filesystem::rename (filesystem::path (_fs->file ("audio.mxf")), filesystem::path (dcp_path + "/audio.mxf"));
+ shared_ptr<libdcp::MonoPictureAsset> pa (
+ new libdcp::MonoPictureAsset (
+ boost::bind (&MakeDCPJob::j2c_path, this, _1, frames_done),
+ _film->dir (_film->dcp_name()),
+ String::compose ("video_%1.mxf", reel),
+ &dcp.Progress,
+ dfr.frames_per_second,
+ this_time,
+ _opt->out_size.width,
+ _opt->out_size.height,
+ _film->encrypted()
+ )
+ );
+
+ ascend ();
+
+ shared_ptr<libdcp::SoundAsset> sa;
+
+ if (_film->audio_channels() > 0) {
+ descend (0.1);
+ sa.reset (
+ new libdcp::SoundAsset (
+ boost::bind (&MakeDCPJob::wav_path, this, _1),
+ _film->dir (_film->dcp_name()),
+ String::compose ("audio_%1.mxf", reel),
+ &dcp.Progress,
+ dfr.frames_per_second,
+ this_time,
+ frames_done,
+ dcp_audio_channels (_film->audio_channels()),
+ _film->encrypted()
+ )
+ );
+ ascend ();
+ }
+
+ descend (0.1);
+ cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (pa, sa, shared_ptr<libdcp::SubtitleAsset> ())));
+ ascend ();
+
+ frames_done += frames_per_reel;
+ ++reel;
+
+ ascend ();