Merge branch 'content-rework-take5' of /home/carl/git/dvdomatic into content-rework...
authorCarl Hetherington <cth@carlh.net>
Sat, 13 Apr 2013 23:48:34 +0000 (00:48 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 13 Apr 2013 23:48:34 +0000 (00:48 +0100)
1  2 
src/lib/encoder.cc
src/lib/job.cc
src/lib/player.h

diff --combined src/lib/encoder.cc
index d6a57ae6b24efccebf0b149c27125329accddc3e,a8e3547a1bbfc0202d75457cc97cc15ff979a749..3201e6ecb5bd689cd04a4b81013c17a466791357
@@@ -135,9 -135,9 +135,9 @@@ voi
  Encoder::process_end ()
  {
  #if HAVE_SWRESAMPLE   
 -      if (_film->has_audio() && _film->audio_channels() && _swr_context) {
 +      if (_film->has_audio() && _swr_context) {
  
 -              shared_ptr<AudioBuffers> out (new AudioBuffers (_film->audio_channels(), 256));
 +              shared_ptr<AudioBuffers> out (new AudioBuffers (_film->audio_mapping().dcp_channels(), 256));
                        
                while (1) {
                        int const frames = swr_convert (_swr_context, (uint8_t **) out->data(), 256, 0, 0);
@@@ -312,7 -312,7 +312,7 @@@ Encoder::process_audio (shared_ptr<Audi
                /* Compute the resampled frames count and add 32 for luck */
                int const max_resampled_frames = ceil ((int64_t) data->frames() * _film->target_audio_sample_rate() / _film->audio_frame_rate()) + 32;
  
 -              shared_ptr<AudioBuffers> resampled (new AudioBuffers (_film->audio_channels(), max_resampled_frames));
 +              shared_ptr<AudioBuffers> resampled (new AudioBuffers (_film->audio_mapping().dcp_channels(), max_resampled_frames));
  
                /* Resample audio */
                int const resampled_frames = swr_convert (
@@@ -423,7 -423,7 +423,7 @@@ Encoder::encoder_thread (ServerDescript
                }
  
                if (remote_backoff > 0) {
-                       dvdomatic_sleep (remote_backoff);
+                       dcpomatic_sleep (remote_backoff);
                }
  
                lock.lock ();
diff --combined src/lib/job.cc
index f830975af443102509683b5f9c2812e4208cfd80,2a4986f0ddc23cd18c0998a890aac70fc6a28680..812380594ec0ea247661951d93909773fbce2201
@@@ -68,15 -68,11 +68,15 @@@ Job::run_wrapper (
                set_state (FINISHED_ERROR);
                
                string m = String::compose (_("An error occurred whilst handling the file %1."), boost::filesystem::path (e.filename()).leaf());
 -              
 -              boost::filesystem::space_info const s = boost::filesystem::space (e.filename());
 -              if (s.available < pow (1024, 3)) {
 -                      m += N_("\n\n");
 -                      m += _("The drive that the film is stored on is low in disc space.  Free some more space and try again.");
 +
 +              try {
 +                      boost::filesystem::space_info const s = boost::filesystem::space (e.filename());
 +                      if (s.available < pow (1024, 3)) {
 +                              m += N_("\n\n");
 +                              m += _("The drive that the film is stored on is low in disc space.  Free some more space and try again.");
 +                      }
 +              } catch (...) {
 +
                }
  
                set_error (e.what(), m);
@@@ -91,7 -87,7 +91,7 @@@
                set_state (FINISHED_ERROR);
                set_error (
                        e.what (),
-                       _("It is not known what caused this error.  The best idea is to report the problem to the DVD-o-matic mailing list (dvdomatic@carlh.net)")
+                       _("It is not known what caused this error.  The best idea is to report the problem to the DCP-o-matic mailing list (dcpomatic@carlh.net)")
                        );
  
        } catch (...) {
                set_state (FINISHED_ERROR);
                set_error (
                        _("Unknown error"),
-                       _("It is not known what caused this error.  The best idea is to report the problem to the DVD-o-matic mailing list (dvdomatic@carlh.net)")
+                       _("It is not known what caused this error.  The best idea is to report the problem to the DCP-o-matic mailing list (dcpomatic@carlh.net)")
                        );
  
        }
diff --combined src/lib/player.h
index 7a99d656190bd25c23faddcd08f61e218942c884,dbfde09a671980a3bdd99ea33a99bef4b5203bbb..9a55b8599a4031dce55af54e202e060af32dda45
@@@ -17,8 -17,8 +17,8 @@@
  
  */
  
- #ifndef DVDOMATIC_PLAYER_H
- #define DVDOMATIC_PLAYER_H
+ #ifndef DCPOMATIC_PLAYER_H
+ #define DCPOMATIC_PLAYER_H
  
  #include <list>
  #include <boost/shared_ptr.hpp>
@@@ -70,7 -70,7 +70,7 @@@ private
        std::list<boost::shared_ptr<VideoDecoder> >::iterator _video_decoder;
        std::list<boost::shared_ptr<SndfileDecoder> > _sndfile_decoders;
  
 -      boost::shared_ptr<AudioBuffers> _sndfile_buffers;
 +      boost::shared_ptr<AudioBuffers> _audio_buffers;
  
        bool _video_sync;
  };