diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-17 22:40:08 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-17 22:40:08 +0100 |
| commit | d6e74fb7dbc5b01c9ce42f8fe780bb16262d13b1 (patch) | |
| tree | 85ec43c83ad755843e6009f29a01edbe4985b5c0 /src/lib/make_dcp_job.cc | |
| parent | 988fa33f7d25f2f3319442ce3c9ed661172e4d56 (diff) | |
Re-work FilmState / Film relationship a bit; Film now inherits from FilmState and FilmState does get/set.
Diffstat (limited to 'src/lib/make_dcp_job.cc')
| -rw-r--r-- | src/lib/make_dcp_job.cc | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/lib/make_dcp_job.cc b/src/lib/make_dcp_job.cc index efd35ba44..83904fd60 100644 --- a/src/lib/make_dcp_job.cc +++ b/src/lib/make_dcp_job.cc @@ -52,7 +52,7 @@ MakeDCPJob::MakeDCPJob (shared_ptr<const FilmState> s, shared_ptr<const Options> string MakeDCPJob::name () const { - return String::compose ("Make DCP for %1", _fs->name); + return String::compose ("Make DCP for %1", _fs->name()); } string @@ -78,17 +78,20 @@ MakeDCPJob::run () int frames = 0; switch (_fs->content_type ()) { case VIDEO: - frames = _fs->dcp_frames ? _fs->dcp_frames : _fs->length; + frames = _fs->dcp_length (); break; case STILL: - frames = _fs->still_duration * ImageMagickDecoder::static_frames_per_second (); + frames = _fs->still_duration() * ImageMagickDecoder::static_frames_per_second (); break; } libdcp::DCP dcp (_fs->dir (_fs->dcp_name())); dcp.Progress.connect (sigc::mem_fun (*this, &MakeDCPJob::dcp_progress)); - shared_ptr<libdcp::CPL> cpl (new libdcp::CPL (_fs->dir (_fs->dcp_name()), _fs->dcp_name(), _fs->dcp_content_type->libdcp_kind (), frames, rint (_fs->frames_per_second))); + shared_ptr<libdcp::CPL> cpl ( + new libdcp::CPL (_fs->dir (_fs->dcp_name()), _fs->dcp_name(), _fs->dcp_content_type()->libdcp_kind (), frames, rint (_fs->frames_per_second())) + ); + dcp.add_cpl (cpl); descend (0.9); @@ -98,7 +101,7 @@ MakeDCPJob::run () _fs->dir (_fs->dcp_name()), "video.mxf", &dcp.Progress, - rint (_fs->frames_per_second), + rint (_fs->frames_per_second()), frames, _opt->out_size.width, _opt->out_size.height @@ -109,7 +112,7 @@ MakeDCPJob::run () shared_ptr<libdcp::SoundAsset> sa; - if (_fs->audio_channels > 0) { + if (_fs->audio_channels() > 0) { descend (0.1); sa.reset ( new libdcp::SoundAsset ( @@ -117,9 +120,9 @@ MakeDCPJob::run () _fs->dir (_fs->dcp_name()), "audio.mxf", &dcp.Progress, - rint (_fs->frames_per_second), + rint (_fs->frames_per_second()), frames, - _fs->audio_channels + _fs->audio_channels() ) ); ascend (); |
