From: Carl Hetherington Date: Tue, 9 Sep 2014 20:52:05 +0000 (+0100) Subject: Merge master. X-Git-Tag: v2.0.48~614 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=39029279954b1f346d3ba28ec12c58211bfa7436;hp=-c Merge master. --- 39029279954b1f346d3ba28ec12c58211bfa7436 diff --combined ChangeLog index cf51e9fcc,67f31f66c..f0ba9f138 --- a/ChangeLog +++ b/ChangeLog @@@ -1,18 -1,11 +1,26 @@@ +2014-09-09 Carl Hetherington + + * Version 2.0.6 released. + +2014-09-09 Carl Hetherington + + * Fix missing OS X dependencies. + + * Use a different directory for DCP-o-matic 2 + configuration (not the same as 1.x). + +2014-09-08 Carl Hetherington + + * Version 2.0.5 released. + + 2014-09-08 Carl Hetherington + + * Version 1.73.4 released. + + 2014-09-08 Carl Hetherington + + * Fix failure to load Targa files. + 2014-09-07 Carl Hetherington * Version 1.73.3 released. @@@ -56,33 -49,6 +64,33 @@@ 2014-08-29 Carl Hetherington + * Version 2.0.4 released. + +2014-08-24 Carl Hetherington + + * Version 2.0.3 released. + +2014-08-24 Carl Hetherington + + * Version 2.0.2 released. + +2014-08-06 Carl Hetherington + + * Version 2.0.1 released. + +2014-07-15 Carl Hetherington + + * A variety of changes were made on the 2.0 branch + but not documented in the ChangeLog. Most sigificantly: + + - DCP import + - Creation of DCPs with proper XML subtitles + - Import of .srt and .xml subtitles + - Audio processing framework (with some basic processors). + +2014-03-07 Carl Hetherington + + * Add subtitle view. * Some improvements to the manual. 2014-08-26 Carl Hetherington @@@ -113,7 -79,6 +121,7 @@@ * Attempt to fix random crashes on OS X (especially during encodes) thought to be caused by multiple threads using (different) stringstreams at the same time; see src/lib/safe_stringstream. +>>>>>>> origin/master 2014-08-09 Carl Hetherington @@@ -178,7 -143,6 +186,7 @@@ 2014-07-10 Carl Hetherington * Version 1.72.2 released. +>>>>>>> origin/master 2014-07-10 Carl Hetherington diff --combined src/lib/magick_image_proxy.cc index 0908ed921,000000000..4adf8047f mode 100644,000000..100644 --- a/src/lib/magick_image_proxy.cc +++ b/src/lib/magick_image_proxy.cc @@@ -1,114 -1,0 +1,135 @@@ +/* + Copyright (C) 2014 Carl Hetherington + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#include +#include "magick_image_proxy.h" +#include "cross.h" +#include "exceptions.h" +#include "util.h" +#include "log.h" +#include "image.h" +#include "log.h" + +#include "i18n.h" + +#define LOG_TIMING(...) _log->microsecond_log (String::compose (__VA_ARGS__), Log::TYPE_TIMING); + ++using std::string; +using boost::shared_ptr; + +MagickImageProxy::MagickImageProxy (boost::filesystem::path path, shared_ptr log) + : ImageProxy (log) +{ + /* Read the file into a Blob */ + + boost::uintmax_t const size = boost::filesystem::file_size (path); + FILE* f = fopen_boost (path, "rb"); + if (!f) { + throw OpenFileError (path); + } + + uint8_t* data = new uint8_t[size]; + if (fread (data, 1, size, f) != size) { + delete[] data; + throw ReadFileError (path); + } + + fclose (f); + _blob.update (data, size); + delete[] data; +} + +MagickImageProxy::MagickImageProxy (shared_ptr, shared_ptr socket, shared_ptr log) + : ImageProxy (log) +{ + uint32_t const size = socket->read_uint32 (); + uint8_t* data = new uint8_t[size]; + socket->read (data, size); + _blob.update (data, size); + delete[] data; +} + +shared_ptr +MagickImageProxy::image () const +{ + if (_image) { + return _image; + } + + LOG_TIMING ("[%1] MagickImageProxy begins decode and convert of %2 bytes", boost::this_thread::get_id(), _blob.length()); + + Magick::Image* magick_image = 0; ++ string error; + try { + magick_image = new Magick::Image (_blob); - } catch (...) { - throw DecodeError (_("Could not decode image file")); ++ } catch (Magick::Exception& e) { ++ error = e.what (); ++ } ++ ++ if (!magick_image) { ++ /* ImageMagick cannot auto-detect Targa files, it seems, so try here with an ++ explicit format. I can't find it documented that passing a (0, 0) geometry ++ is allowed, but it seems to work. ++ */ ++ try { ++ magick_image = new Magick::Image (_blob, Magick::Geometry (0, 0), "TGA"); ++ } catch (...) { ++ ++ } ++ } ++ ++ if (!magick_image) { ++ /* If we failed both an auto-detect and a forced-Targa we give the error from ++ the auto-detect. ++ */ ++ throw DecodeError (String::compose (_("Could not decode image file (%1)"), error)); + } + + dcp::Size size (magick_image->columns(), magick_image->rows()); + LOG_TIMING ("[%1] MagickImageProxy decode finished", boost::this_thread::get_id ()); + + _image.reset (new Image (PIX_FMT_RGB24, size, true)); + + /* Write line-by-line here as _image must be aligned, and write() cannot be told about strides */ + uint8_t* p = _image->data()[0]; + for (int i = 0; i < size.height; ++i) { + using namespace MagickCore; + magick_image->write (0, i, size.width, 1, "RGB", CharPixel, p); + p += _image->stride()[0]; + } + + delete magick_image; + + LOG_TIMING ("[%1] MagickImageProxy completes decode and convert of %2 bytes", boost::this_thread::get_id(), _blob.length()); + + return _image; +} + +void +MagickImageProxy::add_metadata (xmlpp::Node* node) const +{ + node->add_child("Type")->add_child_text (N_("Magick")); +} + +void +MagickImageProxy::send_binary (shared_ptr socket) const +{ + socket->write (_blob.length ()); + socket->write ((uint8_t *) _blob.data (), _blob.length ()); +} diff --combined src/wx/about_dialog.cc index b62683c8f,7680e19cd..7c59e3fc8 --- a/src/wx/about_dialog.cc +++ b/src/wx/about_dialog.cc @@@ -1,5 -1,5 +1,5 @@@ /* - Copyright (C) 2013 Carl Hetherington + Copyright (C) 2013-2014 Carl Hetherington This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@@ -17,10 -17,6 +17,10 @@@ */ +/** @file src/wx/about_dialog.cc + * @brief The "about DCP-o-matic" dialogue box. + */ + #include #include #include "lib/version.h" @@@ -130,6 -126,7 +130,7 @@@ AboutDialog::AboutDialog (wxWindow* par supported_by.Add (wxT ("Evan Freeze")); supported_by.Add (wxT ("Silvio Giuliano")); supported_by.Add (wxT ("Flor Guillaume")); + supported_by.Add (wxT ("Antonio Ruiz Hernandez")); supported_by.Add (wxT ("Jonathan Jensen")); supported_by.Add (wxT ("Chris Kay")); supported_by.Add (wxT ("Adam Klotblixt")); @@@ -219,10 -216,6 +220,10 @@@ SetSizerAndFit (overall_sizer); } +/** Add a section of credits. + * @param name Name of section. + * @param credits List of names. + */ void AboutDialog::add_section (wxString name, wxArrayString credits) { diff --combined wscript index e0b964a22,8db63f625..6ce0615ee --- a/wscript +++ b/wscript @@@ -3,7 -3,7 +3,7 @@@ import o import sys APPNAME = 'dcpomatic' -VERSION = '1.73.4devel' +VERSION = '2.0.6devel' def options(opt): opt.load('compiler_cxx') @@@ -58,9 -58,9 +58,9 @@@ def dynamic_openjpeg(conf) conf.check_cfg(package='libopenjpeg', args='--cflags --libs', max_version='1.5.2', mandatory=True) def static_dcp(conf, static_boost, static_xmlpp, static_xmlsec, static_ssh): - conf.check_cfg(package='libdcp', atleast_version='0.96', args='--cflags', uselib_store='DCP', mandatory=True) + conf.check_cfg(package='libdcp-1.0', atleast_version='0.96', args='--cflags', uselib_store='DCP', mandatory=True) conf.env.DEFINES_DCP = [f.replace('\\', '') for f in conf.env.DEFINES_DCP] - conf.env.STLIB_DCP = ['dcp', 'asdcp-libdcp', 'kumu-libdcp'] + conf.env.STLIB_DCP = ['dcp-1.0', 'asdcp-libdcp-1.0', 'kumu-libdcp-1.0'] conf.env.LIB_DCP = ['glibmm-2.4', 'ssl', 'crypto', 'bz2', 'xslt'] if static_boost: @@@ -84,7 -84,7 +84,7 @@@ conf.env.LIB_DCP.append('ssh') def dynamic_dcp(conf): - conf.check_cfg(package='libdcp', atleast_version='0.97.0', args='--cflags --libs', uselib_store='DCP', mandatory=True) + conf.check_cfg(package='libdcp-1.0', atleast_version='0.92', args='--cflags --libs', uselib_store='DCP', mandatory=True) conf.env.DEFINES_DCP = [f.replace('\\', '') for f in conf.env.DEFINES_DCP] def dynamic_ssh(conf): @@@ -223,7 -223,7 +223,7 @@@ def configure(conf) if conf.env.TARGET_LINUX or conf.env.TARGET_OSX: conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_POSIX') conf.env.append_value('CXXFLAGS', '-DPOSIX_LOCALE_PREFIX="%s/share/locale"' % conf.env['INSTALL_PREFIX']) - conf.env.append_value('CXXFLAGS', '-DPOSIX_ICON_PREFIX="%s/share/dcpomatic"' % conf.env['INSTALL_PREFIX']) + conf.env.append_value('CXXFLAGS', '-DPOSIX_ICON_PREFIX="%s/share/dcpomatic2"' % conf.env['INSTALL_PREFIX']) boost_lib_suffix = '' boost_thread = 'boost_thread' conf.env.append_value('LINKFLAGS', '-pthread') @@@ -251,7 -251,7 +251,7 @@@ # if conf.env.TARGET_DEBIAN: - conf.check_cfg(package='libcxml', atleast_version='0.08', args='--cflags', uselib_store='CXML', mandatory=True) + conf.check_cfg(package='libcxml', atleast_version='0.11', args='--cflags', uselib_store='CXML', mandatory=True) conf.env.STLIB_CXML = ['cxml'] conf.check_cfg(package='libxml++-2.6', args='--cflags --libs', uselib_store='XMLPP', mandatory=True) conf.check_cfg(package='libcurl', args='--cflags --libs', uselib_store='CURL', mandatory=True) @@@ -323,8 -323,6 +323,8 @@@ conf.check_cfg(package='glib-2.0', args='--cflags --libs', uselib_store='GLIB', mandatory=True) conf.check_cfg(package= '', path=conf.options.magickpp_config, args='--cppflags --cxxflags --libs', uselib_store='MAGICK', mandatory=True) conf.check_cfg(package='libzip', args='--cflags --libs', uselib_store='ZIP', mandatory=True) + conf.check_cfg(package='pangomm-1.4', args='--cflags --libs', uselib_store='PANGOMM', mandatory=True) + conf.check_cfg(package='cairomm-1.0', args='--cflags --libs', uselib_store='CAIROMM', mandatory=True) conf.check_cc(fragment=""" #include @@@ -361,10 -359,10 +361,10 @@@ def build(bld) bld.recurse('platform/osx') for r in ['22x22', '32x32', '48x48', '64x64', '128x128']: - bld.install_files('${PREFIX}/share/icons/hicolor/%s/apps' % r, 'icons/%s/dcpomatic.png' % r) + bld.install_files('${PREFIX}/share/icons/hicolor/%s/apps' % r, 'icons/%s/dcpomatic2.png' % r) if not bld.env.TARGET_WINDOWS: - bld.install_files('${PREFIX}/share/dcpomatic', 'icons/taskbar_icon.png') + bld.install_files('${PREFIX}/share/dcpomatic2', 'icons/taskbar_icon.png') bld.add_post_fun(post) @@@ -430,4 -428,4 +430,4 @@@ def pot_merge(bld) bld.recurse('src') def tags(bld): - os.system('etags src/lib/*.cc src/lib/*.h src/wx/*.cc src/wx/*.h src/tools/*.cc src/tools/*.h') + os.system('etags src/lib/*.cc src/lib/*.h src/wx/*.cc src/wx/*.h src/tools/*.cc src/tools/*.h test/*.cc')