diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-09 14:07:35 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-09 14:07:35 +0100 |
| commit | 644bb89cb752eb89d639e16ee0bff70d25a75750 (patch) | |
| tree | d55916d4fe52c97af0f708ffeb6b28abcbe2eab0 /src/lib | |
| parent | 3e7b4caf9be417bc1c80f1389d01e9dc98a25f21 (diff) | |
Bump libdcp.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/dcp_subtitle.cc | 10 | ||||
| -rw-r--r-- | src/lib/writer.cc | 26 |
2 files changed, 3 insertions, 33 deletions
diff --git a/src/lib/dcp_subtitle.cc b/src/lib/dcp_subtitle.cc index 66cee4ad8..9963d0a94 100644 --- a/src/lib/dcp_subtitle.cc +++ b/src/lib/dcp_subtitle.cc @@ -39,15 +39,7 @@ DCPSubtitle::load (boost::filesystem::path file) const 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 (...) { } diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 7091930f4..9e2cf4bd4 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -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))); - 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))); - dcp.add (stereo); } 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"; - /* 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::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 ( @@ -556,8 +536,6 @@ Writer::finish () 0 ) )); - - dcp.add (_subtitle_asset); } cpl->add (reel); |
