diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-08-23 00:23:43 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-08-23 00:23:43 +0100 |
| commit | 7a242c8193ba8b5c0379167b3f90a1ea0ece7a66 (patch) | |
| tree | 7da1fcc0c781102715963e9fb00d34dc0772116d /src | |
| parent | eff721c382ed6a3d1e82dd8926b0ae27f4f6f5a2 (diff) | |
Update for new libdcp; add some more formats; fix compile with old boost.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/film.cc | 8 | ||||
| -rw-r--r-- | src/lib/format.cc | 4 | ||||
| -rw-r--r-- | src/lib/make_dcp_job.cc | 32 |
3 files changed, 42 insertions, 2 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc index 65a75b845..f8a3b192d 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -167,8 +167,16 @@ Film::set_content (string c) { string check = _state.directory; +#if BOOST_FILESYSTEM_VERSION == 3 filesystem::path slash ("/"); string platform_slash = slash.make_preferred().string (); +#else +#ifdef DVDOMATIC_WINDOWS + string platform_slash = "\\"; +#else + string platform_slash = "/"; +#endif +#endif if (!ends_with (check, platform_slash)) { check += platform_slash; diff --git a/src/lib/format.cc b/src/lib/format.cc index d99ed926a..ff3a5b202 100644 --- a/src/lib/format.cc +++ b/src/lib/format.cc @@ -76,8 +76,12 @@ Format::as_metadata () const void Format::setup_formats () { + _formats.push_back (new Format (119, Size (1285, 1080), "119", "1.19")); + _formats.push_back (new Format (133, Size (1436, 1080), "133", "1.33")); + _formats.push_back (new Format (138, Size (1485, 1080), "138", "1.375")); _formats.push_back (new Format (133, Size (1998, 1080), "133-in-flat", "4:3 within Flat")); _formats.push_back (new Format (137, Size (1480, 1080), "137", "Academy")); + _formats.push_back (new Format (166, Size (1793, 1080), "166", "1.66")); _formats.push_back (new Format (178, Size (1998, 1080), "178-in-flat", "16:9 within Flat")); _formats.push_back (new Format (185, Size (1998, 1080), "185", "Flat")); _formats.push_back (new Format (239, Size (2048, 858), "239", "Scope")); diff --git a/src/lib/make_dcp_job.cc b/src/lib/make_dcp_job.cc index 4f42e13f1..525f76c0e 100644 --- a/src/lib/make_dcp_job.cc +++ b/src/lib/make_dcp_job.cc @@ -23,6 +23,9 @@ #include <boost/filesystem.hpp> #include <libdcp/dcp.h> +#include <libdcp/picture_asset.h> +#include <libdcp/sound_asset.h> +#include <libdcp/reel.h> extern "C" { #include <libavutil/pixdesc.h> } @@ -88,15 +91,40 @@ MakeDCPJob::run () dcp.Progress.connect (sigc::mem_fun (*this, &MakeDCPJob::dcp_progress)); descend (0.9); - dcp.add_picture_asset (sigc::mem_fun (*this, &MakeDCPJob::j2c_path), _opt->out_size.width, _opt->out_size.height); + shared_ptr<libdcp::MonoPictureAsset> pa ( + new libdcp::MonoPictureAsset ( + sigc::mem_fun (*this, &MakeDCPJob::j2c_path), + _fs->dir (_fs->name), + "video.mxf", + &dcp.Progress, + rint (_fs->frames_per_second), + frames, + _opt->out_size.width, + _opt->out_size.height + ) + ); + ascend (); + shared_ptr<libdcp::SoundAsset> sa; + if (_fs->audio_channels > 0) { descend (0.1); - dcp.add_sound_asset (sigc::mem_fun (*this, &MakeDCPJob::wav_path), _fs->audio_channels); + sa.reset ( + new libdcp::SoundAsset ( + sigc::mem_fun (*this, &MakeDCPJob::wav_path), + _fs->dir (_fs->name), + "audio.mxf", + &dcp.Progress, + rint (_fs->frames_per_second), + frames, + _fs->audio_channels + ) + ); ascend (); } + dcp.add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (pa, sa, shared_ptr<libdcp::SubtitleAsset> ()))); dcp.write_xml (); set_progress (1); |
