Merge master.
authorCarl Hetherington <cth@carlh.net>
Wed, 22 Oct 2014 09:10:54 +0000 (10:10 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 22 Oct 2014 09:10:54 +0000 (10:10 +0100)
1  2 
ChangeLog
debian/changelog
src/lib/ffmpeg.cc
src/wx/about_dialog.cc

diff --combined ChangeLog
index 873ad89dffe7361b40e682306fd9abd0c55ebb09,ed089ba54ee398449a92d5e0842b21ade3775036..78d6eb4d78d5e7e9616219a5341390c7462a1911
+++ b/ChangeLog
@@@ -1,3 -1,12 +1,12 @@@
+ 2014-10-22  Carl Hetherington  <cth@carlh.net>
+       * Version 1.76.3 released.
+ 2014-10-22  Carl Hetherington  <cth@carlh.net>
+       * Fix bug where some files from iTunes would
+       be read as being at 90,000fps.
  2014-10-20  Carl Hetherington  <cth@carlh.net>
  
        * Version 1.76.2 released.
        * Make server finding more reliable when
        there are more than a few servers.
  
 +2014-10-05  Carl Hetherington  <cth@carlh.net>
 +
 +      * Use a more sensible default position and size for
 +      .srt subs.
 +
 +2014-10-03  Carl Hetherington  <cth@carlh.net>
 +
 +      * Version 2.0.14 released.
 +
 +2014-10-01  Carl Hetherington  <cth@carlh.net>
 +
 +      * Version 2.0.13 released.
 +
 +2014-09-30  Carl Hetherington  <cth@carlh.net>
 +
 +      * Version 2.0.12 released.
 +
 +2014-09-30  Carl Hetherington  <cth@carlh.net>
 +
 +      * Add basic video fade in/out.
 +
 +2014-09-22  Carl Hetherington  <cth@carlh.net>
 +
 +      * Version 2.0.11 released.
 +
 +2014-09-18  Carl Hetherington  <cth@carlh.net>
 +
 +      * Version 2.0.10 released.
 +
  2014-10-08  Carl Hetherington  <cth@carlh.net>
  
        * Version 1.74.2 released.
  
  2014-09-12  Carl Hetherington  <cth@carlh.net>
  
 +      * Version 2.0.9 released.
 +
 +2014-09-12  Carl Hetherington  <cth@carlh.net>
 +
 +      * Add "re-examine" option to content context menu (#339).
 +
 +2014-09-11  Carl Hetherington  <cth@carlh.net>
 +
 +      * 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  <cth@carlh.net>
  
        * Fix hidden advanced preferences button in some locales.
  
 -2014-09-08  Carl Hetherington  <cth@carlh.net>
 +      * Version 2.0.8 released.
 +
 +2014-09-10  Carl Hetherington  <cth@carlh.net>
 +
 +      * Fix loading of 1.x films.
 +
 +      * Fix crash on audio analysis in some cases.
  
 -      * Version 1.73.4 released.
 +2014-09-09  Carl Hetherington  <cth@carlh.net>
 +
 +      * Version 2.0.7 released.
 +
 +2014-09-09  Carl Hetherington  <cth@carlh.net>
 +
 +      * Version 2.0.6 released.
 +
 +2014-09-09  Carl Hetherington  <cth@carlh.net>
 +
 +      * 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  <cth@carlh.net>
  
 -      * Fix failure to load Targa files.
 +      * Version 2.0.5 released.
  
 -2014-09-07  Carl Hetherington  <cth@carlh.net>
 +      * Fix hidden advanced preferences button in some locales.
 +
 +2014-09-08  Carl Hetherington  <cth@carlh.net>
  
 -      * Version 1.73.3 released.
 +      * Fix failure to load Targa files.
  
  2014-09-07  Carl Hetherington  <cth@carlh.net>
  
  
        * Fix a few bad fuzzy translations from the preferences dialog.
  
 -2014-09-03  Carl Hetherington  <cth@carlh.net>
 -
 -      * Version 1.73.2 released.
 -
  2014-09-03  Carl Hetherington  <cth@carlh.net>
  
        * Fix server certificate downloads on OS X (#376).
  
  2014-08-29  Carl Hetherington  <cth@carlh.net>
  
 +      * Version 2.0.4 released.
 +
 +2014-08-24  Carl Hetherington  <cth@carlh.net>
 +
 +      * Version 2.0.3 released.
 +
 +2014-08-24  Carl Hetherington  <cth@carlh.net>
 +
 +      * Version 2.0.2 released.
 +
 +2014-08-06  Carl Hetherington  <cth@carlh.net>
 +
 +      * Version 2.0.1 released.
 +
 +2014-07-15  Carl Hetherington  <cth@carlh.net>
 +
 +      * 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  <cth@carlh.net>
 +
 +      * Add subtitle view.
        * Some improvements to the manual.
  
  2014-08-26  Carl Hetherington  <cth@carlh.net>
        * 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  <cth@carlh.net>
  
  2014-07-10  Carl Hetherington  <cth@carlh.net>
  
        * Version 1.72.2 released.
 +>>>>>>> origin/master
  
  2014-07-10  Carl Hetherington  <cth@carlh.net>
  
diff --combined debian/changelog
index 9842aacb1bde7a3ea88e935d98f511d924fcf1ec,750be88ce441a063db8c6c731b869493bf637663..aa4a34921cd89480802d8085b7f19ef8091e6055
@@@ -1,4 -1,4 +1,4 @@@
 -dcpomatic (1.76.3-1) UNRELEASED; urgency=low
 +dcpomatic (2.0.14-1) UNRELEASED; urgency=low
  
    * New upstream release.
    * New upstream release.
    * New upstream release.
    * New upstream release.
    * New upstream release.
+   * New upstream release.
  
-  -- Carl Hetherington <carl@d1stkfactory>  Mon, 20 Oct 2014 22:50:32 +0100
+  -- Carl Hetherington <carl@d1stkfactory>  Wed, 22 Oct 2014 09:32:14 +0100
  
  dcpomatic (0.87-1) UNRELEASED; urgency=low
  
diff --combined src/lib/ffmpeg.cc
index fa369dda429c9342c2b08eed7a4b74ee50a38c35,53eed97e2dfb9fe8b5d1d7231cb2a9c54301ce70..4fe1c04484ab38527db8bf67a051904e8fb60eee
@@@ -1,5 -1,5 +1,5 @@@
  /*
 -    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
 +    Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
  
      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
@@@ -22,11 -22,9 +22,11 @@@ extern "C" 
  #include <libavformat/avformat.h>
  #include <libswscale/swscale.h>
  }
 -#include <libdcp/raw_convert.h>
 +#include <dcp/raw_convert.h>
  #include "ffmpeg.h"
  #include "ffmpeg_content.h"
 +#include "ffmpeg_audio_stream.h"
 +#include "ffmpeg_subtitle_stream.h"
  #include "exceptions.h"
  #include "util.h"
  
@@@ -35,7 -33,7 +35,7 @@@
  using std::string;
  using std::cout;
  using boost::shared_ptr;
 -using libdcp::raw_convert;
 +using dcp::raw_convert;
  
  boost::mutex FFmpeg::_mutex;
  
@@@ -49,7 -47,8 +49,7 @@@ FFmpeg::FFmpeg (boost::shared_ptr<cons
        , _video_stream (-1)
  {
        setup_general ();
 -      setup_video ();
 -      setup_audio ();
 +      setup_decoders ();
  }
  
  FFmpeg::~FFmpeg ()
        boost::mutex::scoped_lock lm (_mutex);
  
        for (uint32_t i = 0; i < _format_context->nb_streams; ++i) {
 -              AVCodecContext* context = _format_context->streams[i]->codec;
 -              if (context->codec_type == AVMEDIA_TYPE_VIDEO || context->codec_type == AVMEDIA_TYPE_AUDIO) {
 -                      avcodec_close (context);
 -              }
 +              avcodec_close (_format_context->streams[i]->codec);
        }
  
        av_frame_free (&_frame);
 -      
        avformat_close_input (&_format_context);
  }
  
@@@ -106,7 -109,10 +106,10 @@@ FFmpeg::setup_general (
  
        for (uint32_t i = 0; i < _format_context->nb_streams; ++i) {
                AVStream* s = _format_context->streams[i];
-               if (s->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
+               /* Files from iTunes sometimes have two video streams, one with the avg_frame_rate.num and .den set
+                  to zero.  Ignore these streams.
+               */
+               if (s->codec->codec_type == AVMEDIA_TYPE_VIDEO && s->avg_frame_rate.num > 0 && s->avg_frame_rate.den > 0) {
                        _video_stream = i;
                }
        }
  }
  
  void
 -FFmpeg::setup_video ()
 -{
 -      boost::mutex::scoped_lock lm (_mutex);
 -
 -      assert (_video_stream >= 0);
 -      AVCodecContext* context = _format_context->streams[_video_stream]->codec;
 -      AVCodec* codec = avcodec_find_decoder (context->codec_id);
 -
 -      if (codec == 0) {
 -              throw DecodeError (_("could not find video decoder"));
 -      }
 -
 -      if (avcodec_open2 (context, codec, 0) < 0) {
 -              throw DecodeError (N_("could not open video decoder"));
 -      }
 -}
 -
 -void
 -FFmpeg::setup_audio ()
 +FFmpeg::setup_decoders ()
  {
        boost::mutex::scoped_lock lm (_mutex);
  
        for (uint32_t i = 0; i < _format_context->nb_streams; ++i) {
                AVCodecContext* context = _format_context->streams[i]->codec;
 -              if (context->codec_type != AVMEDIA_TYPE_AUDIO) {
 -                      continue;
 -              }
                
                AVCodec* codec = avcodec_find_decoder (context->codec_id);
 -              if (codec == 0) {
 -                      throw DecodeError (_("could not find audio decoder"));
 -              }
 -              
 -              if (avcodec_open2 (context, codec, 0) < 0) {
 -                      throw DecodeError (N_("could not open audio decoder"));
 +              if (codec) {
 +                      if (avcodec_open2 (context, codec, 0) < 0) {
 +                              throw DecodeError (N_("could not open decoder"));
 +                      }
                }
 +
 +              /* We are silently ignoring any failures to find suitable decoders here */
        }
  }
  
 -
  AVCodecContext *
  FFmpeg::video_codec_context () const
  {
  AVCodecContext *
  FFmpeg::audio_codec_context () const
  {
 +      if (!_ffmpeg_content->audio_stream ()) {
 +              return 0;
 +      }
 +      
        return _ffmpeg_content->audio_stream()->stream(_format_context)->codec;
  }
  
 +AVCodecContext *
 +FFmpeg::subtitle_codec_context () const
 +{
 +      if (!_ffmpeg_content->subtitle_stream ()) {
 +              return 0;
 +      }
 +      
 +      return _ffmpeg_content->subtitle_stream()->stream(_format_context)->codec;
 +}
 +
  int
  FFmpeg::avio_read (uint8_t* buffer, int const amount)
  {
diff --combined src/wx/about_dialog.cc
index 1bbcaba799c65518a6bd65e19b714575c52d034d,d245d65a4a1b432d7300f7055b90099b75e4e350..dbf502289cdf20e53b25b7ea82fea68c122cd9f2
@@@ -1,5 -1,5 +1,5 @@@
  /*
 -    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
 +    Copyright (C) 2013-2014 Carl Hetherington <cth@carlh.net>
  
      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
  
  */
  
 +/** @file  src/wx/about_dialog.cc
 + *  @brief The "about DCP-o-matic" dialogue box.
 + */
 +
  #include <wx/notebook.h>
  #include <wx/hyperlink.h>
  #include "lib/version.h"
@@@ -151,6 -147,7 +151,7 @@@ AboutDialog::AboutDialog (wxWindow* par
        supported_by.Add (wxT ("Aldo Midali"));
        supported_by.Add (wxT ("Sylvain Mielle"));
        supported_by.Add (wxT ("Lindsay Morris"));
+       supported_by.Add (wxT ("David Nedrow"));
        supported_by.Add (wxT ("Tim O'Brien"));
        supported_by.Add (wxT ("Ivan Pullman"));
        supported_by.Add (wxT ("Mark Rolfe"));
        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)
  {