diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-06-14 09:34:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-06-14 09:34:09 +0100 |
| commit | 3d6501346b187f35d0f55d16e13f8817f505a82f (patch) | |
| tree | f57c153b99a5301de3e7024bc414706749974d0a | |
| parent | cd29c4ed26fde9b9c07190f92205705b13c6bd73 (diff) | |
| parent | 6b9c1b3bdec2b4396314ccf6bf2d5aeaa5402ae6 (diff) | |
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | cscript | 2 | ||||
| -rw-r--r-- | src/lib/dcp_subtitle.cc | 15 | ||||
| -rw-r--r-- | src/tools/wscript | 2 | ||||
| -rw-r--r-- | test/time_calculation_test.cc | 2 | ||||
| -rw-r--r-- | test/wscript | 2 |
6 files changed, 18 insertions, 9 deletions
@@ -1,3 +1,7 @@ +2016-06-13 Carl Hetherington <cth@carlh.net> + + * Give better error messages when subtitles fail to load. + 2016-06-13 c.hetherington <cth@carlh.net> * Add 3D video frame type for 3D DCP inputs (#806). @@ -237,7 +237,7 @@ def dependencies(target): ffmpeg_options = {} return (('ffmpeg-cdist', 'aab2fb1', ffmpeg_options), - ('libdcp', 'd927e9b'), + ('libdcp', '8837fe7'), ('libsub', '3e299e5')) def configure_options(target): diff --git a/src/lib/dcp_subtitle.cc b/src/lib/dcp_subtitle.cc index b0e114be2..f9aa7e0d9 100644 --- a/src/lib/dcp_subtitle.cc +++ b/src/lib/dcp_subtitle.cc @@ -20,34 +20,39 @@ #include "dcp_subtitle.h" #include "exceptions.h" +#include "compose.hpp" #include <dcp/interop_subtitle_asset.h> #include <dcp/smpte_subtitle_asset.h> #include "i18n.h" +using std::string; +using std::exception; using boost::shared_ptr; shared_ptr<dcp::SubtitleAsset> DCPSubtitle::load (boost::filesystem::path file) const { shared_ptr<dcp::SubtitleAsset> sc; + string interop_error; + string smpte_error; try { sc.reset (new dcp::InteropSubtitleAsset (file)); - } catch (...) { - + } catch (exception& e) { + interop_error = e.what (); } if (!sc) { try { sc.reset (new dcp::SMPTESubtitleAsset (file)); - } catch (...) { - + } catch (exception& e) { + smpte_error = e.what(); } } if (!sc) { - throw FileError (_("Could not read subtitles"), file); + throw FileError (String::compose (_("Could not read subtitles (%1 / %2)"), interop_error, smpte_error), file); } return sc; diff --git a/src/tools/wscript b/src/tools/wscript index 20fcdf129..76c87598f 100644 --- a/src/tools/wscript +++ b/src/tools/wscript @@ -30,7 +30,7 @@ def configure(conf): def build(bld): uselib = 'BOOST_THREAD BOOST_DATETIME DCP XMLSEC CXML XMLPP AVFORMAT AVFILTER AVCODEC ' uselib += 'AVUTIL SWSCALE POSTPROC CURL BOOST_FILESYSTEM SSH ZIP CAIROMM FONTCONFIG PANGOMM SUB MAGICK SNDFILE SAMPLERATE BOOST_REGEX ' - uselib += 'ICU ' + uselib += 'ICU NETTLE ' if bld.env.TARGET_WINDOWS: uselib += 'WINSOCK2' diff --git a/test/time_calculation_test.cc b/test/time_calculation_test.cc index 3d602c0f0..ddd685d0c 100644 --- a/test/time_calculation_test.cc +++ b/test/time_calculation_test.cc @@ -43,7 +43,7 @@ static string const xml = "<Content>" "<VideoWidth>1280</VideoWidth>" "<VideoHeight>720</VideoHeight>" "<VideoFrameRate>25</VideoFrameRate>" - "<VideoFrameType>0</VideoFrameType>" + "<VideoFrameType>2d</VideoFrameType>" "<LeftCrop>0</LeftCrop>" "<RightCrop>0</RightCrop>" "<TopCrop>0</TopCrop>" diff --git a/test/wscript b/test/wscript index b7ac654cd..771651236 100644 --- a/test/wscript +++ b/test/wscript @@ -34,7 +34,7 @@ def build(bld): obj = bld(features='cxx cxxprogram') obj.name = 'unit-tests' obj.uselib = 'BOOST_TEST BOOST_THREAD BOOST_FILESYSTEM BOOST_DATETIME SNDFILE SAMPLERATE DCP FONTCONFIG CAIROMM PANGOMM XMLPP ' - obj.uselib += 'AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE POSTPROC CXML MAGICK SUB GLIB CURL SSH XMLSEC BOOST_REGEX ICU ' + obj.uselib += 'AVFORMAT AVFILTER AVCODEC AVUTIL SWSCALE POSTPROC CXML MAGICK SUB GLIB CURL SSH XMLSEC BOOST_REGEX ICU NETTLE ' if bld.env.TARGET_WINDOWS: obj.uselib += 'WINSOCK2' obj.use = 'libdcpomatic2' |
