Small libdcp API change.
authorCarl Hetherington <cth@carlh.net>
Wed, 17 Aug 2016 13:31:12 +0000 (14:31 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 17 Aug 2016 13:31:12 +0000 (14:31 +0100)
cscript
src/lib/film.cc
src/lib/reel_writer.cc
test/digest_test.cc
test/import_dcp_test.cc

diff --git a/cscript b/cscript
index 9dda13d3a7958dff48993bbfa764ab2548793a71..956a8f6fe8f13aae8ad4513896005812a14319a7 100644 (file)
--- a/cscript
+++ b/cscript
@@ -237,7 +237,7 @@ def dependencies(target):
         ffmpeg_options = {}
 
     return (('ffmpeg-cdist', '1d4a1a4', ffmpeg_options),
-            ('libdcp', '81ed0eb'),
+            ('libdcp', '34f2b95'),
             ('libsub', '067c21c'))
 
 def configure_options(target):
index a41ab3c95eb2c7722418ec814185a88c06e59701..7d183d03226e4a2ef73e68c79e2ef2cccb02f6d4 100644 (file)
@@ -955,12 +955,13 @@ Film::cpls () const
                        try {
                                dcp::DCP dcp (*i);
                                dcp.read ();
+                               DCPOMATIC_ASSERT (dcp.cpls().front()->file());
                                out.push_back (
                                        CPLSummary (
                                                i->path().leaf().string(),
                                                dcp.cpls().front()->id(),
                                                dcp.cpls().front()->annotation_text(),
-                                               dcp.cpls().front()->file()
+                                               dcp.cpls().front()->file().get()
                                                )
                                        );
                        } catch (...) {
index 9d2f9d0bc633cbe102d9513dd7f9abfa087f130d..c1ca2abb1cef2ee37ca6ae41e2a34fbe105c5ccb 100644 (file)
@@ -180,12 +180,13 @@ void
 ReelWriter::check_existing_picture_asset ()
 {
        /* Try to open the existing asset */
-       FILE* asset_file = fopen_boost (_picture_asset->file(), "rb");
+       DCPOMATIC_ASSERT (_picture_asset->file());
+       FILE* asset_file = fopen_boost (_picture_asset->file().get(), "rb");
        if (!asset_file) {
-               LOG_GENERAL ("Could not open existing asset at %1 (errno=%2)", _picture_asset->file().string(), errno);
+               LOG_GENERAL ("Could not open existing asset at %1 (errno=%2)", _picture_asset->file()->string(), errno);
                return;
        } else {
-               LOG_GENERAL ("Opened existing asset at %1", _picture_asset->file().string());
+               LOG_GENERAL ("Opened existing asset at %1", _picture_asset->file()->string());
        }
 
        /* Offset of the last dcp::FrameInfo in the info file */
@@ -268,7 +269,8 @@ ReelWriter::finish ()
 
        /* Hard-link any video asset file into the DCP */
        if (_picture_asset) {
-               boost::filesystem::path video_from = _picture_asset->file ();
+               DCPOMATIC_ASSERT (_picture_asset->file());
+               boost::filesystem::path video_from = _picture_asset->file().get();
                boost::filesystem::path video_to;
                video_to /= _film->dir (_film->dcp_name());
                video_to /= video_asset_filename (_picture_asset, _reel_index, _reel_count, _content_summary);
index 664f5bd2022080d94e168623d5e57bef3644da1a..7395fe46854841adc73c253a23d357388dae9eea 100644 (file)
@@ -79,13 +79,13 @@ BOOST_AUTO_TEST_CASE (digest_test)
 
        list<shared_ptr<dcp::Reel> >::const_iterator i = reels.begin ();
        BOOST_REQUIRE (i != reels.end ());
-       BOOST_CHECK_EQUAL ((*i)->main_picture()->hash().get(), openssl_hash ((*i)->main_picture()->asset()->file ()));
+       BOOST_CHECK_EQUAL ((*i)->main_picture()->hash().get(), openssl_hash ((*i)->main_picture()->asset()->file().get()));
        ++i;
        BOOST_REQUIRE (i != reels.end ());
-       BOOST_CHECK_EQUAL ((*i)->main_picture()->hash().get(), openssl_hash ((*i)->main_picture()->asset()->file ()));
+       BOOST_CHECK_EQUAL ((*i)->main_picture()->hash().get(), openssl_hash ((*i)->main_picture()->asset()->file().get()));
        ++i;
        BOOST_REQUIRE (i != reels.end ());
-       BOOST_CHECK_EQUAL ((*i)->main_picture()->hash().get(), openssl_hash ((*i)->main_picture()->asset()->file ()));
+       BOOST_CHECK_EQUAL ((*i)->main_picture()->hash().get(), openssl_hash ((*i)->main_picture()->asset()->file().get()));
        ++i;
        BOOST_REQUIRE (i == reels.end ());
 }
index 69ffa9cc438181ffb8286391394fb5ffba419f55..cd0396d075ed3ecfdcbc503c528fac15adee54d2 100644 (file)
@@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE (import_dcp_test)
        dcp::EncryptedKDM kdm = A->make_kdm (
                Config::instance()->decryption_chain()->leaf (),
                vector<dcp::Certificate> (),
-               A_dcp.cpls().front()->file (),
+               A_dcp.cpls().front()->file().get(),
                dcp::LocalTime ("2014-07-21T00:00:00+00:00"),
                dcp::LocalTime ("2024-07-21T00:00:00+00:00"),
                dcp::MODIFIED_TRANSITIONAL_1