From: Carl Hetherington Date: Mon, 24 Feb 2014 12:19:50 +0000 (+0000) Subject: Merge master; specify libdcp-1.0. X-Git-Tag: v2.0.48~912 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=85c65bd422742813992686c17a5e1b718cc3c449 Merge master; specify libdcp-1.0. --- 85c65bd422742813992686c17a5e1b718cc3c449 diff --cc cscript index d6a04aba6,14e3347a1..b8b058006 --- a/cscript +++ b/cscript @@@ -129,8 -129,8 +129,8 @@@ def make_control(debian_version, bits, print >>f,'' def dependencies(target): - return (('ffmpeg-cdist', '5ac3a6af077c10f07c31954c372a8f29e4e18e2a'), + return (('ffmpeg-cdist', '08827fa4e1d483511e6135c424d2ca9c56a9ed50'), - ('libdcp', '5839998')) + ('libdcp', '1.0')) def build(target, options): cmd = './waf configure --prefix=%s' % target.work_dir_cscript() diff --cc src/lib/film.cc index 774c1b392,1d07ec77f..901c51284 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@@ -420,8 -426,8 +426,8 @@@ Film::read_metadata ( _sequence_video = f.bool_child ("SequenceVideo"); _three_d = f.bool_child ("ThreeD"); _interop = f.bool_child ("Interop"); - _key = libdcp::Key (f.string_child ("Key")); + _key = dcp::Key (f.string_child ("Key")); - _playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"), version); + _playlist->set_from_xml (shared_from_this(), f.node_child ("Playlist"), _state_version); _dirty = false; } diff --cc src/lib/film.h index 68916c7b0,7e65ecb16..0a474bab7 --- a/src/lib/film.h +++ b/src/lib/film.h @@@ -323,8 -327,10 +328,10 @@@ private bool _three_d; bool _sequence_video; bool _interop; - libdcp::Key _key; + dcp::Key _key; + int _state_version; + /** true if our state has changed since we last saved it */ mutable bool _dirty; diff --cc src/lib/util.cc index fd3a318b0,25fbc130b..63b1a5395 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@@ -939,24 -940,63 +943,70 @@@ make_signer ( boost::filesystem::path signer_key (sd); signer_key /= "leaf.key"; - return shared_ptr (new libdcp::Signer (chain, signer_key)); + return shared_ptr (new dcp::Signer (chain, signer_key)); } - dcp::Size - fit_ratio_within (float ratio, dcp::Size full_frame) + map + split_get_request (string url) + { + enum { + AWAITING_QUESTION_MARK, + KEY, + VALUE + } state = AWAITING_QUESTION_MARK; + + map r; + string k; + string v; + for (size_t i = 0; i < url.length(); ++i) { + switch (state) { + case AWAITING_QUESTION_MARK: + if (url[i] == '?') { + state = KEY; + } + break; + case KEY: + if (url[i] == '=') { + v.clear (); + state = VALUE; + } else { + k += url[i]; + } + break; + case VALUE: + if (url[i] == '&') { + r.insert (make_pair (k, v)); + k.clear (); + state = KEY; + } else { + v += url[i]; + } + break; + } + } + + if (state == VALUE) { + r.insert (make_pair (k, v)); + } + + return r; + } + + libdcp::Size + fit_ratio_within (float ratio, libdcp::Size full_frame) { if (ratio < full_frame.ratio ()) { - return libdcp::Size (rint (full_frame.height * ratio), full_frame.height); + return dcp::Size (rint (full_frame.height * ratio), full_frame.height); } - return libdcp::Size (full_frame.width, rint (full_frame.width / ratio)); + return dcp::Size (full_frame.width, rint (full_frame.width / ratio)); +} + +DCPTime +time_round_up (DCPTime t, DCPTime nearest) +{ + DCPTime const a = t + nearest - 1; + return a - (a % nearest); } void * diff --cc src/lib/util.h index b89c71eee,ef29cc08f..76dbda190 --- a/src/lib/util.h +++ b/src/lib/util.h @@@ -77,12 -76,14 +77,14 @@@ extern bool valid_image_file (boost::fi extern boost::filesystem::path mo_path (); #endif extern std::string tidy_for_filename (std::string); -extern boost::shared_ptr make_signer (); -extern libdcp::Size fit_ratio_within (float ratio, libdcp::Size); +extern boost::shared_ptr make_signer (); +extern dcp::Size fit_ratio_within (float ratio, dcp::Size); + extern std::string entities_to_text (std::string e); + extern std::map split_get_request (std::string url); -struct FrameRateConversion +struct FrameRateChange { - FrameRateConversion (float, int); + FrameRateChange (float, int); /** @return factor by which to multiply a source frame rate to get the effective rate after any skip or repeat has happened. diff --cc wscript index ebf444c8f,64616eb73..708e48910 --- a/wscript +++ b/wscript @@@ -55,9 -55,9 +55,9 @@@ def dynamic_openjpeg(conf) conf.check_cfg(package='libopenjpeg', args='--cflags --libs', max_version='1.5.1', mandatory=True) def static_dcp(conf, static_boost, static_xmlpp, static_xmlsec, static_ssh): -- conf.check_cfg(package='libdcp', atleast_version='0.92', args='--cflags', uselib_store='DCP', mandatory=True) ++ conf.check_cfg(package='libdcp-1.0', atleast_version='0.92', 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', 'kumu-libdcp'] conf.env.LIB_DCP = ['glibmm-2.4', 'ssl', 'crypto', 'bz2', 'xslt'] if static_boost: @@@ -81,7 -81,7 +81,7 @@@ conf.env.LIB_DCP.append('ssh') def dynamic_dcp(conf): -- conf.check_cfg(package='libdcp', atleast_version='0.92', 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):