From 49f7b473b0446811f8e1f61ae0b88ec0e0b5328a Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 9 Jan 2014 23:50:21 +0000 Subject: Remove some deprecated FFmpeg stuff. --- src/lib/ffmpeg.cc | 4 ++-- src/lib/ffmpeg_decoder.cc | 4 ---- src/lib/ffmpeg_examiner.cc | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc index e5e5f317a..d3653e311 100644 --- a/src/lib/ffmpeg.cc +++ b/src/lib/ffmpeg.cc @@ -62,7 +62,7 @@ FFmpeg::~FFmpeg () } } - avcodec_free_frame (&_frame); + av_frame_free (&_frame); avformat_close_input (&_format_context); } @@ -136,7 +136,7 @@ FFmpeg::setup_general () } } - _frame = avcodec_alloc_frame (); + _frame = av_frame_alloc (); if (_frame == 0) { throw DecodeError (N_("could not allocate frame")); } diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index d9b779659..b672b2c1f 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -167,8 +167,6 @@ FFmpegDecoder::pass () return; } - avcodec_get_frame_defaults (_frame); - shared_ptr film = _film.lock (); assert (film); @@ -345,8 +343,6 @@ FFmpegDecoder::seek (VideoContent::Frame frame, bool accurate) continue; } - avcodec_get_frame_defaults (_frame); - int finished = 0; r = avcodec_decode_video2 (video_codec_context(), _frame, &finished, &_packet); if (r >= 0 && finished) { diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index 78b6e3121..a63090d12 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -70,7 +70,6 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr c) } int frame_finished; - avcodec_get_frame_defaults (_frame); AVCodecContext* context = _format_context->streams[_packet.stream_index]->codec; -- cgit v1.2.3 From 77e4bcc1514fdeaa3838644f59439f34b064e33c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 10 Jan 2014 09:33:55 +0000 Subject: Try again to remove anything at audio_mxf_filename. --- src/lib/writer.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 320528682..01bb2525e 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -98,9 +98,14 @@ Writer::Writer (shared_ptr f, weak_ptr j) don't like overwriting existing files here, so try to remove it using boost. */ boost::system::error_code ec; - boost::filesystem::remove (_film->file (_film->audio_mxf_filename ()), ec); + boost::filesystem::remove_all (_film->file (_film->audio_mxf_filename ()), ec); if (ec) { - _film->log()->log (String::compose ("Could not remove existing audio MXF file (%1)", ec.value ())); + _film->log()->log ( + String::compose ( + "Could not remove existing audio MXF file %1 (%2)", + _film->file (_film->audio_mxf_filename ()), + ec.value ()) + ); } _sound_asset.reset (new libdcp::SoundAsset (_film->directory (), _film->audio_mxf_filename ())); -- cgit v1.2.3 From 90f122da87efc3c6398b43292a9756e7f5765f25 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 10 Jan 2014 10:25:07 +0000 Subject: Try to fix double are-you-sure prompt on closing with active jobs. --- ChangeLog | 4 ++++ src/tools/dcpomatic.cc | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/ChangeLog b/ChangeLog index 7b5a548b8..e912c796a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-01-10 Carl Hetherington + + * Try to fix double "are you sure" prompt on quitting with active jobs. + 2014-01-09 Carl Hetherington * Version 1.61.1 released. diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 111b5769d..1e60d9690 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -429,11 +429,6 @@ private: void file_exit () { - if (!should_close ()) { - return; - } - - maybe_save_then_delete_film (); Close (true); } -- cgit v1.2.3 From 3c76bbafc804456e99e9e6a82ff5698bae7349a9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 10 Jan 2014 10:26:02 +0000 Subject: Add a _full_condition to so that ::write() sleeps if there is lots of writing to do already. --- ChangeLog | 3 +++ src/lib/writer.cc | 27 +++++++++++++++++++++------ src/lib/writer.h | 6 ++++-- 3 files changed, 28 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/ChangeLog b/ChangeLog index e912c796a..361eea36a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-01-10 Carl Hetherington + * Try to stop the queue of things to write filling up excessively + on fast CPUs. + * Try to fix double "are you sure" prompt on quitting with active jobs. 2014-01-09 Carl Hetherington diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 01bb2525e..cc3b87596 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -129,6 +129,10 @@ Writer::write (shared_ptr encoded, int frame, Eyes eyes) { boost::mutex::scoped_lock lock (_mutex); + while (_queued_full_in_memory > _maximum_frames_in_memory) { + _full_condition.wait (lock); + } + QueueItem qi; qi.type = QueueItem::FULL; qi.encoded = encoded; @@ -148,7 +152,7 @@ Writer::write (shared_ptr encoded, int frame, Eyes eyes) ++_queued_full_in_memory; } - _condition.notify_all (); + _empty_condition.notify_all (); } void @@ -156,6 +160,10 @@ Writer::fake_write (int frame, Eyes eyes) { boost::mutex::scoped_lock lock (_mutex); + while (_queued_full_in_memory > _maximum_frames_in_memory) { + _full_condition.wait (lock); + } + FILE* ifi = fopen_boost (_film->info_path (frame, eyes), "r"); libdcp::FrameInfo info (ifi); fclose (ifi); @@ -174,7 +182,7 @@ Writer::fake_write (int frame, Eyes eyes) _queue.push_back (qi); } - _condition.notify_all (); + _empty_condition.notify_all (); } /** This method is not thread safe */ @@ -229,7 +237,7 @@ try } TIMING (N_("writer sleeps with a queue of %1"), _queue.size()); - _condition.wait (lock); + _empty_condition.wait (lock); TIMING (N_("writer wakes with a queue of %1"), _queue.size()); } @@ -345,7 +353,8 @@ Writer::finish () boost::mutex::scoped_lock lock (_mutex); _finish = true; - _condition.notify_all (); + _empty_condition.notify_all (); + _full_condition.notify_all (); lock.unlock (); _thread->join (); @@ -433,7 +442,9 @@ Writer::finish () meta.set_issue_date_now (); dcp.write_xml (_film->interop (), meta, _film->is_signed() ? make_signer () : shared_ptr ()); - _film->log()->log (String::compose (N_("Wrote %1 FULL, %2 FAKE, %3 REPEAT; %4 pushed to disk"), _full_written, _fake_written, _repeat_written, _pushed_to_disk)); + _film->log()->log ( + String::compose (N_("Wrote %1 FULL, %2 FAKE, %3 REPEAT; %4 pushed to disk"), _full_written, _fake_written, _repeat_written, _pushed_to_disk) + ); } /** Tell the writer that frame `f' should be a repeat of the frame before it */ @@ -442,6 +453,10 @@ Writer::repeat (int f, Eyes e) { boost::mutex::scoped_lock lock (_mutex); + while (_queued_full_in_memory > _maximum_frames_in_memory) { + _full_condition.wait (lock); + } + QueueItem qi; qi.type = QueueItem::REPEAT; qi.frame = f; @@ -455,7 +470,7 @@ Writer::repeat (int f, Eyes e) _queue.push_back (qi); } - _condition.notify_all (); + _empty_condition.notify_all (); } bool diff --git a/src/lib/writer.h b/src/lib/writer.h index 842d6a55d..e2807d712 100644 --- a/src/lib/writer.h +++ b/src/lib/writer.h @@ -103,8 +103,10 @@ private: int _queued_full_in_memory; /** mutex for thread state */ mutable boost::mutex _mutex; - /** condition to manage thread wakeups */ - boost::condition _condition; + /** condition to manage thread wakeups when we have nothing to do */ + boost::condition _empty_condition; + /** condition to manage thread wakeups when we have too much to do */ + boost::condition _full_condition; /** the data of the last written frame, or 0 if there isn't one */ boost::shared_ptr _last_written[EYES_COUNT]; /** the index of the last written frame */ -- cgit v1.2.3 From 3ace8d6c8400939a6b66743fe395a0c16a90ecf2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 10 Jan 2014 10:29:44 +0000 Subject: Fix daft mistake in ordering with audio MXF deletion saga. --- src/lib/writer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/writer.cc b/src/lib/writer.cc index cc3b87596..b93a26bb0 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -91,8 +91,6 @@ Writer::Writer (shared_ptr f, weak_ptr j) _picture_asset->set_key (_film->key ()); } - _picture_asset_writer = _picture_asset->start_write (_first_nonexistant_frame > 0); - /* Write the sound asset into the film directory so that we leave the creation of the DCP directory until the last minute. Some versions of windows inexplicably don't like overwriting existing files here, so try to remove it using boost. @@ -108,6 +106,8 @@ Writer::Writer (shared_ptr f, weak_ptr j) ); } + _picture_asset_writer = _picture_asset->start_write (_first_nonexistant_frame > 0); + _sound_asset.reset (new libdcp::SoundAsset (_film->directory (), _film->audio_mxf_filename ())); _sound_asset->set_edit_rate (_film->video_frame_rate ()); _sound_asset->set_channels (_film->audio_channels ()); -- cgit v1.2.3 From 0523d4a83d7d334560d261686bdb329eea8bfb96 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 10 Jan 2014 10:56:34 +0000 Subject: Missing signal of _full_condition mutex. --- src/lib/writer.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/lib/writer.cc b/src/lib/writer.cc index b93a26bb0..558eda97e 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -337,6 +337,8 @@ try qi.encoded.reset (); --_queued_full_in_memory; } + + _full_condition.notify_all (); } } catch (...) -- cgit v1.2.3 From b0b5d621c851ea22f5328fcb4d212936d670804f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 10 Jan 2014 14:13:56 +0000 Subject: More windows debug. --- src/lib/writer.cc | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 558eda97e..cfc19a13d 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -45,6 +45,7 @@ using std::pair; using std::string; using std::list; using std::cout; +using std::stringstream; using boost::shared_ptr; using boost::weak_ptr; @@ -91,6 +92,17 @@ Writer::Writer (shared_ptr f, weak_ptr j) _picture_asset->set_key (_film->key ()); } + _picture_asset_writer = _picture_asset->start_write (_first_nonexistant_frame > 0); + + _sound_asset.reset (new libdcp::SoundAsset (_film->directory (), _film->audio_mxf_filename ())); + _sound_asset->set_edit_rate (_film->video_frame_rate ()); + _sound_asset->set_channels (_film->audio_channels ()); + _sound_asset->set_sampling_rate (_film->audio_frame_rate ()); + + if (_film->encrypted ()) { + _sound_asset->set_key (_film->key ()); + } + /* Write the sound asset into the film directory so that we leave the creation of the DCP directory until the last minute. Some versions of windows inexplicably don't like overwriting existing files here, so try to remove it using boost. @@ -98,25 +110,32 @@ Writer::Writer (shared_ptr f, weak_ptr j) boost::system::error_code ec; boost::filesystem::remove_all (_film->file (_film->audio_mxf_filename ()), ec); if (ec) { + + stringstream s; + boost::filesystem::path p = _film->file (_film->audio_mxf_filename ()); + s << p << "\n" + << "exists=" << boost::filesystem::exists (p) << "\n" + << "file_size=" << boost::filesystem::file_size (p) << "\n" + << "hard_link_count=" << boost::filesystem::hard_link_count (p) << "\n" + << "is_directory=" << boost::filesystem::is_directory (p) << "\n" + << "is_empty=" << boost::filesystem::is_empty (p) << "\n" + << "is_other=" << boost::filesystem::is_other (p) << "\n" + << "is_regular_file=" << boost::filesystem::is_regular_file (p) << "\n" + << "last_write_time=" << boost::filesystem::last_write_time (p) << "\n" + << "type=" << boost::filesystem::status (p).type () << "\n" + << "permissions=" << boost::filesystem::status (p).permissions () << "\n"; + + _film->log()->log (s.str ()); + _film->log()->log ( String::compose ( "Could not remove existing audio MXF file %1 (%2)", _film->file (_film->audio_mxf_filename ()), - ec.value ()) + ec.value () + ) ); } - _picture_asset_writer = _picture_asset->start_write (_first_nonexistant_frame > 0); - - _sound_asset.reset (new libdcp::SoundAsset (_film->directory (), _film->audio_mxf_filename ())); - _sound_asset->set_edit_rate (_film->video_frame_rate ()); - _sound_asset->set_channels (_film->audio_channels ()); - _sound_asset->set_sampling_rate (_film->audio_frame_rate ()); - - if (_film->encrypted ()) { - _sound_asset->set_key (_film->key ()); - } - _sound_asset_writer = _sound_asset->start_write (); _thread = new boost::thread (boost::bind (&Writer::thread, this)); -- cgit v1.2.3 From d37c1c35b36a28a3e3bbec6c21721f16f8e4aa48 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 11 Jan 2014 18:37:15 +0000 Subject: Destroy Transcoder when cancelling transcode jobs; this closes the audio MXF so it can be overwritten, even on Windows. --- ChangeLog | 5 ++++ src/lib/encoder.cc | 3 --- src/lib/transcode_job.cc | 9 ++++---- src/lib/writer.cc | 59 +++++++++++++++++------------------------------- src/lib/writer.h | 2 ++ 5 files changed, 32 insertions(+), 46 deletions(-) (limited to 'src') diff --git a/ChangeLog b/ChangeLog index 2972c6caa..0a353e57a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-01-11 Carl Hetherington + + * Hopefully fix error on restarting a cancelled transcode job + on Windows. + 2014-01-10 Carl Hetherington * Version 1.62.2 released. diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc index b78bcaeea..fbec3e4d0 100644 --- a/src/lib/encoder.cc +++ b/src/lib/encoder.cc @@ -68,9 +68,6 @@ Encoder::Encoder (shared_ptr f, weak_ptr j) Encoder::~Encoder () { terminate_threads (); - if (_writer) { - _writer->finish (); - } } /** Add a worker thread for a each thread on a remote server. Caller must hold diff --git a/src/lib/transcode_job.cc b/src/lib/transcode_job.cc index fd69b08e7..87fd5daef 100644 --- a/src/lib/transcode_job.cc +++ b/src/lib/transcode_job.cc @@ -64,12 +64,11 @@ TranscodeJob::run () _film->log()->log (N_("Transcode job completed successfully")); - } catch (std::exception& e) { - + } catch (...) { set_progress (1); set_state (FINISHED_ERROR); - _film->log()->log (String::compose (N_("Transcode job failed (%1)"), e.what())); - + _film->log()->log (N_("Transcode job failed or cancelled")); + _transcoder.reset (); throw; } } @@ -78,7 +77,7 @@ string TranscodeJob::status () const { if (!_transcoder) { - return _("0%"); + return Job::status (); } float const fps = _transcoder->current_encoding_rate (); diff --git a/src/lib/writer.cc b/src/lib/writer.cc index cfc19a13d..572a1c3a4 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -104,38 +104,8 @@ Writer::Writer (shared_ptr f, weak_ptr j) } /* Write the sound asset into the film directory so that we leave the creation - of the DCP directory until the last minute. Some versions of windows inexplicably - don't like overwriting existing files here, so try to remove it using boost. + of the DCP directory until the last minute. */ - boost::system::error_code ec; - boost::filesystem::remove_all (_film->file (_film->audio_mxf_filename ()), ec); - if (ec) { - - stringstream s; - boost::filesystem::path p = _film->file (_film->audio_mxf_filename ()); - s << p << "\n" - << "exists=" << boost::filesystem::exists (p) << "\n" - << "file_size=" << boost::filesystem::file_size (p) << "\n" - << "hard_link_count=" << boost::filesystem::hard_link_count (p) << "\n" - << "is_directory=" << boost::filesystem::is_directory (p) << "\n" - << "is_empty=" << boost::filesystem::is_empty (p) << "\n" - << "is_other=" << boost::filesystem::is_other (p) << "\n" - << "is_regular_file=" << boost::filesystem::is_regular_file (p) << "\n" - << "last_write_time=" << boost::filesystem::last_write_time (p) << "\n" - << "type=" << boost::filesystem::status (p).type () << "\n" - << "permissions=" << boost::filesystem::status (p).permissions () << "\n"; - - _film->log()->log (s.str ()); - - _film->log()->log ( - String::compose ( - "Could not remove existing audio MXF file %1 (%2)", - _film->file (_film->audio_mxf_filename ()), - ec.value () - ) - ); - } - _sound_asset_writer = _sound_asset->start_write (); _thread = new boost::thread (boost::bind (&Writer::thread, this)); @@ -143,6 +113,11 @@ Writer::Writer (shared_ptr f, weak_ptr j) job->sub (_("Encoding image data")); } +Writer::~Writer () +{ + terminate_thread (false); +} + void Writer::write (shared_ptr encoded, int frame, Eyes eyes) { @@ -366,23 +341,31 @@ catch (...) } void -Writer::finish () +Writer::terminate_thread (bool can_throw) { - if (!_thread) { - return; - } - boost::mutex::scoped_lock lock (_mutex); _finish = true; _empty_condition.notify_all (); _full_condition.notify_all (); lock.unlock (); - _thread->join (); - rethrow (); + _thread->join (); + if (can_throw) { + rethrow (); + } delete _thread; _thread = 0; +} + +void +Writer::finish () +{ + if (!_thread) { + return; + } + + terminate_thread (true); _picture_asset_writer->finalize (); _sound_asset_writer->finalize (); diff --git a/src/lib/writer.h b/src/lib/writer.h index e2807d712..7af79a417 100644 --- a/src/lib/writer.h +++ b/src/lib/writer.h @@ -71,6 +71,7 @@ class Writer : public ExceptionStore, public boost::noncopyable { public: Writer (boost::shared_ptr, boost::weak_ptr); + ~Writer (); bool can_fake_write (int) const; @@ -83,6 +84,7 @@ public: private: void thread (); + void terminate_thread (bool); void check_existing_picture_mxf (); bool check_existing_picture_mxf_frame (FILE *, int, Eyes); bool have_sequenced_image_at_queue_head (); -- cgit v1.2.3 From bea8adc8856efac19e996d32bbb6e85bfb5b614b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 12 Jan 2014 23:17:20 +0000 Subject: Missing LocaleGuards. --- ChangeLog | 13 ++----------- src/wx/audio_mapping_view.cc | 4 ++++ 2 files changed, 6 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/ChangeLog b/ChangeLog index 0a353e57a..3e9b9fe58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,6 @@ -2014-01-11 Carl Hetherington +2014-01-12 Carl Hetherington - * Hopefully fix error on restarting a cancelled transcode job - on Windows. - -2014-01-10 Carl Hetherington - - * Version 1.62.2 released. - -2014-01-10 Carl Hetherington - - * Version 1.62.1 released. + * Fix crashes when using -3dB options in locales with a , decimal separator. 2014-01-10 Carl Hetherington diff --git a/src/wx/audio_mapping_view.cc b/src/wx/audio_mapping_view.cc index 9fa57a1b1..c08da0912 100644 --- a/src/wx/audio_mapping_view.cc +++ b/src/wx/audio_mapping_view.cc @@ -58,6 +58,8 @@ public: void Draw (wxGrid& grid, wxGridCellAttr &, wxDC& dc, const wxRect& rect, int row, int col, bool) { + LocaleGuard lg; + dc.SetPen (*wxThePenList->FindOrCreatePen (wxColour (255, 255, 255), 1, wxPENSTYLE_SOLID)); dc.SetBrush (*wxTheBrushList->FindOrCreateBrush (wxColour (255, 255, 255), wxBRUSHSTYLE_SOLID)); dc.DrawRectangle (rect); @@ -222,6 +224,8 @@ AudioMappingView::set (AudioMapping map) void AudioMappingView::update_cells () { + LocaleGuard lg; + if (_grid->GetNumberRows ()) { _grid->DeleteRows (0, _grid->GetNumberRows ()); } -- cgit v1.2.3 From e60b1a4c5addabc85bbe2fff685c28561941f8e1 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 12 Jan 2014 23:44:31 +0000 Subject: Fix recently-introduced crash on double-terminating the Writer thread. --- src/lib/writer.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 572a1c3a4..7fd746488 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -344,6 +344,10 @@ void Writer::terminate_thread (bool can_throw) { boost::mutex::scoped_lock lock (_mutex); + if (_thread == 0) { + return; + } + _finish = true; _empty_condition.notify_all (); _full_condition.notify_all (); -- cgit v1.2.3 From 7d424ea7e085e5380e5dcbfd2f268adb67cb0e44 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 13 Jan 2014 09:29:10 +0000 Subject: Change 4:3 and 5:3 ratios to be precise rather than 1.33:1 and 1.66:1, and also tweak 1.19:1 (#306). --- ChangeLog | 5 ++++- src/lib/ratio.cc | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/ChangeLog b/ChangeLog index ef132e58d..b35298c88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,14 @@ 2014-01-13 Carl Hetherington + * Change 4:3 and 5:3 ratios to be precise rather than 1.33:1 and 1.66:1, and + also tweak 1.19:1 (#306). + * Version 1.63.0 released. 2014-01-12 Carl Hetherington * Fix crashes when using -3dB options in locales with a , decimal separator. - + * Version 1.62.3 released. 2014-01-11 Carl Hetherington diff --git a/src/lib/ratio.cc b/src/lib/ratio.cc index 41abbb760..a47b2101e 100644 --- a/src/lib/ratio.cc +++ b/src/lib/ratio.cc @@ -32,11 +32,11 @@ vector Ratio::_ratios; void Ratio::setup_ratios () { - _ratios.push_back (new Ratio (float(1285) / 1080, "119", _("1.19"), "F")); - _ratios.push_back (new Ratio (float(1436) / 1080, "133", _("4:3"), "F")); + _ratios.push_back (new Ratio (float(1290) / 1080, "119", _("1.19"), "F")); + _ratios.push_back (new Ratio (float(1440) / 1080, "133", _("4:3"), "F")); _ratios.push_back (new Ratio (float(1480) / 1080, "137", _("Academy"), "F")); _ratios.push_back (new Ratio (float(1485) / 1080, "138", _("1.375"), "F")); - _ratios.push_back (new Ratio (float(1793) / 1080, "166", _("1.66"), "F")); + _ratios.push_back (new Ratio (float(1800) / 1080, "166", _("1.66"), "F")); _ratios.push_back (new Ratio (float(1920) / 1080, "178", _("16:9"), "F")); _ratios.push_back (new Ratio (float(1998) / 1080, "185", _("Flat"), "F")); _ratios.push_back (new Ratio (float(2048) / 858, "239", _("Scope"), "S")); -- cgit v1.2.3 From 164f71186d80798b55fad2f463918b8c514df21e Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 13 Jan 2014 21:44:03 +0000 Subject: Set focus to name field in new film dialog (#308). --- src/wx/new_film_dialog.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/wx/new_film_dialog.cc b/src/wx/new_film_dialog.cc index be5af999e..e0ad2c457 100644 --- a/src/wx/new_film_dialog.cc +++ b/src/wx/new_film_dialog.cc @@ -67,6 +67,8 @@ NewFilmDialog::NewFilmDialog (wxWindow* parent) overall_sizer->Layout (); overall_sizer->SetSizeHints (this); + + _name->SetFocus (); } NewFilmDialog::~NewFilmDialog () -- cgit v1.2.3 From 057400eb1718e8769592e34e07d90405eb95605f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 14 Jan 2014 10:39:07 +0000 Subject: Scale subtitle times with frame rate change if they are part of a piece of video content. --- ChangeLog | 5 +++++ src/lib/ffmpeg_decoder.cc | 2 +- src/lib/player.cc | 15 +++++++++++++-- 3 files changed, 19 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/ChangeLog b/ChangeLog index b35298c88..fadc8f509 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-01-14 Carl Hetherington + + * Try to fix subtitle problems when the video frame rate is being changed + from content to DCP. + 2014-01-13 Carl Hetherington * Change 4:3 and 5:3 ratios to be precise rather than 1.33:1 and 1.66:1, and diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index b672b2c1f..a6f9a17c3 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -556,7 +556,7 @@ FFmpegDecoder::decode_subtitle_packet () source that we may have chopped off for the DCP) */ double const packet_time = (static_cast (sub.pts ) / AV_TIME_BASE) + _video_pts_offset; - + /* hence start time for this sub */ Time const from = (packet_time + (double (sub.start_display_time) / 1e3)) * TIME_HZ; Time const to = (packet_time + (double (sub.end_display_time) / 1e3)) * TIME_HZ; diff --git a/src/lib/player.cc b/src/lib/player.cc index 9f8599693..56145f5bd 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -292,6 +292,7 @@ Player::process_video (weak_ptr weak_piece, shared_ptr image pi->set_subtitle (_out_subtitle.image, _out_subtitle.position + container_offset); } + #ifdef DCPOMATIC_DEBUG _last_video = piece->content; @@ -683,8 +684,18 @@ Player::update_subtitle () _in_subtitle.image->pixel_format (), true ); - _out_subtitle.from = _in_subtitle.from + piece->content->position (); - _out_subtitle.to = _in_subtitle.to + piece->content->position (); + + /* XXX: hack */ + Time from = _in_subtitle.from; + Time to = _in_subtitle.to; + shared_ptr vc = dynamic_pointer_cast (piece->content); + if (vc) { + from = rint (from * vc->video_frame_rate() / _film->video_frame_rate()); + to = rint (to * vc->video_frame_rate() / _film->video_frame_rate()); + } + + _out_subtitle.from = from * piece->content->position (); + _out_subtitle.to = to + piece->content->position (); } /** Re-emit the last frame that was emitted, using current settings for crop, ratio, scaler and subtitles. -- cgit v1.2.3 From f9290d2981cdc71f6e7092ced757a7362a93cfc2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 14 Jan 2014 11:23:24 +0000 Subject: Untested windows version info in make_dcp log. --- src/lib/film.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/lib/film.cc b/src/lib/film.cc index 8586d4b73..1290cbda2 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -265,6 +265,14 @@ Film::make_dcp () #else log()->log ("libdcp built in optimised mode."); #endif + +#ifdef DCPOMATIC_WINDOWS + OSVERSIONINFO info; + info.dwOSVersionInfoSize = sizeof (info); + GetVersionEx (&info); + log()->log (String::compose ("Windows version %1.%2.%3 SP %4", info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber, info.szCSDVersion)); +#endif + log()->log (String::compose ("CPU: %1, %2 processors", cpu_info(), boost::thread::hardware_concurrency ())); list > const m = mount_info (); for (list >::const_iterator i = m.begin(); i != m.end(); ++i) { -- cgit v1.2.3 From bac6c3d236358b1eead9ad4ee154e12d03edb3fa Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 14 Jan 2014 19:10:58 +0000 Subject: Updated de_DE translation from Markus Raab. --- ChangeLog | 2 ++ src/lib/po/de_DE.po | 4 ++-- src/tools/po/de_DE.po | 11 ++++++----- src/wx/po/de_DE.po | 42 ++++++++++++++++++++---------------------- 4 files changed, 30 insertions(+), 29 deletions(-) (limited to 'src') diff --git a/ChangeLog b/ChangeLog index 4776158d6..fd2061a14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-01-14 Carl Hetherington + * Updated de_DE translation from Markus Raab. + * Version 1.63.1 released. 2014-01-14 Carl Hetherington diff --git a/src/lib/po/de_DE.po b/src/lib/po/de_DE.po index 3d8a26f66..acb666099 100644 --- a/src/lib/po/de_DE.po +++ b/src/lib/po/de_DE.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-07 20:01+0000\n" -"PO-Revision-Date: 2014-01-05 23:06+0100\n" +"PO-Revision-Date: 2014-01-14 19:45+0100\n" "Last-Translator: \n" "Language-Team: LANGUAGE \n" "Language: de\n" @@ -603,7 +603,7 @@ msgstr "Bild-Decoder nicht gefunden" #: src/lib/writer.cc:387 msgid "could not move audio MXF into the DCP (%1)" -msgstr "" +msgstr "Ton MXF kann nicht in das DCP verschoben werden (%1)" #: src/lib/sndfile_decoder.cc:45 msgid "could not open audio file for reading" diff --git a/src/tools/po/de_DE.po b/src/tools/po/de_DE.po index 8604e2a4c..2de6cb871 100644 --- a/src/tools/po/de_DE.po +++ b/src/tools/po/de_DE.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-07 20:01+0000\n" -"PO-Revision-Date: 2014-01-02 13:17+0100\n" +"PO-Revision-Date: 2014-01-14 19:49+0100\n" "Last-Translator: \n" "Language-Team: LANGUAGE \n" "Language: de\n" @@ -86,7 +86,7 @@ msgstr "Über DCP-o-matic" #: src/tools/dcpomatic.cc:230 msgid "Check for updates" -msgstr "" +msgstr "Auf Updates überprüfen" #: src/tools/dcpomatic.cc:638 msgid "Could not load film %1 (%2)" @@ -111,7 +111,6 @@ msgid "DCP-o-matic" msgstr "DCP-o-matic" #: src/tools/dcpomatic.cc:229 -#, fuzzy msgid "Encoding servers..." msgstr "Encoding Server..." @@ -150,10 +149,12 @@ msgid "" "The DCP for this film will take up about %.1f Gb, and the disk that you are " "using only has %.1f Gb available. Do you want to continue anyway?" msgstr "" +"Das DCP für diesen Film wird etwa %.1f GB groß. Auf dem ausgewählten " +"Laufwerk sind aber nur %.1f GB frei. Möchten Sie trotzdem weitermachen ?" #: src/tools/dcpomatic.cc:729 msgid "The DCP-o-matic download server could not be contacted." -msgstr "" +msgstr "Der DCP-o-matic Download Server ist nicht erreichbar." #: src/tools/dcpomatic.cc:356 msgid "" @@ -165,7 +166,7 @@ msgstr "" #: src/tools/dcpomatic.cc:724 msgid "There are no new versions of DCP-o-matic available." -msgstr "" +msgstr "Es ist keine neue Version des DCP-o-matic verfügbar." #: src/tools/dcpomatic.cc:558 msgid "There are unfinished jobs; are you sure you want to quit?" diff --git a/src/wx/po/de_DE.po b/src/wx/po/de_DE.po index 5a1046524..58923196d 100644 --- a/src/wx/po/de_DE.po +++ b/src/wx/po/de_DE.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-01-07 20:01+0000\n" -"PO-Revision-Date: 2014-01-05 23:08+0100\n" +"PO-Revision-Date: 2014-01-14 20:00+0100\n" "Last-Translator: \n" "Language-Team: LANGUAGE \n" "Language: de\n" @@ -38,7 +38,7 @@ msgstr "(DCP-o-matic zum ändern der Sprache neu starten)" #: src/wx/audio_mapping_view.cc:133 msgid "-3dB" -msgstr "" +msgstr "-3dB" #: src/wx/colour_conversion_editor.cc:83 msgid "1 / " @@ -74,7 +74,7 @@ msgstr "4K" #: src/wx/update_dialog.cc:34 msgid "A new version of DCP-o-matic is available." -msgstr "" +msgstr "Es ist eine neue Version von DCP-o-matic verfügbar." #: src/wx/about_dialog.cc:30 msgid "About DCP-o-matic" @@ -129,6 +129,7 @@ msgstr "Ton Kanäle" msgid "" "Audio will be passed from content channel %d to DCP channel %d unaltered." msgstr "" +"Der Ton von Kanal %d wird ohne Veränderung an das DCP Kanal %d weitergegeben." #: src/wx/audio_mapping_view.cc:324 #, c-format @@ -136,6 +137,8 @@ msgid "" "Audio will be passed from content channel %d to DCP channel %d with gain " "%.1fdB." msgstr "" +"Der Ton von Kanal %d wird wird an das DCP Kanal %d mit %.1fdB Pegel " +"weitergegeben." #: src/wx/job_wrapper.cc:38 #, c-format @@ -167,9 +170,8 @@ msgid "Cancel" msgstr "Abbrechen" #: src/wx/audio_gain_dialog.cc:26 -#, fuzzy msgid "Channel gain" -msgstr "Kanäle" +msgstr "Kanal Pegel" #: src/wx/audio_dialog.cc:44 msgid "Channels" @@ -177,11 +179,11 @@ msgstr "Kanäle" #: src/wx/config_dialog.cc:143 msgid "Check for testing updates as well as stable ones" -msgstr "" +msgstr "Überprüfung auf Updates auch für Test-Versionen." #: src/wx/config_dialog.cc:139 msgid "Check for updates on startup" -msgstr "" +msgstr "Beim Starten auf Updates überprüfen." #: src/wx/content_menu.cc:182 msgid "Choose a file" @@ -349,9 +351,8 @@ msgid "Edit..." msgstr "Bearbeiten..." #: src/wx/cinema_dialog.cc:35 -#, fuzzy msgid "Email address for KDM delivery" -msgstr "Von Adresse für KDM Emails" +msgstr "Email Adresse für KDM Zustellung" #: src/wx/servers_list_dialog.cc:30 msgid "Encoding Servers" @@ -411,7 +412,7 @@ msgstr "Von Adresse für KDM Emails" #: src/wx/audio_mapping_view.cc:132 msgid "Full" -msgstr "" +msgstr "Ein" #: src/wx/timing_panel.cc:42 msgid "Full length" @@ -424,7 +425,7 @@ msgstr "Lautstärken Rechner" #: src/wx/audio_gain_dialog.cc:31 #, c-format msgid "Gain for content channel %d in DCP channel %d" -msgstr "" +msgstr "Pegel des Kanals %d im DCP Kanal %d" #: src/wx/properties_dialog.cc:57 msgid "Gb" @@ -557,12 +558,12 @@ msgstr "Neuer Film" #: src/wx/update_dialog.cc:36 msgid "New versions of DCP-o-matic are available." -msgstr "" +msgstr "Eine neue Version von DCP-o-matic ist verfügbar." #: src/wx/audio_mapping_view.cc:319 #, c-format msgid "No audio will be passed from content channel %d to DCP channel %d." -msgstr "" +msgstr "Der Ton von Kanal %d wird nicht an das DCP Kanal %d weitergegeben." #: src/wx/video_panel.cc:198 msgid "No stretch" @@ -574,7 +575,7 @@ msgstr "Kein" #: src/wx/audio_mapping_view.cc:131 msgid "Off" -msgstr "" +msgstr "Aus" #: src/wx/config_dialog.cc:119 msgid "Outgoing mail server" @@ -668,7 +669,7 @@ msgstr "Neustart" #: src/wx/audio_mapping_view.cc:327 msgid "Right click to change gain." -msgstr "" +msgstr "Rechtsklick für Pegeländerung" #: src/wx/video_panel.cc:101 msgid "Right crop" @@ -732,9 +733,8 @@ msgid "Snap" msgstr "Einschnappen" #: src/wx/update_dialog.cc:43 -#, fuzzy msgid "Stable version " -msgstr "Inhalt Version" +msgstr "Stabile Version" #: src/wx/film_editor.cc:185 msgid "Standard" @@ -781,9 +781,8 @@ msgid "Territory (e.g. UK)" msgstr "Gebiet (z.B. UK)" #: src/wx/update_dialog.cc:48 -#, fuzzy msgid "Test version " -msgstr "Inhalt Version" +msgstr "Test Version" #: src/wx/content_menu.cc:223 msgid "" @@ -853,7 +852,7 @@ msgstr "Nach oben" #: src/wx/update_dialog.cc:27 msgid "Update" -msgstr "" +msgstr "Update" #: src/wx/film_editor.cc:126 msgid "Use DCI name" @@ -880,9 +879,8 @@ msgid "Video" msgstr "Bild" #: src/wx/timing_panel.cc:56 -#, fuzzy msgid "Video frame rate" -msgstr "Bild Rate" +msgstr "Bildwiederholrate" #: src/wx/subtitle_panel.cc:39 msgid "With Subtitles" -- cgit v1.2.3 From 04cca7e8804b179be3ecb0d2b97d4d69e7fffede Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 14 Jan 2014 22:16:19 +0000 Subject: Don't take into account audio decoders with no audio when updating audio_done_up_to, otherwise it will await audio from those decoders that never comes. --- ChangeLog | 3 +++ src/lib/player.cc | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/ChangeLog b/ChangeLog index fd2061a14..99ef9f218 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2014-01-14 Carl Hetherington + * Fix problems with adding new soundtracks to FFmpeg content with + no audio track. + * Updated de_DE translation from Markus Raab. * Version 1.63.1 released. diff --git a/src/lib/player.cc b/src/lib/player.cc index 56145f5bd..ce5109733 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -224,7 +224,8 @@ Player::pass () continue; } - if (dynamic_pointer_cast ((*i)->decoder)) { + shared_ptr ad = dynamic_pointer_cast ((*i)->decoder); + if (ad && ad->has_audio ()) { audio_done_up_to = min (audio_done_up_to.get_value_or (TIME_MAX), (*i)->audio_position); } } -- cgit v1.2.3 From f71a23109d774dc65e4262e5dba41360732cf342 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 15 Jan 2014 09:52:32 +0000 Subject: Set interop flags on assets, not just the DCP/CPL's XML. --- ChangeLog | 4 ++++ src/lib/writer.cc | 2 ++ 2 files changed, 6 insertions(+) (limited to 'src') diff --git a/ChangeLog b/ChangeLog index 138f18af6..d2c10fb55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-01-15 Carl Hetherington + + * Hopefully fix badly-labelled MXFs when in Interop mode. + 2014-01-14 Carl Hetherington * Version 1.63.2 released. diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 7fd746488..c2a6c981b 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -87,6 +87,7 @@ Writer::Writer (shared_ptr f, weak_ptr j) _picture_asset->set_edit_rate (_film->video_frame_rate ()); _picture_asset->set_size (fit_ratio_within (_film->container()->ratio(), _film->full_frame ())); + _picture_asset->set_interop (_film->interop ()); if (_film->encrypted ()) { _picture_asset->set_key (_film->key ()); @@ -98,6 +99,7 @@ Writer::Writer (shared_ptr f, weak_ptr j) _sound_asset->set_edit_rate (_film->video_frame_rate ()); _sound_asset->set_channels (_film->audio_channels ()); _sound_asset->set_sampling_rate (_film->audio_frame_rate ()); + _sound_asset->set_interop (_film->interop ()); if (_film->encrypted ()) { _sound_asset->set_key (_film->key ()); -- cgit v1.2.3