Merge master.
authorCarl Hetherington <cth@carlh.net>
Mon, 11 Aug 2014 21:39:20 +0000 (22:39 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 11 Aug 2014 21:39:20 +0000 (22:39 +0100)
27 files changed:
1  2 
ChangeLog
debian/changelog
platform/osx/make_dmg.sh
src/lib/analyse_audio_job.cc
src/lib/analyse_audio_job.h
src/lib/audio_decoder.cc
src/lib/colour_conversion.cc
src/lib/encoder.cc
src/lib/ffmpeg.cc
src/lib/ffmpeg_decoder.cc
src/lib/image_proxy.cc
src/lib/job.cc
src/lib/playlist.cc
src/lib/ratio.cc
src/lib/send_kdm_email_job.cc
src/lib/send_kdm_email_job.h
src/lib/transcode_job.cc
src/lib/writer.cc
src/lib/wscript
src/tools/dcpomatic.cc
src/tools/dcpomatic_cli.cc
src/wx/timecode.cc
src/wx/timecode.h
src/wx/timing_panel.cc
src/wx/video_panel.cc
test/film_metadata_test.cc
test/job_test.cc

diff --cc ChangeLog
index fe281428425795f7c86cf586e95d28215e6eab0a,04778b35f72b1a98fb7118b4c5538be69e591920..23ccae1902d6f8189f305fa33f221f08f27353ae
+++ b/ChangeLog
@@@ -1,21 -1,20 +1,38 @@@
 +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.
 +
+ 2014-08-09  Carl Hetherington  <cth@carlh.net>
+       * Version 1.72.10 released.
+ 2014-08-09  Carl Hetherington  <cth@carlh.net>
+       * Version 1.72.8 released.
+ 2014-08-08  Carl Hetherington  <cth@carlh.net>
+       * Approximate support for changing timing details of multiple
+       bits of content at the same time.
+       * Allow removal of multiple bits of content at the same time.
+       * Version 1.72.7 released.
  2014-08-04  Carl Hetherington  <cth@carlh.net>
  
        * Add BCC option for KDM emails.
index 09d40178298a9256211e2b1504703a01fb37445c,0cf0cc1d82e01c5ac011c7851d3d37242365f070..1da8a1f91707c709a48beaa08630d3c38924a409
@@@ -171,8 -171,10 +171,15 @@@ dcpomatic (2.0.1-1) UNRELEASED; urgency
    * New upstream release.
    * New upstream release.
    * New upstream release.
++<<<<<<< HEAD
 +
 + -- Carl Hetherington <carl@dalglish>  Wed, 06 Aug 2014 18:59:35 +0100
++=======
+   * New upstream release.
+   * New upstream release.
+  -- Carl Hetherington <carl@d1stkfactory>  Sat, 09 Aug 2014 12:38:18 +0100
++>>>>>>> origin/master
  
  dcpomatic (0.87-1) UNRELEASED; urgency=low
  
index 5500c42678c048599783376aaac640eefe1070ed,01e9b0aefb8dc131970dd3e4b5923aef163f96db..1174f966a07e0c34071d61c1ad4d240e3baf21f1
@@@ -53,16 -53,16 +53,29 @@@ function universal_copy_lib 
      relink="$relink|$2"
  }
  
++<<<<<<< HEAD
 +universal_copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2 "$WORK/$macos"
 +universal_copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_cli "$WORK/$macos"
 +universal_copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_server_cli "$WORK/$macos"
 +universal_copy $ROOT src/dcpomatic/build/src/tools/dcpomatic2_batch "$WORK/$macos"
 +universal_copy $ROOT src/dcpomatic/build/src/lib/libdcpomatic2.dylib "$WORK/$libs"
 +universal_copy $ROOT src/dcpomatic/build/src/wx/libdcpomatic2-wx.dylib "$WORK/$libs"
 +universal_copy_lib $ROOT libcxml "$WORK/$libs"
 +universal_copy_lib $ROOT libdcp-1.0 "$WORK/$libs"
 +universal_copy_lib $ROOT libasdcp-libdcp-1.0 "$WORK/$libs"
 +universal_copy_lib $ROOT libkumu-libdcp-1.0 "$WORK/$libs"
++=======
+ universal_copy $ROOT src/dcpomatic/build/src/tools/dcpomatic "$WORK/$macos"
+ universal_copy $ROOT src/dcpomatic/build/src/tools/dcpomatic_cli "$WORK/$macos"
+ universal_copy $ROOT src/dcpomatic/build/src/tools/dcpomatic_server_cli "$WORK/$macos"
+ universal_copy $ROOT src/dcpomatic/build/src/tools/dcpomatic_batch "$WORK/$macos"
+ universal_copy $ROOT src/dcpomatic/build/src/lib/libdcpomatic.dylib "$WORK/$libs"
+ universal_copy $ROOT src/dcpomatic/build/src/wx/libdcpomatic-wx.dylib "$WORK/$libs"
+ universal_copy_lib $ROOT libcxml "$WORK/$libs"
+ universal_copy_lib $ROOT libdcp "$WORK/$libs"
+ universal_copy_lib $ROOT libasdcp-libdcp "$WORK/$libs"
+ universal_copy_lib $ROOT libkumu-libdcp "$WORK/$libs"
++>>>>>>> origin/master
  universal_copy_lib $ROOT libopenjpeg "$WORK/$libs"
  universal_copy_lib $ROOT libavdevice "$WORK/$libs"
  universal_copy_lib $ROOT libavformat "$WORK/$libs"
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index f5af239b0a0eeba9445d85a98fbe97c767ae9658,ebe62b51fbd412cb73956b2ae86db2c6058257ab..fa369dda429c9342c2b08eed7a4b74ee50a38c35
@@@ -34,9 -32,8 +34,8 @@@ extern "C" 
  
  using std::string;
  using std::cout;
- using std::stringstream;
  using boost::shared_ptr;
 -using libdcp::raw_convert;
 +using dcp::raw_convert;
  
  boost::mutex FFmpeg::_mutex;
  
Simple merge
Simple merge
diff --cc src/lib/job.cc
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index c594a64464729e4ae33287deb06c64f457f234f4,e8d4f90a6cbc181bb7c162cf5bf7efc1179db29c..eda82f27729c6b810b6850679c0562eeadb24ba2
@@@ -60,10 -53,8 +60,9 @@@ using std::pair
  using std::string;
  using std::list;
  using std::cout;
- using std::stringstream;
  using boost::shared_ptr;
  using boost::weak_ptr;
 +using boost::dynamic_pointer_cast;
  
  int const Writer::_maximum_frames_in_memory = Config::instance()->num_local_encoding_threads() + 4;
  
diff --cc src/lib/wscript
index f26529b8423b7763a6ab237c2feafe6e07dadf51,f53ae7b74db8dbb4923b97ca13ea4228e3a1bd0a..15f26c34f2dcc91cfeef95d19a142301eebd5e38
@@@ -54,17 -40,13 +54,16 @@@ sources = ""
            job.cc
            job_manager.cc
            kdm.cc
-           json_server.cc
            log.cc
 +          magick_image_proxy.cc
            md5_digester.cc
 -          piece.cc
 +          mid_side_decoder.cc
            player.cc
 -          player_video_frame.cc
 +          player_video.cc
            playlist.cc
            ratio.cc
 +          raw_image_proxy.cc
 +          render_subtitles.cc
            resampler.cc
            scp_dcp_job.cc
            scaler.cc
Simple merge
Simple merge
Simple merge
index b13e8c3c084b9c35514e805f59e752927fe46ae1,d0e8176f2d12a5e1cd51fce3675850c7a661c666..72b00ddeb4867065943d41b7ca41ad1295d632a8
@@@ -26,8 -26,9 +26,9 @@@ class Timecode : public wxPane
  public:
        Timecode (wxWindow *);
  
 -      void set (Time, int);
 -      Time get (int) const;
 +      void set (DCPTime, int);
 +      DCPTime get (int) const;
+       void clear ();
  
        void set_editable (bool);
  
index 021ab6ab08405ecd646286937cd948ac82096d97,38891fb0e841af1b65c038d130298079e5edc2a5..a0e1f8f8a4845b8ebc9c852202d89818b55f8f01
  
  using std::cout;
  using std::string;
+ using std::set;
  using boost::shared_ptr;
  using boost::dynamic_pointer_cast;
 -using libdcp::raw_convert;
 +using dcp::raw_convert;
  
 -TimingPanel::TimingPanel (FilmEditor* e)
 +TimingPanel::TimingPanel (ContentPanel* p)
        /* horrid hack for apparent lack of context support with wxWidgets i18n code */
 -      : FilmEditorPanel (e, S_("Timing|Timing"))
 +      : ContentSubPanel (p, S_("Timing|Timing"))
  {
        wxFlexGridSizer* grid = new wxFlexGridSizer (2, 4, 4);
        _sizer->Add (grid, 0, wxALL, 8);
  void
  TimingPanel::film_content_changed (int property)
  {
 -      ContentList cl = _editor->selected_content ();
 -      int const film_video_frame_rate = _editor->film()->video_frame_rate ();
 +      ContentList cl = _parent->selected ();
-       shared_ptr<Content> content;
-       if (cl.size() == 1) {
-               content = cl.front ();
-       }
 +      int const film_video_frame_rate = _parent->film()->video_frame_rate ();
+       /* Here we check to see if we have exactly one different value of various
+          properties, and fill the controls with that value if so.
+       */
        
        if (property == ContentProperty::POSITION) {
-               if (content) {
-                       _position->set (content->position (), film_video_frame_rate);
 -              set<Time> check;
++              set<DCPTime> check;
+               for (ContentList::const_iterator i = cl.begin (); i != cl.end(); ++i) {
+                       check.insert ((*i)->position ());
+               }
+               if (check.size() == 1) {
+                       _position->set (cl.front()->position(), film_video_frame_rate);
                } else {
-                       _position->set (DCPTime () , 24);
+                       _position->clear ();
                }
+               
        } else if (
                property == ContentProperty::LENGTH ||
                property == VideoContentProperty::VIDEO_FRAME_RATE ||
                property == VideoContentProperty::VIDEO_FRAME_TYPE
                ) {
-               if (content) {
-                       _full_length->set (content->full_length (), film_video_frame_rate);
-                       _play_length->set (content->length_after_trim (), film_video_frame_rate);
 -              set<Time> check;
++              set<DCPTime> check;
+               for (ContentList::const_iterator i = cl.begin (); i != cl.end(); ++i) {
+                       check.insert ((*i)->full_length ());
+               }
+               
+               if (check.size() == 1) {
+                       _full_length->set (cl.front()->full_length (), film_video_frame_rate);
                } else {
-                       _full_length->set (DCPTime (), 24);
-                       _play_length->set (DCPTime (), 24);
+                       _full_length->clear ();
                }
        } else if (property == ContentProperty::TRIM_START) {
-               if (content) {
-                       _trim_start->set (content->trim_start (), film_video_frame_rate);
-                       _play_length->set (content->length_after_trim (), film_video_frame_rate);
 -              set<Time> check;
++              set<DCPTime> check;
+               for (ContentList::const_iterator i = cl.begin (); i != cl.end(); ++i) {
+                       check.insert ((*i)->trim_start ());
+               }
+               
+               if (check.size() == 1) {
+                       _trim_start->set (cl.front()->trim_start (), film_video_frame_rate);
                } else {
-                       _trim_start->set (DCPTime (), 24);
-                       _play_length->set (DCPTime (), 24);
+                       _trim_start->clear ();
                }
+               
        } else if (property == ContentProperty::TRIM_END) {
-               if (content) {
-                       _trim_end->set (content->trim_end (), film_video_frame_rate);
-                       _play_length->set (content->length_after_trim (), film_video_frame_rate);
 -              set<Time> check;
++              set<DCPTime> check;
+               for (ContentList::const_iterator i = cl.begin (); i != cl.end(); ++i) {
+                       check.insert ((*i)->trim_end ());
+               }
+               
+               if (check.size() == 1) {
+                       _trim_end->set (cl.front()->trim_end (), film_video_frame_rate);
                } else {
-                       _trim_end->set (DCPTime (), 24);
-                       _play_length->set (DCPTime (), 24);
 -                      _trim_end->set (0, 24);
++                      _trim_end->clear ();
+               }
+       }
+       if (
+               property == ContentProperty::LENGTH ||
+               property == ContentProperty::TRIM_START ||
+               property == ContentProperty::TRIM_END ||
+               property == VideoContentProperty::VIDEO_FRAME_RATE ||
+               property == VideoContentProperty::VIDEO_FRAME_TYPE
+               ) {
 -              set<Time> check;
++              set<DCPTime> check;
+               for (ContentList::const_iterator i = cl.begin (); i != cl.end(); ++i) {
+                       check.insert ((*i)->length_after_trim ());
+               }
+               
+               if (check.size() == 1) {
+                       _play_length->set (cl.front()->length_after_trim (), film_video_frame_rate);
+               } else {
+                       _play_length->clear ();
                }
        }
  
  void
  TimingPanel::position_changed ()
  {
 -      ContentList c = _editor->selected_content ();
 +      ContentList c = _parent->selected ();
-       if (c.size() == 1) {
-               c.front()->set_position (_position->get (_parent->film()->video_frame_rate ()));
+       for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
 -              (*i)->set_position (_position->get (_editor->film()->video_frame_rate ()));
++              (*i)->set_position (_position->get (_parent->film()->video_frame_rate ()));
        }
  }
  
  void
  TimingPanel::full_length_changed ()
  {
 -      ContentList c = _editor->selected_content ();
 +      ContentList c = _parent->selected ();
-       if (c.size() == 1) {
-               shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (c.front ());
+       for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
+               shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (*i);
                if (ic && ic->still ()) {
 -                      ic->set_video_length (rint (_full_length->get (_editor->film()->video_frame_rate()) * ic->video_frame_rate() / TIME_HZ));
 +                      /* XXX: No effective FRC here... is this right? */
 +                      ic->set_video_length (ContentTime (_full_length->get (_parent->film()->video_frame_rate()), FrameRateChange (1, 1)));
                }
        }
  }
  void
  TimingPanel::trim_start_changed ()
  {
 -      ContentList c = _editor->selected_content ();
 +      ContentList c = _parent->selected ();
-       if (c.size() == 1) {
-               c.front()->set_trim_start (_trim_start->get (_parent->film()->video_frame_rate ()));
+       for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
 -              (*i)->set_trim_start (_trim_start->get (_editor->film()->video_frame_rate ()));
++              (*i)->set_trim_start (_trim_start->get (_parent->film()->video_frame_rate ()));
        }
  }
  
  void
  TimingPanel::trim_end_changed ()
  {
 -      ContentList c = _editor->selected_content ();
 +      ContentList c = _parent->selected ();
-       if (c.size() == 1) {
-               c.front()->set_trim_end (_trim_end->get (_parent->film()->video_frame_rate ()));
+       for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
 -              (*i)->set_trim_end (_trim_end->get (_editor->film()->video_frame_rate ()));
++              (*i)->set_trim_end (_trim_end->get (_parent->film()->video_frame_rate ()));
        }
  }
  
  void
  TimingPanel::play_length_changed ()
  {
 -      ContentList c = _editor->selected_content ();
 +      ContentList c = _parent->selected ();
-       if (c.size() == 1) {
-               c.front()->set_trim_end (c.front()->full_length() - _play_length->get (_parent->film()->video_frame_rate()) - c.front()->trim_start());
+       for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
 -              (*i)->set_trim_end ((*i)->full_length() - _play_length->get (_editor->film()->video_frame_rate()) - (*i)->trim_start());
++              (*i)->set_trim_end ((*i)->full_length() - _play_length->get (_parent->film()->video_frame_rate()) - (*i)->trim_start());
        }
  }
  
@@@ -201,9 -251,9 +252,9 @@@ TimingPanel::video_frame_rate_changed (
  void
  TimingPanel::set_video_frame_rate ()
  {
 -      ContentList c = _editor->selected_content ();
 +      ContentList c = _parent->selected ();
-       if (c.size() == 1) {
-               shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (c.front ());
+       for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
+               shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (*i);
                if (vc) {
                        vc->set_video_frame_rate (raw_convert<float> (wx_to_std (_video_frame_rate->GetValue ())));
                }
  void
  TimingPanel::content_selection_changed ()
  {
-       ContentList sel = _parent->selected ();
-       bool const single = sel.size() == 1;
-       /* Things that are only allowed with single selections */
-       _position->Enable (single);
-       _full_length->Enable (single);
-       _trim_start->Enable (single);
-       _trim_end->Enable (single);
-       _play_length->Enable (single);
-       _video_frame_rate->Enable (single);
 -      bool const e = !_editor->selected_content().empty ();
++      bool const e = !_parent->selected().empty ();
+       _position->Enable (e);
+       _full_length->Enable (e);
+       _trim_start->Enable (e);
+       _trim_end->Enable (e);
+       _play_length->Enable (e);
+       _video_frame_rate->Enable (e);
        
        film_content_changed (ContentProperty::POSITION);
        film_content_changed (ContentProperty::LENGTH);
index f00edd8fff0f69c3168911694a22b906581fd567,fcb1b9f806069babf0f2032ae01a8ba1adf035b6..cd831baed7cbc5b97324d97a1a603773d0ee0614
@@@ -331,8 -331,8 +331,8 @@@ VideoPanel::setup_description (
  
        d << wxString::Format (_("Content frame rate %.4f\n"), vcs->video_frame_rate ());
        ++lines;
 -      FrameRateChange frc (vcs->video_frame_rate(), _editor->film()->video_frame_rate ());
 +      FrameRateChange frc (vcs->video_frame_rate(), _parent->film()->video_frame_rate ());
-       d << std_to_wx (frc.description) << "\n";
+       d << std_to_wx (frc.description ()) << "\n";
        ++lines;
  
        for (int i = lines; i < 6; ++i) {
Simple merge
Simple merge