summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-05-07 12:54:04 +0100
committerCarl Hetherington <cth@carlh.net>2015-05-07 12:54:04 +0100
commit0463cc5d09fd759a8ec3e40560ab8fd31c369876 (patch)
treeab2eaba3a7f939017c387e4765eb104ab81064b7
parent21fb4ee6deb1321b37ad360cabdc8963774a4897 (diff)
parent3c5905314398833aafa54a91c59c16e4e0d87d8c (diff)
Merge branch '1.0' of git.carlh.net:git/dcpomatic into 2.0
-rw-r--r--ChangeLog9
-rw-r--r--cscript2
-rw-r--r--debian/changelog5
-rw-r--r--src/lib/writer.cc46
-rw-r--r--wscript2
5 files changed, 42 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 89ad3743b..6d7404239 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-05-07 Carl Hetherington <cth@carlh.net>
+
+ * Version 2.0.43 released.
+
+2015-05-07 Carl Hetherington <cth@carlh.net>
+
+ * A few small but possibly sigificant correctness fixes
+ for subtitles (thanks to dcp_inspect).
+
2015-05-04 Carl Hetherington <cth@carlh.net>
* Version 2.0.42 released.
diff --git a/cscript b/cscript
index a25f17016..e113e7101 100644
--- a/cscript
+++ b/cscript
@@ -156,7 +156,7 @@ def make_control(debian_version, bits, filename, debug):
def dependencies(target):
return (('ffmpeg-cdist', 'f69bb08'),
- ('libdcp', '1818e75'),
+ ('libdcp', 'e0906dd'),
('libsub', 'f66b11f'))
def build(target, options):
diff --git a/debian/changelog b/debian/changelog
index 8b92df444..43750e790 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-dcpomatic (2.0.42-1) UNRELEASED; urgency=low
+dcpomatic (2.0.43-1) UNRELEASED; urgency=low
* New upstream release.
* New upstream release.
@@ -221,8 +221,9 @@ dcpomatic (2.0.42-1) UNRELEASED; urgency=low
* New upstream release.
* New upstream release.
* New upstream release.
+ * New upstream release.
- -- Carl Hetherington <carl@d1stkfactory> Mon, 04 May 2015 03:03:10 +0100
+ -- Carl Hetherington <carl@d1stkfactory> Thu, 07 May 2015 00:48:20 +0100
dcpomatic (0.87-1) UNRELEASED; urgency=low
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 9f6886a21..31c265e2f 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -505,18 +505,6 @@ Writer::finish ()
}
if (_subtitle_content) {
- _subtitle_content->write_xml (_film->dir (_film->dcp_name ()) / _film->subtitle_xml_filename ());
- reel->add (shared_ptr<dcp::ReelSubtitleAsset> (
- new dcp::ReelSubtitleAsset (
- _subtitle_content,
- dcp::Fraction (_film->video_frame_rate(), 1),
- _picture_mxf->intrinsic_duration (),
- 0
- )
- ));
-
- dcp.add (_subtitle_content);
-
boost::filesystem::path const liberation = shared_path () / "LiberationSans-Regular.ttf";
/* Add all the fonts to the subtitle content and as assets to the DCP */
@@ -524,16 +512,34 @@ Writer::finish ()
boost::filesystem::path const from = i->file.get_value_or (liberation);
_subtitle_content->add_font (i->id, from.leaf().string ());
- boost::filesystem::path to = _film->dir (_film->dcp_name ()) / from.leaf();
+ boost::filesystem::path to = _film->dir (_film->dcp_name ()) / _subtitle_content->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) {
- dcp.add (shared_ptr<dcp::Font> (new dcp::Font (to)));
- } else {
- LOG_WARNING_NC (String::compose ("Could not copy font %1 to DCP", from.string ()));
+ if (ec) {
+ throw FileError ("Could not copy font to DCP", from);
}
+
+ dcp.add (shared_ptr<dcp::Font> (new dcp::Font (to)));
}
+
+ _subtitle_content->write_xml (_film->dir (_film->dcp_name ()) / _subtitle_content->id () / _film->subtitle_xml_filename ());
+ reel->add (shared_ptr<dcp::ReelSubtitleAsset> (
+ new dcp::ReelSubtitleAsset (
+ _subtitle_content,
+ dcp::Fraction (_film->video_frame_rate(), 1),
+ _picture_mxf->intrinsic_duration (),
+ 0
+ )
+ ));
+
+ dcp.add (_subtitle_content);
}
cpl->add (reel);
@@ -663,7 +669,11 @@ Writer::write (PlayerSubtitles subs)
}
if (!_subtitle_content) {
- _subtitle_content.reset (new dcp::InteropSubtitleContent (_film->name(), _film->subtitle_language ()));
+ string lang = _film->subtitle_language ();
+ if (lang.empty ()) {
+ lang = "Unknown";
+ }
+ _subtitle_content.reset (new dcp::InteropSubtitleContent (_film->name(), lang));
}
for (list<dcp::SubtitleString>::const_iterator i = subs.text.begin(); i != subs.text.end(); ++i) {
diff --git a/wscript b/wscript
index 05a3629ec..644d69b8d 100644
--- a/wscript
+++ b/wscript
@@ -5,7 +5,7 @@ import distutils
import distutils.spawn
APPNAME = 'dcpomatic'
-VERSION = '2.0.42devel'
+VERSION = '2.0.43devel'
def options(opt):
opt.load('compiler_cxx')