Write subtitle intrinsic durations to match the picture in the reel; sort out test...
authorCarl Hetherington <cth@carlh.net>
Tue, 22 Jul 2014 10:27:55 +0000 (11:27 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 22 Jul 2014 10:27:55 +0000 (11:27 +0100)
src/lib/transcoder.cc
src/lib/writer.cc
test/test.cc
test/wscript

index 1012c45442b69320e9b4bd7aac14143167755065..9d8eebe255d63d16dac547ab5851e8388c601c0c 100644 (file)
@@ -62,7 +62,8 @@ Transcoder::go ()
        _encoder->begin ();
 
        DCPTime const frame = DCPTime::from_frames (1, _film->video_frame_rate ());
-       for (DCPTime t; t < _film->length(); t += frame) {
+       DCPTime const length = _film->length ();
+       for (DCPTime t; t < length; t += frame) {
                list<shared_ptr<PlayerVideo> > v = _player->get_video (t, true);
                for (list<shared_ptr<PlayerVideo> >::const_iterator i = v.begin(); i != v.end(); ++i) {
                        _encoder->enqueue (*i);
index c34a6a66d7350cd624f526b8de4b4689b2a11523..c594a64464729e4ae33287deb06c64f457f234f4 100644 (file)
@@ -466,7 +466,7 @@ Writer::finish ()
                                   new dcp::ReelSubtitleAsset (
                                           _subtitle_content,
                                           dcp::Fraction (_film->video_frame_rate(), 1),
-                                          _subtitle_content->latest_subtitle_out().to_seconds() * _film->video_frame_rate(),
+                                          _picture_mxf->intrinsic_duration (),
                                           0
                                           )
                                   ));
index 4466b74cb32d77212766b84302df0e4a03456daf..cbf4b5d4d6f84024cdcff4a3258d2d027b165a53 100644 (file)
@@ -162,6 +162,7 @@ check_dcp (boost::filesystem::path ref, boost::filesystem::path check)
        options.max_audio_sample_error = 255;
        options.cpl_annotation_texts_can_differ = true;
        options.mxf_names_can_differ = true;
+       options.reel_hashes_can_differ = true;
        
        BOOST_CHECK (ref_dcp.equals (check_dcp, options, boost::bind (note, _1, _2)));
 }
index 3345d9eb83bf5c72eabc33684c555048bfd18372..493836a7ab3fd747a300476ebd1cd64980876d36 100644 (file)
@@ -37,6 +37,7 @@ def build(bld):
                  film_metadata_test.cc
                  frame_rate_test.cc
                  image_test.cc
+                 import_dcp_test.cc
                  isdcf_name_test.cc
                  job_test.cc
                  make_black_test.cc