From d25b0a20c8e52b5b76fed0d9c08b972a363e6cc6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 17 Aug 2016 14:31:12 +0100 Subject: [PATCH] Small libdcp API change. --- cscript | 2 +- src/lib/film.cc | 3 ++- src/lib/reel_writer.cc | 10 ++++++---- test/digest_test.cc | 6 +++--- test/import_dcp_test.cc | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/cscript b/cscript index 9dda13d3a..956a8f6fe 100644 --- 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): diff --git a/src/lib/film.cc b/src/lib/film.cc index a41ab3c95..7d183d032 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -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 (...) { diff --git a/src/lib/reel_writer.cc b/src/lib/reel_writer.cc index 9d2f9d0bc..c1ca2abb1 100644 --- a/src/lib/reel_writer.cc +++ b/src/lib/reel_writer.cc @@ -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); diff --git a/test/digest_test.cc b/test/digest_test.cc index 664f5bd20..7395fe468 100644 --- a/test/digest_test.cc +++ b/test/digest_test.cc @@ -79,13 +79,13 @@ BOOST_AUTO_TEST_CASE (digest_test) list >::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 ()); } diff --git a/test/import_dcp_test.cc b/test/import_dcp_test.cc index 69ffa9cc4..cd0396d07 100644 --- a/test/import_dcp_test.cc +++ b/test/import_dcp_test.cc @@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE (import_dcp_test) dcp::EncryptedKDM kdm = A->make_kdm ( Config::instance()->decryption_chain()->leaf (), vector (), - 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 -- 2.30.2