Update for newer libdcp.
authorCarl Hetherington <cth@carlh.net>
Mon, 10 Sep 2012 14:15:10 +0000 (15:15 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 10 Sep 2012 14:15:10 +0000 (15:15 +0100)
src/lib/make_dcp_job.cc
wscript

index 525f76c0e26b26f2dce5c49867232c7312948497..8d3547cae8d0808422bef01877fbe1682dcfd9bc 100644 (file)
@@ -87,9 +87,12 @@ MakeDCPJob::run ()
                break;
        }
        
-       libdcp::DCP dcp (_fs->dir (_fs->name), _fs->name, _fs->dcp_content_type->libdcp_kind (), rint (_fs->frames_per_second), frames);
+       libdcp::DCP dcp (_fs->dir (_fs->name));
        dcp.Progress.connect (sigc::mem_fun (*this, &MakeDCPJob::dcp_progress));
 
+       shared_ptr<libdcp::CPL> cpl (new libdcp::CPL (_fs->dir (_fs->name), _fs->name, _fs->dcp_content_type->libdcp_kind (), frames, rint (_fs->frames_per_second)));
+       dcp.add_cpl (cpl);
+
        descend (0.9);
        shared_ptr<libdcp::MonoPictureAsset> pa (
                new libdcp::MonoPictureAsset (
@@ -124,7 +127,7 @@ MakeDCPJob::run ()
                ascend ();
        }
 
-       dcp.add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (pa, sa, shared_ptr<libdcp::SubtitleAsset> ())));
+       cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (pa, sa, shared_ptr<libdcp::SubtitleAsset> ())));
        dcp.write_xml ();
 
        set_progress (1);
diff --git a/wscript b/wscript
index d3ec0d1f4658e3b5ba9f9c3c19e03184df3d6b08..bf9e041e395913ee6aa7fe609753b098daf5b0b4 100644 (file)
--- a/wscript
+++ b/wscript
@@ -60,7 +60,7 @@ def configure(conf):
     conf.check_cfg(package = 'libswresample', args = '--cflags --libs', uselib_store = 'SWRESAMPLE', mandatory = True)
     conf.check_cfg(package = 'libpostproc', args = '--cflags --libs', uselib_store = 'POSTPROC', mandatory = True)
     conf.check_cfg(package = 'sndfile', args = '--cflags --libs', uselib_store = 'SNDFILE', mandatory = True)
-    conf.check_cfg(package = 'libdcp', atleast_version = '0.11', args = '--cflags --libs', uselib_store = 'DCP', mandatory = True)
+    conf.check_cfg(package = 'libdcp', atleast_version = '0.20', args = '--cflags --libs', uselib_store = 'DCP', mandatory = True)
     conf.check_cfg(package = 'glib-2.0', args = '--cflags --libs', uselib_store = 'GLIB', mandatory = True)
     conf.check_cfg(package = '', path = 'Magick++-config', args = '--cppflags --cxxflags --libs', uselib_store = 'MAGICK', mandatory = True)
     conf.check_cc(msg = 'Checking for library libtiff', function_name = 'TIFFOpen', header_name = 'tiffio.h', lib = 'tiff', uselib_store = 'TIFF')