From: Carl Hetherington Date: Fri, 12 Sep 2014 22:16:31 +0000 (+0100) Subject: Merge master. X-Git-Tag: v2.0.48~591 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=3e12c68dc0451e73b5bc1a84d1d70f4999f7b4b5 Merge master. --- 3e12c68dc0451e73b5bc1a84d1d70f4999f7b4b5 diff --cc ChangeLog index 183339f61,6803d355c..222a0eea1 --- a/ChangeLog +++ b/ChangeLog @@@ -1,18 -1,7 +1,20 @@@ 2014-09-12 Carl Hetherington + * Version 2.0.9 released. + +2014-09-12 Carl Hetherington + + * Add "re-examine" option to content context menu (#339). + +2014-09-11 Carl Hetherington + + * Restore encoding optimisations for still-image sources. + + * Add option to re-make signing chain with specified organisation, + common names etc. (#354) + + * Allow separate X and Y scale for subtitles (#337). + 2014-09-10 Carl Hetherington * Allow DCP names to be created using the ISDCF template and then diff --cc src/lib/film.cc index 475dd6844,54503ef72..268109921 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@@ -91,12 -91,11 +91,14 @@@ using dcp::raw_convert * 7 -> 8 * Use tag in rather than . * 8 -> 9 - * DCI -> ISDCF. + * DCI -> ISDCF + * 9 -> 10 + * Subtitle X and Y scale. + * + * Bumped to 32 for 2.0 branch; some times are expressed in Times rather + * than frames now. */ -int const Film::current_state_version = 10; +int const Film::current_state_version = 32; /** Construct a Film object in a given directory. * diff --cc src/lib/player.cc index e46d539f8,8063d1212..f83c9563b --- a/src/lib/player.cc +++ b/src/lib/player.cc @@@ -110,179 -110,244 +110,180 @@@ Player::setup_pieces ( } } - if (_audio && ad && ad->has_audio ()) { - if ((*i)->audio_position < earliest_t) { - earliest_t = (*i)->audio_position; - earliest = *i; - type = AUDIO; - } + optional best_overlap_frc; + if (best_overlap) { + best_overlap_frc = FrameRateChange (best_overlap->video_frame_rate(), _film->video_frame_rate ()); + } else { + /* No video overlap; e.g. if the DCP is just audio */ + best_overlap_frc = FrameRateChange (_film->video_frame_rate(), _film->video_frame_rate ()); } - } - if (!earliest) { - flush (); - return true; - } + /* FFmpeg */ + shared_ptr fc = dynamic_pointer_cast (*i); + if (fc) { + decoder.reset (new FFmpegDecoder (fc, _film->log())); + frc = FrameRateChange (fc->video_frame_rate(), _film->video_frame_rate()); + } - switch (type) { - case VIDEO: - if (earliest_t > _video_position) { - emit_black (); - } else { - if (earliest->repeating ()) { - earliest->repeat (this); - } else { - earliest->decoder->pass (); - } + shared_ptr dc = dynamic_pointer_cast (*i); + if (dc) { + decoder.reset (new DCPDecoder (dc, _film->log ())); + frc = FrameRateChange (dc->video_frame_rate(), _film->video_frame_rate()); } - break; - case AUDIO: - if (earliest_t > _audio_position) { - emit_silence (_film->time_to_audio_frames (earliest_t - _audio_position)); - } else { - earliest->decoder->pass (); - - if (earliest->decoder->done()) { - shared_ptr ac = dynamic_pointer_cast (earliest->content); - assert (ac); - shared_ptr re = resampler (ac, false); - if (re) { - shared_ptr b = re->flush (); - if (b->frames ()) { - process_audio ( - earliest, - b, - ac->audio_length() * ac->output_audio_frame_rate() / ac->content_audio_frame_rate(), - true - ); - } + /* ImageContent */ + shared_ptr ic = dynamic_pointer_cast (*i); + if (ic) { + /* See if we can re-use an old ImageDecoder */ + for (list >::const_iterator j = old_pieces.begin(); j != old_pieces.end(); ++j) { + shared_ptr imd = dynamic_pointer_cast ((*j)->decoder); + if (imd && imd->content() == ic) { + decoder = imd; } } - } - break; - } - if (_audio) { - boost::optional