Bump libdcp.
authorCarl Hetherington <cth@carlh.net>
Tue, 9 Jun 2015 13:07:35 +0000 (14:07 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 9 Jun 2015 13:07:35 +0000 (14:07 +0100)
cscript
src/lib/dcp_subtitle.cc
src/lib/writer.cc

diff --git a/cscript b/cscript
index 4b8a86d5b1a89fa65b1a4e9b44c22c7db9a2d06c..79eb11d7f701c61d871018e3ccb9089df8ceb08e 100644 (file)
--- a/cscript
+++ b/cscript
@@ -207,7 +207,7 @@ def make_spec(filename, version, target):
 
 def dependencies(target):
     return (('ffmpeg-cdist', '0492ad2'),
 
 def dependencies(target):
     return (('ffmpeg-cdist', '0492ad2'),
-            ('libdcp', '6425742'),
+            ('libdcp', 'e4b8bed'),
             ('libsub', 'f66b11f'))
 
 def configure_options(target):
             ('libsub', 'f66b11f'))
 
 def configure_options(target):
index 66cee4ad866f9772e8cdc96e75dc696a66ac9c14..9963d0a9479c1059cf98194bf58e2278e7724048 100644 (file)
@@ -39,15 +39,7 @@ DCPSubtitle::load (boost::filesystem::path file) const
 
        if (!sc) {
                try {
 
        if (!sc) {
                try {
-                       sc.reset (new dcp::SMPTESubtitleAsset (file, true));
-               } catch (...) {
-
-               }
-       }
-
-       if (!sc) {
-               try {
-                       sc.reset (new dcp::SMPTESubtitleAsset (file, false));
+                       sc.reset (new dcp::SMPTESubtitleAsset (file));
                } catch (...) {
 
                }
                } catch (...) {
 
                }
index 7091930f48ab4be5f8245bf513355901fee7a468..9e2cf4bd4fbef9624d78f3d8ca8dc0034d01f113 100644 (file)
@@ -505,43 +505,23 @@ Writer::finish ()
        shared_ptr<dcp::MonoPictureAsset> mono = dynamic_pointer_cast<dcp::MonoPictureAsset> (_picture_asset);
        if (mono) {
                reel->add (shared_ptr<dcp::ReelPictureAsset> (new dcp::ReelMonoPictureAsset (mono, 0)));
        shared_ptr<dcp::MonoPictureAsset> mono = dynamic_pointer_cast<dcp::MonoPictureAsset> (_picture_asset);
        if (mono) {
                reel->add (shared_ptr<dcp::ReelPictureAsset> (new dcp::ReelMonoPictureAsset (mono, 0)));
-               dcp.add (mono);
        }
 
        shared_ptr<dcp::StereoPictureAsset> stereo = dynamic_pointer_cast<dcp::StereoPictureAsset> (_picture_asset);
        if (stereo) {
                reel->add (shared_ptr<dcp::ReelPictureAsset> (new dcp::ReelStereoPictureAsset (stereo, 0)));
        }
 
        shared_ptr<dcp::StereoPictureAsset> stereo = dynamic_pointer_cast<dcp::StereoPictureAsset> (_picture_asset);
        if (stereo) {
                reel->add (shared_ptr<dcp::ReelPictureAsset> (new dcp::ReelStereoPictureAsset (stereo, 0)));
-               dcp.add (stereo);
        }
 
        if (_sound_asset) {
                reel->add (shared_ptr<dcp::ReelSoundAsset> (new dcp::ReelSoundAsset (_sound_asset, 0)));
        }
 
        if (_sound_asset) {
                reel->add (shared_ptr<dcp::ReelSoundAsset> (new dcp::ReelSoundAsset (_sound_asset, 0)));
-               dcp.add (_sound_asset);
        }
 
        if (_subtitle_asset) {
                boost::filesystem::path const liberation = shared_path () / "LiberationSans-Regular.ttf";
 
        }
 
        if (_subtitle_asset) {
                boost::filesystem::path const liberation = shared_path () / "LiberationSans-Regular.ttf";
 
-               /* Add all the fonts to the subtitle content and as assets to the DCP */
+               /* Add all the fonts to the subtitle content */
                BOOST_FOREACH (shared_ptr<Font> i, _fonts) {
                BOOST_FOREACH (shared_ptr<Font> i, _fonts) {
-                       boost::filesystem::path const from = i->file.get_value_or (liberation);
-                       _subtitle_asset->add_font (i->id, from.leaf().string ());
-
-                       boost::filesystem::path to = _film->dir (_film->dcp_name ()) / _subtitle_asset->id ();
-                       boost::filesystem::create_directories (to, ec);
-                       if (ec) {
-                               throw FileError (_("Could not create directory"), to);
-                       }
-
-                       to /= from.leaf();
-
-                       boost::system::error_code ec;
-                       boost::filesystem::copy_file (from, to, ec);
-                       if (ec) {
-                               throw FileError ("Could not copy font to DCP", from);
-                       }
-
-                       dcp.add (shared_ptr<dcp::Font> (new dcp::Font (to)));
+                       _subtitle_asset->add_font (i->id, i->file.get_value_or (liberation));
                }
 
                _subtitle_asset->write (
                }
 
                _subtitle_asset->write (
@@ -556,8 +536,6 @@ Writer::finish ()
                                           0
                                           )
                                   ));
                                           0
                                           )
                                   ));
-               
-               dcp.add (_subtitle_asset);
        }
        
        cpl->add (reel);
        }
        
        cpl->add (reel);