No-op: remove all trailing whitespace.
authorCarl Hetherington <cth@carlh.net>
Sun, 21 Jun 2015 00:15:32 +0000 (01:15 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 21 Jun 2015 00:15:32 +0000 (01:15 +0100)
278 files changed:
src/lib/analyse_audio_job.cc
src/lib/audio_analysis.cc
src/lib/audio_analysis.h
src/lib/audio_buffers.cc
src/lib/audio_buffers.h
src/lib/audio_content.cc
src/lib/audio_content.h
src/lib/audio_decoder.h
src/lib/audio_decoder_stream.cc
src/lib/audio_decoder_stream.h
src/lib/audio_filter.cc
src/lib/audio_mapping.cc
src/lib/audio_mapping.h
src/lib/audio_stream.h
src/lib/channel_count.h
src/lib/cinema.cc
src/lib/cinema.h
src/lib/cinema_sound_processor.h
src/lib/colour_conversion.cc
src/lib/colour_conversion.h
src/lib/config.cc
src/lib/config.h
src/lib/content.cc
src/lib/content.h
src/lib/content_audio.h
src/lib/content_factory.cc
src/lib/content_subtitle.h
src/lib/content_video.h
src/lib/cross.cc
src/lib/data.cc
src/lib/dcp_content.cc
src/lib/dcp_content.h
src/lib/dcp_content_type.h
src/lib/dcp_decoder.cc
src/lib/dcp_decoder.h
src/lib/dcp_examiner.cc
src/lib/dcp_examiner.h
src/lib/dcp_subtitle.cc
src/lib/dcp_subtitle_content.cc
src/lib/dcp_subtitle_decoder.cc
src/lib/dcp_video.cc
src/lib/dcp_video.h
src/lib/dcpomatic_socket.cc
src/lib/dcpomatic_socket.h
src/lib/dcpomatic_time.h
src/lib/decoder.h
src/lib/dolby_cp750.cc
src/lib/encoder.cc
src/lib/encoder.h
src/lib/environment_info.cc
src/lib/exceptions.cc
src/lib/exceptions.h
src/lib/ffmpeg.cc
src/lib/ffmpeg.h
src/lib/ffmpeg_audio_stream.h
src/lib/ffmpeg_content.cc
src/lib/ffmpeg_content.h
src/lib/ffmpeg_decoder.cc
src/lib/ffmpeg_decoder.h
src/lib/ffmpeg_examiner.cc
src/lib/ffmpeg_examiner.h
src/lib/ffmpeg_stream.h
src/lib/ffmpeg_subtitle_stream.cc
src/lib/ffmpeg_subtitle_stream.h
src/lib/file_group.cc
src/lib/film.cc
src/lib/film.h
src/lib/filter.cc
src/lib/filter.h
src/lib/filter_graph.cc
src/lib/font.cc
src/lib/font.h
src/lib/frame_rate_change.cc
src/lib/image.cc
src/lib/image.h
src/lib/image_content.cc
src/lib/image_content.h
src/lib/image_decoder.cc
src/lib/image_decoder.h
src/lib/image_examiner.cc
src/lib/image_filename_sorter.cc
src/lib/image_subtitle.h
src/lib/internet.cc
src/lib/isdcf_metadata.cc
src/lib/isdcf_metadata.h
src/lib/j2k_image_proxy.cc
src/lib/j2k_image_proxy.h
src/lib/job.cc
src/lib/job.h
src/lib/job_manager.cc
src/lib/job_manager.h
src/lib/json_server.cc
src/lib/json_server.h
src/lib/kdm.cc
src/lib/log.cc
src/lib/log.h
src/lib/magick_image_proxy.cc
src/lib/magick_image_proxy.h
src/lib/md5_digester.cc
src/lib/md5_digester.h
src/lib/piece.h
src/lib/player.cc
src/lib/player.h
src/lib/player_subtitles.h
src/lib/player_video.cc
src/lib/player_video.h
src/lib/playlist.cc
src/lib/playlist.h
src/lib/position_image.h
src/lib/ratio.cc
src/lib/ratio.h
src/lib/raw_image_proxy.h
src/lib/rect.h
src/lib/render_subtitles.cc
src/lib/resampler.cc
src/lib/resampler.h
src/lib/safe_stringstream.h
src/lib/scoped_temporary.cc
src/lib/scp_dcp_job.cc
src/lib/send_kdm_email_job.cc
src/lib/send_problem_report_job.cc
src/lib/server.cc
src/lib/server.h
src/lib/server_finder.cc
src/lib/server_finder.h
src/lib/signal_manager.h
src/lib/signaller.h
src/lib/single_stream_audio_content.cc
src/lib/single_stream_audio_content.h
src/lib/sndfile_base.cc
src/lib/sndfile_base.h
src/lib/sndfile_content.h
src/lib/sndfile_decoder.cc
src/lib/sndfile_decoder.h
src/lib/sndfile_examiner.h
src/lib/subrip_content.cc
src/lib/subrip_content.h
src/lib/subrip_decoder.cc
src/lib/subrip_decoder.h
src/lib/subrip_subtitle.h
src/lib/subtitle_content.cc
src/lib/subtitle_content.h
src/lib/subtitle_decoder.cc
src/lib/subtitle_decoder.h
src/lib/timer.cc
src/lib/timer.h
src/lib/transcode_job.cc
src/lib/transcode_job.h
src/lib/transcoder.cc
src/lib/types.h
src/lib/update.cc
src/lib/update.h
src/lib/upmixer_a.h
src/lib/util.cc
src/lib/video_content.cc
src/lib/video_content.h
src/lib/video_content_scale.cc
src/lib/video_decoder.cc
src/lib/writer.cc
src/lib/writer.h
src/tools/dcpomatic.cc
src/tools/dcpomatic_batch.cc
src/tools/dcpomatic_cli.cc
src/tools/dcpomatic_create.cc
src/tools/dcpomatic_kdm.cc
src/tools/dcpomatic_server.cc
src/tools/dcpomatic_server_cli.cc
src/tools/server_test.cc
src/wx/about_dialog.cc
src/wx/audio_dialog.cc
src/wx/audio_gain_dialog.cc
src/wx/audio_gain_dialog.h
src/wx/audio_mapping_view.cc
src/wx/audio_panel.cc
src/wx/audio_panel.h
src/wx/audio_plot.cc
src/wx/cinema_dialog.h
src/wx/colour_conversion_editor.cc
src/wx/colour_conversion_editor.h
src/wx/config_dialog.cc
src/wx/content_colour_conversion_dialog.cc
src/wx/content_colour_conversion_dialog.h
src/wx/content_menu.cc
src/wx/content_menu.h
src/wx/content_panel.cc
src/wx/content_panel.h
src/wx/content_properties_dialog.cc
src/wx/content_widget.h
src/wx/dcp_panel.cc
src/wx/dcp_panel.h
src/wx/dir_picker_ctrl.cc
src/wx/dir_picker_ctrl.h
src/wx/dolby_certificate_dialog.cc
src/wx/doremi_certificate_dialog.cc
src/wx/download_certificate_dialog.cc
src/wx/download_certificate_dialog.h
src/wx/editable_list.h
src/wx/film_editor.cc
src/wx/film_editor.h
src/wx/film_viewer.cc
src/wx/filter_dialog.cc
src/wx/filter_dialog.h
src/wx/filter_editor.cc
src/wx/fonts_dialog.cc
src/wx/fonts_dialog.h
src/wx/gain_calculator_dialog.cc
src/wx/hints_dialog.cc
src/wx/hints_dialog.h
src/wx/isdcf_metadata_dialog.cc
src/wx/job_manager_view.cc
src/wx/job_manager_view.h
src/wx/kdm_dialog.cc
src/wx/kdm_dialog.h
src/wx/key_dialog.cc
src/wx/key_dialog.h
src/wx/make_signer_chain_dialog.h
src/wx/new_film_dialog.cc
src/wx/new_film_dialog.h
src/wx/report_problem_dialog.cc
src/wx/screen_dialog.h
src/wx/servers_list_dialog.cc
src/wx/subtitle_panel.cc
src/wx/subtitle_panel.h
src/wx/subtitle_view.cc
src/wx/subtitle_view.h
src/wx/table_dialog.cc
src/wx/table_dialog.h
src/wx/timecode.cc
src/wx/timecode.h
src/wx/timeline.cc
src/wx/timeline_audio_content_view.h
src/wx/timeline_content_view.cc
src/wx/timeline_content_view.h
src/wx/timeline_dialog.cc
src/wx/timeline_dialog.h
src/wx/timeline_subtitle_content_view.cc
src/wx/timeline_time_axis_view.cc
src/wx/timeline_time_axis_view.h
src/wx/timeline_video_content_view.h
src/wx/timeline_view.cc
src/wx/timeline_view.h
src/wx/timing_panel.cc
src/wx/timing_panel.h
src/wx/update_dialog.cc
src/wx/video_panel.cc
src/wx/wx_util.cc
test/audio_analysis_test.cc
test/audio_buffers_test.cc
test/audio_decoder_test.cc
test/audio_delay_test.cc
test/audio_filter_test.cc
test/client_server_test.cc
test/ffmpeg_audio_test.cc
test/ffmpeg_dcp_test.cc
test/ffmpeg_decoder_seek_test.cc
test/ffmpeg_decoder_sequential_test.cc
test/file_group_test.cc
test/film_metadata_test.cc
test/frame_rate_test.cc
test/image_test.cc
test/isdcf_name_test.cc
test/make_black_test.cc
test/pixel_formats_test.cc
test/play_test.cc
test/player_test.cc
test/recover_test.cc
test/repeat_frame_test.cc
test/resampler_test.cc
test/scaling_test.cc
test/seek_zero_test.cc
test/silence_padding_test.cc
test/srt_subtitle_test.cc
test/stream_test.cc
test/test.cc
test/threed_test.cc
test/util_test.cc
test/video_content_scale_test.cc
test/video_decoder_fill_test.cc

index 3dd15ac272dcb6874aa73066feb32c9e291fd464..8f9b1501067ee5bb7404317270df645daa64ff12 100644 (file)
@@ -63,7 +63,7 @@ AnalyseAudioJob::run ()
 {
        shared_ptr<Player> player (new Player (_film));
        player->set_ignore_video ();
-       
+
        int64_t const len = _film->length().frames (_film->audio_frame_rate());
        _samples_per_point = max (int64_t (1), len / _num_points);
 
@@ -88,7 +88,7 @@ AnalyseAudioJob::run ()
 
        _analysis->set_peak (_overall_peak, DCPTime::from_frames (_overall_peak_frame, _film->audio_frame_rate ()));
        _analysis->write (_film->audio_analysis_path ());
-       
+
        set_progress (1);
        set_state (FINISHED_OK);
 }
index 73422a9be9ad8a2f3a6039d7487c284ddfe4f8bf..7e1dc6e7884f619765c4a927bb31af85ddde9871 100644 (file)
@@ -65,7 +65,7 @@ AudioPoint::operator= (AudioPoint const & other)
        if (this == &other) {
                return *this;
        }
-       
+
        for (int i = 0; i < COUNT; ++i) {
                _data[i] = other._data[i];
        }
@@ -79,7 +79,7 @@ AudioPoint::as_xml (xmlpp::Element* parent) const
        parent->add_child ("Peak")->add_child_text (raw_convert<string> (_data[PEAK]));
        parent->add_child ("RMS")->add_child_text (raw_convert<string> (_data[RMS]));
 }
-       
+
 AudioAnalysis::AudioAnalysis (int channels)
 {
        _data.resize (channels);
index 9387ec896b67b92f072a3d31b0509a4373dc03e3..2411b4316c7f1474ff363b9e71e1baaee82ddaf6 100644 (file)
@@ -42,7 +42,7 @@ public:
        AudioPoint& operator= (AudioPoint const &);
 
        void as_xml (xmlpp::Element *) const;
-       
+
        float& operator[] (int t) {
                return _data[t];
        }
@@ -62,7 +62,7 @@ public:
                _peak = peak;
                _peak_time = time;
        }
-       
+
        AudioPoint get_point (int c, int p) const;
        int points (int c) const;
        int channels () const;
index 71422944decbe544473b7e8479148c0e445ae7cd..0130f17b46d1b59562d47aca53956a7c75e56e58 100644 (file)
@@ -57,7 +57,7 @@ AudioBuffers::operator= (AudioBuffers const & other)
        if (this == &other) {
                return *this;
        }
-               
+
        deallocate ();
        allocate (other._channels, other._frames);
        copy_from (&other, other._frames, 0, 0);
@@ -80,12 +80,12 @@ AudioBuffers::allocate (int channels, int frames)
        _channels = channels;
        _frames = frames;
        _allocated_frames = frames;
-       
+
        _data = static_cast<float**> (malloc (_channels * sizeof (float *)));
        if (!_data) {
                throw bad_alloc ();
        }
-       
+
        for (int i = 0; i < _channels; ++i) {
                _data[i] = static_cast<float*> (malloc (frames * sizeof (float)));
                if (!_data[i]) {
@@ -129,7 +129,7 @@ AudioBuffers::set_frames (int f)
                        _data[c][i] = 0;
                }
        }
-       
+
        _frames = f;
 }
 
@@ -149,7 +149,7 @@ void
 AudioBuffers::make_silent (int c)
 {
        DCPOMATIC_ASSERT (c >= 0 && c < _channels);
-       
+
        for (int i = 0; i < _frames; ++i) {
                _data[c][i] = 0;
        }
@@ -180,7 +180,7 @@ AudioBuffers::copy_from (AudioBuffers const * from, int frames_to_copy, int read
                /* Prevent the asserts from firing if there is nothing to do */
                return;
        }
-       
+
        DCPOMATIC_ASSERT (from->channels() == channels());
 
        DCPOMATIC_ASSERT (from);
@@ -197,14 +197,14 @@ AudioBuffers::copy_from (AudioBuffers const * from, int frames_to_copy, int read
  *  @param to Offset to move to.
  *  @param frames Number of frames to move.
  */
-    
+
 void
 AudioBuffers::move (int from, int to, int frames)
 {
        if (frames == 0) {
                return;
        }
-       
+
        DCPOMATIC_ASSERT (from >= 0);
        DCPOMATIC_ASSERT (from < _frames);
        DCPOMATIC_ASSERT (to >= 0);
@@ -213,7 +213,7 @@ AudioBuffers::move (int from, int to, int frames)
        DCPOMATIC_ASSERT (frames <= _frames);
        DCPOMATIC_ASSERT ((from + frames) <= _frames);
        DCPOMATIC_ASSERT ((to + frames) <= _allocated_frames);
-       
+
        for (int i = 0; i < _channels; ++i) {
                memmove (_data[i] + to, _data[i] + from, frames * sizeof(float));
        }
@@ -279,7 +279,7 @@ void
 AudioBuffers::apply_gain (float dB)
 {
        float const linear = pow (10, dB / 20);
-       
+
        for (int i = 0; i < _channels; ++i) {
                for (int j = 0; j < _frames; ++j) {
                        _data[i][j] *= linear;
index 8cd67aaa729d52afc42a8ff5b11f3d42327de414..bcf5d5928ee1330758573cf4d8a7417f46d76e56 100644 (file)
@@ -47,7 +47,7 @@ public:
        float** data () const {
                return _data;
        }
-       
+
        float* data (int) const;
 
        int channels () const {
@@ -75,7 +75,7 @@ public:
 private:
        void allocate (int, int);
        void deallocate ();
-       
+
        /** Number of channels */
        int _channels;
        /** Number of frames (where a frame is one sample across all channels) */
index e1f435f49b4d4e16934e4559dea6639e105b8b7f..d2d90a1f5b42ce9c0d493ea402765995f1a9512d 100644 (file)
@@ -82,7 +82,7 @@ AudioContent::AudioContent (shared_ptr<const Film> film, vector<shared_ptr<Conte
 {
        shared_ptr<AudioContent> ref = dynamic_pointer_cast<AudioContent> (c[0]);
        DCPOMATIC_ASSERT (ref);
-       
+
        for (size_t i = 0; i < c.size(); ++i) {
                shared_ptr<AudioContent> ac = dynamic_pointer_cast<AudioContent> (c[i]);
 
@@ -115,7 +115,7 @@ AudioContent::set_audio_gain (double g)
                boost::mutex::scoped_lock lm (_mutex);
                _audio_gain = g;
        }
-       
+
        signal_changed (AudioContentProperty::AUDIO_GAIN);
 }
 
@@ -126,7 +126,7 @@ AudioContent::set_audio_delay (int d)
                boost::mutex::scoped_lock lm (_mutex);
                _audio_delay = d;
        }
-       
+
        signal_changed (AudioContentProperty::AUDIO_DELAY);
 }
 
@@ -155,7 +155,7 @@ AudioContent::set_audio_mapping (AudioMapping mapping)
                }
                i->set_mapping (stream_mapping);
        }
-               
+
        signal_changed (AudioContentProperty::AUDIO_STREAMS);
 }
 
@@ -166,9 +166,9 @@ AudioContent::audio_mapping () const
        BOOST_FOREACH (AudioStreamPtr i, audio_streams ()) {
                channels += i->channels ();
        }
-       
+
        AudioMapping merged (channels, MAX_DCP_AUDIO_CHANNELS);
-       
+
        int c = 0;
        int s = 0;
        BOOST_FOREACH (AudioStreamPtr i, audio_streams ()) {
@@ -193,7 +193,7 @@ AudioContent::resampled_audio_frame_rate () const
 {
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
-       
+
        /* Resample to a DCI-approved sample rate */
        double t = has_rate_above_48k() ? 96000 : 48000;
 
index df6527ed094bc75883a7fda86496328e27aef557..2ecb512055cb5836590a32a706d4be0d1a4711bb 100644 (file)
@@ -68,7 +68,7 @@ public:
 
        void set_audio_gain (double);
        void set_audio_delay (int);
-       
+
        double audio_gain () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _audio_gain;
@@ -80,7 +80,7 @@ public:
        }
 
        std::string processing_description () const;
-       
+
 private:
        /** Gain to apply to audio in dB */
        double _audio_gain;
index 1b17029b7e4b2889d85e72861802b6e6c9097bac..387b1ad7ff74e396a6e85978ec6731a8c3af60d9 100644 (file)
@@ -40,7 +40,7 @@ class AudioDecoder : public virtual Decoder, public boost::enable_shared_from_th
 {
 public:
        AudioDecoder (boost::shared_ptr<const AudioContent>);
-       
+
        boost::shared_ptr<const AudioContent> audio_content () const {
                return _audio_content;
        }
@@ -57,8 +57,8 @@ protected:
        void audio (AudioStreamPtr stream, boost::shared_ptr<const AudioBuffers>, ContentTime);
        void flush ();
        void seek (ContentTime t, bool accurate);
-       
-private:       
+
+private:
        boost::shared_ptr<const AudioContent> _audio_content;
        /** An AudioDecoderStream object to manage each stream in _audio_content */
        std::map<AudioStreamPtr, boost::shared_ptr<AudioDecoderStream> > _streams;
index f1d9839f81950777512c1ddf53db0f44fcaf8d43..8c521f94dfbdee956dbc5085b2764a73e651ee01 100644 (file)
@@ -59,7 +59,7 @@ AudioDecoderStream::get (Frame frame, Frame length, bool accurate)
        shared_ptr<ContentAudio> dec;
 
        Frame const end = frame + length - 1;
-               
+
        if (frame < _decoded.frame || end > (_decoded.frame + length * 4)) {
                /* Either we have no decoded data, or what we do have is a long way from what we want: seek */
                seek (ContentTime::from_frames (frame, _content->resampled_audio_frame_rate()), accurate);
@@ -69,7 +69,7 @@ AudioDecoderStream::get (Frame frame, Frame length, bool accurate)
           (to be set up shortly)
        */
        Frame decoded_offset = 0;
-       
+
        /* Now enough pass() calls will either:
         *  (a) give us what we want, or
         *  (b) hit the end of the decoder.
@@ -84,7 +84,7 @@ AudioDecoderStream::get (Frame frame, Frame length, bool accurate)
                        !_decoder->pass ()
                        )
                {}
-               
+
                decoded_offset = frame - _decoded.frame;
        } else {
                while (
@@ -92,7 +92,7 @@ AudioDecoderStream::get (Frame frame, Frame length, bool accurate)
                        !_decoder->pass ()
                        )
                {}
-               
+
                /* Use decoded_offset of 0, as we don't really care what frames we return */
        }
 
@@ -183,7 +183,7 @@ AudioDecoderStream::add (shared_ptr<const AudioBuffers> data)
                */
                return;
        }
-       
+
        /* Resize _decoded to fit the new data */
        int new_size = 0;
        if (_decoded.audio->frames() == 0) {
@@ -194,7 +194,7 @@ AudioDecoderStream::add (shared_ptr<const AudioBuffers> data)
                /* Otherwise we need to extend _decoded to include the new stuff */
                new_size = _position.get() + data->frames() - _decoded.frame;
        }
-       
+
        _decoded.audio->ensure_size (new_size);
        _decoded.audio->set_frames (new_size);
 
index 24f86c2e398a9337610eaebe1c96d97b2b563b18..5c772e4f7cc9423ed172e0fe51f53e7b4acbd781 100644 (file)
@@ -32,12 +32,12 @@ class AudioDecoderStream
 {
 public:
        AudioDecoderStream (boost::shared_ptr<const AudioContent>, AudioStreamPtr, AudioDecoder* decoder);
-       
+
        ContentAudio get (Frame time, Frame length, bool accurate);
        void audio (boost::shared_ptr<const AudioBuffers>, ContentTime);
        void flush ();
        void seek (ContentTime time, bool accurate);
-       
+
 private:
 
        void reset_decoded ();
index dbef25201c642f29f25ad2f8e6336cffa3b5b072..2cf1cf6047ac4b3e00adb5d6812ac8bd1ad5061f 100644 (file)
@@ -29,9 +29,9 @@ vector<float>
 AudioFilter::sinc_blackman (float cutoff, bool invert) const
 {
        vector<float> ir (_M + 1);
-       
+
        /* Impulse response */
-       
+
        for (int i = 0; i <= _M; ++i) {
                if (i == (_M / 2)) {
                        ir[i] = 2 * M_PI * cutoff;
@@ -42,27 +42,27 @@ AudioFilter::sinc_blackman (float cutoff, bool invert) const
                        ir[i] *= (0.42 - 0.5 * cos (2 * M_PI * i / _M) + 0.08 * cos (4 * M_PI * i / _M));
                }
        }
-       
+
        /* Normalise */
-       
+
        float sum = 0;
        for (int i = 0; i <= _M; ++i) {
                sum += ir[i];
        }
-       
+
        for (int i = 0; i <= _M; ++i) {
                ir[i] /= sum;
        }
-       
+
        /* Frequency inversion (swapping low-pass for high-pass, or whatever) */
-       
+
        if (invert) {
                for (int i = 0; i <= _M; ++i) {
                        ir[i] = -ir[i];
                }
                ir[_M / 2] += 1;
        }
-       
+
        return ir;
 }
 
@@ -70,12 +70,12 @@ shared_ptr<AudioBuffers>
 AudioFilter::run (shared_ptr<AudioBuffers> in)
 {
        shared_ptr<AudioBuffers> out (new AudioBuffers (in->channels(), in->frames()));
-       
+
        if (!_tail) {
                _tail.reset (new AudioBuffers (in->channels(), _M + 1));
                _tail->make_silent ();
        }
-       
+
        for (int i = 0; i < in->channels(); ++i) {
                for (int j = 0; j < in->frames(); ++j) {
                        float s = 0;
@@ -86,17 +86,17 @@ AudioFilter::run (shared_ptr<AudioBuffers> in)
                                        s += in->data(i)[j - k] * _ir[k];
                                }
                        }
-                       
+
                        out->data(i)[j] = s;
                }
        }
-       
+
        int const amount = min (in->frames(), _tail->frames());
        if (amount < _tail->frames ()) {
                _tail->move (amount, 0, _tail->frames() - amount);
        }
        _tail->copy_from (in.get(), amount, in->frames() - amount, _tail->frames () - amount);
-       
+
        return out;
 }
 
@@ -124,16 +124,16 @@ BandPassAudioFilter::BandPassAudioFilter (float transition_bandwidth, float lowe
 {
        vector<float> lpf = sinc_blackman (lower, false);
        vector<float> hpf = sinc_blackman (higher, true);
-       
+
        _ir.resize (_M + 1);
        for (int i = 0; i <= _M; ++i) {
                _ir[i] = lpf[i] + hpf[i];
        }
-       
+
        /* We now have a band-stop, so invert for band-pass */
        for (int i = 0; i <= _M; ++i) {
                _ir[i] = -_ir[i];
        }
-       
+
        _ir[_M / 2] += 1;
 }
index ca175912b31c0b7969933622d2b49751b0b2bece..725109ae66031cd0d43583f964ce86fde3a96b09 100644 (file)
@@ -56,7 +56,7 @@ AudioMapping::setup (int input_channels, int output_channels)
 {
        _input_channels = input_channels;
        _output_channels = output_channels;
-       
+
        _gain.resize (_input_channels);
        for (int i = 0; i < _input_channels; ++i) {
                _gain[i].resize (_output_channels);
@@ -161,7 +161,7 @@ AudioMapping::mapped_output_channels () const
        static float const minus_96_db = 0.000015849;
 
        list<int> mapped;
-       
+
        for (vector<vector<float> >::const_iterator i = _gain.begin(); i != _gain.end(); ++i) {
                for (size_t j = 0; j < i->size(); ++j) {
                        if (abs ((*i)[j]) > minus_96_db) {
@@ -172,7 +172,7 @@ AudioMapping::mapped_output_channels () const
 
        mapped.sort ();
        mapped.unique ();
-       
+
        return mapped;
 }
 
index 57169cc1e7d8c13c21208691d344ec1e8fe2431b..ca9b9847fe8f9bc7002ca268014273b934f48800 100644 (file)
@@ -48,7 +48,7 @@ public:
        AudioMapping (cxml::ConstNodePtr, int);
 
        /* Default copy constructor is fine */
-       
+
        void as_xml (xmlpp::Node *) const;
 
        void make_zero ();
@@ -63,12 +63,12 @@ public:
        int output_channels () const {
                return _output_channels;
        }
-       
+
        std::string digest () const;
 
        std::list<int> mapped_output_channels () const;
        void unmap_all ();
-       
+
 private:
        void setup (int input_channels, int output_channels);
 
index 757d2ea296e3b8876d9761da35b0bba796a3cc49..80ccc4cdba0935c138820fef3cc9aad87044235a 100644 (file)
@@ -30,7 +30,7 @@ class AudioStream
 public:
        AudioStream (int frame_rate, int channels);
        AudioStream (int frame_rate, AudioMapping mapping);
-       
+
        void set_mapping (AudioMapping mapping);
        void set_frame_rate (int frame_rate);
 
@@ -51,7 +51,7 @@ protected:
 
 private:
        friend struct audio_sampling_rate_test;
-       
+
        int _frame_rate;
        AudioMapping _mapping;
 };
index 4247fc063efa1d5a82609bfc7a532249a726f905..bc840293e3a8d87aa4f86afbefcc9837952f2b50 100644 (file)
@@ -32,7 +32,7 @@ public:
                : min (n)
                , max (n)
        {}
-       
+
        ChannelCount (int min_, int max_)
                : min (min_)
                , max (max_)
index ce3077b2a041df9ab21e6600a59f4f770f78f164..f774392386b7136568b2dbe06e16b1f6e50f7654 100644 (file)
@@ -84,4 +84,4 @@ Screen::as_xml (xmlpp::Element* parent) const
        }
 }
 
-               
+
index 5c0386837098f1fd668749a57cafeee078ced081..fea4f1c149362ebbc944a8dc1bb547ccb9943b0c 100644 (file)
@@ -44,7 +44,7 @@ public:
        Screen (cxml::ConstNodePtr);
 
        void as_xml (xmlpp::Element *) const;
-       
+
        boost::shared_ptr<Cinema> cinema;
        std::string name;
        boost::optional<dcp::Certificate> certificate;
@@ -72,13 +72,13 @@ public:
 
        void add_screen (boost::shared_ptr<Screen>);
        void remove_screen (boost::shared_ptr<Screen>);
-       
+
        std::string name;
        std::string email;
        std::list<boost::shared_ptr<Screen> > screens () const {
                return _screens;
        }
 
-private:       
+private:
        std::list<boost::shared_ptr<Screen> > _screens;
 };
index 30ab7d5a5a90492b1b0f9fdd68ccfdf80c439edf..1d4a389f381bdc48c013641796ccb70cfd972438 100644 (file)
@@ -50,7 +50,7 @@ public:
        std::string name () const {
                return _name;
        }
-       
+
        static std::vector<CinemaSoundProcessor const *> all ();
        static void setup_cinema_sound_processors ();
        static CinemaSoundProcessor const * from_id (std::string id);
index 0f05474d8780fa148543219d4d13de0c45ba62d8..31d4cc41a6dc3f33836015a9d87b3a68a0a39ab2 100644 (file)
@@ -45,13 +45,13 @@ vector<PresetColourConversion> PresetColourConversion::_presets;
 ColourConversion::ColourConversion ()
        : dcp::ColourConversion (dcp::ColourConversion::srgb_to_xyz ())
 {
-       
+
 }
 
 ColourConversion::ColourConversion (dcp::ColourConversion conversion_)
        : dcp::ColourConversion (conversion_)
 {
-       
+
 }
 
 ColourConversion::ColourConversion (cxml::NodePtr node, int version)
@@ -78,7 +78,7 @@ ColourConversion::ColourConversion (cxml::NodePtr node, int version)
        } else {
 
                /* Version 1.x */
-               
+
                if (node->bool_child ("InputGammaLinearised")) {
                        _in.reset (new dcp::ModifiedGammaTransferFunction (node->number_child<float> ("InputGamma"), 0.04045, 0.055, 12.92));
                } else {
@@ -87,7 +87,7 @@ ColourConversion::ColourConversion (cxml::NodePtr node, int version)
        }
 
        _yuv_to_rgb = static_cast<dcp::YUVToRGB> (node->optional_number_child<int>("YUVToRGB").get_value_or (dcp::YUV_TO_RGB_REC601));
-       
+
        list<cxml::NodePtr> m = node->node_children ("Matrix");
        if (!m.empty ()) {
                /* Read in old <Matrix> nodes and convert them to chromaticities */
@@ -117,8 +117,8 @@ ColourConversion::ColourConversion (cxml::NodePtr node, int version)
                                node->number_child<double> ("AdjustedWhiteX"), node->number_child<double> ("AdjustedWhiteY")
                                );
                }
-       }       
-       
+       }
+
        _out.reset (new dcp::GammaTransferFunction (node->number_child<double> ("OutputGamma")));
 }
 
@@ -212,7 +212,7 @@ ColourConversion::identifier () const
        }
 
        digester.add (dynamic_pointer_cast<const dcp::GammaTransferFunction> (_out)->gamma ());
-       
+
        return digester.get ();
 }
 
index 06a9cf6c3c3d4f1413a82f578101911d43b3d4e0..eaf43f59218bb701e5b7f68b5324da8223f7e275 100644 (file)
@@ -59,7 +59,7 @@ public:
        std::string name;
        /** an internal short (non-internationalised) name for this preset */
        std::string id;
-       
+
        static std::vector<PresetColourConversion> all () {
                return _presets;
        }
@@ -67,7 +67,7 @@ public:
        static PresetColourConversion from_id (std::string id);
 
        static void setup_colour_conversion_presets ();
-       
+
 private:
        static std::vector<PresetColourConversion> _presets;
 };
index e726acee189498b4b9ef75d6cda1de63c5821e70..e6f3637292939955df627752c7f8118e87504020 100644 (file)
@@ -79,9 +79,9 @@ Config::set_defaults ()
        _check_for_test_updates = false;
        _maximum_j2k_bandwidth = 250000000;
        _log_types = Log::TYPE_GENERAL | Log::TYPE_WARNING | Log::TYPE_ERROR | Log::TYPE_DEBUG;
-#ifdef DCPOMATIC_WINDOWS         
+#ifdef DCPOMATIC_WINDOWS
        _win32_console = false;
-#endif   
+#endif
 
        _allowed_dcp_frame_rates.clear ();
        _allowed_dcp_frame_rates.push_back (24);
@@ -138,7 +138,7 @@ Config::read ()
                        _servers.push_back ((*i)->content ());
                }
        }
-       
+
        _tms_ip = f.string_child ("TMSIP");
        _tms_path = f.string_child ("TMSPath");
        _tms_user = f.string_child ("TMSUser");
@@ -170,13 +170,13 @@ Config::read ()
        } else if (f.optional_string_child ("DCPIssuer")) {
                _dcp_issuer = f.string_child ("DCPIssuer");
        }
-       
+
        if (version && version.get() >= 2) {
                _default_isdcf_metadata = ISDCFMetadata (f.node_child ("ISDCFMetadata"));
        } else {
                _default_isdcf_metadata = ISDCFMetadata (f.node_child ("DCIMetadata"));
        }
-       
+
        _default_still_length = f.optional_number_child<int>("DefaultStillLength").get_value_or (10);
        _default_j2k_bandwidth = f.optional_number_child<int>("DefaultJ2KBandwidth").get_value_or (200000000);
        _default_audio_delay = f.optional_number_child<int>("DefaultAudioDelay").get_value_or (0);
@@ -207,9 +207,9 @@ Config::read ()
        _allow_any_dcp_frame_rate = f.optional_bool_child ("AllowAnyDCPFrameRate");
 
        _log_types = f.optional_number_child<int> ("LogTypes").get_value_or (Log::TYPE_GENERAL | Log::TYPE_WARNING | Log::TYPE_ERROR);
-#ifdef DCPOMATIC_WINDOWS       
+#ifdef DCPOMATIC_WINDOWS
        _win32_console = f.optional_bool_child ("Win32Console").get_value_or (false);
-#endif 
+#endif
 
        list<cxml::NodePtr> his = f.node_children ("History");
        for (list<cxml::NodePtr>::const_iterator i = his.begin(); i != his.end(); ++i) {
@@ -308,7 +308,7 @@ Config::write () const
        root->add_child("DefaultDirectory")->add_child_text (_default_directory.string ());
        root->add_child("ServerPortBase")->add_child_text (raw_convert<string> (_server_port_base));
        root->add_child("UseAnyServers")->add_child_text (_use_any_servers ? "1" : "0");
-       
+
        for (vector<string>::const_iterator i = _servers.begin(); i != _servers.end(); ++i) {
                root->add_child("Server")->add_child_text (*i);
        }
@@ -356,9 +356,9 @@ Config::write () const
        root->add_child("MaximumJ2KBandwidth")->add_child_text (raw_convert<string> (_maximum_j2k_bandwidth));
        root->add_child("AllowAnyDCPFrameRate")->add_child_text (_allow_any_dcp_frame_rate ? "1" : "0");
        root->add_child("LogTypes")->add_child_text (raw_convert<string> (_log_types));
-#ifdef DCPOMATIC_WINDOWS       
+#ifdef DCPOMATIC_WINDOWS
        root->add_child("Win32Console")->add_child_text (_win32_console ? "1" : "0");
-#endif 
+#endif
 
        xmlpp::Element* signer = root->add_child ("Signer");
        dcp::CertificateChain::List certs = _signer->certificates().root_to_leaf ();
@@ -437,7 +437,7 @@ Config::add_to_history (boost::filesystem::path p)
 {
        /* Remove existing instances of this path in the history */
        _history.erase (remove (_history.begin(), _history.end(), p), _history.end ());
-       
+
        _history.insert (_history.begin (), p);
        if (_history.size() > HISTORY_SIZE) {
                _history.pop_back ();
index 20529911b605ba363b4117454c9759a773a5dade..0040591f165543c4b895c9171397aa91b7e95eaa 100644 (file)
@@ -88,7 +88,7 @@ public:
        std::string tms_ip () const {
                return _tms_ip;
        }
-       
+
        /** @return The path on a TMS that we should changed DCPs to */
        std::string tms_path () const {
                return _tms_path;
@@ -112,7 +112,7 @@ public:
        std::list<boost::shared_ptr<Cinema> > cinemas () const {
                return _cinemas;
        }
-       
+
        std::list<int> allowed_dcp_frame_rates () const {
                return _allowed_dcp_frame_rates;
        }
@@ -120,7 +120,7 @@ public:
        bool allow_any_dcp_frame_rate () const {
                return _allow_any_dcp_frame_rate;
        }
-       
+
        ISDCFMetadata default_isdcf_metadata () const {
                return _default_isdcf_metadata;
        }
@@ -180,7 +180,7 @@ public:
        std::string kdm_bcc () const {
                return _kdm_bcc;
        }
-       
+
        std::string kdm_email () const {
                return _kdm_email;
        }
@@ -213,11 +213,11 @@ public:
                return _log_types;
        }
 
-#ifdef DCPOMATIC_WINDOWS       
+#ifdef DCPOMATIC_WINDOWS
        bool win32_console () const {
                return _win32_console;
        }
-#endif 
+#endif
 
        std::vector<boost::filesystem::path> history () const {
                return _history;
@@ -291,7 +291,7 @@ public:
                if (!_language) {
                        return;
                }
-                       
+
                _language = boost::none;
                changed ();
        }
@@ -347,7 +347,7 @@ public:
        void set_kdm_bcc (std::string f) {
                maybe_set (_kdm_bcc, f);
        }
-       
+
        void set_kdm_email (std::string e) {
                maybe_set (_kdm_email, e);
        }
@@ -382,11 +382,11 @@ public:
                maybe_set (_log_types, t);
        }
 
-#ifdef DCPOMATIC_WINDOWS       
+#ifdef DCPOMATIC_WINDOWS
        void set_win32_console (bool c) {
                maybe_set (_win32_console, c);
        }
-#endif 
+#endif
 
        void clear_history () {
                _history.clear ();
@@ -394,12 +394,12 @@ public:
        }
 
        void add_to_history (boost::filesystem::path p);
-       
+
        void changed ();
        boost::signals2::signal<void ()> Changed;
 
        void write () const;
-       
+
        static Config* instance ();
        static void drop ();
        static void restore_defaults ();
@@ -474,11 +474,11 @@ private:
        /** maximum allowed J2K bandwidth in bits per second */
        int _maximum_j2k_bandwidth;
        int _log_types;
-#ifdef DCPOMATIC_WINDOWS       
+#ifdef DCPOMATIC_WINDOWS
        bool _win32_console;
-#endif 
+#endif
        std::vector<boost::filesystem::path> _history;
-       
+
        /** Singleton instance, or 0 */
        static Config* _instance;
 };
index 2ee660b7fab0111e2f985949a969a802808cc0c7..aa382d68b9e5f53fa233e70a6d4925ae65a73b9e 100644 (file)
@@ -134,7 +134,7 @@ Content::examine (shared_ptr<Job> job)
        if (job) {
                job->sub (_("Computing digest"));
        }
-       
+
        boost::mutex::scoped_lock lm (_mutex);
        vector<boost::filesystem::path> p = _paths;
        lm.unlock ();
@@ -163,7 +163,7 @@ Content::set_position (DCPTime p)
                if (p == _position) {
                        return;
                }
-               
+
                _position = p;
        }
 
@@ -200,7 +200,7 @@ Content::clone () const
        if (!film) {
                return shared_ptr<Content> ();
        }
-       
+
        /* This is a bit naughty, but I can't think of a compelling reason not to do it ... */
        xmlpp::Document doc;
        xmlpp::Node* node = doc.create_root_node ("Content");
@@ -230,7 +230,7 @@ string
 Content::identifier () const
 {
        SafeStringStream s;
-       
+
        s << Content::digest()
          << "_" << position().get()
          << "_" << trim_start().get()
index 4b6153a9d17929c555ccfe750c9fe04883428d67..6ee9e59dd289fd15c0eff15258d15a9916bdc9f2 100644 (file)
@@ -69,17 +69,17 @@ public:
         *  @param job Job to use to report progress, or 0.
         */
        virtual void examine (boost::shared_ptr<Job> job);
-       
+
        /** @return Quick one-line summary of the content, as will be presented in the
         *  film editor.
         */
        virtual std::string summary () const = 0;
-       
+
        /** @return Technical details of this content; these are written to logs to
         *  help with debugging.
         */
        virtual std::string technical_summary () const;
-       
+
        virtual void as_xml (xmlpp::Node *) const;
        virtual DCPTime full_length () const = 0;
        virtual std::string identifier () const;
@@ -104,7 +104,7 @@ public:
                boost::mutex::scoped_lock lm (_mutex);
                return _paths[i];
        }
-       
+
        bool paths_valid () const;
 
        /** @return Digest of the content's file(s).  Note: this is
@@ -134,7 +134,7 @@ public:
        }
 
        void set_trim_end (DCPTime);
-       
+
        DCPTime trim_end () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _trim_end;
@@ -146,7 +146,7 @@ public:
        }
 
        DCPTime length_after_trim () const;
-       
+
        void set_change_signals_frequent (bool f) {
                _change_signals_frequent = f;
        }
@@ -169,7 +169,7 @@ protected:
 
        /** Paths of our data files */
        std::vector<boost::filesystem::path> _paths;
-       
+
 private:
        std::string _digest;
        DCPTime _position;
index 194e90e3f35919f4562a6709b97cfad47d16fd6f..c343865e39fa1d586f2df2af03ee84ee5e6d6703 100644 (file)
@@ -37,7 +37,7 @@ public:
                : audio (new AudioBuffers (0, 0))
                , frame (0)
        {}
-               
+
        ContentAudio (boost::shared_ptr<AudioBuffers> a, Frame f)
                : audio (a)
                , frame (f)
index db3a305006ba61c8d8e19c8bb84c6508c4673a5d..3c65b43129a14a23d62628a8f14a1911495b4ec8 100644 (file)
@@ -48,7 +48,7 @@ content_factory (shared_ptr<const Film> film, cxml::NodePtr node, int version, l
        string const type = node->string_child ("Type");
 
        boost::shared_ptr<Content> content;
-       
+
        if (type == "FFmpeg") {
                content.reset (new FFmpegContent (film, node, version, notes));
        } else if (type == "Image") {
index 36bc22b13e5e5f04d7bd9243f264784eb67ac7cb..ef904a9805e50476b064b7cdc589290694ff7777 100644 (file)
@@ -61,7 +61,7 @@ public:
        {}
 
        ContentTimePeriod period () const;
-       
+
        std::list<dcp::SubtitleString> subs;
 };
 
index c8f5cca0b9c29b708b3ab5fb64e81b44845554dc..2c996f816650de6651463c3b33887d765b880aa9 100644 (file)
@@ -40,7 +40,7 @@ public:
                , part (p)
                , frame (f)
        {}
-       
+
        boost::shared_ptr<const ImageProxy> image;
        Eyes eyes;
        Part part;
index 0bcb31e3e78e99eeb5f7a5d7628142a51a47a642..2689be2c27c0a422e7dd104babfba52d90b5f569 100644 (file)
@@ -75,7 +75,7 @@ string
 cpu_info ()
 {
        string info;
-       
+
 #ifdef DCPOMATIC_LINUX
        /* This use of ifstream is ok; the filename can never
           be non-Latin
@@ -99,7 +99,7 @@ cpu_info ()
        if (sysctlbyname ("machdep.cpu.brand_string", buffer, &N, 0, 0) == 0) {
                info = buffer;
        }
-#endif         
+#endif
 
 #ifdef DCPOMATIC_WINDOWS
        HKEY key;
@@ -124,11 +124,11 @@ cpu_info ()
        }
 
        info = string (value.begin(), value.end());
-       
+
        RegCloseKey (key);
 
-#endif 
-       
+#endif
+
        return info;
 }
 
@@ -142,7 +142,7 @@ app_contents ()
        if (_NSGetExecutablePath (buffer, &size)) {
                throw StringError ("_NSGetExecutablePath failed");
        }
-       
+
        boost::filesystem::path path (buffer);
        path = boost::filesystem::canonical (path);
        path = path.parent_path ();
@@ -170,7 +170,7 @@ shared_path ()
 #endif
 #ifdef DCPOMATIC_OSX
        return app_contents() / "Resources";
-#endif 
+#endif
 }
 
 void
@@ -241,7 +241,7 @@ run_ffprobe (boost::filesystem::path content, boost::filesystem::path out, share
        CloseHandle (child_stderr_read);
 #endif
 
-#ifdef DCPOMATIC_LINUX 
+#ifdef DCPOMATIC_LINUX
        string ffprobe = "ffprobe \"" + content.string() + "\" 2> \"" + out.string() + "\"";
        LOG_GENERAL (N_("Probing with %1"), ffprobe);
         system (ffprobe.c_str ());
@@ -251,7 +251,7 @@ run_ffprobe (boost::filesystem::path content, boost::filesystem::path out, share
        boost::filesystem::path path = app_contents();
        path /= "MacOS";
        path /= "ffprobe";
-       
+
        string ffprobe = path.string() + " \"" + content.string() + "\" 2> \"" + out.string() + "\"";
        LOG_GENERAL (N_("Probing with %1"), ffprobe);
        system (ffprobe.c_str ());
@@ -262,13 +262,13 @@ list<pair<string, string> >
 mount_info ()
 {
        list<pair<string, string> > m;
-       
+
 #ifdef DCPOMATIC_LINUX
        FILE* f = setmntent ("/etc/mtab", "r");
        if (!f) {
                return m;
        }
-       
+
        while (true) {
                struct mntent* mnt = getmntent (f);
                if (!mnt) {
@@ -291,11 +291,11 @@ openssl_path ()
        wchar_t dir[512];
        GetModuleFileName (GetModuleHandle (0), dir, sizeof (dir));
        PathRemoveFileSpec (dir);
-       
+
        boost::filesystem::path path = dir;
        path /= "openssl.exe";
        return path;
-#else  
+#else
        /* We assume that it's on the path for Linux and OS X */
        return "openssl";
 #endif
@@ -323,9 +323,9 @@ dcpomatic_fseek (FILE* stream, int64_t offset, int whence)
 {
 #ifdef DCPOMATIC_WINDOWS
        return _fseeki64 (stream, offset, whence);
-#else  
+#else
        return fseek (stream, offset, whence);
-#endif 
+#endif
 }
 
 void
@@ -333,7 +333,7 @@ Waker::nudge ()
 {
 #ifdef DCPOMATIC_WINDOWS
        SetThreadExecutionState (ES_SYSTEM_REQUIRED);
-#endif 
+#endif
 }
 
 Waker::Waker ()
@@ -343,12 +343,12 @@ Waker::Waker ()
         // IOPMAssertionCreateWithName (kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, CFSTR ("Encoding DCP"), &_assertion_id);
        /* but it's not available on 10.5, so we use this */
         IOPMAssertionCreate (kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, &_assertion_id);
-#endif 
+#endif
 }
 
 Waker::~Waker ()
 {
-#ifdef DCPOMATIC_OSX   
+#ifdef DCPOMATIC_OSX
        IOPMAssertionRelease (_assertion_id);
-#endif 
+#endif
 }
index 92b0b19d53380590fb2071b43d646612a45a058b..5975ff6fc776d8808c1c07089046ad368cc6dffd 100644 (file)
@@ -54,13 +54,13 @@ Data::Data (boost::filesystem::path file)
        if (!f) {
                throw FileError (_("could not open file for reading"), file);
        }
-       
+
        size_t const r = fread (_data.get(), 1, _size, f);
        if (r != size_t (_size)) {
                fclose (f);
                throw FileError (_("could not read from file"), file);
        }
-               
+
        fclose (f);
 }
 
index d51a560dd90dea93684ae251e69adc16799579a3..880a543e7430dc9b7123f9bce275f2bc246ee8df 100644 (file)
@@ -82,10 +82,10 @@ void
 DCPContent::examine (shared_ptr<Job> job)
 {
        bool const could_be_played = can_be_played ();
-               
+
        job->set_progress_unknown ();
        Content::examine (job);
-       
+
        shared_ptr<DCPExaminer> examiner (new DCPExaminer (shared_from_this ()));
        take_from_video_examiner (examiner);
        take_from_audio_examiner (examiner);
index 74f06cdc640adaa8a7337becaf1bb31ae5508534..54527422e117db5eb15a1025d6cfc2af2fc60411 100644 (file)
@@ -51,7 +51,7 @@ public:
        }
 
        DCPTime full_length () const;
-       
+
        void examine (boost::shared_ptr<Job>);
        std::string summary () const;
        std::string technical_summary () const;
@@ -63,7 +63,7 @@ public:
                boost::mutex::scoped_lock lm (_mutex);
                return _has_subtitles;
        }
-       
+
        boost::filesystem::path directory () const;
 
        bool encrypted () const {
@@ -78,10 +78,10 @@ public:
        }
 
        bool can_be_played () const;
-       
+
 private:
        void read_directory (boost::filesystem::path);
-       
+
        std::string _name;
        bool _has_subtitles;
        /** true if our DCP is encrypted */
index 34398009bcaa24fb00bd4fe7e47d82fe6ac8af28..c370fef4d52fa3229e7f677bc87eb24efdcb5d70 100644 (file)
@@ -64,5 +64,5 @@ private:
        /** All available DCP content types */
        static std::vector<DCPContentType const *> _dcp_content_types;
 };
-     
+
 #endif
index ab906b3d17f8b4e4b54042c0874df1a61417b2e4..0ec50e0cd24ff9a52523707a121ddb50acb22544 100644 (file)
@@ -63,7 +63,7 @@ DCPDecoder::pass ()
 
        float const vfr = _dcp_content->video_frame_rate ();
        int64_t const frame = _next.frames (vfr);
-       
+
        if ((*_reel)->main_picture ()) {
                shared_ptr<dcp::PictureAsset> asset = (*_reel)->main_picture()->asset ();
                shared_ptr<dcp::MonoPictureAsset> mono = dynamic_pointer_cast<dcp::MonoPictureAsset> (asset);
@@ -76,7 +76,7 @@ DCPDecoder::pass ()
                                shared_ptr<ImageProxy> (new J2KImageProxy (stereo->get_frame (entry_point + frame), asset->size(), dcp::EYE_LEFT)),
                                frame
                                );
-                       
+
                        video (
                                shared_ptr<ImageProxy> (new J2KImageProxy (stereo->get_frame (entry_point + frame), asset->size(), dcp::EYE_RIGHT)),
                                frame
@@ -111,7 +111,7 @@ DCPDecoder::pass ()
                        ++_reel;
                }
        }
-       
+
        return false;
 }
 
index 5d9b76497411bc3f6a482c99f7be25964bbc8a54..7d26139ba47ab6d62a403c066fc091aab30f1c89 100644 (file)
@@ -40,7 +40,7 @@ public:
 private:
        bool pass ();
        void seek (ContentTime t, bool accurate);
-       
+
        std::list<ContentTimePeriod> image_subtitles_during (ContentTimePeriod, bool starting) const;
        std::list<ContentTimePeriod> text_subtitles_during (ContentTimePeriod, bool starting) const;
 
index 21ffeda296c503edb0d9af6c76aec737a335c3ec..1dd469206063d737ac216686c4ac827b9f69d968 100644 (file)
@@ -83,7 +83,7 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content)
 
                        _video_length += (*i)->main_picture()->duration();
                }
-                       
+
                if ((*i)->main_sound ()) {
                        shared_ptr<dcp::SoundAsset> asset = (*i)->main_sound()->asset ();
 
@@ -109,20 +109,20 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content)
 
        _encrypted = dcp.encrypted ();
        _kdm_valid = true;
-       
+
        /* Check that we can read the first picture frame */
        try {
                if (!dcp.cpls().empty () && !dcp.cpls().front()->reels().empty ()) {
                        shared_ptr<dcp::PictureAsset> asset = dcp.cpls().front()->reels().front()->main_picture()->asset ();
                        shared_ptr<dcp::MonoPictureAsset> mono = dynamic_pointer_cast<dcp::MonoPictureAsset> (asset);
                        shared_ptr<dcp::StereoPictureAsset> stereo = dynamic_pointer_cast<dcp::StereoPictureAsset> (asset);
-                       
+
                        if (mono) {
                                mono->get_frame(0)->xyz_image ();
                        } else {
                                stereo->get_frame(0)->xyz_image (dcp::EYE_LEFT);
                        }
-                       
+
                }
        } catch (dcp::DCPReadError& e) {
                _kdm_valid = false;
index bf083e8ec68ce0844cdfe7c06f27aa162ae565e7..ed457b5c246835a8243569071d1559bb10547b72 100644 (file)
@@ -30,15 +30,15 @@ class DCPExaminer : public VideoExaminer, public AudioExaminer
 {
 public:
        DCPExaminer (boost::shared_ptr<const DCPContent>);
-       
+
        boost::optional<float> video_frame_rate () const {
                return _video_frame_rate;
        }
-       
+
        dcp::Size video_size () const {
                return _video_size.get_value_or (dcp::Size (1998, 1080));
        }
-       
+
        Frame video_length () const {
                return _video_length;
        }
@@ -58,11 +58,11 @@ public:
        int audio_channels () const {
                return _audio_channels.get_value_or (0);
        }
-       
+
        Frame audio_length () const {
                return _audio_length;
        }
-       
+
        int audio_frame_rate () const {
                return _audio_frame_rate.get_value_or (48000);
        }
index 9963d0a9479c1059cf98194bf58e2278e7724048..be64937809765486e8bbed8689476d1e1375726c 100644 (file)
@@ -30,11 +30,11 @@ shared_ptr<dcp::SubtitleAsset>
 DCPSubtitle::load (boost::filesystem::path file) const
 {
        shared_ptr<dcp::SubtitleAsset> sc;
-       
+
        try {
                sc.reset (new dcp::InteropSubtitleAsset (file));
        } catch (...) {
-               
+
        }
 
        if (!sc) {
index 3f13f34e2b7afcdf2b991ee3dbf27109d12fb47e..8b09b6fee1628671403895879868f1fe150c582f 100644 (file)
@@ -36,7 +36,7 @@ DCPSubtitleContent::DCPSubtitleContent (shared_ptr<const Film> film, boost::file
        : Content (film, path)
        , SubtitleContent (film, path)
 {
-       
+
 }
 
 DCPSubtitleContent::DCPSubtitleContent (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
@@ -56,7 +56,7 @@ DCPSubtitleContent::examine (shared_ptr<Job> job)
 
        /* Default to turning these subtitles on */
        set_use_subtitles (true);
-       
+
        boost::mutex::scoped_lock lm (_mutex);
 
        shared_ptr<dcp::InteropSubtitleAsset> iop = dynamic_pointer_cast<dcp::InteropSubtitleAsset> (sc);
@@ -95,7 +95,7 @@ DCPSubtitleContent::technical_summary () const
 {
        return Content::technical_summary() + " - " + _("DCP XML subtitles");
 }
-      
+
 void
 DCPSubtitleContent::as_xml (xmlpp::Node* node) const
 {
index 9687f646c0e73ed686a0a76cdca6be64a8265977..3c7bffdda440295cdc8033bb943922b6e5ba743b 100644 (file)
@@ -65,7 +65,7 @@ DCPSubtitleDecoder::image_subtitles_during (ContentTimePeriod, bool) const
 {
        return list<ContentTimePeriod> ();
 }
-       
+
 list<ContentTimePeriod>
 DCPSubtitleDecoder::text_subtitles_during (ContentTimePeriod p, bool starting) const
 {
@@ -78,7 +78,7 @@ DCPSubtitleDecoder::text_subtitles_during (ContentTimePeriod p, bool starting) c
                        ContentTime::from_seconds (i->in().as_seconds ()),
                        ContentTime::from_seconds (i->out().as_seconds ())
                        );
-               
+
                if ((starting && p.contains (period.from)) || (!starting && p.overlaps (period))) {
                        d.push_back (period);
                }
index 806ec94642c0238afcd22428e27840551222b341..b72353d9ecbc6482c6573f496275e53687d495d4 100644 (file)
@@ -87,7 +87,7 @@ DCPVideo::DCPVideo (
        , _burn_subtitles (b)
        , _log (l)
 {
-       
+
 }
 
 DCPVideo::DCPVideo (shared_ptr<const PlayerVideo> frame, shared_ptr<const cxml::Node> node, shared_ptr<Log> log)
@@ -144,11 +144,11 @@ DCPVideo::encode_locally (dcp::NoteHandler note)
        parameters.tile_size_on = false;
        parameters.cp_tdx = 1;
        parameters.cp_tdy = 1;
-       
+
        /* Tile part */
        parameters.tp_flag = 'C';
        parameters.tp_on = 1;
-       
+
        /* Tile and Image shall be at (0,0) */
        parameters.cp_tx0 = 0;
        parameters.cp_ty0 = 0;
@@ -159,19 +159,19 @@ DCPVideo::encode_locally (dcp::NoteHandler note)
        parameters.cblockw_init = 32;
        parameters.cblockh_init = 32;
        parameters.csty |= 0x01;
-       
+
        /* The progression order shall be CPRL */
        parameters.prog_order = CPRL;
-       
+
        /* No ROI */
        parameters.roi_compno = -1;
-       
+
        parameters.subsampling_dx = 1;
        parameters.subsampling_dy = 1;
-       
+
        /* 9-7 transform */
        parameters.irreversible = 1;
-       
+
        parameters.tcp_rates[0] = 0;
        parameters.tcp_numlayers++;
        parameters.cp_disto_alloc = 1;
@@ -179,27 +179,27 @@ DCPVideo::encode_locally (dcp::NoteHandler note)
        if (_resolution == RESOLUTION_4K) {
                parameters.numpocs = 2;
                parameters.POC[0].tile = 1;
-               parameters.POC[0].resno0 = 0; 
+               parameters.POC[0].resno0 = 0;
                parameters.POC[0].compno0 = 0;
                parameters.POC[0].layno1 = 1;
                parameters.POC[0].resno1 = parameters.numresolution - 1;
                parameters.POC[0].compno1 = 3;
                parameters.POC[0].prg1 = CPRL;
                parameters.POC[1].tile = 1;
-               parameters.POC[1].resno0 = parameters.numresolution - 1; 
+               parameters.POC[1].resno0 = parameters.numresolution - 1;
                parameters.POC[1].compno0 = 0;
                parameters.POC[1].layno1 = 1;
                parameters.POC[1].resno1 = parameters.numresolution;
                parameters.POC[1].compno1 = 3;
                parameters.POC[1].prg1 = CPRL;
        }
-       
+
        parameters.cp_comment = strdup (N_("DCP-o-matic"));
        parameters.cp_cinema = _resolution == RESOLUTION_2K ? CINEMA2K_24 : CINEMA4K_24;
 
        /* 3 components, so use MCT */
        parameters.tcp_mct = 1;
-       
+
        /* set max image */
        parameters.max_comp_size = max_comp_size;
        parameters.tcp_rates[0] = ((float) (3 * xyz->size().width * xyz->size().height * 12)) / (max_cs_len * 8);
@@ -269,7 +269,7 @@ DCPVideo::encode_remotely (ServerDescription serv)
        add_metadata (root);
 
        LOG_GENERAL (N_("Sending frame %1 to remote"), _index);
-       
+
        /* Send XML metadata */
        string xml = doc.write_to_string ("UTF-8");
        socket->write (xml.length() + 1);
@@ -285,7 +285,7 @@ DCPVideo::encode_remotely (ServerDescription serv)
        socket->read (e.data().get(), e.size());
 
        LOG_GENERAL (N_("Finished remotely-encoded frame %1"), _index);
-       
+
        return e;
 }
 
index c1c48623def2595f4979f0a36bb2da2d3363c777..97be0779802b8cc7653feed28b24f68fcb2957bb 100644 (file)
@@ -59,11 +59,11 @@ public:
        Eyes eyes () const;
 
        bool same (boost::shared_ptr<const DCPVideo> other) const;
-       
+
 private:
 
        void add_metadata (xmlpp::Element *) const;
-       
+
        boost::shared_ptr<const PlayerVideo> _frame;
        int _index;                      ///< frame index within the DCP's intrinsic duration
        int _frames_per_second;          ///< Frames per second that we will use for the DCP
index d575e323027a4e77ed14afa9802d8ae1e82c657f..16f01f39c23e8c0a1e411209a17a23349100386c 100644 (file)
@@ -78,7 +78,7 @@ Socket::write (uint8_t const * data, int size)
        boost::system::error_code ec = boost::asio::error::would_block;
 
        boost::asio::async_write (_socket, boost::asio::buffer (data, size), boost::lambda::var(ec) = boost::lambda::_1);
-       
+
        do {
                _io_service.run_one ();
        } while (ec == boost::asio::error::would_block);
@@ -110,7 +110,7 @@ Socket::read (uint8_t* data, int size)
        do {
                _io_service.run_one ();
        } while (ec == boost::asio::error::would_block);
-       
+
        if (ec) {
                throw NetworkError (String::compose (_("error during async_read (%1)"), ec.value ()));
        }
index 82ca5ff694bac96d0605553e36ecf89d9c3597ba..9e81faa0c0b967402d06c118d384ba28dfde3859 100644 (file)
@@ -40,10 +40,10 @@ public:
 
        void write (uint32_t n);
        void write (uint8_t const * data, int size);
-       
+
        void read (uint8_t* data, int size);
        uint32_t read_uint32 ();
-       
+
 private:
        void check ();
 
index 0b78c5390557f03024bfac43f0b012159d4da68e..df9c46c7157651fff9759b8f6e342c18b563ce2f 100644 (file)
@@ -62,7 +62,7 @@ public:
 
        /* Explicit conversion from type O */
        Time (Time<O, S> d, FrameRateChange f);
-       
+
        Type get () const {
                return _t;
        }
@@ -144,7 +144,7 @@ public:
                   to a frame boundary at the start rather than the end.
                */
                int64_t ff = frames (r);
-               
+
                h = ff / (3600 * r);
                ff -= h * 3600 * r;
                m = ff / (60 * r);
@@ -173,7 +173,7 @@ public:
                return o.str ();
        }
 
-       
+
        static Time<S, O> from_seconds (double s) {
                return Time<S, O> (s * HZ);
        }
@@ -191,14 +191,14 @@ public:
        static Time<S, O> min () {
                return Time<S, O> (-INT64_MAX);
        }
-       
+
        static Time<S, O> max () {
                return Time<S, O> (INT64_MAX);
        }
-       
+
 private:
        friend struct dcptime_round_up_test;
-       
+
        Type _t;
        static const int HZ = 96000;
 };
@@ -223,7 +223,7 @@ class ContentTimePeriod
 {
 public:
        ContentTimePeriod () {}
-       
+
        ContentTimePeriod (ContentTime f, ContentTime t)
                : from (f)
                , to (t)
index c5a359e1a86afd52a7750c90d662447d5ce42b7b..c93069882af4b1d01c5f0d371b7ab92c74f96aa1 100644 (file)
@@ -40,9 +40,9 @@ class Decoder : public boost::noncopyable
 public:
        virtual ~Decoder () {}
 
-protected:     
+protected:
        friend class AudioDecoderStream;
-       
+
        /** Seek so that the next pass() will yield the next thing
         *  (video/sound frame, subtitle etc.) at or after the requested
         *  time.  Pass accurate = true to try harder to ensure that, at worst,
index 317d129d99f0abcba3af6c78d4bf904baf05010c..35f044630bea86a00b5700fe12aa8e65a7284903 100644 (file)
@@ -39,7 +39,7 @@ DolbyCP750::db_for_fader_change (float from, float to) const
                        float const t = min (to, 4.0f);
                        db += (t - from) * 20;
                }
-               
+
                if (to > 4) {
                        float const t = max (from, 4.0f);
                        db += (to - t) * 3.33333333333333333;
index 776ccd118eb2beadef66c0a15ad605284dc908b2..93e15031db14f2b754a824fccf2d65ad4c743285 100644 (file)
@@ -117,7 +117,7 @@ Encoder::end ()
        }
 
        lock.unlock ();
-       
+
        terminate_threads ();
 
        LOG_GENERAL (N_("Mopping up %1"), _queue.size());
@@ -144,7 +144,7 @@ Encoder::end ()
                        LOG_ERROR (N_("Local encode failed (%1)"), e.what ());
                }
        }
-}      
+}
 
 /** @return an estimate of the current number of frames we are encoding per second,
  *  or 0 if not known.
@@ -178,7 +178,7 @@ void
 Encoder::frame_done ()
 {
        boost::mutex::scoped_lock lock (_state_mutex);
-       
+
        struct timeval tv;
        gettimeofday (&tv, 0);
        _time_history.push_front (tv);
@@ -194,7 +194,7 @@ void
 Encoder::enqueue (shared_ptr<PlayerVideo> pv)
 {
        _waker.nudge ();
-       
+
        boost::mutex::scoped_lock lock (_mutex);
 
        /* XXX: discard 3D here if required */
@@ -283,7 +283,7 @@ try
           encodings.
        */
        int remote_backoff = 0;
-       
+
        while (true) {
 
                LOG_TIMING ("[%1] encoder thread sleeps", boost::this_thread::get_id());
@@ -300,7 +300,7 @@ try
                shared_ptr<DCPVideo> vf = _queue.front ();
                LOG_TIMING ("[%1] encoder thread pops frame %2 (%3) from queue", boost::this_thread::get_id(), vf->index(), vf->eyes ());
                _queue.pop_front ();
-               
+
                lock.unlock ();
 
                optional<Data> encoded;
@@ -309,14 +309,14 @@ try
                if (server) {
                        try {
                                encoded = vf->encode_remotely (server.get ());
-                               
+
                                if (remote_backoff > 0) {
                                        LOG_GENERAL ("%1 was lost, but now she is found; removing backoff", server->host_name ());
                                }
-                               
+
                                /* This job succeeded, so remove any backoff */
                                remote_backoff = 0;
-                               
+
                        } catch (std::exception& e) {
                                if (remote_backoff < 60) {
                                        /* back off more */
@@ -327,7 +327,7 @@ try
                                        vf->index(), server->host_name(), e.what(), remote_backoff
                                        );
                        }
-                       
+
                } else {
                        try {
                                LOG_TIMING ("[%1] encoder thread begins local encode of %2", boost::this_thread::get_id(), vf->index());
index 0e2d306546635de6d75aade7436364d5505d40c2..6bbdda4c5e23ea8722395623efd950293d749d13 100644 (file)
@@ -77,9 +77,9 @@ public:
        int video_frames_out () const;
 
 private:
-       
+
        void frame_done ();
-       
+
        void encoder_thread (boost::optional<ServerDescription>);
        void terminate_threads ();
        void add_worker_threads (ServerDescription);
index d10e23727e317c885dde090b02b5e7c71d7b4a19..364973ff8af0cbd1fb5e714740ceda2e1753353b 100644 (file)
@@ -109,7 +109,7 @@ environment_info (shared_ptr<Log> log)
        info.dwOSVersionInfoSize = sizeof (info);
        GetVersionEx (&info);
        LOG_GENERAL ("Windows version %1.%2.%3 SP %4", info.dwMajorVersion, info.dwMinorVersion, info.dwBuildNumber, info.szCSDVersion);
-#endif 
+#endif
 
 #if __GNUC__
 #if __x86_64__
@@ -118,7 +118,7 @@ environment_info (shared_ptr<Log> log)
        LOG_GENERAL_NC ("Built for 32-bit");
 #endif
 #endif
-       
+
        LOG_GENERAL ("CPU: %1, %2 processors", cpu_info(), boost::thread::hardware_concurrency ());
        list<pair<string, string> > const m = mount_info ();
        for (list<pair<string, string> >::const_iterator i = m.begin(); i != m.end(); ++i) {
index c4c3d08151773f8e184e6a45f67c705165ec2f10..399915253bf45c0f4a754b056c2eff59aeacc45e 100644 (file)
@@ -47,7 +47,7 @@ ReadFileError::ReadFileError (boost::filesystem::path f, int e)
 WriteFileError::WriteFileError (boost::filesystem::path f, int e)
        : FileError (String::compose (_("could not write to file %1 (%2)"), f.string(), strerror (e)), f)
 {
-       
+
 }
 
 MissingSettingError::MissingSettingError (string s)
@@ -65,7 +65,7 @@ PixelFormatError::PixelFormatError (string o, AVPixelFormat f)
 SubRipError::SubRipError (string saw, string expecting, boost::filesystem::path f)
        : FileError (String::compose (_("Error in SubRip file: saw %1 while expecting %2"), saw.empty() ? "[nothing]" : saw, expecting), f)
 {
-       
+
 }
 
 InvalidSignerError::InvalidSignerError ()
index 96dc816ec4dea27cbbc94937dbf98a0c76c2fe6b..268e8c36d200771d84e291ccd90e8f215da54c29 100644 (file)
@@ -296,8 +296,8 @@ public:
                }
        }
 
-protected:     
-       
+protected:
+
        void store_current () {
                boost::mutex::scoped_lock lm (_mutex);
                _exception = boost::current_exception ();
index 8764933e3e070522b247029e26aee80a148a4ab7..f5d114e8f946c59cecbcc8e4efb72c31d1eccc5e 100644 (file)
@@ -85,14 +85,14 @@ FFmpeg::setup_general ()
        _avio_context = avio_alloc_context (_avio_buffer, _avio_buffer_size, 0, this, avio_read_wrapper, 0, avio_seek_wrapper);
        _format_context = avformat_alloc_context ();
        _format_context->pb = _avio_context;
-       
+
        AVDictionary* options = 0;
        /* These durations are in microseconds, and represent how far into the content file
           we will look for streams.
        */
        av_dict_set (&options, "analyzeduration", raw_convert<string> (5 * 60 * 1000000).c_str(), 0);
        av_dict_set (&options, "probesize", raw_convert<string> (5 * 60 * 1000000).c_str(), 0);
-       
+
        if (avformat_open_input (&_format_context, 0, 0, &options) < 0) {
                throw OpenFileError (_ffmpeg_content->path(0).string ());
        }
@@ -126,8 +126,8 @@ FFmpeg::setup_general ()
        */
        if (_video_stream == -1 && video_stream_undefined_frame_rate != -1) {
                _video_stream = video_stream_undefined_frame_rate;
-       }       
-       
+       }
+
        if (_video_stream < 0) {
                throw DecodeError (N_("could not find video stream"));
        }
@@ -146,7 +146,7 @@ FFmpeg::setup_general ()
                        }
                }
        }
-       
+
        if (duplicates) {
                /* Put in our own IDs */
                for (uint32_t i = 0; i < _format_context->nb_streams; ++i) {
@@ -167,7 +167,7 @@ FFmpeg::setup_decoders ()
 
        for (uint32_t i = 0; i < _format_context->nb_streams; ++i) {
                AVCodecContext* context = _format_context->streams[i]->codec;
-               
+
                AVCodec* codec = avcodec_find_decoder (context->codec_id);
                if (codec) {
 
@@ -177,7 +177,7 @@ FFmpeg::setup_decoders ()
                        */
                        AVDictionary* options = 0;
                        av_dict_set (&options, "disable_footer", "1", 0);
-                       
+
                        if (avcodec_open2 (context, codec, &options) < 0) {
                                throw DecodeError (N_("could not open decoder"));
                        }
@@ -199,7 +199,7 @@ FFmpeg::subtitle_codec_context () const
        if (!_ffmpeg_content->subtitle_stream ()) {
                return 0;
        }
-       
+
        return _ffmpeg_content->subtitle_stream()->stream(_format_context)->codec;
 }
 
@@ -215,6 +215,6 @@ FFmpeg::avio_seek (int64_t const pos, int whence)
        if (whence == AVSEEK_SIZE) {
                return _file_group.length ();
        }
-       
+
        return _file_group.seek (pos, whence);
 }
index 835136c759d8b6004f7b9a6f6c7eecf414eac2ba..4299edc28ffdddd273e37dbd9b2a3714467d507e 100644 (file)
@@ -56,14 +56,14 @@ public:
 protected:
        AVCodecContext* video_codec_context () const;
        AVCodecContext* subtitle_codec_context () const;
-       
+
        boost::shared_ptr<const FFmpegContent> _ffmpeg_content;
 
        uint8_t* _avio_buffer;
        int _avio_buffer_size;
        AVIOContext* _avio_context;
        FileGroup _file_group;
-       
+
        AVFormatContext* _format_context;
        AVPacket _packet;
        AVFrame* _frame;
index 7fe3c4fdaedd907df31ecdf5d06360eb8b41f43a..84882e89c89c3a9f1057368c35da603b1d708edb 100644 (file)
@@ -37,7 +37,7 @@ public:
        void as_xml (xmlpp::Node *) const;
 
        /* XXX: should probably be locked */
-       
+
        boost::optional<ContentTime> first_audio;
 
 private:
index 1793b8998c47c00394a673107d093f6f19c8c0c8..c4fc363578f6c32ea23c3dec56b6f0a3bc39b0fb 100644 (file)
@@ -172,7 +172,7 @@ FFmpegContent::examine (shared_ptr<Job> job)
                if (!_subtitle_streams.empty ()) {
                        _subtitle_stream = _subtitle_streams.front ();
                }
-               
+
                _audio_streams = examiner->audio_streams ();
 
                if (!_audio_streams.empty ()) {
@@ -214,7 +214,7 @@ FFmpegContent::technical_summary () const
        }
 
        string filt = Filter::ffmpeg_string (_filters);
-       
+
        return Content::technical_summary() + " - "
                + VideoContent::technical_summary() + " - "
                + AudioContent::technical_summary() + " - "
@@ -321,7 +321,7 @@ vector<AudioStreamPtr>
 FFmpegContent::audio_streams () const
 {
        boost::mutex::scoped_lock lm (_mutex);
-       
+
        vector<AudioStreamPtr> s;
        copy (_audio_streams.begin(), _audio_streams.end(), back_inserter (s));
        return s;
index 04523b117a49b51784e8ddc3c5cfb2286bc4cf33..5c2b5496d3de187bb0b4987d674b6d77563d91ba 100644 (file)
@@ -54,7 +54,7 @@ public:
        boost::shared_ptr<FFmpegContent> shared_from_this () {
                return boost::dynamic_pointer_cast<FFmpegContent> (Content::shared_from_this ());
        }
-       
+
        void examine (boost::shared_ptr<Job>);
        std::string summary () const;
        std::string technical_summary () const;
@@ -65,7 +65,7 @@ public:
 
        /* VideoContent */
        void set_default_colour_conversion ();
-       
+
        /* AudioContent */
        std::vector<AudioStreamPtr> audio_streams () const;
 
@@ -73,7 +73,7 @@ public:
        bool has_subtitles () const;
 
        void set_filters (std::vector<Filter const *> const &);
-       
+
        std::vector<boost::shared_ptr<FFmpegSubtitleStream> > subtitle_streams () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _subtitle_streams;
@@ -106,7 +106,7 @@ public:
 private:
        friend struct ffmpeg_pts_offset_test;
        friend struct audio_sampling_rate_test;
-       
+
        std::vector<boost::shared_ptr<FFmpegSubtitleStream> > _subtitle_streams;
        boost::shared_ptr<FFmpegSubtitleStream> _subtitle_stream;
        std::vector<boost::shared_ptr<FFmpegAudioStream> > _audio_streams;
index 4ca06329b116ae9561ddb3c61fa11a17416af9c2..0c9225a6abc2f6485ab7fe31b6e0cb376ea4671d 100644 (file)
@@ -124,14 +124,14 @@ void
 FFmpegDecoder::flush ()
 {
        /* Get any remaining frames */
-       
+
        _packet.data = 0;
        _packet.size = 0;
-       
+
        /* XXX: should we reset _packet.data and size after each *_decode_* call? */
-       
+
        while (decode_video_packet ()) {}
-       
+
        decode_audio_packet ();
        AudioDecoder::flush ();
 }
@@ -152,7 +152,7 @@ FFmpegDecoder::pass ()
                        av_strerror (r, buf, sizeof(buf));
                        LOG_ERROR (N_("error on av_read_frame (%1) (%2)"), buf, r);
                }
-               
+
                flush ();
                return true;
        }
@@ -206,7 +206,7 @@ FFmpegDecoder::deinterleave_audio (shared_ptr<FFmpegAudioStream> stream, uint8_t
                }
        }
        break;
-       
+
        case AV_SAMPLE_FMT_S16:
        {
                int16_t* p = reinterpret_cast<int16_t *> (data[0]);
@@ -234,7 +234,7 @@ FFmpegDecoder::deinterleave_audio (shared_ptr<FFmpegAudioStream> stream, uint8_t
                }
        }
        break;
-       
+
        case AV_SAMPLE_FMT_S32:
        {
                int32_t* p = reinterpret_cast<int32_t *> (data[0]);
@@ -268,7 +268,7 @@ FFmpegDecoder::deinterleave_audio (shared_ptr<FFmpegAudioStream> stream, uint8_t
                }
        }
        break;
-               
+
        case AV_SAMPLE_FMT_FLTP:
        {
                float** p = reinterpret_cast<float**> (data);
@@ -314,7 +314,7 @@ FFmpegDecoder::seek (ContentTime time, bool accurate)
        /* XXX: it seems debatable whether PTS should be used here...
           http://www.mjbshaw.com/2012/04/seeking-in-ffmpeg-know-your-timestamp.html
        */
-       
+
        ContentTime u = time - _pts_offset;
        if (u < ContentTime ()) {
                u = ContentTime ();
@@ -324,7 +324,7 @@ FFmpegDecoder::seek (ContentTime time, bool accurate)
        avcodec_flush_buffers (video_codec_context());
 
        /* XXX: should be flushing audio buffers? */
-       
+
        if (subtitle_codec_context ()) {
                avcodec_flush_buffers (subtitle_codec_context ());
        }
@@ -336,7 +336,7 @@ FFmpegDecoder::decode_audio_packet ()
        /* Audio packets can contain multiple frames, so we may have to call avcodec_decode_audio4
           several times.
        */
-       
+
        AVPacket copy_packet = _packet;
 
        /* XXX: inefficient */
@@ -350,7 +350,7 @@ FFmpegDecoder::decode_audio_packet ()
                /* The packet's stream may not be an audio one; just ignore it in this method if so */
                return;
        }
-       
+
        while (copy_packet.size > 0) {
 
                int frame_finished;
@@ -376,14 +376,14 @@ FFmpegDecoder::decode_audio_packet ()
                                av_frame_get_best_effort_timestamp (_frame) *
                                av_q2d ((*stream)->stream (_format_context)->time_base))
                                + _pts_offset;
-                       
+
                        int const data_size = av_samples_get_buffer_size (
                                0, (*stream)->stream(_format_context)->codec->channels, _frame->nb_samples, audio_sample_format (*stream), 1
                                );
 
                        audio (*stream, deinterleave_audio (*stream, _frame->data, data_size), ct);
                }
-                       
+
                copy_packet.data += decode_result;
                copy_packet.size -= decode_result;
        }
@@ -400,7 +400,7 @@ FFmpegDecoder::decode_video_packet ()
        boost::mutex::scoped_lock lm (_filter_graphs_mutex);
 
        shared_ptr<FilterGraph> graph;
-       
+
        list<shared_ptr<FilterGraph> >::iterator i = _filter_graphs.begin();
        while (i != _filter_graphs.end() && !(*i)->can_process (dcp::Size (_frame->width, _frame->height), (AVPixelFormat) _frame->format)) {
                ++i;
@@ -419,7 +419,7 @@ FFmpegDecoder::decode_video_packet ()
        for (list<pair<shared_ptr<Image>, int64_t> >::iterator i = images.begin(); i != images.end(); ++i) {
 
                shared_ptr<Image> image = i->first;
-               
+
                if (i->second != AV_NOPTS_VALUE) {
                        double const pts = i->second * av_q2d (_format_context->streams[_video_stream]->time_base) + _pts_offset.seconds ();
                        video (
@@ -433,7 +433,7 @@ FFmpegDecoder::decode_video_packet ()
 
        return true;
 }
-       
+
 void
 FFmpegDecoder::decode_subtitle_packet ()
 {
@@ -442,7 +442,7 @@ FFmpegDecoder::decode_subtitle_packet ()
        if (avcodec_decode_subtitle2 (subtitle_codec_context(), &sub, &got_subtitle, &_packet) < 0 || !got_subtitle) {
                return;
        }
-       
+
        if (sub.num_rects <= 0) {
                /* Sometimes we get an empty AVSubtitle, which is used by some codecs to
                   indicate that the previous subtitle should stop.  We can ignore it here.
@@ -465,7 +465,7 @@ FFmpegDecoder::decode_subtitle_packet ()
                /* We have to look up the `to' time in the stream's records */
                period.to = ffmpeg_content()->subtitle_stream()->find_subtitle_to (sub_period.from);
        }
-       
+
        AVSubtitleRect const * rect = sub.rects[0];
 
        switch (rect->type) {
@@ -481,7 +481,7 @@ FFmpegDecoder::decode_subtitle_packet ()
                cout << "XXX: SUBTITLE_ASS " << rect->ass << "\n";
                break;
        }
-       
+
        avsubtitle_free (&sub);
 }
 
@@ -504,7 +504,7 @@ FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTimeP
           G, third B, fourth A.
        */
        shared_ptr<Image> image (new Image (PIX_FMT_RGBA, dcp::Size (rect->w, rect->h), true));
-       
+
        /* Start of the first line in the subtitle */
        uint8_t* sub_p = rect->pict.data[0];
        /* sub_p looks up into a BGRA palette which is here
@@ -513,7 +513,7 @@ FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTimeP
        uint32_t const * palette = (uint32_t *) rect->pict.data[1];
        /* Start of the output data */
        uint32_t* out_p = (uint32_t *) image->data()[0];
-       
+
        for (int y = 0; y < rect->h; ++y) {
                uint8_t* sub_line_p = sub_p;
                uint32_t* out_line_p = out_p;
@@ -524,7 +524,7 @@ FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTimeP
                sub_p += rect->pict.linesize[0];
                out_p += image->stride()[0] / sizeof (uint32_t);
        }
-       
+
        dcp::Size const vs = _ffmpeg_content->video_size ();
        dcpomatic::Rect<double> const scaled_rect (
                static_cast<double> (rect->x) / vs.width,
@@ -532,7 +532,7 @@ FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTimeP
                static_cast<double> (rect->w) / vs.width,
                static_cast<double> (rect->h) / vs.height
                );
-       
+
        image_subtitle (period, image, scaled_rect);
 }
 
index 41af744471d1f91280c493e8aa2563b4ddaa8494..60217b07372f3c2da65bc225462cec03deb493e7 100644 (file)
@@ -72,9 +72,9 @@ private:
 
        std::list<ContentTimePeriod> image_subtitles_during (ContentTimePeriod, bool starting) const;
        std::list<ContentTimePeriod> text_subtitles_during (ContentTimePeriod, bool starting) const;
-       
+
        boost::shared_ptr<Log> _log;
-       
+
        std::list<boost::shared_ptr<FilterGraph> > _filter_graphs;
        boost::mutex _filter_graphs_mutex;
 
index 6d5e33238913c0f1e1afb79659e005ebb42f099b..16a89faa75a580e1ef55aa1a595d0e46fbc43d14 100644 (file)
@@ -56,7 +56,7 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
                        if (s->codec->channel_layout == 0) {
                                s->codec->channel_layout = av_get_default_channel_layout (s->codec->channels);
                        }
-                       
+
                        _audio_streams.push_back (
                                shared_ptr<FFmpegAudioStream> (
                                        new FFmpegAudioStream (audio_stream_name (s), s->id, s->codec->sample_rate, s->codec->channels)
@@ -105,7 +105,7 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Jo
                if (_packet.stream_index == _video_stream) {
                        video_packet (context);
                }
-               
+
                for (size_t i = 0; i < _audio_streams.size(); ++i) {
                        if (_audio_streams[i]->uses_index (_format_context, _packet.stream_index)) {
                                audio_packet (context, _audio_streams[i]);
@@ -180,7 +180,7 @@ optional<ContentTime>
 FFmpegExaminer::frame_time (AVStream* s) const
 {
        optional<ContentTime> t;
-       
+
        int64_t const bet = av_frame_get_best_effort_timestamp (_frame);
        if (bet != AV_NOPTS_VALUE) {
                t = ContentTime::from_seconds (bet * av_q2d (s->time_base));
@@ -263,7 +263,7 @@ FFmpegExaminer::stream_name (AVStream* s) const
                if (lang) {
                        n << lang->value;
                }
-               
+
                AVDictionaryEntry const * title = av_dict_get (s->metadata, "title", 0, 0);
                if (title) {
                        if (!n.str().empty()) {
index d6149446ae0984e26719b542d1d4fba66890edec..7b64b508aff864661aa56b8cea8cd392a9f64c05 100644 (file)
@@ -28,7 +28,7 @@ class FFmpegExaminer : public FFmpeg, public VideoExaminer
 {
 public:
        FFmpegExaminer (boost::shared_ptr<const FFmpegContent>, boost::shared_ptr<Job> job = boost::shared_ptr<Job> ());
-       
+
        boost::optional<float> video_frame_rate () const;
        dcp::Size video_size () const;
        Frame video_length () const;
@@ -37,7 +37,7 @@ public:
        std::vector<boost::shared_ptr<FFmpegSubtitleStream> > subtitle_streams () const {
                return _subtitle_streams;
        }
-       
+
        std::vector<boost::shared_ptr<FFmpegAudioStream> > audio_streams () const {
                return _audio_streams;
        }
@@ -45,12 +45,12 @@ public:
        boost::optional<ContentTime> first_video () const {
                return _first_video;
        }
-       
+
 private:
        void video_packet (AVCodecContext *);
        void audio_packet (AVCodecContext *, boost::shared_ptr<FFmpegAudioStream>);
        void subtitle_packet (AVCodecContext *, boost::shared_ptr<FFmpegSubtitleStream>);
-       
+
        std::string stream_name (AVStream* s) const;
        std::string audio_stream_name (AVStream* s) const;
        std::string subtitle_stream_name (AVStream* s) const;
index 6479bd70d96a817c73cf91e39cea41e0c70adea9..0930ea2b433de047c8286a23b64e6264c298a764 100644 (file)
@@ -33,7 +33,7 @@ public:
                : name (n)
                , _id (i)
        {}
-                               
+
        FFmpegStream (cxml::ConstNodePtr);
 
        void as_xml (xmlpp::Node *) const;
@@ -57,7 +57,7 @@ public:
 
        friend bool operator== (FFmpegStream const & a, FFmpegStream const & b);
        friend bool operator!= (FFmpegStream const & a, FFmpegStream const & b);
-       
+
 private:
        int _id;
 };
index b322428b990da823340a23b15b9aefa9ac89a0a3..413477865cf189481180bf0eaefa616bc7dc055c 100644 (file)
@@ -62,11 +62,11 @@ FFmpegSubtitleStream::add_subtitle (ContentTimePeriod period)
        _subtitles[period.from] = period.to;
 }
 
-list<ContentTimePeriod> 
+list<ContentTimePeriod>
 FFmpegSubtitleStream::subtitles_during (ContentTimePeriod period, bool starting) const
 {
        list<ContentTimePeriod> d;
-       
+
        /* XXX: inefficient */
        for (map<ContentTime, ContentTime>::const_iterator i = _subtitles.begin(); i != _subtitles.end(); ++i) {
                if ((starting && period.contains (i->first)) || (!starting && period.overlaps (ContentTimePeriod (i->first, i->second)))) {
index 3ed931b8c996b1691cf0acbe25dc9434d28b1cd1..a39b10ffd6624804baa80916a1cfe1f894d32a9e 100644 (file)
@@ -26,7 +26,7 @@ public:
        FFmpegSubtitleStream (std::string n, int i)
                : FFmpegStream (n, i)
        {}
-       
+
        FFmpegSubtitleStream (cxml::ConstNodePtr);
 
        void as_xml (xmlpp::Node *) const;
index 9c8d43204b1b830726c073de894e7b9f5c6e9e22..6f6a5a9162245f85ecb81a6178929c5782b3ff99 100644 (file)
@@ -82,7 +82,7 @@ FileGroup::ensure_open_path (size_t p) const
                /* Already open */
                return;
        }
-       
+
        if (_current_file) {
                fclose (_current_file);
        }
@@ -111,9 +111,9 @@ FileGroup::seek (int64_t pos, int whence) const
                }
 #ifdef DCPOMATIC_WINDOWS
                full_pos += _ftelli64 (_current_file);
-#else          
+#else
                full_pos += ftell (_current_file);
-#endif         
+#endif
                full_pos += pos;
                break;
        case SEEK_END:
index 5ec5fbc2f280a1b8e17d9e952b7c82bd33c54318..66f1de868bd8c6307eb208337e92f478afeff605 100644 (file)
@@ -137,11 +137,11 @@ Film::Film (boost::filesystem::path dir, bool log)
 
        _playlist_changed_connection = _playlist->Changed.connect (bind (&Film::playlist_changed, this));
        _playlist_content_changed_connection = _playlist->ContentChanged.connect (bind (&Film::playlist_content_changed, this, _1, _2, _3));
-       
+
        /* Make state.directory a complete path without ..s (where possible)
           (Code swiped from Adam Bowen on stackoverflow)
        */
-       
+
        boost::filesystem::path p (boost::filesystem::system_complete (dir));
        boost::filesystem::path result;
        for (boost::filesystem::path::iterator i = p.begin(); i != p.end(); ++i) {
@@ -171,7 +171,7 @@ Film::~Film ()
        for (list<boost::signals2::connection>::const_iterator i = _job_connections.begin(); i != _job_connections.end(); ++i) {
                i->disconnect ();
        }
-}      
+}
 
 string
 Film::video_identifier () const
@@ -180,7 +180,7 @@ Film::video_identifier () const
 
        SafeStringStream s;
        s.imbue (std::locale::classic ());
-       
+
        s << container()->id()
          << "_" << resolution_to_string (_resolution)
          << "_" << _playlist->video_identifier()
@@ -209,7 +209,7 @@ Film::video_identifier () const
 
        return s.str ();
 }
-         
+
 /** @return The file to write video frame info to */
 boost::filesystem::path
 Film::info_file () const
@@ -259,7 +259,7 @@ Film::audio_analysis_path () const
                if (!ac) {
                        continue;
                }
-               
+
                digester.add (ac->digest ());
                digester.add (ac->audio_mapping().digest ());
                digester.add (ac->audio_gain ());
@@ -278,7 +278,7 @@ void
 Film::make_dcp ()
 {
        set_isdcf_date_today ();
-       
+
        if (dcp_name().find ("/") != string::npos) {
                throw BadSettingError (_("name"), _("cannot contain slashes"));
        }
@@ -292,7 +292,7 @@ Film::make_dcp ()
        LOG_GENERAL ("DCP video rate %1 fps", video_frame_rate());
        LOG_GENERAL ("%1 threads", Config::instance()->num_local_encoding_threads());
        LOG_GENERAL ("J2K bandwidth %1", j2k_bandwidth());
-       
+
        if (container() == 0) {
                throw MissingSettingError (_("container"));
        }
@@ -386,7 +386,7 @@ Film::read_metadata ()
        if (_state_version > current_state_version) {
                throw StringError (_("This film was created with a newer version of DCP-o-matic, and it cannot be loaded into this version.  Sorry!"));
        }
-       
+
        _name = f.string_child ("Name");
        if (_state_version >= 9) {
                _use_isdcf_name = f.bool_child ("UseISDCFName");
@@ -460,9 +460,9 @@ Film::dir (boost::filesystem::path d) const
        boost::filesystem::path p;
        p /= _directory;
        p /= d;
-       
+
        boost::filesystem::create_directories (p);
-       
+
        return p;
 }
 
@@ -477,7 +477,7 @@ Film::file (boost::filesystem::path f) const
        p /= f;
 
        boost::filesystem::create_directories (p.parent_path ());
-       
+
        return p;
 }
 
@@ -494,7 +494,7 @@ Film::isdcf_name (bool if_created_now) const
        split (words, raw_name, is_any_of (" "));
 
        string fixed_name;
-       
+
        /* Add each word to fixed_name */
        for (vector<string>::const_iterator i = words.begin(); i != words.end(); ++i) {
                string w = *i;
@@ -509,7 +509,7 @@ Film::isdcf_name (bool if_created_now) const
                                ++caps;
                        }
                }
-               
+
                /* If w is all caps make the rest of it lower case, otherwise
                   leave it alone.
                */
@@ -540,15 +540,15 @@ Film::isdcf_name (bool if_created_now) const
        if (dm.temp_version) {
                d << "-Temp";
        }
-       
+
        if (dm.pre_release) {
                d << "-Pre";
        }
-       
+
        if (dm.red_band) {
                d << "-RedBand";
        }
-       
+
        if (!dm.chain.empty ()) {
                d << "-" << dm.chain;
        }
@@ -568,13 +568,13 @@ Film::isdcf_name (bool if_created_now) const
        if (video_frame_rate() != 24) {
                d << "-" << video_frame_rate();
        }
-       
+
        if (container()) {
                d << "_" << container()->isdcf_name();
        }
 
        ContentList cl = content ();
-       
+
        /* XXX: this uses the first bit of content only */
 
        /* The standard says we don't do this for trailers, for some strange reason */
@@ -592,7 +592,7 @@ Film::isdcf_name (bool if_created_now) const
                                break;
                        }
                }
-               
+
                if (content_ratio && content_ratio != container()) {
                        d << "-" << content_ratio->isdcf_name();
                }
@@ -637,18 +637,18 @@ Film::isdcf_name (bool if_created_now) const
                                copy (c.begin(), c.end(), back_inserter (mapped));
                        }
                }
-               
+
                mapped.sort ();
                mapped.unique ();
-               
+
                /* Count them */
-               
+
                for (list<int>::const_iterator i = mapped.begin(); i != mapped.end(); ++i) {
                        if (*i >= audio_channels()) {
                                /* This channel is mapped but is not included in the DCP */
                                continue;
                        }
-                       
+
                        if (static_cast<dcp::Channel> (*i) == dcp::LFE) {
                                ++lfe;
                        } else {
@@ -656,7 +656,7 @@ Film::isdcf_name (bool if_created_now) const
                        }
                }
        }
-       
+
        if (non_lfe) {
                d << "_" << non_lfe << lfe;
        }
@@ -664,7 +664,7 @@ Film::isdcf_name (bool if_created_now) const
        /* XXX: HI/VI */
 
        d << "_" << resolution_to_string (_resolution);
-       
+
        if (!dm.studio.empty ()) {
                d << "_" << dm.studio;
        }
@@ -684,7 +684,7 @@ Film::isdcf_name (bool if_created_now) const
        } else {
                d << "_SMPTE";
        }
-       
+
        if (three_d ()) {
                d << "-3D";
        }
@@ -718,7 +718,7 @@ Film::dcp_name (bool if_created_now) const
                        filtered += unfiltered[i];
                }
        }
-       
+
        return filtered;
 }
 
@@ -863,7 +863,7 @@ Film::j2c_path (int f, Eyes e, bool t) const
        } else if (e == EYES_RIGHT) {
                s << ".R";
        }
-       
+
        s << ".j2c";
 
        if (t) {
@@ -879,7 +879,7 @@ vector<CPLSummary>
 Film::cpls () const
 {
        vector<CPLSummary> out;
-       
+
        boost::filesystem::path const dir = directory ();
        for (boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator(dir); i != boost::filesystem::directory_iterator(); ++i) {
                if (
@@ -903,7 +903,7 @@ Film::cpls () const
                        }
                }
        }
-       
+
        return out;
 }
 
@@ -947,13 +947,13 @@ Film::examine_and_add_content (shared_ptr<Content> c)
        if (dynamic_pointer_cast<FFmpegContent> (c)) {
                run_ffprobe (c->path(0), file ("ffprobe.log"), _log);
        }
-                       
+
        shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c));
 
        _job_connections.push_back (
                j->Finished.connect (bind (&Film::maybe_add_content, this, boost::weak_ptr<Job> (j), boost::weak_ptr<Content> (c)))
                );
-       
+
        JobManager::instance()->add (j);
 }
 
@@ -964,7 +964,7 @@ Film::maybe_add_content (weak_ptr<Job> j, weak_ptr<Content> c)
        if (!job || !job->finished_ok ()) {
                return;
        }
-       
+
        shared_ptr<Content> content = c.lock ();
        if (content) {
                add_content (content);
@@ -1035,7 +1035,7 @@ Film::playlist_changed ()
 {
        signal_changed (CONTENT);
        signal_changed (NAME);
-}      
+}
 
 int
 Film::audio_frame_rate () const
@@ -1088,7 +1088,7 @@ Film::make_kdm (
        if (!signer->valid ()) {
                throw InvalidSignerError ();
        }
-       
+
        return dcp::DecryptedKDM (
                cpl, key(), from, until, "DCP-o-matic", cpl->content_title_text(), dcp::LocalTime().as_string()
                ).encrypt (signer, target, formulation);
@@ -1162,7 +1162,7 @@ string
 Film::subtitle_language () const
 {
        set<string> languages;
-       
+
        ContentList cl = content ();
        BOOST_FOREACH (shared_ptr<Content>& c, cl) {
                shared_ptr<SubtitleContent> sc = dynamic_pointer_cast<SubtitleContent> (c);
@@ -1215,7 +1215,7 @@ Film::audio_output_names () const
        if (audio_processor ()) {
                return audio_processor()->input_names ();
        }
-       
+
        vector<string> n;
        n.push_back (_("L"));
        n.push_back (_("R"));
index f268bc5b7c6050737c8bb5730d7db8b33ebb71c2..5e4c01c868cb46341f073f823182e3b77e436bba 100644 (file)
@@ -105,7 +105,7 @@ public:
 
        uint64_t required_disk_space () const;
        bool should_be_enough_disk_space (double& required, double& available, bool& can_hard_link) const;
-       
+
        /* Proxies for some Playlist methods */
 
        ContentList content () const;
@@ -121,7 +121,7 @@ public:
                dcp::LocalTime until,
                dcp::Formulation formulation
                ) const;
-       
+
        std::list<dcp::EncryptedKDM> make_kdms (
                std::list<boost::shared_ptr<Screen> >,
                boost::filesystem::path cpl_file,
@@ -140,7 +140,7 @@ public:
        std::vector<std::string> audio_output_names () const;
 
        void repeat_content (ContentList, int);
-       
+
        /** Identifiers for the parts of our state;
            used for signalling changes.
        */
@@ -200,7 +200,7 @@ public:
        bool is_signed () const {
                return _signed;
        }
-       
+
        bool encrypted () const {
                return _encrypted;
        }
@@ -245,7 +245,7 @@ public:
        AudioProcessor const * audio_processor () const {
                return _audio_processor;
        }
-       
+
 
        /* SET */
 
@@ -304,7 +304,7 @@ private:
         *  must not be relative.
         */
        boost::filesystem::path _directory;
-       
+
        /** Name for DCP-o-matic */
        std::string _name;
        /** True if a auto-generated ISDCF-compliant name should be used for our DCP */
index a7dd9c5cee61c1f2e935705681f574a2a847ce17..c9876c05b16d150748a3fb0cdd17e6d5b2c9d5e9 100644 (file)
@@ -61,7 +61,7 @@ void
 Filter::setup_filters ()
 {
        /* Note: "none" is a magic id name, so don't use it here */
-          
+
        maybe_add (N_("mcdeint"),   _("Motion compensating deinterlacer"),            _("De-interlacing"),  N_("mcdeint"));
        maybe_add (N_("kerndeint"), _("Kernel deinterlacer"),                         _("De-interlacing"),  N_("kerndeint"));
        maybe_add (N_("yadif"),     _("Yet Another Deinterlacing Filter"),            _("De-interlacing"),  N_("yadif"));
index 66ecc4308355ba19c55cd4fa91a2ffbc8d4619d7..39687fcd45981dce485f882d452d4a8bbe44591d 100644 (file)
@@ -54,11 +54,11 @@ public:
        std::string vf () const {
                return _vf;
        }
-       
+
        std::string category () const {
                return _category;
        }
-       
+
        static std::vector<Filter const *> all ();
        static Filter const * from_id (std::string);
        static void setup_filters ();
index 9f80118bd468be8f6df388d7931b3f501af13e27..da7b0413397b9b01d7529414a4730f7aff59638c 100644 (file)
@@ -67,7 +67,7 @@ FilterGraph::FilterGraph (shared_ptr<const FFmpegContent> content, dcp::Size s,
        }
 
        _frame = av_frame_alloc ();
-       
+
        AVFilterGraph* graph = avfilter_graph_alloc();
        if (graph == 0) {
                throw DecodeError (N_("could not create filter graph."));
@@ -98,7 +98,7 @@ FilterGraph::FilterGraph (shared_ptr<const FFmpegContent> content, dcp::Size s,
        pixel_fmts[0] = _pixel_format;
        pixel_fmts[1] = PIX_FMT_NONE;
        sink_params->pixel_fmts = pixel_fmts;
-       
+
        if (avfilter_graph_create_filter (&_buffer_sink_context, buffer_sink, N_("out"), 0, sink_params, graph) < 0) {
                throw DecodeError (N_("could not create buffer sink."));
        }
@@ -120,7 +120,7 @@ FilterGraph::FilterGraph (shared_ptr<const FFmpegContent> content, dcp::Size s,
        if (avfilter_graph_parse (graph, filters.c_str(), inputs, outputs, 0) < 0) {
                throw DecodeError (N_("could not set up filter graph."));
        }
-       
+
        if (avfilter_graph_config (graph, 0) < 0) {
                throw DecodeError (N_("could not configure filter graph."));
        }
@@ -148,17 +148,17 @@ FilterGraph::process (AVFrame* frame)
                if (r < 0) {
                        throw DecodeError (String::compose (N_("could not push buffer into filter chain (%1)."), r));
                }
-               
+
                while (true) {
                        if (av_buffersink_get_frame (_buffer_sink_context, _frame) < 0) {
                                break;
                        }
-                       
+
                        images.push_back (make_pair (shared_ptr<Image> (new Image (_frame)), av_frame_get_best_effort_timestamp (_frame)));
                        av_frame_unref (_frame);
                }
        }
-               
+
        return images;
 }
 
index 0e1ad85cdf2bb6a248b6e75d770c442cfbcc2a2b..d729c26965a1490bbef7337701c20dd2eb1d1abd 100644 (file)
@@ -24,7 +24,7 @@ Font::Font (cxml::NodePtr node)
        : _id (node->string_child ("Id"))
        , _file (node->optional_string_child ("File"))
 {
-       
+
 }
 
 void
index 0dd63448e7557edd089b70ed9889e8a3a8977064..ca7650cc1b68d43406e2c8f27dd27e68762ea760 100644 (file)
@@ -51,7 +51,7 @@ public:
 
        boost::signals2::signal<void()> Changed;
 
-private:       
+private:
        /** Font ID, used to describe it in the subtitle content */
        std::string _id;
        boost::optional<boost::filesystem::path> _file;
index 31fce6b6d71182625ebc0a43bc4609d1e7f5ab8c..d327f8e31ad151d8cdd7e7c517b836c28394b78f 100644 (file)
@@ -37,14 +37,14 @@ about_equal (float a, float b)
            = Ff + Fd - Ff frames
            = Fd frames
            = Fd/f seconds
+
           So if we accept a difference of 1 frame, ie 1/f seconds, we can
           say that
 
           1/f = Fd/f
        ie 1 = Fd
        ie d = 1/F
+
           So for a 3hr film, ie F = 3 * 60 * 60 = 10800, the acceptable
           FPS error is 1/F ~= 0.0001 ~= 10-e4
        */
@@ -81,7 +81,7 @@ string
 FrameRateChange::description () const
 {
        string description;
-       
+
        if (!skip && repeat == 1 && !change_speed) {
                description = _("Content and DCP have the same rate.\n");
        } else {
index d5d3167cd0bd3059fab1ed0654782987ba6d32ad..c403b61abfe9cee0daea7d74cdccd49820275b60 100644 (file)
@@ -56,7 +56,7 @@ Image::line_factor (int n) const
        if (!d) {
                throw PixelFormatError ("lines()", _pixel_format);
        }
-       
+
        return pow (2.0f, d->log2_chroma_h);
 }
 
@@ -81,7 +81,7 @@ Image::components () const
        if ((d->flags & PIX_FMT_PLANAR) == 0) {
                return 1;
        }
-       
+
        return d->nb_components;
 }
 
@@ -129,7 +129,7 @@ Image::crop_scale_window (
                sws_getCoefficients (lut[yuv_to_rgb]), 0,
                0, 1 << 16, 1 << 16
                );
-       
+
        /* Prepare input data pointers with crop */
        uint8_t* scale_in_data[components()];
        for (int c = 0; c < components(); ++c) {
@@ -153,7 +153,7 @@ Image::crop_scale_window (
 
        sws_freeContext (scale_context);
 
-       return out;     
+       return out;
 }
 
 shared_ptr<Image>
@@ -184,7 +184,7 @@ Image::scale (dcp::Size out_size, dcp::YUVToRGB yuv_to_rgb, AVPixelFormat out_fo
                sws_getCoefficients (lut[yuv_to_rgb]), 0,
                0, 1 << 16, 1 << 16
                );
-       
+
        sws_scale (
                scale_context,
                data(), stride(),
@@ -263,7 +263,7 @@ Image::make_black ()
        static uint16_t const ten_bit_uv =      (1 << 9) - 1;
        /* U/V black value for 16-bit colour */
        static uint16_t const sixteen_bit_uv =  (1 << 15) - 1;
-       
+
        switch (_pixel_format) {
        case PIX_FMT_YUV420P:
        case PIX_FMT_YUV422P:
@@ -291,7 +291,7 @@ Image::make_black ()
        case PIX_FMT_YUV444P9BE:
                yuv_16_black (swap_16 (nine_bit_uv), false);
                break;
-               
+
        case PIX_FMT_YUV422P10LE:
        case PIX_FMT_YUV444P10LE:
                yuv_16_black (ten_bit_uv, false);
@@ -301,7 +301,7 @@ Image::make_black ()
        case PIX_FMT_YUV444P16LE:
                yuv_16_black (sixteen_bit_uv, false);
                break;
-               
+
        case PIX_FMT_YUV444P10BE:
        case PIX_FMT_YUV422P10BE:
                yuv_16_black (swap_16 (ten_bit_uv), false);
@@ -312,31 +312,31 @@ Image::make_black ()
        case AV_PIX_FMT_YUVA444P9BE:
                yuv_16_black (swap_16 (nine_bit_uv), true);
                break;
-               
+
        case AV_PIX_FMT_YUVA420P9LE:
        case AV_PIX_FMT_YUVA422P9LE:
        case AV_PIX_FMT_YUVA444P9LE:
                yuv_16_black (nine_bit_uv, true);
                break;
-               
+
        case AV_PIX_FMT_YUVA420P10BE:
        case AV_PIX_FMT_YUVA422P10BE:
        case AV_PIX_FMT_YUVA444P10BE:
                yuv_16_black (swap_16 (ten_bit_uv), true);
                break;
-               
+
        case AV_PIX_FMT_YUVA420P10LE:
        case AV_PIX_FMT_YUVA422P10LE:
        case AV_PIX_FMT_YUVA444P10LE:
                yuv_16_black (ten_bit_uv, true);
                break;
-               
+
        case AV_PIX_FMT_YUVA420P16BE:
        case AV_PIX_FMT_YUVA422P16BE:
        case AV_PIX_FMT_YUVA444P16BE:
                yuv_16_black (swap_16 (sixteen_bit_uv), true);
                break;
-               
+
        case AV_PIX_FMT_YUVA420P16LE:
        case AV_PIX_FMT_YUVA422P16LE:
        case AV_PIX_FMT_YUVA444P16LE:
@@ -419,7 +419,7 @@ Image::alpha_blend (shared_ptr<const Image> other, Position<int> position)
                                tp[0] = op[0] * alpha + tp[0] * (1 - alpha);
                                tp[1] = op[1] * alpha + tp[1] * (1 - alpha);
                                tp[2] = op[2] * alpha + tp[2] * (1 - alpha);
-                               
+
                                tp += this_bpp;
                                op += other_bpp;
                        }
@@ -439,7 +439,7 @@ Image::alpha_blend (shared_ptr<const Image> other, Position<int> position)
                                tp[1] = op[1] * alpha + tp[1] * (1 - alpha);
                                tp[2] = op[2] * alpha + tp[2] * (1 - alpha);
                                tp[3] = op[3] * alpha + tp[3] * (1 - alpha);
-                               
+
                                tp += this_bpp;
                                op += other_bpp;
                        }
@@ -458,7 +458,7 @@ Image::alpha_blend (shared_ptr<const Image> other, Position<int> position)
                                tp[1] = op[0] * alpha + tp[1] * (1 - alpha);
                                tp[3] = op[1] * alpha + tp[3] * (1 - alpha);
                                tp[5] = op[2] * alpha + tp[5] * (1 - alpha);
-                               
+
                                tp += this_bpp;
                                op += other_bpp;
                        }
@@ -469,7 +469,7 @@ Image::alpha_blend (shared_ptr<const Image> other, Position<int> position)
                DCPOMATIC_ASSERT (false);
        }
 }
-       
+
 void
 Image::copy (shared_ptr<const Image> other, Position<int> position)
 {
@@ -483,7 +483,7 @@ Image::copy (shared_ptr<const Image> other, Position<int> position)
                uint8_t * const op = other->data()[0] + oy * other->stride()[0];
                memcpy (tp, op, N * 3);
        }
-}      
+}
 
 void
 Image::read_from_socket (shared_ptr<Socket> socket)
@@ -534,7 +534,7 @@ Image::bytes_per_pixel (int c) const
        if (d->nb_components > 3) {
                bpp[3] = floor ((d->comp[3].depth_minus1 + 1 + 7) / 8) / pow (2.0f, d->log2_chroma_w);
        }
-       
+
        if ((d->flags & PIX_FMT_PLANAR) == 0) {
                /* Not planar; sum them up */
                return bpp[0] + bpp[1] + bpp[2] + bpp[3];
@@ -562,10 +562,10 @@ Image::allocate ()
 {
        _data = (uint8_t **) wrapped_av_malloc (4 * sizeof (uint8_t *));
        _data[0] = _data[1] = _data[2] = _data[3] = 0;
-       
+
        _line_size = (int *) wrapped_av_malloc (4 * sizeof (int));
        _line_size[0] = _line_size[1] = _line_size[2] = _line_size[3] = 0;
-       
+
        _stride = (int *) wrapped_av_malloc (4 * sizeof (int));
        _stride[0] = _stride[1] = _stride[2] = _stride[3] = 0;
 
index 8cf4a72f71e62f432e020a9f65e273787997becf..89cd98f7b281bd6cfe68a758e3b8ceb33625d3a9 100644 (file)
@@ -47,7 +47,7 @@ public:
        Image (boost::shared_ptr<const Image>, bool);
        Image& operator= (Image const &);
        ~Image ();
-       
+
        uint8_t * const * data () const;
        int * line_size () const;
        int const * stride () const;
@@ -61,7 +61,7 @@ public:
        boost::shared_ptr<Image> scale (dcp::Size, dcp::YUVToRGB yuv_to_rgb, AVPixelFormat, bool aligned) const;
        boost::shared_ptr<Image> crop (Crop c, bool aligned) const;
        boost::shared_ptr<Image> crop_scale_window (Crop c, dcp::Size, dcp::Size, dcp::YUVToRGB yuv_to_rgb, AVPixelFormat, bool aligned) const;
-       
+
        void make_black ();
        void make_transparent ();
        void alpha_blend (boost::shared_ptr<const Image> image, Position<int> pos);
@@ -70,14 +70,14 @@ public:
 
        void read_from_socket (boost::shared_ptr<Socket>);
        void write_to_socket (boost::shared_ptr<Socket>) const;
-       
+
        AVPixelFormat pixel_format () const {
                return _pixel_format;
        }
 
 private:
        friend struct pixel_formats_test;
-       
+
        void allocate ();
        void swap (Image &);
        float bytes_per_pixel (int) const;
index 3f62c3ebfdccbddd487b30751e43d226d9cc3307..920d7ae54753db4b4b4bbe1f223e48b4cb94d766 100644 (file)
@@ -58,7 +58,7 @@ ImageContent::ImageContent (shared_ptr<const Film> film, boost::filesystem::path
                if (_paths.empty()) {
                        throw FileError (_("No valid image files were found in the folder."), p);
                }
-                               
+
                sort (_paths.begin(), _paths.end(), ImageFilenameSorter ());
        }
 
@@ -73,7 +73,7 @@ ImageContent::ImageContent (shared_ptr<const Film> film, cxml::ConstNodePtr node
        : Content (film, node)
        , VideoContent (film, node, version)
 {
-       
+
 }
 
 string
@@ -120,7 +120,7 @@ ImageContent::examine (shared_ptr<Job> job)
 
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
-       
+
        shared_ptr<ImageExaminer> examiner (new ImageExaminer (film, shared_from_this(), job));
        take_from_video_examiner (examiner);
 }
@@ -168,10 +168,10 @@ ImageContent::set_video_frame_rate (float r)
                if (_video_frame_rate == r) {
                        return;
                }
-               
+
                _video_frame_rate = r;
        }
-       
+
        signal_changed (VideoContentProperty::VIDEO_FRAME_RATE);
 }
 
index 11c932153adba433c64174ba6fc14ec97908f069..4a8d91bdbdd95638dfd8fec468b218faecfd900b 100644 (file)
@@ -47,7 +47,7 @@ public:
 
        /* VideoContent */
        void set_default_colour_conversion ();
-       
+
        void set_video_length (Frame);
        bool still () const;
        void set_video_frame_rate (float);
index 3d3e1a55b2083ad6fa7a70276af8f0804485d9da..3d543eaf28562572a8ee3f0ce29d50cd3b921ec6 100644 (file)
@@ -61,7 +61,7 @@ ImageDecoder::pass ()
                        _image.reset (new MagickImageProxy (path));
                }
        }
-               
+
        video (_image, _video_position);
        ++_video_position;
        return false;
index 775496bfdb8a874b06f8099f3e1c632c4c0d3857..ed5ce65a7d31be7e6df986b23316223382dfbd61 100644 (file)
@@ -37,7 +37,7 @@ public:
 private:
        bool pass ();
        void seek (ContentTime, bool);
-       
+
        boost::shared_ptr<const ImageContent> _image_content;
        boost::shared_ptr<ImageProxy> _image;
        Frame _video_position;
index cea5dfea7d1ea5addb5540a9cf0999ec735ccea0..79c9f727ceed7ba710546cb8d4292eb0f58a4df5 100644 (file)
@@ -41,7 +41,7 @@ ImageExaminer::ImageExaminer (shared_ptr<const Film> film, shared_ptr<const Imag
        : _film (film)
        , _image_content (content)
 {
-#ifdef DCPOMATIC_IMAGE_MAGICK  
+#ifdef DCPOMATIC_IMAGE_MAGICK
        using namespace MagickCore;
 #endif
        boost::filesystem::path path = content->path(0).string ();
index 0cb6adc6bf182705490e44eed16c80b70ccd0741..5a3e1dcecf6ce11297ba7c94c00945393d4d7377 100644 (file)
@@ -40,7 +40,7 @@ private:
        boost::optional<int> extract_number (boost::filesystem::path p)
        {
                p = p.leaf ();
-               
+
                std::string number;
                for (size_t i = 0; i < p.string().size(); ++i) {
                        if (isdigit (p.string()[i])) {
index b25943ae178aedc12010b515350e4bc0c6b295be..217f70fb27db0e20c3394df1114b1536fa17730a 100644 (file)
@@ -31,7 +31,7 @@ public:
                : image (i)
                , rectangle (r)
        {}
-       
+
        boost::shared_ptr<Image> image;
        /** Area that the subtitle covers on its corresponding video, expressed in
         *  proportions of the image size; e.g. rectangle.x = 0.5 would mean that
index b4395fd212c732b3d66da2cb00f07bad34e77dd2..7bc818717a44737f2719960a8bc8832aff4eec82 100644 (file)
@@ -53,7 +53,7 @@ get_from_zip_url (string url, string file, function<void (boost::filesystem::pat
        /* Download the ZIP file to temp_zip */
        CURL* curl = curl_easy_init ();
        curl_easy_setopt (curl, CURLOPT_URL, url.c_str ());
-       
+
        ScopedTemporary temp_zip;
        FILE* f = temp_zip.open ("wb");
        curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, get_from_zip_url_data);
@@ -71,17 +71,17 @@ get_from_zip_url (string url, string file, function<void (boost::filesystem::pat
        }
 
        /* Open the ZIP file and read `file' out of it */
-       
+
        struct zip* zip = zip_open (temp_zip.c_str(), 0, 0);
        if (!zip) {
                return optional<string> (_("Could not open downloaded ZIP file"));
        }
-       
+
        struct zip_file* zip_file = zip_fopen (zip, file.c_str(), 0);
        if (!zip_file) {
                return optional<string> (_("Unexpected ZIP file contents"));
        }
-       
+
        ScopedTemporary temp_cert;
        f = temp_cert.open ("wb");
        char buffer[4096];
@@ -93,7 +93,7 @@ get_from_zip_url (string url, string file, function<void (boost::filesystem::pat
                }
        }
        temp_cert.close ();
-       
+
        load (temp_cert.file ());
        return optional<string> ();
 }
index a9d7d939e13f75eea807f32a8023581617220650..4a0e57d275721bede5a5063c7824e890d3573124 100644 (file)
@@ -44,7 +44,7 @@ ISDCFMetadata::ISDCFMetadata (cxml::ConstNodePtr node)
        , two_d_version_of_three_d (node->optional_bool_child ("TwoDVersionOfThreeD").get_value_or (false))
        , mastered_luminance (node->optional_string_child ("MasteredLuminance").get_value_or (""))
 {
-       
+
 }
 
 void
index 6b326ddc8513c94d021526e49486b4204d1765c6..0e904238df62ba96c19f28cc3391a2d76d2e307a 100644 (file)
@@ -34,7 +34,7 @@ public:
                , red_band (false)
                , two_d_version_of_three_d (false)
        {}
-       
+
        ISDCFMetadata (cxml::ConstNodePtr);
 
        void as_xml (xmlpp::Node *) const;
index ce0b88265ee8259e44b3cc3b93879c08b638d01a..9914887738bc5859eba5a21eec55e88f15ee56db 100644 (file)
@@ -112,7 +112,7 @@ J2KImageProxy::image (optional<dcp::NoteHandler> note) const
        } else {
                dcp::xyz_to_rgb (oj, dcp::ColourConversion::srgb_to_xyz(), image->data()[0], image->stride()[0], note);
        }
-       
+
        return image;
 }
 
index fa2df8cd8788d370858393d5423dd0bcb4ecc8fb..191d759db8d5453746a72b15691188992b9987e2 100644 (file)
@@ -40,11 +40,11 @@ public:
        Data j2k () const {
                return _data;
        }
-       
+
        dcp::Size size () const {
                return _size;
        }
-       
+
 private:
        Data _data;
        dcp::Size _size;
index 25ff0aa4cf887e0422fb9e470b0fbd2b0b0f424c..71e4c34464be7db3eec2db19dbd8b0c5fa31a454 100644 (file)
@@ -86,7 +86,7 @@ Job::run_wrapper ()
                set_error (e.what(), m);
                set_progress (1);
                set_state (FINISHED_ERROR);
-               
+
        } catch (OpenFileError& e) {
 
                set_error (
@@ -106,7 +106,7 @@ Job::run_wrapper ()
                set_error (_("Out of memory"), _("There was not enough memory to do this."));
                set_progress (1);
                set_state (FINISHED_ERROR);
-               
+
        } catch (std::exception& e) {
 
                set_error (
@@ -116,7 +116,7 @@ Job::run_wrapper ()
 
                set_progress (1);
                set_state (FINISHED_ERROR);
-               
+
        } catch (...) {
 
                set_error (
@@ -182,7 +182,7 @@ Job::paused () const
        boost::mutex::scoped_lock lm (_state_mutex);
        return _state == PAUSED;
 }
-       
+
 /** Set the state of this job.
  *  @param s New state.
  */
@@ -204,7 +204,7 @@ Job::set_state (State s)
 
        if (finished) {
                emit (boost::bind (boost::ref (Finished)));
-       }       
+       }
 }
 
 /** @return DCPTime (in seconds) that this sub-job has been running */
@@ -214,7 +214,7 @@ Job::elapsed_time () const
        if (_start_time == 0) {
                return 0;
        }
-       
+
        return time (0) - _start_time;
 }
 
@@ -259,7 +259,7 @@ Job::sub (string n)
                boost::mutex::scoped_lock lm (_progress_mutex);
                _sub_name = n;
        }
-       
+
        set_progress (0, true);
 }
 
@@ -286,7 +286,7 @@ Job::set_error (string s, string d)
 {
        LOG_ERROR_NC (s);
        LOG_ERROR_NC (d);
-       
+
        _film->log()->log (String::compose ("Error in job: %1 (%2)", s, d), Log::TYPE_ERROR);
        boost::mutex::scoped_lock lm (_state_mutex);
        _error_summary = s;
@@ -319,9 +319,9 @@ Job::status () const
                        /* 100% makes it sound like we've finished when we haven't */
                        pc = 99;
                }
-               
+
                s << pc << N_("%");
-               
+
                if (t > 10 && r > 0) {
                        /// TRANSLATORS: remaining here follows an amount of time that is remaining
                        /// on an operation.
@@ -368,7 +368,7 @@ Job::remaining_time () const
        if (progress().get_value_or(0) == 0) {
                return elapsed_time ();
        }
-       
+
        return elapsed_time() / progress().get() - elapsed_time();
 }
 
index 8fe87747c2186a465b48799ab8b4734bc9a58fe6..06a341f40d6808581d4bcf44ed3f2805f15285d1 100644 (file)
@@ -47,7 +47,7 @@ public:
        virtual std::string json_name () const = 0;
        /** Run this job in the current thread. */
        virtual void run () = 0;
-       
+
        void start ();
        void pause ();
        void resume ();
@@ -97,7 +97,7 @@ protected:
                FINISHED_ERROR, ///< the job has finished in error
                FINISHED_CANCELLED ///< the job was cancelled
        };
-       
+
        void set_state (State);
        void set_error (std::string s, std::string d);
 
index b5b64a77eccc9d9f000d8512ee3a2101142a059b..f31a00a18b33f0bce674f0406b06197f8fbea691 100644 (file)
@@ -40,7 +40,7 @@ JobManager::JobManager ()
        , _last_active_jobs (false)
        , _scheduler (new boost::thread (boost::bind (&JobManager::scheduler, this)))
 {
-       
+
 }
 
 JobManager::~JobManager ()
@@ -64,7 +64,7 @@ JobManager::add (shared_ptr<Job> j)
        }
 
        emit (boost::bind (boost::ref (JobAdded), weak_ptr<Job> (j)));
-       
+
        return j;
 }
 
@@ -98,7 +98,7 @@ JobManager::errors () const
        }
 
        return false;
-}      
+}
 
 void
 JobManager::scheduler ()
@@ -112,21 +112,21 @@ JobManager::scheduler ()
                        if (_terminate) {
                                return;
                        }
-                       
+
                        for (list<shared_ptr<Job> >::iterator i = _jobs.begin(); i != _jobs.end(); ++i) {
 
                                if (!(*i)->finished ()) {
                                        active_jobs = true;
                                }
-                               
+
                                if ((*i)->running ()) {
                                        /* Something is already happening */
                                        break;
                                }
-                               
+
                                if ((*i)->is_new()) {
                                        (*i)->start ();
-                                       
+
                                        /* Only start one job at once */
                                        break;
                                }
index b946c1a98e0836893eb758b2d19554d4643871e2..d0e83e26f6c13b369ba524d421c6bcd72d25e7b5 100644 (file)
@@ -51,11 +51,11 @@ public:
 private:
        /* This function is part of the test suite */
        friend void ::wait_for_jobs ();
-       
+
        JobManager ();
        ~JobManager ();
        void scheduler ();
-       
+
        mutable boost::mutex _mutex;
        std::list<boost::shared_ptr<Job> > _jobs;
        bool _terminate;
index 1035c248fccbb3b5abc873e848765214e1c6ebc0..e06ee22c3d0b75f44fd82a5b5293cb0970941646 100644 (file)
@@ -139,22 +139,22 @@ void
 JSONServer::request (string url, shared_ptr<tcp::socket> socket)
 {
        cout << "request: " << url << "\n";
-       
+
        map<string, string> r = split_get_request (url);
        for (map<string, string>::iterator i = r.begin(); i != r.end(); ++i) {
                cout << i->first << " => " << i->second << "\n";
        }
-       
+
        string action;
        if (r.find ("action") != r.end ()) {
                action = r["action"];
        }
-       
+
        stringstream json;
        if (action == "status") {
-               
+
                list<shared_ptr<Job> > jobs = JobManager::instance()->get ();
-               
+
                json << "{ \"jobs\": [";
                for (list<shared_ptr<Job> >::iterator i = jobs.begin(); i != jobs.end(); ++i) {
 
@@ -163,7 +163,7 @@ JSONServer::request (string url, shared_ptr<tcp::socket> socket)
                        if ((*i)->film()) {
                                json << "\"dcp\": \"" << (*i)->film()->dcp_name() << "\", ";
                        }
-                       
+
                        json << "\"name\": \""   << (*i)->json_name() << "\", ";
                        if ((*i)->progress ()) {
                                json << "\"progress\": " << (*i)->progress().get() << ", ";
@@ -172,7 +172,7 @@ JSONServer::request (string url, shared_ptr<tcp::socket> socket)
                        }
                        json << "\"status\": \"" << (*i)->json_status() << "\"";
                        json << " }";
-                       
+
                        list<shared_ptr<Job> >::iterator j = i;
                        ++j;
                        if (j != jobs.end ()) {
@@ -180,12 +180,12 @@ JSONServer::request (string url, shared_ptr<tcp::socket> socket)
                        }
                }
                json << "] }";
-               
+
                if (json.str().empty ()) {
                        json << "{ }";
                }
        }
-       
+
        stringstream reply;
        reply << "HTTP/1.1 200 OK\r\n"
              << "Content-Length: " << json.str().length() << "\r\n"
index 623067558c938216be282a1fe96889f08877feae..06c49d885b7c81dff802441eb883c87080114f01 100644 (file)
@@ -28,4 +28,4 @@ private:
        void request (std::string url, boost::shared_ptr<boost::asio::ip::tcp::socket> socket);
 };
 
-       
+
index 8949736f80353eb8987cb623e68bd9ca81c0e77b..8489eed3352d34cb45e1bfa83bf6126d0d2b591a 100644 (file)
@@ -42,7 +42,7 @@ struct ScreenKDM
                : screen (s)
                , kdm (k)
        {}
-       
+
        shared_ptr<Screen> screen;
        dcp::EncryptedKDM kdm;
 };
@@ -68,23 +68,23 @@ struct CinemaKDMs
                        }
                        throw FileError ("could not create ZIP file", zip_file);
                }
-               
+
                list<shared_ptr<string> > kdm_strings;
-               
+
                for (list<ScreenKDM>::const_iterator i = screen_kdms.begin(); i != screen_kdms.end(); ++i) {
                        shared_ptr<string> kdm (new string (i->kdm.as_xml ()));
                        kdm_strings.push_back (kdm);
-                       
+
                        struct zip_source* source = zip_source_buffer (zip, kdm->c_str(), kdm->length(), 0);
                        if (!source) {
                                throw StringError ("could not create ZIP source");
                        }
-                       
+
                        if (zip_add (zip, kdm_filename (film, *i).c_str(), source) == -1) {
                                throw StringError ("failed to add KDM to ZIP archive");
                        }
                }
-               
+
                if (zip_close (zip) == -1) {
                        throw StringError ("failed to close ZIP archive");
                }
@@ -111,9 +111,9 @@ make_screen_kdms (
        )
 {
        list<dcp::EncryptedKDM> kdms = film->make_kdms (screens, cpl, from, to, formulation);
-          
+
        list<ScreenKDM> screen_kdms;
-       
+
        list<shared_ptr<Screen> >::iterator i = screens.begin ();
        list<dcp::EncryptedKDM>::iterator j = kdms.begin ();
        while (i != screens.end() && j != kdms.end ()) {
@@ -139,18 +139,18 @@ make_cinema_kdms (
        list<CinemaKDMs> cinema_kdms;
 
        while (!screen_kdms.empty ()) {
-               
+
                /* Get all the screens from a single cinema */
 
                CinemaKDMs ck;
-               
+
                list<ScreenKDM>::iterator i = screen_kdms.begin ();
                ck.cinema = i->screen->cinema;
                ck.screen_kdms.push_back (*i);
                list<ScreenKDM>::iterator j = i;
                ++i;
                screen_kdms.remove (*j);
-               
+
                while (i != screen_kdms.end ()) {
                        if (i->screen->cinema == ck.cinema) {
                                ck.screen_kdms.push_back (*i);
@@ -225,27 +225,27 @@ email_kdms (
        list<CinemaKDMs> cinema_kdms = make_cinema_kdms (film, screens, cpl, from, to, formulation);
 
        for (list<CinemaKDMs>::const_iterator i = cinema_kdms.begin(); i != cinema_kdms.end(); ++i) {
-               
+
                boost::filesystem::path zip_file = boost::filesystem::temp_directory_path ();
                zip_file /= boost::filesystem::unique_path().string() + ".zip";
                i->make_zip_file (film, zip_file);
-               
+
                /* Send email */
-               
+
                quickmail_initialize ();
 
                SafeStringStream start;
                start << from.date() << " " << from.time_of_day();
                SafeStringStream end;
                end << to.date() << " " << to.time_of_day();
-               
+
                string subject = Config::instance()->kdm_subject();
                boost::algorithm::replace_all (subject, "$CPL_NAME", film->dcp_name ());
                boost::algorithm::replace_all (subject, "$START_TIME", start.str ());
                boost::algorithm::replace_all (subject, "$END_TIME", end.str ());
                boost::algorithm::replace_all (subject, "$CINEMA_NAME", i->cinema->name);
                quickmail mail = quickmail_create (Config::instance()->kdm_from().c_str(), subject.c_str ());
-               
+
                quickmail_add_to (mail, i->cinema->email.c_str ());
                if (!Config::instance()->kdm_cc().empty ()) {
                        quickmail_add_cc (mail, Config::instance()->kdm_cc().c_str ());
@@ -255,13 +255,13 @@ email_kdms (
                }
 
                quickmail_add_header (mail, "Content-Type: text/plain; charset=UTF-8");
-               
+
                string body = Config::instance()->kdm_email().c_str();
                boost::algorithm::replace_all (body, "$CPL_NAME", film->dcp_name ());
                boost::algorithm::replace_all (body, "$START_TIME", start.str ());
                boost::algorithm::replace_all (body, "$END_TIME", end.str ());
                boost::algorithm::replace_all (body, "$CINEMA_NAME", i->cinema->name);
-               
+
                SafeStringStream screens;
                for (list<ScreenKDM>::const_iterator j = i->screen_kdms.begin(); j != i->screen_kdms.end(); ++j) {
                        screens << j->screen->name << ", ";
@@ -280,7 +280,7 @@ email_kdms (
                        Config::instance()->mail_user().c_str(),
                        Config::instance()->mail_password().c_str()
                        );
-               
+
                if (error) {
                        quickmail_destroy (mail);
                        throw KDMError (String::compose ("Failed to send KDM email (%1)", error));
index efea9f6b55bc704535d07d64d7c7dd48030826c1..42184ec4582662bf09d21896f4332d9ab6bae24b 100644 (file)
@@ -75,7 +75,7 @@ Log::log (string message, int type)
        if (type & TYPE_WARNING) {
                s << "WARNING: ";
        }
-       
+
        s << message;
        do_log (s.str ());
 }
@@ -153,7 +153,7 @@ FileLog::head_and_tail (int amount) const
                head_amount = size;
                tail_amount = 0;
        }
-       
+
        FILE* f = fopen_boost (_file, "r");
        if (!f) {
                return "";
@@ -162,7 +162,7 @@ FileLog::head_and_tail (int amount) const
        string out;
 
        char* buffer = new char[max(head_amount, tail_amount) + 1];
-       
+
        int N = fread (buffer, 1, head_amount, f);
        buffer[N] = '\0';
        out += string (buffer);
@@ -171,7 +171,7 @@ FileLog::head_and_tail (int amount) const
                out +=  "\n .\n .\n .\n";
 
                fseek (f, - tail_amount - 1, SEEK_END);
-               
+
                N = fread (buffer, 1, tail_amount, f);
                buffer[N] = '\0';
                out += string (buffer) + "\n";
index f83c6a90204ef675c93a89f7b0100f760c7efe01..1b7cef03891c107d979bb465ed05ef6e8700b24f 100644 (file)
@@ -54,14 +54,14 @@ public:
        virtual std::string head_and_tail (int amount = 1024) const = 0;
 
 protected:
-       
+
        /** mutex to protect the log */
        mutable boost::mutex _mutex;
-       
+
 private:
        virtual void do_log (std::string m) = 0;
        void config_changed ();
-       
+
        /** bit-field of log types which should be put into the log (others are ignored) */
        int _types;
        boost::signals2::scoped_connection _config_connection;
@@ -87,7 +87,7 @@ public:
                return "";
        }
 
-private:       
+private:
        void do_log (std::string) {}
 };
 
index d4d7e8aa6b8690a2c8945b5fae5111b3fc4c4b35..41aede6130d420b63dcc29ae843b9850dc55ce94 100644 (file)
@@ -36,19 +36,19 @@ using boost::dynamic_pointer_cast;
 MagickImageProxy::MagickImageProxy (boost::filesystem::path path)
 {
        /* Read the file into a Blob */
-       
+
        boost::uintmax_t const size = boost::filesystem::file_size (path);
        FILE* f = fopen_boost (path, "rb");
        if (!f) {
                throw OpenFileError (path);
        }
-               
+
        uint8_t* data = new uint8_t[size];
        if (fread (data, 1, size, f) != size) {
                delete[] data;
                throw ReadFileError (path);
        }
-       
+
        fclose (f);
        _blob.update (data, size);
        delete[] data;
@@ -67,7 +67,7 @@ shared_ptr<Image>
 MagickImageProxy::image (optional<dcp::NoteHandler>) const
 {
        boost::mutex::scoped_lock lm (_mutex);
-       
+
        if (_image) {
                return _image;
        }
@@ -110,7 +110,7 @@ MagickImageProxy::image (optional<dcp::NoteHandler>) const
                using namespace MagickCore;
 #else
                using namespace MagickLib;
-#endif         
+#endif
                magick_image->write (0, i, size.width, 1, "RGB", CharPixel, p);
                p += _image->stride()[0];
        }
@@ -144,6 +144,6 @@ MagickImageProxy::same (shared_ptr<const ImageProxy> other) const
        if (_blob.length() != mp->_blob.length()) {
                return false;
        }
-       
+
        return memcmp (_blob.data(), mp->_blob.data(), _blob.length()) == 0;
 }
index f4ddb2c9418c7c7d23f4c1e0c254a48aa1a043aa..d22789eda7d04db3dbdeb167ceea2976ffc0b62e 100644 (file)
@@ -31,7 +31,7 @@ public:
        void send_binary (boost::shared_ptr<Socket>) const;
        bool same (boost::shared_ptr<const ImageProxy> other) const;
 
-private:       
+private:
        Magick::Blob _blob;
        mutable boost::shared_ptr<Image> _image;
        mutable boost::mutex _mutex;
index df73a69453e56bccde81d8279e109517a375cd48..c1c8f6827827c4c94082bdbafb0085bdbbeaada3 100644 (file)
@@ -55,14 +55,14 @@ MD5Digester::get () const
        if (!_digest) {
                unsigned char digest[MD5_DIGEST_LENGTH];
                MD5_Final (digest, &_context);
-               
+
                SafeStringStream s;
                for (int i = 0; i < MD5_DIGEST_LENGTH; ++i) {
                        s << hex << setfill('0') << setw(2) << ((int) digest[i]);
                }
-               
+
                _digest = s.str ();
        }
-       
+
        return _digest.get ();
 }
index 8ae7e81cfe99e2078d8dd67dd2bbe0fdc2dc5117..6507146721a2ce3004e9f4f068f0db64ee0add0a 100644 (file)
@@ -36,7 +36,7 @@ public:
        }
 
        void add (std::string const & s);
-       
+
        std::string get () const;
 
 private:
index 976409381d3a8744c69f5f14e53f67a5ca688e08..9aaeec3014f3811a50570a141d023c4bd9b79670 100644 (file)
@@ -34,7 +34,7 @@ public:
                , decoder (d)
                , frc (f)
        {}
-       
+
        boost::shared_ptr<Content> content;
        boost::shared_ptr<Decoder> decoder;
        FrameRateChange frc;
index 449a4384dfd9b2f8c02d5f971309dddcb2ea70a1..be1268f48a02fcdafb4985431cfdb1e5e2fff50d 100644 (file)
@@ -94,7 +94,7 @@ Player::setup_pieces ()
                if (!(*i)->paths_valid ()) {
                        continue;
                }
-               
+
                shared_ptr<Decoder> decoder;
                optional<FrameRateChange> frc;
 
@@ -106,7 +106,7 @@ Player::setup_pieces ()
                        if (!vc) {
                                continue;
                        }
-                       
+
                        DCPTime const overlap = max (vc->position(), (*i)->position()) - min (vc->end(), (*i)->end());
                        if (overlap > best_overlap_t) {
                                best_overlap = vc;
@@ -202,7 +202,7 @@ Player::content_changed (weak_ptr<Content> w, int property, bool frequent)
                property == VideoContentProperty::VIDEO_FRAME_TYPE ||
                property == DCPContentProperty::CAN_BE_PLAYED
                ) {
-               
+
                _have_valid_pieces = false;
                Changed (frequent);
 
@@ -218,7 +218,7 @@ Player::content_changed (weak_ptr<Content> w, int property, bool frequent)
                property == VideoContentProperty::VIDEO_FADE_IN ||
                property == VideoContentProperty::VIDEO_FADE_OUT
                ) {
-               
+
                Changed (frequent);
        }
 }
@@ -256,7 +256,7 @@ list<PositionImage>
 Player::transform_image_subtitles (list<ImageSubtitle> subs) const
 {
        list<PositionImage> all;
-       
+
        for (list<ImageSubtitle>::const_iterator i = subs.begin(); i != subs.end(); ++i) {
                if (!i->image) {
                        continue;
@@ -264,7 +264,7 @@ Player::transform_image_subtitles (list<ImageSubtitle> subs) const
 
                /* We will scale the subtitle up to fit _video_container_size */
                dcp::Size scaled_size (i->rectangle.width * _video_container_size.width, i->rectangle.height * _video_container_size.height);
-               
+
                /* Then we need a corrective translation, consisting of two parts:
                 *
                 * 1.  that which is the result of the scaling of the subtitle by _video_container_size; this will be
@@ -346,7 +346,7 @@ Player::get_video (DCPTime time, bool accurate)
                        pvf.push_back (black_player_video_frame (time));
                        return pvf;
                }
-               
+
                dcp::Size image_size = content->scale().size (content, _video_container_size, _film->frame_size ());
 
                for (list<ContentVideo>::const_iterator i = content_video.begin(); i != content_video.end(); ++i) {
@@ -388,8 +388,8 @@ Player::get_video (DCPTime time, bool accurate)
                for (list<shared_ptr<PlayerVideo> >::const_iterator i = pvf.begin(); i != pvf.end(); ++i) {
                        (*i)->set_subtitle (merge (sub_images));
                }
-       }       
-               
+       }
+
        return pvf;
 }
 
@@ -404,7 +404,7 @@ Player::get_audio (DCPTime time, DCPTime length, bool accurate)
 
        shared_ptr<AudioBuffers> audio (new AudioBuffers (_film->audio_channels(), length_frames));
        audio->make_silent ();
-       
+
        list<shared_ptr<Piece> > ov = overlaps<AudioContent> (time, time + length);
        if (ov.empty ()) {
                return audio;
@@ -436,7 +436,7 @@ Player::get_audio (DCPTime time, DCPTime length, bool accurate)
                Frame const content_frame = dcp_to_content_audio (*i, request);
 
                BOOST_FOREACH (AudioStreamPtr j, content->audio_streams ()) {
-                       
+
                        /* Audio from this piece's decoder stream (which might be more or less than what we asked for) */
                        ContentAudio all = decoder->get_audio (j, content_frame, request_frames, accurate);
 
@@ -467,7 +467,7 @@ Player::get_audio (DCPTime time, DCPTime length, bool accurate)
                        if (_audio_processor) {
                                dcp_mapped = _audio_processor->run (dcp_mapped);
                        }
-               
+
                        all.audio = dcp_mapped;
 
                        audio->accumulate_frames (
@@ -561,7 +561,7 @@ Player::get_subtitles (DCPTime time, DCPTime length, bool starting)
 
                list<ContentImageSubtitle> image = subtitle_decoder->get_image_subtitles (ContentTimePeriod (from, to), starting);
                for (list<ContentImageSubtitle>::iterator i = image.begin(); i != image.end(); ++i) {
-                       
+
                        /* Apply content's subtitle offsets */
                        i->sub.rectangle.x += subtitle_content->subtitle_x_offset ();
                        i->sub.rectangle.y += subtitle_content->subtitle_y_offset ();
@@ -573,7 +573,7 @@ Player::get_subtitles (DCPTime time, DCPTime length, bool starting)
                        /* Apply a corrective translation to keep the subtitle centred after that scale */
                        i->sub.rectangle.x -= i->sub.rectangle.width * (subtitle_content->subtitle_x_scale() - 1);
                        i->sub.rectangle.y -= i->sub.rectangle.height * (subtitle_content->subtitle_y_scale() - 1);
-                       
+
                        ps.image.push_back (i->sub);
                }
 
index e515fced345bdd39a610e70c24c1a9383866663a..f22faa7ac28bf9d3f84fb829d61be72ee3dbb41d 100644 (file)
@@ -44,7 +44,7 @@ class Resampler;
 class PlayerVideo;
 class ImageProxy;
 class Font;
+
 class PlayerStatistics
 {
 public:
@@ -55,7 +55,7 @@ public:
                        , good (0)
                        , skip (0)
                {}
-               
+
                int black;
                int repeat;
                int good;
@@ -68,7 +68,7 @@ public:
                        , good (0)
                        , skip (0)
                {}
-               
+
                DCPTime silence;
                int64_t good;
                int64_t skip;
@@ -96,7 +96,7 @@ public:
        void set_burn_subtitles (bool burn);
 
        PlayerStatistics const & statistics () const;
-       
+
        /** Emitted when something has changed such that if we went back and emitted
         *  the last frame again it would look different.  This is not emitted after
         *  a seek.
@@ -141,10 +141,10 @@ private:
                                overlaps.push_back (*i);
                        }
                }
-               
+
                return overlaps;
        }
-       
+
        boost::shared_ptr<const Film> _film;
 
        /** Our pieces are ready to go; if this is false the pieces must be (re-)created before they are used */
index 65de500f63d265ca7bea8b6bbd5144122708a3e5..93a0d5378775c30a769f8d01d5b9a987b5546a97 100644 (file)
@@ -30,7 +30,7 @@ public:
                : from (f)
                , to (t)
        {}
-       
+
        DCPTime from;
        DCPTime to;
 
index a84d3b45f2c9346c6e58251dedf8328bcea774e0..c2ba1362ac04f53a1028d7caad92e6aaac0f71d0 100644 (file)
@@ -71,13 +71,13 @@ PlayerVideo::PlayerVideo (shared_ptr<cxml::Node> node, shared_ptr<Socket> socket
        _in = image_proxy_factory (node->node_child ("In"), socket);
 
        if (node->optional_number_child<int> ("SubtitleX")) {
-               
+
                _subtitle.position = Position<int> (node->number_child<int> ("SubtitleX"), node->number_child<int> ("SubtitleY"));
 
                _subtitle.image.reset (
                        new Image (PIX_FMT_RGBA, dcp::Size (node->number_child<int> ("SubtitleWidth"), node->number_child<int> ("SubtitleHeight")), true)
                        );
-               
+
                _subtitle.image->read_from_socket (socket);
        }
 }
@@ -92,7 +92,7 @@ shared_ptr<Image>
 PlayerVideo::image (AVPixelFormat pixel_format, bool burn_subtitle, dcp::NoteHandler note) const
 {
        shared_ptr<Image> im = _in->image (optional<dcp::NoteHandler> (note));
-       
+
        Crop total_crop = _crop;
        switch (_part) {
        case PART_LEFT_HALF:
@@ -115,7 +115,7 @@ PlayerVideo::image (AVPixelFormat pixel_format, bool burn_subtitle, dcp::NoteHan
        if (_colour_conversion) {
                yuv_to_rgb = _colour_conversion.get().yuv_to_rgb();
        }
-               
+
        shared_ptr<Image> out = im->crop_scale_window (total_crop, _inter_size, _out_size, yuv_to_rgb, pixel_format, true);
 
        if (burn_subtitle && _subtitle.image) {
@@ -168,12 +168,12 @@ bool
 PlayerVideo::has_j2k () const
 {
        /* XXX: burnt-in subtitle; maybe other things */
-       
+
        shared_ptr<const J2KImageProxy> j2k = dynamic_pointer_cast<const J2KImageProxy> (_in);
        if (!j2k) {
                return false;
        }
-       
+
        return _crop == Crop () && _inter_size == j2k->size();
 }
 
index e6aa4c7b2919b44afc1e6dab71c5fbe4e05d1782..276c9794834db2aeaa6a08668b8fe8530d58dbe2 100644 (file)
@@ -49,11 +49,11 @@ public:
                Part,
                boost::optional<ColourConversion>
                );
-       
+
        PlayerVideo (boost::shared_ptr<cxml::Node>, boost::shared_ptr<Socket>);
 
        void set_subtitle (PositionImage);
-       
+
        boost::shared_ptr<Image> image (AVPixelFormat pix_fmt, bool burn_subtitle, dcp::NoteHandler note) const;
 
        void add_metadata (xmlpp::Node* node, bool send_subtitles) const;
index 0bb339f5051bd8d35c65480e7c1abbe876ff447e..c5e026699b476d8864c64f65983f2fa3a7d4d43c 100644 (file)
@@ -67,11 +67,11 @@ Playlist::content_changed (weak_ptr<Content> content, int property, bool frequen
           - any other position changes will be timeline drags which should not result in content
           being sequenced.
        */
-       
+
        if (property == ContentProperty::LENGTH || property == VideoContentProperty::VIDEO_FRAME_TYPE) {
                maybe_sequence_video ();
        }
-       
+
        ContentChanged (content, property, frequent);
 }
 
@@ -81,9 +81,9 @@ Playlist::maybe_sequence_video ()
        if (!_sequence_video || _sequencing_video) {
                return;
        }
-       
+
        _sequencing_video = true;
-       
+
        DCPTime next_left;
        DCPTime next_right;
        for (ContentList::iterator i = _content.begin(); i != _content.end(); ++i) {
@@ -91,7 +91,7 @@ Playlist::maybe_sequence_video ()
                if (!vc) {
                        continue;
                }
-               
+
                if (vc->video_frame_type() == VIDEO_FRAME_TYPE_3D_RIGHT) {
                        vc->set_position (next_right);
                        next_right = vc->end() + DCPTime::delta ();
@@ -102,7 +102,7 @@ Playlist::maybe_sequence_video ()
        }
 
        /* This won't change order, so it does not need a sort */
-       
+
        _sequencing_video = false;
 }
 
@@ -110,7 +110,7 @@ string
 Playlist::video_identifier () const
 {
        string t;
-       
+
        for (ContentList::const_iterator i = _content.begin(); i != _content.end(); ++i) {
                shared_ptr<const VideoContent> vc = dynamic_pointer_cast<const VideoContent> (*i);
                if (vc) {
@@ -162,7 +162,7 @@ Playlist::remove (shared_ptr<Content> c)
        while (i != _content.end() && *i != c) {
                ++i;
        }
-       
+
        if (i != _content.end ()) {
                _content.erase (i);
                Changed ();
@@ -179,14 +179,14 @@ Playlist::remove (ContentList c)
                while (j != _content.end() && *j != *i) {
                        ++j;
                }
-       
+
                if (j != _content.end ()) {
                        _content.erase (j);
                }
        }
 
        /* This won't change order, so it does not need a sort */
-       
+
        Changed ();
 }
 
@@ -249,7 +249,7 @@ Playlist::best_dcp_frame_rate () const
        if (!best) {
                return 24;
        }
-       
+
        return best->dcp;
 }
 
@@ -272,7 +272,7 @@ Playlist::reconnect ()
        }
 
        _content_connections.clear ();
-               
+
        for (ContentList::iterator i = _content.begin(); i != _content.end(); ++i) {
                _content_connections.push_back ((*i)->Changed.connect (bind (&Playlist::content_changed, this, _1, _2, _3)));
        }
@@ -349,7 +349,7 @@ Playlist::repeat (ContentList c, int n)
        }
 
        sort (_content.begin(), _content.end(), ContentSorter ());
-       
+
        reconnect ();
        Changed ();
 }
@@ -358,7 +358,7 @@ void
 Playlist::move_earlier (shared_ptr<Content> c)
 {
        sort (_content.begin(), _content.end(), ContentSorter ());
-       
+
        ContentList::iterator previous = _content.end ();
        ContentList::iterator i = _content.begin();
        while (i != _content.end() && *i != c) {
@@ -371,7 +371,7 @@ Playlist::move_earlier (shared_ptr<Content> c)
                return;
        }
 
-       
+
        DCPTime const p = (*previous)->position ();
        (*previous)->set_position (p + c->length_after_trim ());
        c->set_position (p);
@@ -382,7 +382,7 @@ void
 Playlist::move_later (shared_ptr<Content> c)
 {
        sort (_content.begin(), _content.end(), ContentSorter ());
-       
+
        ContentList::iterator i = _content.begin();
        while (i != _content.end() && *i != c) {
                ++i;
index 91051e9c4752353f6fe79a4793b69850dc6f81a3..3829d6f31e9254367b006823aa44f8f000d477fe 100644 (file)
@@ -68,7 +68,7 @@ public:
        std::string video_identifier () const;
 
        DCPTime length () const;
-       
+
        int best_dcp_frame_rate () const;
        DCPTime video_end () const;
        FrameRateChange active_frame_rate_change (DCPTime, int dcp_frame_rate) const;
@@ -85,7 +85,7 @@ public:
         *  Third parameter is true if signals are currently being emitted frequently.
         */
        mutable boost::signals2::signal<void (boost::weak_ptr<Content>, int, bool)> ContentChanged;
-       
+
 private:
        void content_changed (boost::weak_ptr<Content>, int, bool);
        void reconnect ();
index c0c65d1da9bc250bbc341be153ffc6b9035ef2f0..e3a091b371639c024f8eecbdaafebcc440676fd0 100644 (file)
@@ -29,12 +29,12 @@ class PositionImage
 {
 public:
        PositionImage () {}
-       
+
        PositionImage (boost::shared_ptr<Image> i, Position<int> p)
                : image (i)
                , position (p)
        {}
-       
+
        boost::shared_ptr<Image> image;
        Position<int> position;
 
index 6edd154e04030ea1142ccdbff86e107a98261d79..a6ebad14117542443e3fd704b35ca7cacdfbebd3 100644 (file)
@@ -49,7 +49,7 @@ Ratio::from_id (string i)
        if (i == "137") {
                i = "138";
        }
-       
+
        vector<Ratio const *>::iterator j = _ratios.begin ();
        while (j != _ratios.end() && (*j)->id() != i) {
                ++j;
@@ -77,13 +77,13 @@ Ratio::from_ratio (float r)
 
        return *j;
 }
-   
+
 Ratio const *
 Ratio::nearest_from_ratio (float r)
 {
        Ratio const * nearest = 0;
        float distance = FLT_MAX;
-       
+
        for (vector<Ratio const *>::iterator i = _ratios.begin (); i != _ratios.end(); ++i) {
                float const d = fabs ((*i)->ratio() - r);
                if (d < distance) {
index 360fb2340639866c94276b09d2a5fd4f39f33b02..7b70bd7f7b2572dc8bbaa55a56827b2f5217a187 100644 (file)
@@ -66,7 +66,7 @@ private:
        std::string _nickname;
        std::string _isdcf_name;
 
-       static std::vector<Ratio const *> _ratios;      
+       static std::vector<Ratio const *> _ratios;
 };
 
 #endif
index 33bf4827380e30f64a86c0fc0c694562d61556b6..71c8df30bab4ce5a1ad029944e7d0b3cc93a2205 100644 (file)
@@ -27,12 +27,12 @@ class RawImageProxy : public ImageProxy
 public:
        RawImageProxy (boost::shared_ptr<Image>);
        RawImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket);
-       
+
        boost::shared_ptr<Image> image (boost::optional<dcp::NoteHandler> note = boost::optional<dcp::NoteHandler> ()) const;
        void add_metadata (xmlpp::Node *) const;
        void send_binary (boost::shared_ptr<Socket>) const;
        bool same (boost::shared_ptr<const ImageProxy>) const;
-       
+
 private:
        boost::shared_ptr<Image> _image;
 };
index 963119b507b793998d370ffdf1acd786af1dbe9b..97b90abc5e28546ab74d6c0fa1115460289a0dbb 100644 (file)
 
 namespace dcpomatic
 {
-       
+
 /** @struct Rect
  *  @brief A rectangle.
  */
-template <class T>     
+template <class T>
 class Rect
 {
 public:
-       
+
        Rect ()
                : x (0)
                , y (0)
@@ -71,7 +71,7 @@ public:
        {
                T const tx = max (x, other.x);
                T const ty = max (y, other.y);
-       
+
                return Rect (
                        tx, ty,
                        min (x + width, other.x + other.width) - tx,
index 0d059eb43f3194744bef1404d13a9edc4bb04dbb..53f71328302c7d6dcfc193c8b905eb08010796d7 100644 (file)
@@ -72,7 +72,7 @@ render_subtitle (dcp::SubtitleString const & subtitle, dcp::Size target)
                image->size().height,
                Cairo::ImageSurface::format_stride_for_width (Cairo::FORMAT_ARGB32, image->size().width)
                );
-       
+
        Cairo::RefPtr<Cairo::Context> context = Cairo::Context::create (surface);
        Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create (context);
 
@@ -89,13 +89,13 @@ render_subtitle (dcp::SubtitleString const & subtitle, dcp::Size target)
        }
        layout->set_font_description (font);
        layout->set_text (subtitle.text ());
-       
+
        /* Compute fade factor */
        /* XXX */
        float fade_factor = 1;
 
        layout->update_from_cairo_context (context);
-               
+
        context->scale (xscale, yscale);
 
        if (subtitle.effect() == dcp::SHADOW) {
@@ -123,7 +123,7 @@ render_subtitle (dcp::SubtitleString const & subtitle, dcp::Size target)
                layout->add_to_cairo_context (context);
                context->stroke ();
        }
-       
+
        int layout_width;
        int layout_height;
        layout->get_size (layout_width, layout_height);
index 8111dde5f578023713034c2bc7ce4e3540484491..2538f7dca57080d718954fdb6f216753b78ae7c2 100644 (file)
@@ -20,7 +20,7 @@
 extern "C" {
 #include "libavutil/channel_layout.h"
 #include "libavutil/opt.h"
-}      
+}
 #include "resampler.h"
 #include "audio_buffers.h"
 #include "exceptions.h"
@@ -51,7 +51,7 @@ Resampler::Resampler (int in, int out, int channels)
        /* Sample rates */
        av_opt_set_int (_swr_context, "isr", _in_rate, 0);
        av_opt_set_int (_swr_context, "osr", _out_rate, 0);
-       
+
        swr_init (_swr_context);
 }
 
@@ -70,16 +70,16 @@ Resampler::run (shared_ptr<const AudioBuffers> in)
        int const resampled_frames = swr_convert (
                _swr_context, (uint8_t **) resampled->data(), max_resampled_frames, (uint8_t const **) in->data(), in->frames()
                );
-       
+
        if (resampled_frames < 0) {
                char buf[256];
                av_strerror (resampled_frames, buf, sizeof(buf));
                throw EncodeError (String::compose (_("could not run sample-rate converter for %1 samples (%2) (%3)"), in->frames(), resampled_frames, buf));
        }
-       
+
        resampled->set_frames (resampled_frames);
        return resampled;
-}      
+}
 
 shared_ptr<const AudioBuffers>
 Resampler::flush ()
@@ -91,11 +91,11 @@ Resampler::flush ()
 
        while (true) {
                int const frames = swr_convert (_swr_context, (uint8_t **) pass->data(), pass_size, 0, 0);
-               
+
                if (frames < 0) {
                        throw EncodeError (_("could not run sample-rate converter"));
                }
-               
+
                if (frames == 0) {
                        break;
                }
index 21ef412deb02d9e79109203ef6e5ad7ea3f05b9f..332b9b4b1ce2d7d821af17b5d6b39ab6a89f18eb 100644 (file)
@@ -36,7 +36,7 @@ public:
        boost::shared_ptr<const AudioBuffers> run (boost::shared_ptr<const AudioBuffers>);
        boost::shared_ptr<const AudioBuffers> flush ();
 
-private:       
+private:
        SwrContext* _swr_context;
        int _in_rate;
        int _out_rate;
index 0ffcb62243b4635e23f1420ce86fcb06b751df95..e6f6595ba7a34380bd1784e1b4dfb4f64d2dea90 100644 (file)
@@ -44,11 +44,11 @@ class SafeStringStream
 public:
        SafeStringStream ()
        {}
-       
+
        SafeStringStream (std::string s)
                : _stream (s)
        {}
-       
+
        template <class T>
        std::ostream& operator<< (T val)
        {
@@ -88,7 +88,7 @@ public:
        {
                _stream.fill (f);
        }
-       
+
        void precision (int p)
        {
                _stream.precision (p);
index c64f632438c99560bb1297e4ecdeaa186ca10da6..b712fe4944dfbada271cd68ec63ffe14860ea235 100644 (file)
@@ -31,7 +31,7 @@ ScopedTemporary::ScopedTemporary ()
 /** Close and delete the temporary file */
 ScopedTemporary::~ScopedTemporary ()
 {
-       close ();       
+       close ();
        boost::system::error_code ec;
        boost::filesystem::remove (_file, ec);
 }
index d71ec6fd207aaa5a3e9a04e9c953ca43c31d3295..86eec16b24771b3844e31bd07585706a6dac7938 100644 (file)
@@ -74,7 +74,7 @@ public:
 
        ssh_session session;
 
-private:       
+private:
        bool _connected;
 };
 
@@ -121,60 +121,60 @@ void
 SCPDCPJob::run ()
 {
        LOG_GENERAL_NC (N_("SCP DCP job starting"));
-       
+
        SSHSession ss;
-       
+
        set_status (_("connecting"));
-       
+
        ssh_options_set (ss.session, SSH_OPTIONS_HOST, Config::instance()->tms_ip().c_str ());
        ssh_options_set (ss.session, SSH_OPTIONS_USER, Config::instance()->tms_user().c_str ());
        int const port = 22;
        ssh_options_set (ss.session, SSH_OPTIONS_PORT, &port);
-       
+
        int r = ss.connect ();
        if (r != SSH_OK) {
                throw NetworkError (String::compose (_("Could not connect to server %1 (%2)"), Config::instance()->tms_ip(), ssh_get_error (ss.session)));
        }
-       
+
        int const state = ssh_is_server_known (ss.session);
        if (state == SSH_SERVER_ERROR) {
                throw NetworkError (String::compose (_("SSH error (%1)"), ssh_get_error (ss.session)));
        }
-       
+
        r = ssh_userauth_password (ss.session, 0, Config::instance()->tms_password().c_str ());
        if (r != SSH_AUTH_SUCCESS) {
                throw NetworkError (String::compose (_("Failed to authenticate with server (%1)"), ssh_get_error (ss.session)));
        }
-       
+
        SSHSCP sc (ss.session);
-       
+
        r = ssh_scp_init (sc.scp);
        if (r != SSH_OK) {
                throw NetworkError (String::compose (_("Could not start SCP session (%1)"), ssh_get_error (ss.session)));
        }
-       
+
        r = ssh_scp_push_directory (sc.scp, _film->dcp_name().c_str(), S_IRWXU);
        if (r != SSH_OK) {
                throw NetworkError (String::compose (_("Could not create remote directory %1 (%2)"), _film->dcp_name(), ssh_get_error (ss.session)));
        }
-       
+
        boost::filesystem::path const dcp_dir = _film->dir (_film->dcp_name());
-       
+
        boost::uintmax_t bytes_to_transfer = 0;
        for (boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator (dcp_dir); i != boost::filesystem::directory_iterator(); ++i) {
                bytes_to_transfer += boost::filesystem::file_size (*i);
        }
-       
+
        boost::uintmax_t buffer_size = 64 * 1024;
        char buffer[buffer_size];
        boost::uintmax_t bytes_transferred = 0;
-       
+
        for (boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator (dcp_dir); i != boost::filesystem::directory_iterator(); ++i) {
-               
+
                string const leaf = boost::filesystem::path(*i).leaf().generic_string ();
-               
+
                set_status (String::compose (_("copying %1"), leaf));
-               
+
                boost::uintmax_t to_do = boost::filesystem::file_size (*i);
                ssh_scp_push_file (sc.scp, leaf.c_str(), to_do, S_IRUSR | S_IWUSR);
 
@@ -190,7 +190,7 @@ SCPDCPJob::run ()
                                fclose (f);
                                throw ReadFileError (boost::filesystem::path (*i).string());
                        }
-                       
+
                        r = ssh_scp_write (sc.scp, buffer, t);
                        if (r != SSH_OK) {
                                fclose (f);
@@ -206,7 +206,7 @@ SCPDCPJob::run ()
 
                fclose (f);
        }
-       
+
        set_progress (1);
        set_status (N_(""));
        set_state (FINISHED_OK);
index 4be54c5cd98bbb7cbf68b814ede4c8269c8195a7..cddf424f4a4d8aec0a20de8af2828c64995fc281 100644 (file)
@@ -62,12 +62,12 @@ void
 SendKDMEmailJob::run ()
 {
        try {
-               
+
                set_progress_unknown ();
                email_kdms (_film, _screens, _dcp, _from, _to, _formulation);
                set_progress (1);
                set_state (FINISHED_OK);
-               
+
        } catch (std::exception& e) {
 
                set_progress (1);
index 0fd14bc2452fb6e789e2eb12d92b219209bc314f..f08adea7861c27c57da1b16856a9a2b78da86707 100644 (file)
@@ -62,11 +62,11 @@ SendProblemReportJob::run ()
        set_progress_unknown ();
 
        quickmail mail = quickmail_create (_from.c_str(), "DCP-o-matic problem report");
-       
+
        quickmail_add_to (mail, "carl@dcpomatic.com");
-       
+
        string body = _summary + "\n\n";
-       
+
        body += "log head and tail:\n";
        body += "---<8----\n";
        body += _film->log()->head_and_tail ();
@@ -76,16 +76,16 @@ SendProblemReportJob::run ()
        add_file (body, "metadata.xml");
 
        quickmail_set_body (mail, body.c_str());
-       
+
        char const* error = quickmail_send (mail, "main.carlh.net", 2525, 0, 0);
-       
+
        if (error) {
                set_state (FINISHED_ERROR);
                set_error (error, "");
        } else {
                set_state (FINISHED_OK);
        }
-       
+
        quickmail_destroy (mail);
 
        set_progress (1);
@@ -98,7 +98,7 @@ SendProblemReportJob::add_file (string& body, boost::filesystem::path file) cons
        if (!f) {
                return;
        }
-       
+
        body += file.string() + ":\n";
        body += "---<8----\n";
        uintmax_t const size = boost::filesystem::file_size (_film->file (file));
index 2a5ff5c9adf0f839250355a0a5afcb6cc8241493..79840c25bb2701bebc57f010fe764ae6c08348b0 100644 (file)
@@ -118,11 +118,11 @@ Server::process (shared_ptr<Socket> socket, struct timeval& after_read, struct t
        DCPVideo dcp_video_frame (pvf, xml, _log);
 
        gettimeofday (&after_read, 0);
-       
+
        Data encoded = dcp_video_frame.encode_locally (boost::bind (&Log::dcp_log, _log.get(), _1, _2));
 
        gettimeofday (&after_encode, 0);
-       
+
        try {
                socket->write (encoded.size ());
                socket->write (encoded.data ().get (), encoded.size ());
@@ -150,7 +150,7 @@ Server::worker_thread ()
 
                shared_ptr<Socket> socket = _queue.front ();
                _queue.pop_front ();
-               
+
                lock.unlock ();
 
                int frame = -1;
@@ -160,9 +160,9 @@ Server::worker_thread ()
                struct timeval after_read;
                struct timeval after_encode;
                struct timeval end;
-               
+
                gettimeofday (&start, 0);
-               
+
                try {
                        frame = process (socket, after_read, after_encode);
                        ip = socket->socket().remote_endpoint().address().to_string();
@@ -174,7 +174,7 @@ Server::worker_thread ()
                gettimeofday (&end, 0);
 
                socket.reset ();
-               
+
                lock.lock ();
 
                if (frame >= 0) {
@@ -188,14 +188,14 @@ Server::worker_thread ()
                                << "receive " << (seconds(after_read) - seconds(start)) << "s "
                                << "encode " << (seconds(after_encode) - seconds(after_read)) << "s "
                                << "send " << (seconds(end) - seconds(after_encode)) << "s.";
-                                                  
+
                        if (_verbose) {
                                cout << message.str() << "\n";
                        }
 
                        LOG_GENERAL_NC (message.str ());
                }
-               
+
                _full_condition.notify_all ();
        }
 }
@@ -207,13 +207,13 @@ Server::run (int num_threads)
        if (_verbose) {
                cout << "DCP-o-matic server starting with " << num_threads << " threads.\n";
        }
-       
+
        for (int i = 0; i < num_threads; ++i) {
                _worker_threads.push_back (new thread (bind (&Server::worker_thread, this)));
        }
 
        _broadcast.thread = new thread (bind (&Server::broadcast_thread, this));
-       
+
        start_accept ();
        _io_service.run ();
 }
@@ -267,7 +267,7 @@ Server::broadcast_received ()
 
                }
        }
-               
+
        _broadcast.socket->async_receive_from (
                boost::asio::buffer (_broadcast.buffer, sizeof (_broadcast.buffer)),
                _broadcast.send_endpoint, boost::bind (&Server::broadcast_received, this)
@@ -293,15 +293,15 @@ Server::handle_accept (shared_ptr<Socket> socket, boost::system::error_code cons
        }
 
        boost::mutex::scoped_lock lock (_worker_mutex);
-       
+
        /* Wait until the queue has gone down a bit */
        while (_queue.size() >= _worker_threads.size() * 2 && !_terminate) {
                _full_condition.wait (lock);
        }
-       
+
        _queue.push_back (socket);
        _empty_condition.notify_all ();
 
        start_accept ();
 }
-       
+
index 1dc3b7b4edf92d1c3545458c30ea1c8185c67f1c..51dc8774e166372f6327d3753552bfac2f44601b 100644 (file)
@@ -50,7 +50,7 @@ public:
                : _host_name ("")
                , _threads (1)
        {}
-       
+
        /** @param h Server host name or IP address in string form.
         *  @param t Number of threads to use on the server.
         */
@@ -60,7 +60,7 @@ public:
        {}
 
        /* Default copy constructor is fine */
-       
+
        /** @return server's host name or IP address in string form */
        std::string host_name () const {
                return _host_name;
@@ -121,13 +121,13 @@ private:
                        : thread (0)
                        , socket (0)
                {}
-               
+
                boost::thread* thread;
                boost::asio::ip::udp::socket* socket;
                char buffer[64];
                boost::asio::ip::udp::endpoint send_endpoint;
                boost::asio::io_service io_service;
-               
+
        } _broadcast;
 };
 
index 726437ea57b3eaa14fdea90667c38a053f5963cb..ac4651657872418b7aa56f9aaedfa91e595599f9 100644 (file)
@@ -76,7 +76,7 @@ try
         socket.set_option (boost::asio::socket_base::broadcast (true));
 
        string const data = DCPOMATIC_HELLO;
-       
+
        while (!_stop) {
                if (Config::instance()->use_any_servers ()) {
                        /* Broadcast to look for servers */
@@ -153,18 +153,18 @@ ServerFinder::handle_accept (boost::system::error_code ec, shared_ptr<Socket> so
                start_accept ();
                return;
        }
-       
+
        uint32_t length;
        socket->read (reinterpret_cast<uint8_t*> (&length), sizeof (uint32_t));
        length = ntohl (length);
-       
+
        scoped_array<char> buffer (new char[length]);
        socket->read (reinterpret_cast<uint8_t*> (buffer.get()), length);
-       
+
        string s (buffer.get());
        shared_ptr<cxml::Document> xml (new cxml::Document ("ServerAvailable"));
        xml->read_string (s);
-       
+
        string const ip = socket->socket().remote_endpoint().address().to_string ();
        if (!server_found (ip) && xml->optional_number_child<int>("Version").get_value_or (0) == SERVER_LINK_VERSION) {
                ServerDescription sd (ip, xml->number_child<int> ("Threads"));
index dc62f998deb0d79f5e9926753fbd5c81c95f7559..ec855938be4ddfd92e1f324194cbf6d8128b4e41 100644 (file)
@@ -51,7 +51,7 @@ private:
        boost::signals2::signal<void (ServerDescription)> ServerFound;
 
        bool _disabled;
-       
+
        /** Thread to periodically issue broadcasts to find encoding servers */
        boost::thread* _broadcast_thread;
        /** Thread to listen to the responses from servers */
index ae4306e3077ad51ed34f50b65da0bf8edcf461e1..546d3d739af0ac531685be0454c49731e4d8eca9 100644 (file)
@@ -76,7 +76,7 @@ private:
        }
 
        friend class Signaller;
-       
+
        /** A io_service which is used as the conduit for messages */
        boost::asio::io_service _service;
        /** Object required to keep io_service from stopping when it has nothing to do */
index 661a171eccea20e6f98f28782dd56234d1318f1a..fa249078c1f1fd30609c3609a7a2776444199c0c 100644 (file)
@@ -103,7 +103,7 @@ public:
                if (signal_manager) {
                        signal_manager->emit (boost::bind (&Wrapper<T>::signal, w));
                }
-               
+
                boost::mutex::scoped_lock lm (_signaller_mutex);
 
                /* Clean up finished Wrappers */
index 6a9a78bfae712e654b48c3424840fbeaa75ee267..cf2dcc1bd6210a9e78d4b5ead98c8bbb968aeadf 100644 (file)
@@ -62,7 +62,7 @@ SingleStreamAudioContent::take_from_audio_examiner (shared_ptr<AudioExaminer> ex
 {
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
-       
+
        {
                boost::mutex::scoped_lock lm (_mutex);
                _audio_stream.reset (new AudioStream (examiner->audio_frame_rate(), examiner->audio_channels ()));
index abe68b4447cfc5098c7161e8d975d15b9b6d2ccd..7ae6dbaa46c3538d6fb5a951e05ebd829a7031b4 100644 (file)
@@ -45,7 +45,7 @@ public:
        AudioStreamPtr audio_stream () const {
                return _audio_stream;
        }
-               
+
        void take_from_audio_examiner (boost::shared_ptr<AudioExaminer>);
 
 protected:
index 3f7ee0d7546648ca2d8dfdda4210fb8abe6dc24b..712df7bda37fb2b3eb4b07bb77265e9055f3a9c2 100644 (file)
@@ -39,10 +39,10 @@ Sndfile::Sndfile (shared_ptr<const SndfileContent> c)
        /* Here be monsters.  See fopen_boost for similar shenanigans */
 #ifdef DCPOMATIC_WINDOWS
        _sndfile = sf_wchar_open (_sndfile_content->path(0).c_str(), SFM_READ, &_info);
-#else  
+#else
        _sndfile = sf_open (_sndfile_content->path(0).string().c_str(), SFM_READ, &_info);
 #endif
-       
+
        if (!_sndfile) {
                throw DecodeError (_("could not open audio file for reading"));
        }
index 6c4f02197c3caf837daa610c938a9bc9e3cd73a5..4b7a50fc754431a0480f779d90e8b42f599b42d6 100644 (file)
@@ -31,7 +31,7 @@ public:
        Sndfile (boost::shared_ptr<const SndfileContent> content);
        virtual ~Sndfile ();
 
-protected:     
+protected:
        boost::shared_ptr<const SndfileContent> _sndfile_content;
        SNDFILE* _sndfile;
        SF_INFO _info;
index f5a2e38b1310a0fb8f4bac0ea7f3e4ebf4933a3a..c07b823d4bcd52e7a82c971cf7df7c7a02e11a1f 100644 (file)
@@ -38,9 +38,9 @@ public:
        boost::shared_ptr<SndfileContent> shared_from_this () {
                return boost::dynamic_pointer_cast<SndfileContent> (Content::shared_from_this ());
        }
-       
+
        DCPTime full_length () const;
-       
+
        void examine (boost::shared_ptr<Job>);
        std::string summary () const;
        std::string technical_summary () const;
@@ -48,7 +48,7 @@ public:
        void as_xml (xmlpp::Node *) const;
 
        void take_from_audio_examiner (boost::shared_ptr<AudioExaminer>);
-       
+
        static bool valid_file (boost::filesystem::path);
 
 private:
@@ -56,7 +56,7 @@ private:
                boost::mutex::scoped_lock lm (_mutex);
                return _audio_length;
        }
-       
+
        Frame _audio_length;
 };
 
index ff14543e19502a74e9f711ccd32416569d2f534d..2fa9ae2a3c48df0328f618016c65a5f1bc64e599 100644 (file)
@@ -39,7 +39,7 @@ SndfileDecoder::SndfileDecoder (shared_ptr<const SndfileContent> c)
        , _remaining (_info.frames)
        , _deinterleave_buffer (0)
 {
-       
+
 }
 
 SndfileDecoder::~SndfileDecoder ()
@@ -53,7 +53,7 @@ SndfileDecoder::pass ()
        if (_remaining == 0) {
                return true;
        }
-       
+
        /* Do things in half second blocks as I think there may be limits
           to what FFmpeg (and in particular the resampler) can cope with.
        */
@@ -61,7 +61,7 @@ SndfileDecoder::pass ()
        sf_count_t const this_time = min (block, _remaining);
 
        int const channels = _sndfile_content->audio_stream()->channels ();
-       
+
        shared_ptr<AudioBuffers> data (new AudioBuffers (channels, this_time));
 
        if (_sndfile_content->audio_stream()->channels() == 1) {
@@ -84,7 +84,7 @@ SndfileDecoder::pass ()
                        }
                }
        }
-               
+
        data->set_frames (this_time);
        audio (_sndfile_content->audio_stream (), data, ContentTime::from_frames (_done, _info.samplerate));
        _done += this_time;
index 40e31316571b257a761f2d498eec2ee9e225ba83..7fcf5037c424f2e32b1df6659970c12fbebd39fa 100644 (file)
@@ -33,7 +33,7 @@ public:
 private:
        bool pass ();
        void seek (ContentTime, bool);
-       
+
        int64_t _done;
        int64_t _remaining;
        float* _deinterleave_buffer;
index b3ab3c4e2b282ce19cf326938cea1a56a9c6edee..c64ceae6eb4bbb3f4f8c9cfa34895eae614fa014 100644 (file)
@@ -24,7 +24,7 @@ class SndfileExaminer : public Sndfile, public AudioExaminer
 {
 public:
        SndfileExaminer (boost::shared_ptr<const SndfileContent> content);
-       
+
        int audio_channels () const;
        Frame audio_length () const;
        int audio_frame_rate () const;
index 9656ec184144261c8a830de31b188bf698aac814..7ab13c2c3cf8f80a7f87542443d266cc7203910d 100644 (file)
@@ -56,7 +56,7 @@ SubRipContent::examine (boost::shared_ptr<Job> job)
 
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
-       
+
        DCPTime len (s.length (), film->active_frame_rate_change (position ()));
 
        /* Default to turning these subtitles on */
index e6352617972e31fcfd089911964446abcab60173..09346a174294d62b7f1fe601293843d46350830d 100644 (file)
@@ -28,7 +28,7 @@ public:
        boost::shared_ptr<SubRipContent> shared_from_this () {
                return boost::dynamic_pointer_cast<SubRipContent> (Content::shared_from_this ());
        }
-       
+
        /* Content */
        void examine (boost::shared_ptr<Job>);
        std::string summary () const;
@@ -42,7 +42,7 @@ public:
        }
 
        static std::string const font_id;
-       
+
 private:
        DCPTime _length;
 };
index fecbbc5584cc96d6a943a9142fc49969d36b1909..c2bd4f3e0bd7dc8fa35167bc726447bca72958d2 100644 (file)
@@ -40,7 +40,7 @@ void
 SubRipDecoder::seek (ContentTime time, bool accurate)
 {
        SubtitleDecoder::seek (time, accurate);
-       
+
        _next = 0;
        while (_next < _subtitles.size() && ContentTime::from_seconds (_subtitles[_next].from.all_as_seconds ()) < time) {
                ++_next;
@@ -55,7 +55,7 @@ SubRipDecoder::pass ()
        }
 
        /* XXX: we are ignoring positioning specified in the file */
-       
+
        list<dcp::SubtitleString> out;
        for (list<sub::Line>::const_iterator i = _subtitles[_next].lines.begin(); i != _subtitles[_next].lines.end(); ++i) {
                for (list<sub::Block>::const_iterator j = i->blocks.begin(); j != i->blocks.end(); ++j) {
index 876f763d3a5ffe1c39f1952226250eccb95db4c6..38ccca0a38521c0c98caafdc4ce5c1e06c2b6618 100644 (file)
@@ -37,7 +37,7 @@ protected:
 private:
        std::list<ContentTimePeriod> image_subtitles_during (ContentTimePeriod, bool starting) const;
        std::list<ContentTimePeriod> text_subtitles_during (ContentTimePeriod, bool starting) const;
-       
+
        size_t _next;
 };
 
index d4d27e1400013865653395b0ddf6159cb74c0663..f39a317b72e4d890cc39c5d2d8989d30f9f34f17 100644 (file)
@@ -32,7 +32,7 @@ struct SubRipSubtitlePiece
                , italic (false)
                , underline (false)
        {}
-       
+
        std::string text;
        bool bold;
        bool italic;
index 514ee03cb276e69aaffac87bbde5429b9a5d1ce0..215829659a296cc179dc9b824073a3057ad2cd48 100644 (file)
@@ -78,7 +78,7 @@ SubtitleContent::SubtitleContent (shared_ptr<const Film> film, cxml::ConstNodePt
        } else {
                _use_subtitles = false;
        }
-       
+
        if (version >= 7) {
                _subtitle_x_offset = node->number_child<float> ("SubtitleXOffset");
                _subtitle_y_offset = node->number_child<float> ("SubtitleYOffset");
@@ -109,7 +109,7 @@ SubtitleContent::SubtitleContent (shared_ptr<const Film> film, vector<shared_ptr
        shared_ptr<SubtitleContent> ref = dynamic_pointer_cast<SubtitleContent> (c[0]);
        DCPOMATIC_ASSERT (ref);
        list<shared_ptr<Font> > ref_fonts = ref->fonts ();
-       
+
        for (size_t i = 0; i < c.size(); ++i) {
                shared_ptr<SubtitleContent> sc = dynamic_pointer_cast<SubtitleContent> (c[i]);
 
@@ -120,7 +120,7 @@ SubtitleContent::SubtitleContent (shared_ptr<const Film> film, vector<shared_ptr
                if (sc->subtitle_x_offset() != ref->subtitle_x_offset()) {
                        throw JoinError (_("Content to be joined must have the same subtitle X offset."));
                }
-               
+
                if (sc->subtitle_y_offset() != ref->subtitle_y_offset()) {
                        throw JoinError (_("Content to be joined must have the same subtitle Y offset."));
                }
@@ -166,7 +166,7 @@ void
 SubtitleContent::as_xml (xmlpp::Node* root) const
 {
        boost::mutex::scoped_lock lm (_mutex);
-       
+
        root->add_child("UseSubtitles")->add_child_text (raw_convert<string> (_use_subtitles));
        root->add_child("SubtitleXOffset")->add_child_text (raw_convert<string> (_subtitle_x_offset));
        root->add_child("SubtitleYOffset")->add_child_text (raw_convert<string> (_subtitle_y_offset));
@@ -188,7 +188,7 @@ SubtitleContent::set_use_subtitles (bool u)
        }
        signal_changed (SubtitleContentProperty::USE_SUBTITLES);
 }
-       
+
 void
 SubtitleContent::set_subtitle_x_offset (double o)
 {
index a159d78491a3f79695560d2f2ce95dd3bc70929f..c00ec6f900e07b41e386451f5c43e12246ab544f 100644 (file)
@@ -102,7 +102,7 @@ public:
 protected:
        /** subtitle language (e.g. "German") or empty if it is not known */
        std::string _subtitle_language;
-       
+
 private:
        friend struct ffmpeg_pts_offset_test;
        void font_changed ();
index 93493aa70ae67d5d207471b2ada30db4988a711e..dd2558505d8d460ca3b1ba0e85eae4b2207e2ebc 100644 (file)
@@ -74,7 +74,7 @@ SubtitleDecoder::get (list<T> const & subs, list<ContentTimePeriod> const & sp,
 
        /* Now look for what we wanted in the data we have collected */
        /* XXX: inefficient */
-       
+
        list<T> out;
        for (typename list<T>::const_iterator i = subs.begin(); i != subs.end(); ++i) {
                if ((starting && period.contains (i->period().from)) || (!starting && period.overlaps (i->period ()))) {
@@ -83,7 +83,7 @@ SubtitleDecoder::get (list<T> const & subs, list<ContentTimePeriod> const & sp,
        }
 
        /* Discard anything in _decoded_image_subtitles that is outside 5 seconds either side of period */
-       
+
        list<ContentImageSubtitle>::iterator i = _decoded_image_subtitles.begin();
        while (i != _decoded_image_subtitles.end()) {
                list<ContentImageSubtitle>::iterator tmp = i;
index 8ba74404f2d26dbc3a80c9494c20dd233e9396ef..c958419c75e6b0dcb4fc1a3a20f2996248ca8524 100644 (file)
@@ -40,7 +40,7 @@ public:
 
 protected:
        void seek (ContentTime, bool);
-       
+
        void image_subtitle (ContentTimePeriod period, boost::shared_ptr<Image>, dcpomatic::Rect<double>);
        void text_subtitle (std::list<dcp::SubtitleString>);
 
@@ -56,7 +56,7 @@ private:
         */
        virtual std::list<ContentTimePeriod> image_subtitles_during (ContentTimePeriod period, bool starting) const = 0;
        virtual std::list<ContentTimePeriod> text_subtitles_during (ContentTimePeriod period, bool starting) const = 0;
-       
+
        boost::shared_ptr<const SubtitleContent> _subtitle_content;
 };
 
index 69a7e3aa94b29e4988051f6ca61898d996b94f09..42f1cb350d5c9931caa771d1700d47273909145d 100644 (file)
@@ -81,7 +81,7 @@ StateTimer::~StateTimer ()
                return;
        }
 
-       
+
        set_state (N_(""));
 
        cout << _name << N_(":\n");
index 8c4b046bf7e761fc57bf2cde5d4d8496bdccdc03..4293fee0deefd5abe5fd23c8ef84d72be4462d63 100644 (file)
@@ -39,7 +39,7 @@ class PeriodTimer
 public:
        PeriodTimer (std::string n);
        ~PeriodTimer ();
-       
+
 private:
 
        /** name to use when giving output */
index d16287111edaf098f3df86e7d7b86b472efc18cd..4a2d768f479c7c67fa600ef46c56954d5a60bae2 100644 (file)
@@ -45,7 +45,7 @@ using boost::shared_ptr;
 TranscodeJob::TranscodeJob (shared_ptr<const Film> film)
        : Job (film)
 {
-       
+
 }
 
 string
@@ -101,7 +101,7 @@ TranscodeJob::status () const
                /// TRANSLATORS: fps here is an abbreviation for frames per second
                s << "; " << fixed << setprecision (1) << fps << " " << _("fps");
        }
-       
+
        return s.str ();
 }
 
@@ -111,11 +111,11 @@ TranscodeJob::remaining_time () const
 {
        /* _transcoder might be destroyed by the job-runner thread */
        shared_ptr<Transcoder> t = _transcoder;
-       
+
        if (!t) {
                return 0;
        }
-       
+
        float fps = t->current_encoding_rate ();
 
        if (fps == 0) {
index efe3f971993d818a4c5abe96c3c59d3d446d4579..23a856069d15b6529be66aa6cfebd4f3355c8bfc 100644 (file)
@@ -33,7 +33,7 @@ class TranscodeJob : public Job
 {
 public:
        TranscodeJob (boost::shared_ptr<const Film>);
-       
+
        std::string name () const;
        std::string json_name () const;
        void run ();
index 4ff0c6dfe0ae7397ad90121ea6808f5568bd31fd..3ecc3a064bb2b476ab41016e6c4d7083e1cfd72d 100644 (file)
@@ -67,7 +67,7 @@ Transcoder::go ()
        if (!_film->burn_subtitles ()) {
                _writer->write (_player->get_subtitle_fonts ());
        }
-       
+
        for (DCPTime t; t < length; t += frame) {
                list<shared_ptr<PlayerVideo> > v = _player->get_video (t, true);
                for (list<shared_ptr<PlayerVideo> >::const_iterator i = v.begin(); i != v.end(); ++i) {
index 655aeba095ae29b3cea1a24e89abb39730a40113..b0e9e51aca8314ae0b7769148bc7df49fd564d0a 100644 (file)
@@ -115,7 +115,7 @@ struct Crop
                if (s.height < minimum) {
                        s.height = minimum;
                }
-               
+
                return s;
        }
 
@@ -130,7 +130,7 @@ struct CPLSummary
                , cpl_annotation_text (a)
                , cpl_file (f)
        {}
-       
+
        std::string dcp_directory;
        std::string cpl_id;
        std::string cpl_annotation_text;
index f433ff991607afa4e15b8052fbf0e185c12495ec..24cd28b167bde800aeb419be236ea85d69036da7 100644 (file)
@@ -64,7 +64,7 @@ UpdateChecker::UpdateChecker ()
        curl_easy_setopt (_curl, CURLOPT_WRITEFUNCTION, write_callback_wrapper);
        curl_easy_setopt (_curl, CURLOPT_WRITEDATA, this);
        curl_easy_setopt (_curl, CURLOPT_TIMEOUT, 20);
-       
+
        string const agent = "dcpomatic/" + string (dcpomatic_version);
        curl_easy_setopt (_curl, CURLOPT_USERAGENT, agent.c_str ());
 
@@ -74,7 +74,7 @@ UpdateChecker::UpdateChecker ()
 UpdateChecker::~UpdateChecker ()
 {
        /* We are not cleaning up our thread, but hey well */
-       
+
        curl_easy_cleanup (_curl);
        curl_global_cleanup ();
        delete[] _buffer;
@@ -100,12 +100,12 @@ UpdateChecker::thread ()
                }
                --_to_do;
                lock.unlock ();
-               
+
                try {
                        _offset = 0;
 
                        /* Perform the request */
-                       
+
                        int r = curl_easy_perform (_curl);
                        if (r != CURLE_OK) {
                                set_state (FAILED);
@@ -113,7 +113,7 @@ UpdateChecker::thread ()
                        }
 
                        /* Parse the reply */
-                       
+
                        _buffer[_offset] = '\0';
                        string s (_buffer);
                        cxml::Document doc ("Update");
@@ -133,7 +133,7 @@ UpdateChecker::thread ()
                        if (version_less_than (dcpomatic_version, stable)) {
                                _stable = stable;
                        }
-                       
+
                        if (Config::instance()->check_for_test_updates() && version_less_than (dcpomatic_version, test)) {
                                _test = test;
                        }
@@ -148,7 +148,7 @@ UpdateChecker::thread ()
                }
        }
 }
-       
+
 size_t
 UpdateChecker::write_callback (void* data, size_t size, size_t nmemb)
 {
@@ -203,13 +203,13 @@ UpdateChecker::version_less_than (string const & a, string const & b)
        } else {
                am = raw_convert<int> (ap[2]);
        }
-       
+
        float bm;
        if (ends_with (bp[2], "devel")) {
                bm = raw_convert<int> (bp[2].substr (0, bp[2].length() - 5)) + 0.5;
        } else {
                bm = raw_convert<int> (bp[2]);
        }
-       
+
        return am < bm;
 }
index 461217a372ea61ae3802f0018a0026da76ff2339..b82be7808f7fa0c957a98c02a7ad69a3685e8b5d 100644 (file)
@@ -51,7 +51,7 @@ public:
                boost::mutex::scoped_lock lm (_data_mutex);
                return _state;
        }
-       
+
        /** @return new stable version, if there is one */
        boost::optional<std::string> stable () {
                boost::mutex::scoped_lock lm (_data_mutex);
@@ -63,7 +63,7 @@ public:
                boost::mutex::scoped_lock lm (_data_mutex);
                return _test;
        }
-       
+
        /** @return true if the last signal emission was the first */
        bool last_emit_was_first () const {
                boost::mutex::scoped_lock lm (_data_mutex);
@@ -78,7 +78,7 @@ public:
 
 private:
        friend struct update_checker_test;
-       
+
        static UpdateChecker* _instance;
 
        static bool version_less_than (std::string const & a, std::string const & b);
index 111846fe02856ae86e648a1da98fe7b1095a13c0..389d52d2594362ea75e0b6132c844be0433d028c 100644 (file)
@@ -31,7 +31,7 @@ class UpmixerA : public AudioProcessor
 {
 public:
        UpmixerA (int sampling_rate);
-       
+
        std::string name () const;
        std::string id () const;
        ChannelCount in_channels () const;
index ad4349da202d61d81811629db950882e2279bb17..05eb3121ebe3946927e1b484b51ee2d748a0c065 100644 (file)
@@ -184,7 +184,7 @@ int
 addr2line (void const * const addr)
 {
        char addr2line_cmd[512] = { 0 };
-       sprintf (addr2line_cmd, "addr2line -f -p -e %.256s %p > %s", program_name.c_str(), addr, backtrace_file.string().c_str()); 
+       sprintf (addr2line_cmd, "addr2line -f -p -e %.256s %p > %s", program_name.c_str(), addr, backtrace_file.string().c_str());
        return system(addr2line_cmd);
 }
 
@@ -198,19 +198,19 @@ exception_handler(struct _EXCEPTION_POINTERS * info)
        FILE* f = fopen_boost (backtrace_file, "w");
        fprintf (f, "C-style exception %d\n", info->ExceptionRecord->ExceptionCode);
        fclose(f);
-       
+
        if (info->ExceptionRecord->ExceptionCode != EXCEPTION_STACK_OVERFLOW) {
                CONTEXT* context = info->ContextRecord;
                SymInitialize (GetCurrentProcess (), 0, true);
-               
+
                STACKFRAME frame = { 0 };
-               
+
                /* setup initial stack frame */
 #if _WIN64
                frame.AddrPC.Offset    = context->Rip;
                frame.AddrStack.Offset = context->Rsp;
                frame.AddrFrame.Offset = context->Rbp;
-#else  
+#else
                frame.AddrPC.Offset    = context->Eip;
                frame.AddrStack.Offset = context->Esp;
                frame.AddrFrame.Offset = context->Ebp;
@@ -218,7 +218,7 @@ exception_handler(struct _EXCEPTION_POINTERS * info)
                frame.AddrPC.Mode      = AddrModeFlat;
                frame.AddrStack.Mode   = AddrModeFlat;
                frame.AddrFrame.Mode   = AddrModeFlat;
-               
+
                while (
                        StackWalk (
                                IMAGE_FILE_MACHINE_I386,
@@ -235,13 +235,13 @@ exception_handler(struct _EXCEPTION_POINTERS * info)
                        addr2line((void *) frame.AddrPC.Offset);
                }
        } else {
-#ifdef _WIN64          
+#ifdef _WIN64
                addr2line ((void *) info->ContextRecord->Rip);
-#else          
+#else
                addr2line ((void *) info->ContextRecord->Eip);
-#endif         
+#endif
        }
-       
+
        return EXCEPTION_CONTINUE_SEARCH;
 }
 #endif
@@ -273,7 +273,7 @@ terminate ()
                          << e.what() << std::endl;
        }
        catch (...) {
-               std::cerr << __FUNCTION__ << " caught unknown/unhandled exception." 
+               std::cerr << __FUNCTION__ << " caught unknown/unhandled exception."
                          << std::endl;
        }
 
@@ -306,8 +306,8 @@ dcpomatic_setup ()
        */
        std::locale::global (boost::locale::generator().generate (""));
        boost::filesystem::path::imbue (std::locale ());
-#endif 
-       
+#endif
+
        avfilter_register_all ();
 
 #ifdef DCPOMATIC_OSX
@@ -323,7 +323,7 @@ dcpomatic_setup ()
 
        Pango::init ();
        dcp::init ();
-       
+
        Ratio::setup_ratios ();
        PresetColourConversion::setup_colour_conversion_presets ();
        VideoContentScale::setup_scales ();
@@ -382,7 +382,7 @@ dcpomatic_setup_gettext_i18n (string lang)
 #if defined(DCPOMATIC_WINDOWS) || defined(DCPOMATIC_OSX)
        bindtextdomain ("libdcpomatic2", mo_path().string().c_str());
        bind_textdomain_codeset ("libdcpomatic2", "UTF8");
-#endif 
+#endif
 
 #ifdef DCPOMATIC_LINUX
        bindtextdomain ("libdcpomatic2", LINUX_LOCALE_PREFIX);
@@ -434,7 +434,7 @@ md5_digest_head_tail (vector<boost::filesystem::path> files, boost::uintmax_t si
                fclose (f);
 
                --i;
-       }               
+       }
        digester.add (buffer.get(), size - to_do);
 
        return digester.get ();
@@ -516,7 +516,7 @@ valid_image_file (boost::filesystem::path f)
        if (boost::starts_with (f.leaf().string(), "._")) {
                return false;
        }
-               
+
        string ext = f.extension().string();
        transform (ext.begin(), ext.end(), ext.begin(), ::tolower);
        return (
@@ -555,7 +555,7 @@ fit_ratio_within (float ratio, dcp::Size full_frame)
        if (ratio < full_frame.ratio ()) {
                return dcp::Size (rint (full_frame.height * ratio), full_frame.height);
        }
-       
+
        return dcp::Size (full_frame.width, rint (full_frame.width / ratio));
 }
 
@@ -578,7 +578,7 @@ subtitle_period (AVSubtitle const & sub)
                /* End time is not known */
                return FFmpegSubtitlePeriod (packet_time + ContentTime::from_seconds (sub.start_display_time / 1e3));
        }
-       
+
        return FFmpegSubtitlePeriod (
                packet_time + ContentTime::from_seconds (sub.start_display_time / 1e3),
                packet_time + ContentTime::from_seconds (sub.end_display_time / 1e3)
@@ -593,7 +593,7 @@ split_get_request (string url)
                KEY,
                VALUE
        } state = AWAITING_QUESTION_MARK;
-       
+
        map<string, string> r;
        string k;
        string v;
index f97e46322b9f5cd515741959ef3064367f3b8d44..8c6f6c7eb7ae11c39aada00f73ed0113c76febca 100644 (file)
@@ -119,7 +119,7 @@ VideoContent::VideoContent (shared_ptr<const Film> film, cxml::ConstNodePtr node
                _scale = VideoContentScale (node->node_child ("Scale"));
        }
 
-       
+
        if (node->optional_node_child ("ColourConversion")) {
                _colour_conversion = ColourConversion (node->node_child ("ColourConversion"), version);
        }
@@ -168,7 +168,7 @@ VideoContent::VideoContent (shared_ptr<const Film> film, vector<shared_ptr<Conte
                if (vc->fade_in() != ref->fade_in() || vc->fade_out() != ref->fade_out()) {
                        throw JoinError (_("Content to be joined must have the same fades."));
                }
-               
+
                _video_length += vc->video_length ();
        }
 
@@ -239,7 +239,7 @@ VideoContent::take_from_video_examiner (shared_ptr<VideoExaminer> d)
        LOG_GENERAL ("Video length obtained from header as %1 frames", _video_length);
 
        set_default_colour_conversion ();
-       
+
        signal_changed (VideoContentProperty::VIDEO_SIZE);
        signal_changed (VideoContentProperty::VIDEO_FRAME_RATE);
        signal_changed (VideoContentProperty::VIDEO_SCALE);
@@ -251,14 +251,14 @@ VideoContent::set_left_crop (int c)
 {
        {
                boost::mutex::scoped_lock lm (_mutex);
-               
+
                if (_crop.left == c) {
                        return;
                }
-               
+
                _crop.left = c;
        }
-       
+
        signal_changed (VideoContentProperty::VIDEO_CROP);
 }
 
@@ -270,10 +270,10 @@ VideoContent::set_right_crop (int c)
                if (_crop.right == c) {
                        return;
                }
-               
+
                _crop.right = c;
        }
-       
+
        signal_changed (VideoContentProperty::VIDEO_CROP);
 }
 
@@ -285,10 +285,10 @@ VideoContent::set_top_crop (int c)
                if (_crop.top == c) {
                        return;
                }
-               
+
                _crop.top = c;
        }
-       
+
        signal_changed (VideoContentProperty::VIDEO_CROP);
 }
 
@@ -300,7 +300,7 @@ VideoContent::set_bottom_crop (int c)
                if (_crop.bottom == c) {
                        return;
                }
-               
+
                _crop.bottom = c;
        }
 
@@ -478,10 +478,10 @@ VideoContent::set_video_frame_rate (float r)
                if (_video_frame_rate == r) {
                        return;
                }
-               
+
                _video_frame_rate = r;
        }
-       
+
        signal_changed (VideoContentProperty::VIDEO_FRAME_RATE);
 }
 
@@ -489,7 +489,7 @@ optional<float>
 VideoContent::fade (Frame f) const
 {
        DCPOMATIC_ASSERT (f >= 0);
-       
+
        if (f < fade_in()) {
                return float (f) / fade_in();
        }
@@ -550,7 +550,7 @@ VideoContent::processing_description () const
 
                d << " (" << fixed << setprecision(2) << scaled.ratio() << ":1)\n";
        }
-       
+
        if (scaled != container_size) {
                d << String::compose (
                        _("Padded with black to fit container %1 (%2x%3)"),
@@ -563,7 +563,7 @@ VideoContent::processing_description () const
 
        d << _("Content frame rate");
        d << " " << fixed << setprecision(4) << video_frame_rate() << "\n";
-       
+
        FrameRateChange frc (video_frame_rate(), film->video_frame_rate ());
        d << frc.description () << "\n";
 
index abc9c5fa3e8db454c803b6de462eba4a809c56ef..01e3cb2aab7e876a571bde5f02efa44c43dfc2e1 100644 (file)
@@ -54,7 +54,7 @@ public:
        virtual std::string identifier () const;
 
        virtual void set_default_colour_conversion ();
-       
+
        Frame video_length () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _video_length;
@@ -65,7 +65,7 @@ public:
                if (_video_frame_type == VIDEO_FRAME_TYPE_3D_ALTERNATE) {
                        return _video_length / 2;
                }
-               
+
                return _video_length;
        }
 
@@ -73,7 +73,7 @@ public:
                boost::mutex::scoped_lock lm (_mutex);
                return _video_size;
        }
-       
+
        float video_frame_rate () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _video_frame_rate;
@@ -93,7 +93,7 @@ public:
 
        void set_fade_in (Frame);
        void set_fade_out (Frame);
-       
+
        VideoFrameType video_frame_type () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _video_frame_type;
@@ -149,7 +149,7 @@ public:
                boost::mutex::scoped_lock lm (_mutex);
                return _fade_out;
        }
-       
+
        dcp::Size video_size_after_3d_split () const;
        dcp::Size video_size_after_crop () const;
 
@@ -176,7 +176,7 @@ private:
        friend struct audio_sampling_rate_test;
 
        void setup_default_colour_conversion ();
-       
+
        dcp::Size _video_size;
        VideoFrameType _video_frame_type;
        Crop _crop;
index 59ff4bd9b663d5fe0084192102668239ca7fc6b6..c8c29536117c83fc1e89db36c20cdbada8caf559 100644 (file)
@@ -84,13 +84,13 @@ string
 VideoContentScale::id () const
 {
        SafeStringStream s;
-       
+
        if (_ratio) {
                s << _ratio->id ();
        } else {
                s << (_scale ? "S1" : "S0");
        }
-       
+
        return s.str ();
 }
 
@@ -122,7 +122,7 @@ VideoContentScale::from_id (string id)
 
        return VideoContentScale (true);
 }
-               
+
 /** @param display_container Size of the container that we are displaying this content in.
  *  @param film_container The size of the film's image.
  */
@@ -154,7 +154,7 @@ VideoContentScale::size (shared_ptr<const VideoContent> c, dcp::Size display_con
                        float (display_container.width) / film_container.width,
                        float (display_container.height) / film_container.height
                        );
-               
+
                size.width = rint (size.width * scale);
                size.height = rint (size.height * scale);
        }
index 9d165ab02f810b7d7e4730ff1617115f3a57eafb..fcc262163ecab19844fdd992b641d4d3a2d12c31 100644 (file)
@@ -52,7 +52,7 @@ list<ContentVideo>
 VideoDecoder::decoded_video (Frame frame)
 {
        list<ContentVideo> output;
-       
+
        for (list<ContentVideo>::const_iterator i = _decoded_video.begin(); i != _decoded_video.end(); ++i) {
                if (i->frame == frame) {
                        output.push_back (*i);
@@ -224,7 +224,7 @@ VideoDecoder::fill_3d (Frame from, Frame to, Eyes eye)
                }
        }
 }
-       
+
 /** Called by subclasses when they have a video frame ready */
 void
 VideoDecoder::video (shared_ptr<const ImageProxy> image, Frame frame)
@@ -272,7 +272,7 @@ VideoDecoder::video (shared_ptr<const ImageProxy> image, Frame frame)
 
        boost::optional<Frame> from;
        boost::optional<Frame> to;
-       
+
        if (_decoded_video.empty() && _last_seek_time && _last_seek_accurate) {
                from = _last_seek_time->frames (_video_content->video_frame_rate ());
                to = to_push.front().frame;
index 8643b0def14886807a95fad9755b58461df45215..ae1fb3e87f47d050ac69d40ac8244c7f790faa9f 100644 (file)
@@ -118,7 +118,7 @@ Writer::Writer (shared_ptr<const Film> film, weak_ptr<Job> j)
 
        job->sub (_("Checking existing image data"));
        check_existing_picture_asset ();
-       
+
        _picture_asset_writer = _picture_asset->start_write (
                _film->internal_video_asset_dir() / _film->internal_video_asset_filename(),
                _film->interop() ? dcp::INTEROP : dcp::SMPTE,
@@ -133,7 +133,7 @@ Writer::Writer (shared_ptr<const Film> film, weak_ptr<Job> j)
                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.
                */
@@ -227,14 +227,14 @@ Writer::fake_write (int frame, Eyes eyes)
                /* The queue is too big; wait until that is sorted out */
                _full_condition.wait (lock);
        }
-       
+
        FILE* file = fopen_boost (_film->info_file (), "rb");
        if (!file) {
                throw ReadFileError (_film->info_file ());
        }
        dcp::FrameInfo info = read_frame_info (file, frame, eyes);
        fclose (file);
-       
+
        QueueItem qi;
        qi.type = QueueItem::FAKE;
        qi.size = info.size;
@@ -318,7 +318,7 @@ try
                bool done_something = false;
 
                while (true) {
-                       
+
                        if (_finish || _queued_full_in_memory > _maximum_frames_in_memory || have_sequenced_image_at_queue_head ()) {
                                /* We've got something to do: go and do it */
                                break;
@@ -349,7 +349,7 @@ try
                                                LOG_WARNING (N_("- type FULL, frame %1, eyes %2"), i->frame, i->eyes);
                                        } else {
                                                LOG_WARNING (N_("- type FAKE, size %1, frame %2, eyes %3"), i->size, i->frame, i->eyes);
-                                       }                                               
+                                       }
                                }
                                LOG_WARNING (N_("Last written frame %1, last written eyes %2"), _last_written_frame, _last_written_eyes);
                        }
@@ -399,7 +399,7 @@ try
 
                        _last_written_frame = qi.frame;
                        _last_written_eyes = qi.eyes;
-                       
+
                        shared_ptr<Job> job = _job.lock ();
                        DCPOMATIC_ASSERT (job);
                        int64_t total = _film->length().frames (_film->video_frame_rate ());
@@ -443,7 +443,7 @@ try
                                );
 
                        i->encoded->write_via_temp (_film->j2c_path (i->frame, i->eyes, true), _film->j2c_path (i->frame, i->eyes, false));
-                       
+
                        lock.lock ();
                        i->encoded.reset ();
                        --_queued_full_in_memory;
@@ -473,7 +473,7 @@ Writer::terminate_thread (bool can_throw)
        if (_thread == 0) {
                return;
        }
-       
+
        _finish = true;
        _empty_condition.notify_all ();
        _full_condition.notify_all ();
@@ -483,10 +483,10 @@ Writer::terminate_thread (bool can_throw)
        if (can_throw) {
                rethrow ();
        }
-       
+
        delete _thread;
        _thread = 0;
-}      
+}
 
 void
 Writer::finish ()
@@ -494,17 +494,17 @@ Writer::finish ()
        if (!_thread) {
                return;
        }
-       
+
        terminate_thread (true);
 
        _picture_asset_writer->finalize ();
        if (_sound_asset_writer) {
                _sound_asset_writer->finalize ();
        }
-       
+
        /* Hard-link the video asset into the DCP */
        boost::filesystem::path video_from = _picture_asset->file ();
-       
+
        boost::filesystem::path video_to;
        video_to /= _film->dir (_film->dcp_name());
        video_to /= video_asset_filename (_picture_asset);
@@ -528,7 +528,7 @@ Writer::finish ()
                boost::filesystem::path audio_to;
                audio_to /= _film->dir (_film->dcp_name ());
                audio_to /= audio_asset_filename (_sound_asset);
-               
+
                boost::filesystem::rename (_film->file (audio_asset_filename (_sound_asset)), audio_to, ec);
                if (ec) {
                        throw FileError (
@@ -547,7 +547,7 @@ Writer::finish ()
                        _film->dcp_content_type()->libdcp_kind ()
                        )
                );
-       
+
        dcp.add (cpl);
 
        shared_ptr<dcp::Reel> reel (new dcp::Reel ());
@@ -583,7 +583,7 @@ Writer::finish ()
                                _film->dir (_film->dcp_name ()) / ("sub_" + _subtitle_asset->id() + ".mxf")
                                );
                }
-               
+
                reel->add (shared_ptr<dcp::ReelSubtitleAsset> (
                                   new dcp::ReelSubtitleAsset (
                                           _subtitle_asset,
@@ -593,7 +593,7 @@ Writer::finish ()
                                           )
                                   ));
        }
-       
+
        cpl->add (reel);
 
        shared_ptr<Job> job = _job.lock ();
@@ -637,14 +637,14 @@ Writer::check_existing_picture_asset_frame (FILE* asset, int f, Eyes eyes)
                LOG_GENERAL ("Existing frame %1 has no info file", f);
                return false;
        }
-       
+
        dcp::FrameInfo info = read_frame_info (file, f, eyes);
        fclose (file);
        if (info.size == 0) {
                LOG_GENERAL ("Existing frame %1 has no info file", f);
                return false;
        }
-       
+
        /* Read the data from the asset and hash it */
        dcpomatic_fseek (asset, info.offset, SEEK_SET);
        Data data (info.size);
@@ -738,9 +738,9 @@ Writer::write (PlayerSubtitles subs)
                        s->set_edit_rate (dcp::Fraction (_film->video_frame_rate (), 1));
                        s->set_time_code_rate (_film->video_frame_rate ());
                        _subtitle_asset = s;
-               }                       
+               }
        }
-       
+
        for (list<dcp::SubtitleString>::const_iterator i = subs.text.begin(); i != subs.text.end(); ++i) {
                _subtitle_asset->add (*i);
        }
@@ -779,7 +779,7 @@ long
 Writer::frame_info_position (int frame, Eyes eyes) const
 {
        static int const info_size = 48;
-       
+
        switch (eyes) {
        case EYES_BOTH:
                return frame * info_size;
@@ -790,7 +790,7 @@ Writer::frame_info_position (int frame, Eyes eyes) const
        default:
                DCPOMATIC_ASSERT (false);
        }
-       
+
 
        DCPOMATIC_ASSERT (false);
 }
@@ -802,7 +802,7 @@ Writer::read_frame_info (FILE* file, int frame, Eyes eyes) const
        dcpomatic_fseek (file, frame_info_position (frame, eyes), SEEK_SET);
        fread (&info.offset, sizeof (info.offset), 1, file);
        fread (&info.size, sizeof (info.size), 1, file);
-       
+
        char hash_buffer[33];
        fread (hash_buffer, 1, 32, file);
        hash_buffer[32] = '\0';
index 90b36962cf0acf3637b3bf948c4464ceac247413..486d7d672aa31357b330259cfa89bffc9fbfff0b 100644 (file)
@@ -56,7 +56,7 @@ public:
        QueueItem ()
                : size (0)
        {}
-       
+
        enum Type {
                /** a normal frame with some JPEG200 data */
                FULL,
@@ -98,7 +98,7 @@ public:
        ~Writer ();
 
        bool can_fake_write (int) const;
-       
+
        void write (Data, int, Eyes);
        void fake_write (int, Eyes);
        void repeat (int, Eyes);
@@ -149,7 +149,7 @@ private:
         *  ordering
         */
        int _maximum_frames_in_memory;
-       
+
        /** number of FULL written frames */
        int _full_written;
        /** number of FAKE written frames */
@@ -159,7 +159,7 @@ private:
            due to the limit of frames to be held in memory.
        */
        int _pushed_to_disk;
-       
+
        boost::shared_ptr<dcp::PictureAsset> _picture_asset;
        boost::shared_ptr<dcp::PictureAssetWriter> _picture_asset_writer;
        boost::shared_ptr<dcp::SoundAsset> _sound_asset;
index 5fea90504be49b9a7009224eb36ee903ad3360f3..0a105fa6bc66a24b60b054c0682702166c73cbe8 100644 (file)
@@ -113,7 +113,7 @@ public:
 private:
        /* Not defined */
        FilmChangedDialog (FilmChangedDialog const &);
-       
+
        wxMessageDialog* _dialog;
 };
 
@@ -124,7 +124,7 @@ private:
 #define NEEDS_SELECTED_VIDEO_CONTENT 0x8
 
 map<wxMenuItem*, int> menu_items;
-       
+
 enum {
        ID_file_new = 1,
        ID_file_open,
@@ -163,13 +163,13 @@ public:
 #if defined(DCPOMATIC_WINDOWS)
                if (Config::instance()->win32_console ()) {
                        AllocConsole();
-                       
+
                        HANDLE handle_out = GetStdHandle(STD_OUTPUT_HANDLE);
                        int hCrt = _open_osfhandle((intptr_t) handle_out, _O_TEXT);
                        FILE* hf_out = _fdopen(hCrt, "w");
                        setvbuf(hf_out, NULL, _IONBF, 1);
                        *stdout = *hf_out;
-                       
+
                        HANDLE handle_in = GetStdHandle(STD_INPUT_HANDLE);
                        hCrt = _open_osfhandle((intptr_t) handle_in, _O_TEXT);
                        FILE* hf_in = _fdopen(hCrt, "r");
@@ -257,7 +257,7 @@ public:
        try
        {
                maybe_save_then_delete_film ();
-               
+
                shared_ptr<Film> film (new Film (file));
                list<string> const notes = film->read_metadata ();
 
@@ -268,11 +268,11 @@ public:
                                  "in this version.  Please check the film's settings carefully.")
                                );
                }
-               
+
                for (list<string>::const_iterator i = notes.begin(); i != notes.end(); ++i) {
                        error_dialog (0, std_to_wx (*i));
                }
-               
+
                set_film (film);
        }
        catch (std::exception& e) {
@@ -293,7 +293,7 @@ public:
        shared_ptr<Film> film () const {
                return _film;
        }
-       
+
 private:
 
        void file_changed (boost::filesystem::path f)
@@ -302,15 +302,15 @@ private:
                if (!f.empty ()) {
                        s += " - " + f.string ();
                }
-               
+
                SetTitle (std_to_wx (s));
        }
-       
+
        void file_new ()
        {
                NewFilmDialog* d = new NewFilmDialog (this);
                int const r = d->ShowModal ();
-               
+
                if (r == wxID_OK) {
 
                        if (boost::filesystem::is_directory (d->get_path()) && !boost::filesystem::is_empty(d->get_path())) {
@@ -331,11 +331,11 @@ private:
                                        );
                                return;
                        }
-                       
+
                        maybe_save_then_delete_film ();
                        new_film (d->get_path ());
                }
-               
+
                d->Destroy ();
        }
 
@@ -347,7 +347,7 @@ private:
                        std_to_wx (Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()),
                        wxDEFAULT_DIALOG_STYLE | wxDD_DIR_MUST_EXIST
                        );
-               
+
                int r;
                while (true) {
                        r = c->ShowModal ();
@@ -357,7 +357,7 @@ private:
                                break;
                        }
                }
-                       
+
                if (r == wxID_OK) {
                        load_film (wx_to_std (c->GetPath ()));
                }
@@ -385,7 +385,7 @@ private:
                        load_film (history[n]);
                }
        }
-       
+
        void file_exit ()
        {
                /* false here allows the close handler to veto the close request */
@@ -441,7 +441,7 @@ private:
                if (!_film) {
                        return;
                }
-               
+
                KDMDialog* d = new KDMDialog (this, _film);
                if (d->ShowModal () != wxID_OK) {
                        d->Destroy ();
@@ -463,7 +463,7 @@ private:
                } catch (...) {
                        error_dialog (this, _("An unknown exception occurred."));
                }
-       
+
                d->Destroy ();
        }
 
@@ -482,7 +482,7 @@ private:
                        (*i)->scale_and_crop_to_fit_height ();
                }
        }
-       
+
        void jobs_send_dcp_to_tms ()
        {
                _film->send_dcp_to_tms ();
@@ -512,14 +512,14 @@ private:
                                }
                        }
                }
-#endif         
+#endif
 
 #ifdef DCPOMATIC_OSX
                int r = system (string ("open -R " + _film->dir (_film->dcp_name (false)).string ()).c_str ());
                if (WEXITSTATUS (r)) {
                        error_dialog (this, _("Could not show DCP"));
                }
-#endif                
+#endif
        }
 
        void tools_hints ()
@@ -578,7 +578,7 @@ private:
                d->Destroy ();
                return r;
        }
-               
+
        void close (wxCloseEvent& ev)
        {
                if (!should_close ()) {
@@ -591,7 +591,7 @@ private:
                   now (without, as far as I can see, any way for us to find out).
                */
                _config_changed_connection.disconnect ();
-               
+
                maybe_save_then_delete_film ();
                ev.Skip ();
        }
@@ -606,27 +606,27 @@ private:
                bool const dcp_creation = (i != jobs.end ()) && !(*i)->finished ();
                bool const have_cpl = _film && !_film->cpls().empty ();
                bool const have_selected_video_content = !_film_editor->content_panel()->selected_video().empty();
-               
+
                for (map<wxMenuItem*, int>::iterator j = menu_items.begin(); j != menu_items.end(); ++j) {
-                       
+
                        bool enabled = true;
-                       
+
                        if ((j->second & NEEDS_FILM) && !_film) {
                                enabled = false;
                        }
-                       
+
                        if ((j->second & NOT_DURING_DCP_CREATION) && dcp_creation) {
                                enabled = false;
                        }
-                       
+
                        if ((j->second & NEEDS_CPL) && !have_cpl) {
                                enabled = false;
                        }
-                       
+
                        if ((j->second & NEEDS_SELECTED_VIDEO_CONTENT) && !have_selected_video_content) {
                                enabled = false;
                        }
-                       
+
                        j->first->Enable (enabled);
                }
        }
@@ -636,7 +636,7 @@ private:
                if (!_film) {
                        return;
                }
-               
+
                if (_film->dirty ()) {
                        FilmChangedDialog d (_film->name ());
                        switch (d.run ()) {
@@ -647,7 +647,7 @@ private:
                                break;
                        }
                }
-               
+
                _film.reset ();
        }
 
@@ -656,7 +656,7 @@ private:
                wxMenuItem* item = menu->Append (id, text);
                menu_items.insert (make_pair (item, sens));
        }
-       
+
        void setup_menu (wxMenuBar* m)
        {
                _file_menu = new wxMenu;
@@ -669,17 +669,17 @@ private:
 
                _history_position = _file_menu->GetMenuItems().GetCount();
 
-#ifndef __WXOSX__      
+#ifndef __WXOSX__
                _file_menu->AppendSeparator ();
 #endif
-       
-#ifdef __WXOSX__       
+
+#ifdef __WXOSX__
                add_item (_file_menu, _("&Exit"), wxID_EXIT, ALWAYS);
 #else
                add_item (_file_menu, _("&Quit"), wxID_EXIT, ALWAYS);
-#endif 
-       
-#ifdef __WXOSX__       
+#endif
+
+#ifdef __WXOSX__
                add_item (_file_menu, _("&Preferences...\tCtrl-P"), wxID_PREFERENCES, ALWAYS);
 #else
                wxMenu* edit = new wxMenu;
@@ -689,7 +689,7 @@ private:
                wxMenu* content = new wxMenu;
                add_item (content, _("Scale to fit &width"), ID_content_scale_to_fit_width, NEEDS_FILM | NEEDS_SELECTED_VIDEO_CONTENT);
                add_item (content, _("Scale to fit &height"), ID_content_scale_to_fit_height, NEEDS_FILM | NEEDS_SELECTED_VIDEO_CONTENT);
-               
+
                wxMenu* jobs_menu = new wxMenu;
                add_item (jobs_menu, _("&Make DCP\tCtrl-M"), ID_jobs_make_dcp, NEEDS_FILM | NOT_DURING_DCP_CREATION);
                add_item (jobs_menu, _("Make &KDMs...\tCtrl-K"), ID_jobs_make_kdms, NEEDS_FILM);
@@ -702,17 +702,17 @@ private:
                add_item (tools, _("Check for updates"), ID_tools_check_for_updates, 0);
                tools->AppendSeparator ();
                add_item (tools, _("Restore default preferences"), ID_tools_restore_default_preferences, ALWAYS);
-               
+
                wxMenu* help = new wxMenu;
-#ifdef __WXOSX__       
+#ifdef __WXOSX__
                add_item (help, _("About DCP-o-matic"), wxID_ABOUT, ALWAYS);
-#else  
+#else
                add_item (help, _("About"), wxID_ABOUT, ALWAYS);
-#endif 
+#endif
                add_item (help, _("Report a problem..."), ID_help_report_a_problem, ALWAYS);
-               
+
                m->Append (_file_menu, _("&File"));
-#ifndef __WXOSX__      
+#ifndef __WXOSX__
                m->Append (edit, _("&Edit"));
 #endif
                m->Append (content, _("&Content"));
@@ -732,15 +732,15 @@ private:
                }
                delete _history_separator;
                _history_separator = 0;
-               
+
                int pos = _history_position;
-               
+
                vector<boost::filesystem::path> history = Config::instance()->history ();
-               
+
                if (!history.empty ()) {
                        _history_separator = _file_menu->InsertSeparator (pos++);
                }
-               
+
                for (size_t i = 0; i < history.size(); ++i) {
                        SafeStringStream s;
                        if (i < 9) {
@@ -752,7 +752,7 @@ private:
 
                _history_items = history.size ();
        }
-       
+
        FilmEditor* _film_editor;
        FilmViewer* _film_viewer;
        HintsDialog* _hints_dialog;
@@ -784,26 +784,26 @@ public:
                , _frame (0)
        {}
 
-private:       
-               
+private:
+
        bool OnInit ()
        try
        {
                SetAppName (_("DCP-o-matic"));
-               
+
                if (!wxApp::OnInit()) {
                        return false;
                }
-               
-#ifdef DCPOMATIC_LINUX 
+
+#ifdef DCPOMATIC_LINUX
                unsetenv ("UBUNTU_MENUPROXY");
 #endif
 
-#ifdef __WXOSX__               
+#ifdef __WXOSX__
                ProcessSerialNumber serial;
                GetCurrentProcess (&serial);
                TransformProcessType (&serial, kProcessTransformToForegroundApplication);
-#endif         
+#endif
 
                wxInitAllImageHandlers ();
 
@@ -905,7 +905,7 @@ private:
                /* This will terminate the program */
                return false;
        }
-       
+
        void OnUnhandledException ()
        {
                error_dialog (0, _("An unknown exception occurred.") + "  " + REPORT_PROBLEM);
index 60c5e697d42ab8e396c977e46971d089e275b707..48ef8f798e1f413881032a9bd06b8ba7ea901799 100644 (file)
@@ -99,7 +99,7 @@ private:
                _sizer->Layout ();
                ev.Skip ();
        }
-       
+
        bool should_close ()
        {
                if (!JobManager::instance()->work_to_do ()) {
@@ -117,7 +117,7 @@ private:
                d->Destroy ();
                return r;
        }
-               
+
        void close (wxCloseEvent& ev)
        {
                if (!should_close ()) {
@@ -132,7 +132,7 @@ private:
        {
                add_film ();
        }
-       
+
        void file_quit ()
        {
                if (should_close ()) {
@@ -153,7 +153,7 @@ private:
                if (_last_parent) {
                        c->SetPath (std_to_wx (_last_parent.get().string ()));
                }
-               
+
                int r;
                while (true) {
                        r = c->ShowModal ();
@@ -163,7 +163,7 @@ private:
                                break;
                        }
                }
-                       
+
                if (r == wxID_OK) {
                        try {
                                shared_ptr<Film> film (new Film (wx_to_std (c->GetPath ())));
@@ -197,10 +197,10 @@ class App : public wxApp
                if (!wxApp::OnInit()) {
                        return false;
                }
-               
-#ifdef DCPOMATIC_LINUX         
+
+#ifdef DCPOMATIC_LINUX
                unsetenv ("UBUNTU_MENUPROXY");
-#endif         
+#endif
 
                /* Enable i18n; this will create a Config object
                   to look for a force-configured language.  This Config
index 54e196fe0acb4d5e6a0b9ab343ef46c63ad91bb2..f885412efaf9d1ae0ebd7febd5cb7db5d3175d3e 100644 (file)
@@ -100,7 +100,7 @@ print_dump (shared_ptr<Film> film)
                        } else {
                                cout << "\tno colour conversion\n";
                        }
-                                       
+
                }
 
                shared_ptr<AudioContent> audio = dynamic_pointer_cast<AudioContent> (c);
@@ -176,10 +176,10 @@ main (int argc, char* argv[])
        }
 
        film_dir = argv[optind];
-                       
+
        dcpomatic_setup ();
        signal_manager = new SignalManager ();
-       
+
        if (no_remote) {
                ServerFinder::instance()->disable ();
        }
@@ -201,7 +201,7 @@ main (int argc, char* argv[])
                print_dump (film);
                exit (EXIT_SUCCESS);
        }
-       
+
        ContentList content = film->content ();
        for (ContentList::const_iterator i = content.begin(); i != content.end(); ++i) {
                vector<boost::filesystem::path> paths = (*i)->paths ();
@@ -241,7 +241,7 @@ main (int argc, char* argv[])
                for (list<shared_ptr<Job> >::iterator i = jobs.begin(); i != jobs.end(); ++i) {
                        if (progress) {
                                cout << (*i)->name() << ": ";
-                               
+
                                if ((*i)->progress ()) {
                                        cout << (*i)->status() << "                         \n";
                                } else {
@@ -283,8 +283,8 @@ main (int argc, char* argv[])
        JobManager::drop ();
 
        ServerFinder::drop ();
-       
+
        return error ? EXIT_FAILURE : EXIT_SUCCESS;
 }
 
-         
+
index a826a10710f32a489bdd1be19c435dd59b94a08f..d4d4df29b814f109066c0d87dc1ad3ae910a0288 100644 (file)
@@ -79,7 +79,7 @@ main (int argc, char* argv[])
        Ratio const * content_ratio = 0;
        int still_length = 10;
        boost::filesystem::path output;
-       
+
        int option_index = 0;
        while (true) {
                static struct option long_options[] = {
@@ -171,7 +171,7 @@ main (int argc, char* argv[])
 
                film->set_container (container_ratio);
                film->set_dcp_content_type (dcp_content_type);
-               
+
                for (int i = optind; i < argc; ++i) {
                        shared_ptr<Content> c = content_factory (film, argv[i]);
                        shared_ptr<VideoContent> vc = dynamic_pointer_cast<VideoContent> (c);
@@ -180,7 +180,7 @@ main (int argc, char* argv[])
                        }
                        film->examine_and_add_content (c);
                }
-               
+
                JobManager* jm = JobManager::instance ();
 
                while (jm->work_to_do ()) {}
@@ -214,6 +214,6 @@ main (int argc, char* argv[])
                cerr << argv[0] << ": " << e.what() << "\n";
                exit (EXIT_FAILURE);
        }
-               
+
        return 0;
 }
index ae7d97f4f08a46d4d939aca9647c3920cfed39c7..345b905457d8415ae3b7e7edf78d6e3f054c8a3c 100644 (file)
@@ -116,7 +116,7 @@ int main (int argc, char* argv[])
        dcp::Formulation formulation = dcp::MODIFIED_TRANSITIONAL_1;
 
        program_name = argv[0];
-       
+
        int option_index = 0;
        while (true) {
                static struct option long_options[] = {
@@ -215,7 +215,7 @@ int main (int argc, char* argv[])
        }
 
        string const film_dir = argv[optind];
-                       
+
        dcpomatic_setup ();
 
        shared_ptr<Film> film;
@@ -249,7 +249,7 @@ int main (int argc, char* argv[])
                if (output.empty ()) {
                        error ("you must specify --output");
                }
-               
+
                dcp::Certificate certificate (dcp::file_to_string (certificate_file));
                dcp::EncryptedKDM kdm = film->make_kdm (certificate, cpl, valid_from.get(), valid_to.get(), formulation);
                kdm.as_xml (output);
@@ -278,7 +278,7 @@ int main (int argc, char* argv[])
                                write_kdm_zip_files (
                                        film, (*i)->screens(), cpl, dcp::LocalTime (valid_from.get()), dcp::LocalTime (valid_to.get()), formulation, output
                                        );
-                               
+
                                if (verbose) {
                                        cout << "Wrote ZIP files to " << output << "\n";
                                }
@@ -286,7 +286,7 @@ int main (int argc, char* argv[])
                                write_kdm_files (
                                        film, (*i)->screens(), cpl, dcp::LocalTime (valid_from.get()), dcp::LocalTime (valid_to.get()), formulation, output
                                        );
-                               
+
                                if (verbose) {
                                        cout << "Wrote KDM files to " << output << "\n";
                                }
index 8107949f5a9a4950e5661c728bc57eec15c74970..37eeb1e8e20d8966b68788d979e7f7d33c20c905 100644 (file)
@@ -61,7 +61,7 @@ private:
                _log = m;
        }
 
-       string _log;    
+       string _log;
 };
 
 static shared_ptr<MemoryLog> memory_log (new MemoryLog);
@@ -103,7 +103,7 @@ class TaskBarIcon : public wxTaskBarIcon
 public:
        TaskBarIcon ()
        {
-#ifdef __WXMSW__               
+#ifdef __WXMSW__
                wxIcon icon (std_to_wx ("taskbar_icon"));
 #endif
 #ifdef __WXGTK__
@@ -115,12 +115,12 @@ public:
 #ifndef __WXOSX__
                /* XXX: fix this for OS X */
                SetIcon (icon, std_to_wx ("DCP-o-matic encode server"));
-#endif         
+#endif
 
                Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&TaskBarIcon::status, this), ID_status);
                Bind (wxEVT_COMMAND_MENU_SELECTED, boost::bind (&TaskBarIcon::quit, this), ID_quit);
        }
-       
+
        wxMenu* CreatePopupMenu ()
        {
                wxMenu* menu = new wxMenu;
@@ -151,14 +151,14 @@ public:
                , _icon (0)
        {}
 
-private:       
-       
+private:
+
        bool OnInit ()
        {
                if (!wxApp::OnInit ()) {
                        return false;
                }
-               
+
                dcpomatic_setup ();
 
                _icon = new TaskBarIcon;
@@ -167,7 +167,7 @@ private:
                Bind (wxEVT_TIMER, boost::bind (&App::check, this));
                _timer.reset (new wxTimer (this));
                _timer->Start (1000);
-               
+
                return true;
        }
 
index 847c1fa1b4d25ff87caa74f2f9cd739b7743ea53..efcfdc40e340a251fdd22f9aa1cf6d2a236f797e 100644 (file)
@@ -105,9 +105,9 @@ main (int argc, char* argv[])
        } else {
                log.reset (new NullLog);
        }
-       
+
        Server server (log, verbose);
-       
+
        try {
                server.run (num_threads);
        } catch (boost::system::system_error& e) {
index 6f7a435690a8645b29a02ed7bbcdb9370248f29f..02f4e667398fb16376ee17411bbc5b5b79a8f02b 100644 (file)
@@ -76,7 +76,7 @@ process_video (shared_ptr<PlayerVideo> pvf)
                cout << "\033[0;31msizes differ\033[0m\n";
                return;
        }
-               
+
        uint8_t* p = local_encoded.data().get ();
        uint8_t* q = remote_encoded.data().get ();
        for (int i = 0; i < local_encoded.size(); ++i) {
@@ -129,7 +129,7 @@ main (int argc, char* argv[])
                        break;
                }
        }
-       
+
        if (server_host.empty() || film_dir.empty()) {
                help (argv[0]);
                exit (EXIT_FAILURE);
@@ -141,7 +141,7 @@ main (int argc, char* argv[])
                server = new ServerDescription (server_host, 1);
                film.reset (new Film (film_dir));
                film->read_metadata ();
-               
+
                shared_ptr<Player> player (new Player (film));
 
                DCPTime const frame = DCPTime::from_frames (1, film->video_frame_rate ());
index 13a1ef67111d433fd5512df84416360c5c8dfdae..142705a557008d90f12dee019242592d7223b02a 100644 (file)
@@ -35,7 +35,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
 {
        wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
        wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
-       
+
        wxFont title_font (*wxNORMAL_FONT);
        title_font.SetPointSize (title_font.GetPointSize() + 12);
        title_font.SetWeight (wxFONTWEIGHT_BOLD);
@@ -45,7 +45,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
 
        wxFont version_font (*wxNORMAL_FONT);
        version_font.SetWeight (wxFONTWEIGHT_BOLD);
-       
+
        wxStaticText* t = new wxStaticText (this, wxID_ANY, _("DCP-o-matic"));
        t->SetFont (title_font);
        sizer->Add (t, wxSizerFlags().Centre().Border(wxALL, 16));
@@ -66,7 +66,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
                wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER
                );
        t->SetFont (subtitle_font);
-       
+
        sizer->Add (t, wxSizerFlags().Centre().Border(wxALL, 8));
 
        wxHyperlinkCtrl* h = new wxHyperlinkCtrl (
@@ -82,7 +82,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
                _("(C) 2012-2015 Carl Hetherington, Terrence Meiczinger\n Ole Laursen, Brecht Sanders"),
                wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER
                );
-       
+
        sizer->Add (t, wxSizerFlags().Centre().Border(wxLEFT | wxRIGHT, 16));
 
        _notebook = new wxNotebook (this, wxID_ANY);
@@ -236,7 +236,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
        tested_by.Add (wxT ("Paul Willmott"));
        tested_by.Add (wxT ("Wolfgang Woehl"));
        add_section (_("Tested by"), tested_by);
-       
+
        sizer->Add (_notebook, wxSizerFlags().Centre().Border(wxALL, 16).Expand());
 
        overall_sizer->Add (sizer);
@@ -245,7 +245,7 @@ AboutDialog::AboutDialog (wxWindow* parent)
        if (buttons) {
                overall_sizer->Add (buttons, 1, wxEXPAND | wxALL, 4);
        }
-       
+
        SetSizerAndFit (overall_sizer);
 }
 
@@ -263,7 +263,7 @@ AboutDialog::add_section (wxString name, wxArrayString credits)
        wxSizer* overall_sizer = new wxBoxSizer (wxHORIZONTAL);
 
        vector<wxSizer*> sizers;
-       
+
        for (int i = 0; i < N; ++i) {
                sizers.push_back (new wxBoxSizer (wxVERTICAL));
                overall_sizer->Add (sizers.back (), 1, wxEXPAND | wxALL, 6);
index e1ea70ee31e3341cbc7d120f87add078c3c930f0..fd523aa02057680f205564a4cac08659d6cac9f1 100644 (file)
@@ -41,7 +41,7 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film)
 
        wxBoxSizer* overall_sizer = new wxBoxSizer (wxVERTICAL);
        wxBoxSizer* lr_sizer = new wxBoxSizer (wxHORIZONTAL);
-       
+
        wxBoxSizer* left = new wxBoxSizer (wxVERTICAL);
 
        _plot = new AudioPlot (this);
@@ -70,7 +70,7 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film)
                m->SetFont (subheading_font);
                right->Add (m, 1, wxALIGN_CENTER_VERTICAL | wxTOP, 16);
        }
-       
+
        wxString const types[] = {
                _("Peak"),
                _("RMS")
@@ -87,7 +87,7 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film)
                m->SetFont (subheading_font);
                right->Add (m, 1, wxALIGN_CENTER_VERTICAL | wxTOP, 16);
        }
-       
+
        _smoothing = new wxSlider (this, wxID_ANY, AudioPlot::max_smoothing / 2, 1, AudioPlot::max_smoothing);
        _smoothing->Bind (wxEVT_SCROLL_THUMBTRACK, boost::bind (&AudioDialog::smoothing_changed, this));
        right->Add (_smoothing, 0, wxEXPAND);
@@ -96,12 +96,12 @@ AudioDialog::AudioDialog (wxWindow* parent, shared_ptr<Film> film)
 
        overall_sizer->Add (lr_sizer);
 
-#ifdef DCPOMATIC_LINUX 
+#ifdef DCPOMATIC_LINUX
        wxSizer* buttons = CreateSeparatedButtonSizer (wxCLOSE);
        if (buttons) {
                overall_sizer->Add (buttons, wxSizerFlags().Expand().DoubleBorder());
        }
-#endif 
+#endif
 
        SetSizer (overall_sizer);
        overall_sizer->Layout ();
@@ -141,12 +141,12 @@ AudioDialog::try_to_load_analysis ()
                JobManager::instance()->add (job);
                return;
         }
-       
+
        _plot->set_analysis (_analysis);
        setup_peak_time ();
 
        /* Set up some defaults if no check boxes are checked */
-       
+
        int i = 0;
        while (i < MAX_DCP_AUDIO_CHANNELS && (!_channel_checkbox[i] || !_channel_checkbox[i]->GetValue ())) {
                ++i;
@@ -177,7 +177,7 @@ AudioDialog::analysis_finished ()
 {
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
-       
+
        if (!boost::filesystem::exists (film->audio_analysis_path ())) {
                /* We analysed and still nothing showed up, so maybe it was cancelled or it failed.
                   Give up.
@@ -235,14 +235,14 @@ AudioDialog::setup_peak_time ()
        if (!_analysis || !_analysis->peak ()) {
                return;
        }
-       
+
        shared_ptr<Film> film = _film.lock ();
        if (!film) {
                return;
        }
-       
+
        float peak_dB = 20 * log10 (_analysis->peak().get());
-       
+
        _peak_time->SetLabel (
                wxString::Format (
                        _("Peak is %.2fdB at %s"),
@@ -250,7 +250,7 @@ AudioDialog::setup_peak_time ()
                        time_to_timecode (_analysis->peak_time().get(), film->video_frame_rate ()).data ()
                        )
                );
-       
+
        if (peak_dB > -3) {
                _peak_time->SetForegroundColour (wxColour (255, 0, 0));
        } else {
@@ -266,4 +266,4 @@ AudioDialog::Show (bool show)
        return r;
 }
 
-       
+
index b9b2c1fb7267db01f603fac8cb8c6d67ffd58cc8..75a993d8c4df4b0a4006e24cc43de2f4de129b23 100644 (file)
@@ -44,6 +44,6 @@ AudioGainDialog::value () const
        if (_gain->GetValue() <= -144) {
                return 0;
        }
-       
+
        return pow (10, _gain->GetValue () / 20);
 }
index 673919c249fe2f0bec8dc56a97c9145aa618706a..e4f8ab16cec9216a8ac80d563a560889655eb0b4 100644 (file)
@@ -27,7 +27,7 @@ public:
        AudioGainDialog (wxWindow *, int, int, float);
 
        float value () const;
-       
+
 private:
        wxSpinCtrlDouble* _gain;
 };
index fc2caf0f7865efd8e9d9a4b0c68eba7e5d9e22ac..809b16bc862ee90af12d08e1b67041a0fb5df6bd 100644 (file)
@@ -88,7 +88,7 @@ public:
                }
 
                height = max (0, height);
-               
+
                if (value > 0) {
                        /* Make sure we get a little bit of the marker if there is any gain */
                        height = max (3, height);
@@ -102,7 +102,7 @@ public:
        {
                return wxSize (INDICATOR_SIZE + 4, INDICATOR_SIZE + 4);
        }
-       
+
        wxGridCellRenderer* Clone () const
        {
                return new ValueRenderer;
@@ -155,7 +155,7 @@ AudioMappingView::map_values_changed ()
        update_cells ();
        Changed (_map);
        _last_tooltip_column = -1;
-}      
+}
 
 void
 AudioMappingView::left_click (wxGridEvent& ev)
@@ -165,7 +165,7 @@ AudioMappingView::left_click (wxGridEvent& ev)
        }
 
        int const d = ev.GetCol() - 1;
-       
+
        if (_map.get (ev.GetRow(), d) > 0) {
                _map.set (ev.GetRow(), d, 0);
        } else {
@@ -212,13 +212,13 @@ void
 AudioMappingView::edit ()
 {
        int const d = _menu_column - 1;
-       
+
        AudioGainDialog* dialog = new AudioGainDialog (this, _menu_row, _menu_column - 1, _map.get (_menu_row, d));
        if (dialog->ShowModal () == wxID_OK) {
                _map.set (_menu_row, d, dialog->value ());
                map_values_changed ();
        }
-       
+
        dialog->Destroy ();
 }
 
@@ -263,7 +263,7 @@ AudioMappingView::update_cells ()
        for (int i = 0; i < _grid->GetNumberRows (); ++i) {
                row_names.push_back (wx_to_std (_grid->GetCellValue (i, 0)));
        }
-       
+
        if (_grid->GetNumberRows ()) {
                _grid->DeleteRows (0, _grid->GetNumberRows ());
        }
@@ -275,7 +275,7 @@ AudioMappingView::update_cells ()
                        _grid->SetCellRenderer (i, j + 1, new ValueRenderer);
                }
        }
-       
+
        for (int i = 0; i < _map.input_channels(); ++i) {
                if (i < int (row_names.size ())) {
                        _grid->SetCellValue (i, 0, std_to_wx (row_names[i]));
@@ -316,7 +316,7 @@ AudioMappingView::mouse_moved (wxMouseEvent& ev)
                        float const dB = 20 * log10 (gain);
                        s = wxString::Format (_("Audio will be passed from content channel %d to DCP channel %d with gain %.1fdB."), row + 1, column, dB);
                }
-               
+
                _grid->GetGridWindow()->SetToolTip (s + " " + _("Right click to change gain."));
                _last_tooltip_row = row;
                _last_tooltip_column = column;
index 006b12398a6148f3e7738042dcd824b2429bdbba..c31d5b57502b12d9ae67d5fb31a9d2d144e039bd 100644 (file)
@@ -54,7 +54,7 @@ AudioPanel::AudioPanel (ContentPanel* p)
                boost::mem_fn (&AudioContent::audio_gain),
                boost::mem_fn (&AudioContent::set_audio_gain)
                );
-       
+
        _gain->add (grid, wxGBPosition (r, 1));
        add_label_to_grid_bag_sizer (grid, this, _("dB"), false, wxGBPosition (r, 2));
        _gain_calculate_button = new wxButton (this, wxID_ANY, _("Calculate..."));
@@ -69,7 +69,7 @@ AudioPanel::AudioPanel (ContentPanel* p)
                boost::mem_fn (&AudioContent::audio_delay),
                boost::mem_fn (&AudioContent::set_audio_delay)
                );
-       
+
        _delay->add (grid, wxGBPosition (r, 1));
        /// TRANSLATORS: this is an abbreviation for milliseconds, the unit of time
        add_label_to_grid_bag_sizer (grid, this, _("ms"), false, wxGBPosition (r, 2));
@@ -140,7 +140,7 @@ AudioPanel::gain_calculate_button_clicked ()
                d->Destroy ();
                return;
        }
-       
+
        _gain->wrapped()->SetValue (
                Config::instance()->cinema_sound_processor()->db_for_fader_change (
                        d->wanted_fader (),
@@ -152,7 +152,7 @@ AudioPanel::gain_calculate_button_clicked ()
           I think.
        */
        _gain->view_changed ();
-       
+
        d->Destroy ();
 }
 
index edd3dfcd49d1ed9666680fc1ec85010f06015ed5..2856cec4d230c0a294445912d39c4873115d311a 100644 (file)
@@ -35,7 +35,7 @@ public:
        void film_changed (Film::Property);
        void film_content_changed (int);
        void content_selection_changed ();
-       
+
 private:
        void gain_calculate_button_clicked ();
        void mapping_changed (AudioMapping);
index 829290d4d16a57d126166ab307ef377fb3ace7bc..1c5c1f94bf210ef37d1cde0f9d8780e224ebda4a 100644 (file)
@@ -40,9 +40,9 @@ AudioPlot::AudioPlot (wxWindow* parent)
        : wxPanel (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE)
        , _smoothing (max_smoothing / 2)
 {
-#ifndef __WXOSX__      
+#ifndef __WXOSX__
        SetDoubleBuffered (true);
-#endif 
+#endif
 
        for (int i = 0; i < MAX_DCP_AUDIO_CHANNELS; ++i) {
                _channel_visible[i] = false;
@@ -69,10 +69,10 @@ AudioPlot::AudioPlot (wxWindow* parent)
 
 #if MAX_DCP_AUDIO_CHANNELS != 12
 #warning AudioPlot::AudioPlot is expecting the wrong MAX_DCP_AUDIO_CHANNELS
-#endif 
-       
+#endif
+
        Bind (wxEVT_PAINT, boost::bind (&AudioPlot::paint, this));
-       
+
        SetMinSize (wxSize (640, 512));
 }
 
@@ -143,7 +143,7 @@ AudioPlot::paint ()
        gc->GetTextExtent (wxT ("-80dB"), &metrics.db_label_width, &db_label_height, &db_label_descent, &db_label_leading);
 
        metrics.db_label_width += 8;
-       
+
        int const data_width = GetSize().GetWidth() - metrics.db_label_width;
        /* Assume all channels have the same number of points */
        metrics.x_scale = data_width / float (_analysis->points (0));
@@ -162,7 +162,7 @@ AudioPlot::paint ()
        gc->StrokePath (grid);
 
        gc->DrawText (_("Time"), data_width, metrics.height - metrics.y_origin + db_label_height / 2);
-       
+
        if (_type_visible[AudioPoint::PEAK]) {
                for (int c = 0; c < MAX_DCP_AUDIO_CHANNELS; ++c) {
                        wxGraphicsPath p = gc->CreatePath ();
@@ -203,7 +203,7 @@ AudioPlot::y_for_linear (float p, Metrics const & metrics) const
        if (p < 1e-4) {
                p = 1e-4;
        }
-       
+
        return metrics.height - (20 * log10(p) - _minimum) * metrics.y_scale - metrics.y_origin;
 }
 
@@ -213,7 +213,7 @@ AudioPlot::plot_peak (wxGraphicsPath& path, int channel, Metrics const & metrics
        if (_analysis->points (channel) == 0) {
                return;
        }
-       
+
        path.MoveToPoint (metrics.db_label_width, y_for_linear (_analysis->get_point(channel, 0)[AudioPoint::PEAK], metrics));
 
        float peak = 0;
@@ -237,7 +237,7 @@ AudioPlot::plot_rms (wxGraphicsPath& path, int channel, Metrics const & metrics)
        if (_analysis->points (channel) == 0) {
                return;
        }
-       
+
        path.MoveToPoint (metrics.db_label_width, y_for_linear (_analysis->get_point(channel, 0)[AudioPoint::RMS], metrics));
 
        list<float> smoothing;
@@ -249,7 +249,7 @@ AudioPlot::plot_rms (wxGraphicsPath& path, int channel, Metrics const & metrics)
 
        int const before = _smoothing / 2;
        int const after = _smoothing - before;
-       
+
        /* Pre-load the smoothing list */
        for (int i = 0; i < before; ++i) {
                smoothing.push_back (first);
index 26520a4127203e5ef8ff12af0ac0bae323dfe902..56beaa5bd1a8cb94d2d6b7af9f3245cd941f5ad8 100644 (file)
@@ -27,7 +27,7 @@ public:
 
        std::string name () const;
        std::string email () const;
-       
+
 private:
        wxTextCtrl* _name;
        wxTextCtrl* _email;
index 549940c00bac5108b90e8dc33b73799756146284..d82239b79f07e8477c9ceff6af85cac9c9be680c 100644 (file)
@@ -71,9 +71,9 @@ ColourConversionEditor::ColourConversionEditor (wxWindow* parent)
                _input_B = new wxTextCtrl (this, wxID_ANY, wxT (""));
                s->Add (_input_B, 1, wxEXPAND | wxRIGHT, DCPOMATIC_SIZER_GAP);
                table->Add (s, wxGBPosition (r, 1), wxGBSpan (1, 3));
-       }               
+       }
        ++r;
-       
+
         wxClientDC dc (parent);
         wxSize size = dc.GetTextExtent (wxT ("-0.12345678901"));
         size.SetHeight (-1);
@@ -92,7 +92,7 @@ ColourConversionEditor::ColourConversionEditor (wxWindow* parent)
        /* YUV to RGB conversion */
 
        subhead (table, this, _("YUV to RGB conversion"), r);
-       
+
        add_label_to_grid_bag_sizer (table, this, _("YUV to RGB matrix"), true, wxGBPosition (r, 0));
        _yuv_to_rgb = new wxChoice (this, wxID_ANY);
        _yuv_to_rgb->Append (_("Rec. 601"));
@@ -139,7 +139,7 @@ ColourConversionEditor::ColourConversionEditor (wxWindow* parent)
 
         size = dc.GetTextExtent (wxT ("0.12345678"));
         size.SetHeight (-1);
-       
+
        wxFlexGridSizer* rgb_to_xyz_sizer = new wxFlexGridSizer (3, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
        for (int i = 0; i < 3; ++i) {
                for (int j = 0; j < 3; ++j) {
@@ -169,7 +169,7 @@ ColourConversionEditor::ColourConversionEditor (wxWindow* parent)
 
         size = dc.GetTextExtent (wxT ("0.12345678"));
         size.SetHeight (-1);
-       
+
        wxFlexGridSizer* bradford_sizer = new wxFlexGridSizer (3, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
        for (int i = 0; i < 3; ++i) {
                for (int j = 0; j < 3; ++j) {
@@ -180,7 +180,7 @@ ColourConversionEditor::ColourConversionEditor (wxWindow* parent)
        table->Add (bradford_sizer, wxGBPosition (r - 2, 3), wxGBSpan (2, 1));
 
        subhead (table, this, _("Output gamma correction"), r);
-       
+
        add_label_to_grid_bag_sizer (table, this, _("Output gamma"), true, wxGBPosition (r, 0));
        wxBoxSizer* output_sizer = new wxBoxSizer (wxHORIZONTAL);
        /// TRANSLATORS: this means the mathematical reciprocal operation, i.e. we are dividing 1 by the control that
@@ -300,7 +300,7 @@ ColourConversionEditor::set (ColourConversion conversion)
 
        update_rgb_to_xyz ();
        update_bradford ();
-       
+
        set_spin_ctrl (_output_gamma, dynamic_pointer_cast<const dcp::GammaTransferFunction> (conversion.out ())->gamma ());
 }
 
@@ -366,7 +366,7 @@ ColourConversionEditor::changed ()
        _input_threshold->Enable (lin);
        _input_A->Enable (lin);
        _input_B->Enable (lin);
-       
+
        Changed ();
 }
 
@@ -389,7 +389,7 @@ ColourConversionEditor::update_bradford ()
 {
        _adjusted_white_x->Enable (_adjust_white->GetValue ());
        _adjusted_white_y->Enable (_adjust_white->GetValue ());
-       
+
        boost::numeric::ublas::matrix<double> m = get().bradford ();
        for (int i = 0; i < 3; ++i) {
                for (int j = 0; j < 3; ++j) {
@@ -427,7 +427,7 @@ ColourConversionEditor::changed (wxSpinCtrlDouble* sc)
        if (fabs (_last_spin_ctrl_value[sc] - sc->GetValue()) < 1e-3) {
                return;
        }
-       
+
        Changed ();
 }
 
index b7467a70a1341ba7f66dd11047abfae68396bfec..ab45104e9fc19fac122cbb935a899142414ff98b 100644 (file)
@@ -49,7 +49,7 @@ private:
        void set_spin_ctrl (wxSpinCtrlDouble *, double);
 
        std::map<wxSpinCtrlDouble*, double> _last_spin_ctrl_value;
-       
+
        wxSpinCtrlDouble* _input_gamma;
        wxSpinCtrlDouble* _input_power;
        wxTextCtrl* _input_threshold;
index 447bb98ce8c10965645e314d17167e298adb204d..036172bb7eaa45f381e4b91b7e4ed7f22d1e4696 100644 (file)
@@ -81,10 +81,10 @@ protected:
                config_changed ();
 
                _panel->Bind (wxEVT_DESTROY, boost::bind (&Page::window_destroyed, this));
-               
+
                return _panel;
        }
-       
+
        int _border;
        wxPanel* _panel;
 
@@ -143,13 +143,13 @@ public:
                : StockPage (Kind_General, panel_size, border)
        {}
 
-private:       
+private:
        void setup ()
        {
                wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
                table->AddGrowableCol (1, 1);
                _panel->GetSizer()->Add (table, 1, wxALL | wxEXPAND, _border);
-               
+
                _set_language = new wxCheckBox (_panel, wxID_ANY, _("Set language"));
                table->Add (_set_language, 1);
                _language = new wxChoice (_panel, wxID_ANY);
@@ -162,14 +162,14 @@ private:
                _language->Append (wxT ("Svenska"));
                _language->Append (wxT ("Русский"));
                table->Add (_language);
-               
+
                wxStaticText* restart = add_label_to_sizer (table, _panel, _("(restart DCP-o-matic to see language changes)"), false);
                wxFont font = restart->GetFont();
                font.SetStyle (wxFONTSTYLE_ITALIC);
                font.SetPointSize (font.GetPointSize() - 1);
                restart->SetFont (font);
                table->AddSpacer (0);
-               
+
                add_label_to_sizer (table, _panel, _("Threads to use for encoding on this host"), true);
                _num_local_encoding_threads = new wxSpinCtrl (_panel);
                table->Add (_num_local_encoding_threads, 1);
@@ -177,14 +177,14 @@ private:
                _check_for_updates = new wxCheckBox (_panel, wxID_ANY, _("Check for updates on startup"));
                table->Add (_check_for_updates, 1, wxEXPAND | wxALL);
                table->AddSpacer (0);
-               
+
                _check_for_test_updates = new wxCheckBox (_panel, wxID_ANY, _("Check for testing updates as well as stable ones"));
                table->Add (_check_for_test_updates, 1, wxEXPAND | wxALL);
                table->AddSpacer (0);
 
                _set_language->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&GeneralPage::set_language_changed, this));
                _language->Bind     (wxEVT_COMMAND_CHOICE_SELECTED,  boost::bind (&GeneralPage::language_changed,     this));
-               
+
                _num_local_encoding_threads->SetRange (1, 128);
                _num_local_encoding_threads->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&GeneralPage::num_local_encoding_threads_changed, this));
 
@@ -195,9 +195,9 @@ private:
        void config_changed ()
        {
                Config* config = Config::instance ();
-               
+
                checked_set (_set_language, config->language ());
-               
+
                if (config->language().get_value_or ("") == "fr") {
                        _language->SetSelection (3);
                } else if (config->language().get_value_or ("") == "it") {
@@ -217,7 +217,7 @@ private:
                }
 
                setup_language_sensitivity ();
-               
+
                checked_set (_num_local_encoding_threads, config->num_local_encoding_threads ());
                checked_set (_check_for_updates, config->check_for_updates ());
                checked_set (_check_for_test_updates, config->check_for_test_updates ());
@@ -267,12 +267,12 @@ private:
                        break;
                }
        }
-       
+
        void check_for_updates_changed ()
        {
                Config::instance()->set_check_for_updates (_check_for_updates->GetValue ());
        }
-       
+
        void check_for_test_updates_changed ()
        {
                Config::instance()->set_check_for_test_updates (_check_for_test_updates->GetValue ());
@@ -296,26 +296,26 @@ public:
        DefaultsPage (wxSize panel_size, int border)
                : StandardPage (panel_size, border)
        {}
-       
+
        wxString GetName () const
        {
                return _("Defaults");
        }
 
-#ifdef DCPOMATIC_OSX   
+#ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const
        {
                return wxBitmap ("defaults", wxBITMAP_TYPE_PNG_RESOURCE);
        }
-#endif 
+#endif
 
-private:       
+private:
        void setup ()
        {
                wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
                table->AddGrowableCol (1, 1);
                _panel->GetSizer()->Add (table, 1, wxALL | wxEXPAND, _border);
-               
+
                {
                        add_label_to_sizer (table, _panel, _("Default duration of still images"), true);
                        wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
@@ -324,15 +324,15 @@ private:
                        add_label_to_sizer (s, _panel, _("s"), false);
                        table->Add (s, 1);
                }
-               
+
                add_label_to_sizer (table, _panel, _("Default directory for new films"), true);
 #ifdef DCPOMATIC_USE_OWN_DIR_PICKER
                _directory = new DirPickerCtrl (_panel);
-#else  
+#else
                _directory = new wxDirPickerCtrl (_panel, wxDD_DIR_MUST_EXIST);
 #endif
                table->Add (_directory, 1, wxEXPAND);
-               
+
                add_label_to_sizer (table, _panel, _("Default ISDCF name details"), true);
                _isdcf_metadata_button = new wxButton (_panel, wxID_ANY, _("Edit..."));
                table->Add (_isdcf_metadata_button);
@@ -340,11 +340,11 @@ private:
                add_label_to_sizer (table, _panel, _("Default container"), true);
                _container = new wxChoice (_panel, wxID_ANY);
                table->Add (_container);
-               
+
                add_label_to_sizer (table, _panel, _("Default content type"), true);
                _dcp_content_type = new wxChoice (_panel, wxID_ANY);
                table->Add (_dcp_content_type);
-               
+
                {
                        add_label_to_sizer (table, _panel, _("Default JPEG2000 bandwidth"), true);
                        wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
@@ -353,7 +353,7 @@ private:
                        add_label_to_sizer (s, _panel, _("Mbit/s"), false);
                        table->Add (s, 1);
                }
-               
+
                {
                        add_label_to_sizer (table, _panel, _("Default audio delay"), true);
                        wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
@@ -369,28 +369,28 @@ private:
 
                _still_length->SetRange (1, 3600);
                _still_length->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::still_length_changed, this));
-               
+
                _directory->Bind (wxEVT_COMMAND_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::directory_changed, this));
-               
+
                _isdcf_metadata_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&DefaultsPage::edit_isdcf_metadata_clicked, this));
-               
+
                vector<Ratio const *> ratios = Ratio::all ();
                for (size_t i = 0; i < ratios.size(); ++i) {
                        _container->Append (std_to_wx (ratios[i]->nickname ()));
                }
-               
+
                _container->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::container_changed, this));
-               
+
                vector<DCPContentType const *> const ct = DCPContentType::all ();
                for (size_t i = 0; i < ct.size(); ++i) {
                        _dcp_content_type->Append (std_to_wx (ct[i]->pretty_name ()));
                }
-               
+
                _dcp_content_type->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::dcp_content_type_changed, this));
-               
+
                _j2k_bandwidth->SetRange (50, 250);
                _j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::j2k_bandwidth_changed, this));
-               
+
                _audio_delay->SetRange (-1000, 1000);
                _audio_delay->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::audio_delay_changed, this));
 
@@ -414,7 +414,7 @@ private:
                                _dcp_content_type->SetSelection (i);
                        }
                }
-               
+
                checked_set (_still_length, config->default_still_length ());
                _directory->SetPath (std_to_wx (config->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()));
                checked_set (_j2k_bandwidth, config->default_j2k_bandwidth() / 1000000);
@@ -422,12 +422,12 @@ private:
                checked_set (_audio_delay, config->default_audio_delay ());
                checked_set (_issuer, config->dcp_issuer ());
        }
-               
+
        void j2k_bandwidth_changed ()
        {
                Config::instance()->set_default_j2k_bandwidth (_j2k_bandwidth->GetValue() * 1000000);
        }
-       
+
        void audio_delay_changed ()
        {
                Config::instance()->set_default_audio_delay (_audio_delay->GetValue());
@@ -456,7 +456,7 @@ private:
                vector<Ratio const *> ratio = Ratio::all ();
                Config::instance()->set_default_container (ratio[_container->GetSelection()]);
        }
-       
+
        void dcp_content_type_changed ()
        {
                vector<DCPContentType const *> ct = DCPContentType::all ();
@@ -467,7 +467,7 @@ private:
        {
                Config::instance()->set_dcp_issuer (wx_to_std (_issuer->GetValue ()));
        }
-       
+
        wxSpinCtrl* _j2k_bandwidth;
        wxSpinCtrl* _audio_delay;
        wxButton* _isdcf_metadata_button;
@@ -488,25 +488,25 @@ public:
        EncodingServersPage (wxSize panel_size, int border)
                : StandardPage (panel_size, border)
        {}
-       
+
        wxString GetName () const
        {
                return _("Servers");
        }
 
-#ifdef DCPOMATIC_OSX   
+#ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const
        {
                return wxBitmap ("servers", wxBITMAP_TYPE_PNG_RESOURCE);
        }
-#endif 
+#endif
 
-private:       
+private:
        void setup ()
        {
                _use_any_servers = new wxCheckBox (_panel, wxID_ANY, _("Use all servers"));
                _panel->GetSizer()->Add (_use_any_servers, 0, wxALL, _border);
-               
+
                vector<string> columns;
                columns.push_back (wx_to_std (_("IP address / host name")));
                _servers_list = new EditableList<string, ServerDialog> (
@@ -516,9 +516,9 @@ private:
                        boost::bind (&Config::set_servers, Config::instance(), _1),
                        boost::bind (&EncodingServersPage::server_column, this, _1)
                        );
-               
+
                _panel->GetSizer()->Add (_servers_list, 1, wxEXPAND | wxALL, _border);
-               
+
                _use_any_servers->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&EncodingServersPage::use_any_servers_changed, this));
        }
 
@@ -527,7 +527,7 @@ private:
                checked_set (_use_any_servers, Config::instance()->use_any_servers ());
                _servers_list->refresh ();
        }
-       
+
        void use_any_servers_changed ()
        {
                Config::instance()->set_use_any_servers (_use_any_servers->GetValue ());
@@ -559,17 +559,17 @@ public:
        {
                return wxBitmap ("keys", wxBITMAP_TYPE_PNG_RESOURCE);
        }
-#endif 
+#endif
 
 private:
        void setup ()
        {
                wxStaticText* m = new wxStaticText (_panel, wxID_ANY, _("Certificate chain for signing DCPs and KDMs:"));
                _panel->GetSizer()->Add (m, 0, wxALL, _border);
-               
+
                wxBoxSizer* certificates_sizer = new wxBoxSizer (wxHORIZONTAL);
                _panel->GetSizer()->Add (certificates_sizer, 0, wxLEFT | wxRIGHT, _border);
-               
+
                _certificates = new wxListCtrl (_panel, wxID_ANY, wxDefaultPosition, wxSize (400, 200), wxLC_REPORT | wxLC_SINGLE_SEL);
 
                {
@@ -589,7 +589,7 @@ private:
                        wxFont font = ip.GetFont ();
                        font.SetFamily (wxFONTFAMILY_TELETYPE);
                        ip.SetFont (font);
-                       
+
                        _certificates->InsertColumn (1, ip);
                }
 
@@ -608,7 +608,7 @@ private:
                _panel->GetSizer()->Add (table, 1, wxALL | wxEXPAND, _border);
 
                int r = 0;
-               
+
                _remake_certificates = new wxButton (_panel, wxID_ANY, _("Re-make certificates..."));
                table->Add (_remake_certificates, wxGBPosition (r, 0), wxGBSpan (1, 3));
                ++r;
@@ -642,7 +642,7 @@ private:
                _export_decryption_certificate = new wxButton (_panel, wxID_ANY, _("Export DCP decryption certificate..."));
                table->Add (_export_decryption_certificate, wxGBPosition (r, 0), wxGBSpan (1, 3));
                ++r;
-               
+
                _add_certificate->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&KeysPage::add_certificate, this));
                _remove_certificate->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&KeysPage::remove_certificate, this));
                _certificates->Bind (wxEVT_COMMAND_LIST_ITEM_SELECTED, boost::bind (&KeysPage::update_sensitivity, this));
@@ -664,11 +664,11 @@ private:
                update_decryption_private_key ();
                update_sensitivity ();
        }
-       
+
        void add_certificate ()
        {
                wxFileDialog* d = new wxFileDialog (_panel, _("Select Certificate File"));
-               
+
                if (d->ShowModal() == wxID_OK) {
                        try {
                                dcp::Certificate c (dcp::file_to_string (wx_to_std (d->GetPath ())));
@@ -679,7 +679,7 @@ private:
                                error_dialog (_panel, wxString::Format (_("Could not read certificate file (%s)"), e.what ()));
                        }
                }
-               
+
                d->Destroy ();
 
                update_sensitivity ();
@@ -691,7 +691,7 @@ private:
                if (i == -1) {
                        return;
                }
-               
+
                _certificates->DeleteItem (i);
                _signer->certificates().remove (i);
                Config::instance()->set_signer (_signer);
@@ -741,7 +741,7 @@ private:
                        update_certificate_list ();
                        update_signer_private_key ();
                }
-               
+
                d->Destroy ();
        }
 
@@ -753,7 +753,7 @@ private:
        void update_signer_private_key ()
        {
                checked_set (_signer_private_key, dcp::private_key_fingerprint (_signer->key ()));
-       }       
+       }
 
        void load_signer_private_key ()
        {
@@ -766,7 +766,7 @@ private:
                                        error_dialog (_panel, wxString::Format (_("Could not read key file (%s)"), std_to_wx (p.string ())));
                                        return;
                                }
-                               
+
                                _signer->set_key (dcp::file_to_string (p));
                                Config::instance()->set_signer (_signer);
                                update_signer_private_key ();
@@ -774,7 +774,7 @@ private:
                                error_dialog (_panel, wxString::Format (_("Could not read certificate file (%s)"), e.what ()));
                        }
                }
-               
+
                d->Destroy ();
 
                update_sensitivity ();
@@ -784,7 +784,7 @@ private:
        void load_decryption_certificate ()
        {
                wxFileDialog* d = new wxFileDialog (_panel, _("Select Certificate File"));
-               
+
                if (d->ShowModal() == wxID_OK) {
                        try {
                                dcp::Certificate c (dcp::file_to_string (wx_to_std (d->GetPath ())));
@@ -794,7 +794,7 @@ private:
                                error_dialog (_panel, wxString::Format (_("Could not read certificate file (%s)"), e.what ()));
                        }
                }
-               
+
                d->Destroy ();
        }
 
@@ -816,7 +816,7 @@ private:
                                error_dialog (_panel, wxString::Format (_("Could not read key file (%s)"), e.what ()));
                        }
                }
-               
+
                d->Destroy ();
        }
 
@@ -831,7 +831,7 @@ private:
                        _panel, _("Select Certificate File"), wxEmptyString, wxEmptyString, wxT ("PEM files (*.pem)|*.pem"),
                        wxFD_SAVE | wxFD_OVERWRITE_PROMPT
                        );
-               
+
                if (d->ShowModal () == wxID_OK) {
                        FILE* f = fopen_boost (wx_to_std (d->GetPath ()), "w");
                        if (!f) {
@@ -871,36 +871,36 @@ public:
                return _("TMS");
        }
 
-#ifdef DCPOMATIC_OSX   
+#ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const
        {
                return wxBitmap ("tms", wxBITMAP_TYPE_PNG_RESOURCE);
        }
-#endif 
+#endif
 
-private:       
+private:
        void setup ()
        {
                wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
                table->AddGrowableCol (1, 1);
                _panel->GetSizer()->Add (table, 1, wxALL | wxEXPAND, _border);
-               
+
                add_label_to_sizer (table, _panel, _("IP address"), true);
                _tms_ip = new wxTextCtrl (_panel, wxID_ANY);
                table->Add (_tms_ip, 1, wxEXPAND);
-               
+
                add_label_to_sizer (table, _panel, _("Target path"), true);
                _tms_path = new wxTextCtrl (_panel, wxID_ANY);
                table->Add (_tms_path, 1, wxEXPAND);
-               
+
                add_label_to_sizer (table, _panel, _("User name"), true);
                _tms_user = new wxTextCtrl (_panel, wxID_ANY);
                table->Add (_tms_user, 1, wxEXPAND);
-               
+
                add_label_to_sizer (table, _panel, _("Password"), true);
                _tms_password = new wxTextCtrl (_panel, wxID_ANY);
                table->Add (_tms_password, 1, wxEXPAND);
-               
+
                _tms_ip->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&TMSPage::tms_ip_changed, this));
                _tms_path->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&TMSPage::tms_path_changed, this));
                _tms_user->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&TMSPage::tms_user_changed, this));
@@ -910,28 +910,28 @@ private:
        void config_changed ()
        {
                Config* config = Config::instance ();
-               
+
                checked_set (_tms_ip, config->tms_ip ());
                checked_set (_tms_path, config->tms_path ());
                checked_set (_tms_user, config->tms_user ());
                checked_set (_tms_password, config->tms_password ());
        }
-       
+
        void tms_ip_changed ()
        {
                Config::instance()->set_tms_ip (wx_to_std (_tms_ip->GetValue ()));
        }
-       
+
        void tms_path_changed ()
        {
                Config::instance()->set_tms_path (wx_to_std (_tms_path->GetValue ()));
        }
-       
+
        void tms_user_changed ()
        {
                Config::instance()->set_tms_user (wx_to_std (_tms_user->GetValue ()));
        }
-       
+
        void tms_password_changed ()
        {
                Config::instance()->set_tms_password (wx_to_std (_tms_password->GetValue ()));
@@ -948,27 +948,27 @@ class KDMEmailPage : public StandardPage
 public:
 
        KDMEmailPage (wxSize panel_size, int border)
-#ifdef DCPOMATIC_OSX           
+#ifdef DCPOMATIC_OSX
                /* We have to force both width and height of this one */
                : StandardPage (wxSize (480, 128), border)
 #else
                 : StandardPage (panel_size, border)
-#endif                 
+#endif
        {}
-       
+
        wxString GetName () const
        {
                return _("KDM Email");
        }
 
-#ifdef DCPOMATIC_OSX   
+#ifdef DCPOMATIC_OSX
        wxBitmap GetLargeIcon () const
        {
                return wxBitmap ("kdm_email", wxBITMAP_TYPE_PNG_RESOURCE);
        }
-#endif 
+#endif
 
-private:       
+private:
        void setup ()
        {
                wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
@@ -978,15 +978,15 @@ private:
                add_label_to_sizer (table, _panel, _("Outgoing mail server"), true);
                _mail_server = new wxTextCtrl (_panel, wxID_ANY);
                table->Add (_mail_server, 1, wxEXPAND | wxALL);
-               
+
                add_label_to_sizer (table, _panel, _("Mail user name"), true);
                _mail_user = new wxTextCtrl (_panel, wxID_ANY);
                table->Add (_mail_user, 1, wxEXPAND | wxALL);
-               
+
                add_label_to_sizer (table, _panel, _("Mail password"), true);
                _mail_password = new wxTextCtrl (_panel, wxID_ANY);
                table->Add (_mail_password, 1, wxEXPAND | wxALL);
-               
+
                wxStaticText* plain = add_label_to_sizer (table, _panel, _("(password will be stored on disk in plaintext)"), false);
                wxFont font = plain->GetFont();
                font.SetStyle (wxFONTSTYLE_ITALIC);
@@ -997,7 +997,7 @@ private:
                add_label_to_sizer (table, _panel, _("Subject"), true);
                _kdm_subject = new wxTextCtrl (_panel, wxID_ANY);
                table->Add (_kdm_subject, 1, wxEXPAND | wxALL);
-               
+
                add_label_to_sizer (table, _panel, _("From address"), true);
                _kdm_from = new wxTextCtrl (_panel, wxID_ANY);
                table->Add (_kdm_from, 1, wxEXPAND | wxALL);
@@ -1009,7 +1009,7 @@ private:
                add_label_to_sizer (table, _panel, _("BCC address"), true);
                _kdm_bcc = new wxTextCtrl (_panel, wxID_ANY);
                table->Add (_kdm_bcc, 1, wxEXPAND | wxALL);
-               
+
                _kdm_email = new wxTextCtrl (_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (480, 128), wxTE_MULTILINE);
                _panel->GetSizer()->Add (_kdm_email, 1, wxEXPAND | wxALL, _border);
 
@@ -1030,7 +1030,7 @@ private:
        void config_changed ()
        {
                Config* config = Config::instance ();
-               
+
                checked_set (_mail_server, config->mail_server ());
                checked_set (_mail_user, config->mail_user ());
                checked_set (_mail_password, config->mail_password ());
@@ -1040,17 +1040,17 @@ private:
                checked_set (_kdm_bcc, config->kdm_bcc ());
                checked_set (_kdm_email, Config::instance()->kdm_email ());
        }
-       
+
        void mail_server_changed ()
        {
                Config::instance()->set_mail_server (wx_to_std (_mail_server->GetValue ()));
        }
-       
+
        void mail_user_changed ()
        {
                Config::instance()->set_mail_user (wx_to_std (_mail_user->GetValue ()));
        }
-       
+
        void mail_password_changed ()
        {
                Config::instance()->set_mail_password (wx_to_std (_mail_password->GetValue ()));
@@ -1060,7 +1060,7 @@ private:
        {
                Config::instance()->set_kdm_subject (wx_to_std (_kdm_subject->GetValue ()));
        }
-       
+
        void kdm_from_changed ()
        {
                Config::instance()->set_kdm_from (wx_to_std (_kdm_from->GetValue ()));
@@ -1075,7 +1075,7 @@ private:
        {
                Config::instance()->set_kdm_bcc (wx_to_std (_kdm_bcc->GetValue ()));
        }
-       
+
        void kdm_email_changed ()
        {
                if (_kdm_email->GetValue().IsEmpty ()) {
@@ -1120,7 +1120,7 @@ public:
                , _log_timing (0)
        {}
 
-private:       
+private:
        void setup ()
        {
                wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
@@ -1143,11 +1143,11 @@ private:
 #ifdef __WXOSX__
                wxStaticText* m = new wxStaticText (_panel, wxID_ANY, _("Log:"));
                table->Add (m, 0, wxALIGN_TOP | wxLEFT | wxRIGHT | wxEXPAND | wxALL | wxALIGN_RIGHT, 6);
-#else          
+#else
                wxStaticText* m = new wxStaticText (_panel, wxID_ANY, _("Log"));
                table->Add (m, 0, wxALIGN_TOP | wxLEFT | wxRIGHT | wxEXPAND | wxALL, 6);
-#endif         
-               
+#endif
+
                {
                        wxBoxSizer* t = new wxBoxSizer (wxVERTICAL);
                        _log_general = new wxCheckBox (_panel, wxID_ANY, _("General"));
@@ -1161,12 +1161,12 @@ private:
                        table->Add (t, 0, wxALL, 6);
                }
 
-#ifdef DCPOMATIC_WINDOWS               
+#ifdef DCPOMATIC_WINDOWS
                _win32_console = new wxCheckBox (_panel, wxID_ANY, _("Open console window"));
                table->Add (_win32_console, 1, wxEXPAND | wxALL);
                table->AddSpacer (0);
-#endif         
-               
+#endif
+
                _maximum_j2k_bandwidth->SetRange (1, 1000);
                _maximum_j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&AdvancedPage::maximum_j2k_bandwidth_changed, this));
                _allow_any_dcp_frame_rate->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::allow_any_dcp_frame_rate_changed, this));
@@ -1176,13 +1176,13 @@ private:
                _log_timing->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::log_changed, this));
 #ifdef DCPOMATIC_WINDOWS
                _win32_console->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&AdvancedPage::win32_console_changed, this));
-#endif         
+#endif
        }
 
        void config_changed ()
        {
                Config* config = Config::instance ();
-               
+
                checked_set (_maximum_j2k_bandwidth, config->maximum_j2k_bandwidth() / 1000000);
                checked_set (_allow_any_dcp_frame_rate, config->allow_any_dcp_frame_rate ());
                checked_set (_log_general, config->log_types() & Log::TYPE_GENERAL);
@@ -1222,24 +1222,24 @@ private:
                Config::instance()->set_log_types (types);
        }
 
-#ifdef DCPOMATIC_WINDOWS       
+#ifdef DCPOMATIC_WINDOWS
        void win32_console_changed ()
        {
                Config::instance()->set_win32_console (_win32_console->GetValue ());
        }
-#endif 
-       
+#endif
+
        wxSpinCtrl* _maximum_j2k_bandwidth;
        wxCheckBox* _allow_any_dcp_frame_rate;
        wxCheckBox* _log_general;
        wxCheckBox* _log_warning;
        wxCheckBox* _log_error;
        wxCheckBox* _log_timing;
-#ifdef DCPOMATIC_WINDOWS       
+#ifdef DCPOMATIC_WINDOWS
        wxCheckBox* _win32_console;
-#endif 
+#endif
 };
-       
+
 wxPreferencesEditor*
 create_config_dialog ()
 {
@@ -1256,7 +1256,7 @@ create_config_dialog ()
        wxSize ps = wxSize (-1, -1);
        int const border = 8;
 #endif
-       
+
        e->AddPage (new GeneralPage (ps, border));
        e->AddPage (new DefaultsPage (ps, border));
        e->AddPage (new EncodingServersPage (ps, border));
index 20cbaa02d341c0053012a57bdbbc18df111edc92..45d19d78d616b80a279a896f7ca0f18c02a890ee 100644 (file)
@@ -89,7 +89,7 @@ ContentColourConversionDialog::check_for_preset ()
        if (_setting) {
                return;
        }
-       
+
        optional<size_t> preset = _editor->get().preset ();
 
        _preset_check->SetValue (preset);
@@ -123,4 +123,4 @@ ContentColourConversionDialog::preset_choice_changed ()
        }
 }
 
-       
+
index 57fd5f1e544fdeec750e43364bef006b934b1fc2..407f3f0c8b78dc885cc9533455bcf03f9cb9096e 100644 (file)
@@ -33,7 +33,7 @@ private:
        void check_for_preset ();
        void preset_check_clicked ();
        void preset_choice_changed ();
-       
+
        wxCheckBox* _preset_check;
        wxChoice* _preset_choice;
        ColourConversionEditor* _editor;
index 3cf9f23dcf636f2544fe7edf1668bb2fcee524b4..0adbc775a9134810e9db50ec4b1b4cb9f08a96f7 100644 (file)
@@ -91,9 +91,9 @@ ContentMenu::popup (weak_ptr<Film> film, ContentList c, TimelineContentViewList
                        ++n;
                }
        }
-       
+
        _join->Enable (n > 1);
-       
+
        _find_missing->Enable (_content.size() == 1 && !_content.front()->paths_valid ());
        _properties->Enable (_content.size() == 1);
        _re_examine->Enable (!_content.empty ());
@@ -104,7 +104,7 @@ ContentMenu::popup (weak_ptr<Film> film, ContentList c, TimelineContentViewList
        } else {
                _kdm->Enable (false);
        }
-       
+
        _remove->Enable (!_content.empty ());
        _parent->PopupMenu (_menu, p);
 }
@@ -115,7 +115,7 @@ ContentMenu::repeat ()
        if (_content.empty ()) {
                return;
        }
-               
+
        RepeatDialog* d = new RepeatDialog (_parent);
        if (d->ShowModal() != wxID_OK) {
                d->Destroy ();
@@ -186,7 +186,7 @@ ContentMenu::remove ()
                        if (!fc) {
                                continue;
                        }
-                       
+
                        shared_ptr<TimelineVideoContentView> video;
                        shared_ptr<TimelineAudioContentView> audio;
 
@@ -228,7 +228,7 @@ ContentMenu::find_missing ()
        if (!film) {
                return;
        }
-       
+
        shared_ptr<Content> content;
 
        /* XXX: a bit nasty */
@@ -254,7 +254,7 @@ ContentMenu::find_missing ()
        }
 
        shared_ptr<Job> j (new ExamineContentJob (film, content));
-       
+
        _job_connection = j->Finished.connect (
                bind (
                        &ContentMenu::maybe_found_missing,
@@ -264,7 +264,7 @@ ContentMenu::find_missing ()
                        boost::weak_ptr<Content> (content)
                        )
                );
-       
+
        JobManager::instance()->add (j);
 }
 
@@ -308,16 +308,16 @@ ContentMenu::kdm ()
        DCPOMATIC_ASSERT (!_content.empty ());
        shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent> (_content.front ());
        DCPOMATIC_ASSERT (dcp);
-       
+
        wxFileDialog* d = new wxFileDialog (_parent, _("Select KDM"));
-               
+
        if (d->ShowModal() == wxID_OK) {
                dcp->add_kdm (dcp::EncryptedKDM (dcp::file_to_string (wx_to_std (d->GetPath ()))));
                shared_ptr<Film> film = _film.lock ();
                DCPOMATIC_ASSERT (film);
                film->examine_content (dcp);
        }
-       
+
        d->Destroy ();
 }
 
index a0ac3f48148730bb01c24414c13b4fc4131c5be4..054e3de3e10f1ace878312ebf63bee6563b56732 100644 (file)
@@ -34,7 +34,7 @@ class ContentMenu : public boost::noncopyable
 public:
        ContentMenu (wxWindow* p);
        ~ContentMenu ();
-       
+
        void popup (boost::weak_ptr<Film>, ContentList, TimelineContentViewList, wxPoint);
 
 private:
@@ -46,7 +46,7 @@ private:
        void kdm ();
        void remove ();
        void maybe_found_missing (boost::weak_ptr<Job>, boost::weak_ptr<Content>, boost::weak_ptr<Content>);
-       
+
        wxMenu* _menu;
        /** Film that we are working with; set up by popup() */
        boost::weak_ptr<Film> _film;
index 8bb2512517c638467b84de16855f48dd89f5a8e9..a578c16285ebe508408d766fca5c37c312cb9309 100644 (file)
@@ -61,7 +61,7 @@ ContentPanel::ContentPanel (wxNotebook* n, boost::shared_ptr<Film> film, FilmVie
 
        {
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
-               
+
                _content = new wxListCtrl (_panel, wxID_ANY, wxDefaultPosition, wxSize (320, 160), wxLC_REPORT | wxLC_NO_HEADER);
                _content->DragAcceptFiles (true);
                s->Add (_content, 1, wxEXPAND | wxTOP | wxBOTTOM, 6);
@@ -70,27 +70,27 @@ ContentPanel::ContentPanel (wxNotebook* n, boost::shared_ptr<Film> film, FilmVie
                _content->SetColumnWidth (0, 512);
 
                wxBoxSizer* b = new wxBoxSizer (wxVERTICAL);
-               
+
                _add_file = new wxButton (_panel, wxID_ANY, _("Add file(s)..."));
                _add_file->SetToolTip (_("Add video, image or sound files to the film."));
                b->Add (_add_file, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
-               
+
                _add_folder = new wxButton (_panel, wxID_ANY, _("Add folder..."));
                _add_folder->SetToolTip (_("Add a folder of image files (which will be used as a moving image sequence) or a DCP."));
                b->Add (_add_folder, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
-               
+
                _remove = new wxButton (_panel, wxID_ANY, _("Remove"));
                _remove->SetToolTip (_("Remove the selected piece of content from the film."));
                b->Add (_remove, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
-               
+
                _earlier = new wxButton (_panel, wxID_ANY, _("Up"));
                _earlier->SetToolTip (_("Move the selected piece of content earlier in the film."));
                b->Add (_earlier, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
-               
+
                _later = new wxButton (_panel, wxID_ANY, _("Down"));
                _later->SetToolTip (_("Move the selected piece of content later in the film."));
                b->Add (_later, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
-               
+
                _timeline = new wxButton (_panel, wxID_ANY, _("Timeline..."));
                _timeline->SetToolTip (_("Open the timeline for the film."));
                b->Add (_timeline, 0, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
@@ -148,7 +148,7 @@ ContentPanel::selected_video ()
 {
        ContentList c = selected ();
        VideoContentList vc;
-       
+
        for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
                shared_ptr<VideoContent> t = dynamic_pointer_cast<VideoContent> (*i);
                if (t) {
@@ -164,7 +164,7 @@ ContentPanel::selected_audio ()
 {
        ContentList c = selected ();
        AudioContentList ac;
-       
+
        for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
                shared_ptr<AudioContent> t = dynamic_pointer_cast<AudioContent> (*i);
                if (t) {
@@ -180,7 +180,7 @@ ContentPanel::selected_subtitle ()
 {
        ContentList c = selected ();
        SubtitleContentList sc;
-       
+
        for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
                shared_ptr<SubtitleContent> t = dynamic_pointer_cast<SubtitleContent> (*i);
                if (t) {
@@ -196,7 +196,7 @@ ContentPanel::selected_ffmpeg ()
 {
        ContentList c = selected ();
        FFmpegContentList sc;
-       
+
        for (ContentList::iterator i = c.begin(); i != c.end(); ++i) {
                shared_ptr<FFmpegContent> t = dynamic_pointer_cast<FFmpegContent> (*i);
                if (t) {
@@ -221,7 +221,7 @@ ContentPanel::film_changed (Film::Property p)
        for (list<ContentSubPanel*>::iterator i = _panels.begin(); i != _panels.end(); ++i) {
                (*i)->film_changed (p);
        }
-}      
+}
 
 void
 ContentPanel::selection_changed ()
@@ -265,7 +265,7 @@ ContentPanel::add_folder_clicked ()
        int r = d->ShowModal ();
        boost::filesystem::path const path (wx_to_std (d->GetPath ()));
        d->Destroy ();
-       
+
        if (r != wxID_OK) {
                return;
        }
@@ -290,7 +290,7 @@ ContentPanel::add_folder_clicked ()
                        error_dialog (_panel, _("Could not find a DCP nor a set of images in that folder."));
                }
        } else {
-               
+
                ImageSequenceDialog* e = new ImageSequenceDialog (_panel);
                r = e->ShowModal ();
                float const frame_rate = e->frame_rate ();
@@ -301,7 +301,7 @@ ContentPanel::add_folder_clicked ()
                }
 
                shared_ptr<Content> content;
-               
+
                try {
                        shared_ptr<ImageContent> content (new ImageContent (_film, path));
                        content->set_video_frame_rate (frame_rate);
@@ -331,7 +331,7 @@ ContentPanel::timeline_clicked ()
                _timeline_dialog->Destroy ();
                _timeline_dialog = 0;
        }
-       
+
        _timeline_dialog = new TimelineDialog (this, _film);
        _timeline_dialog->Show ();
 }
@@ -432,7 +432,7 @@ ContentPanel::film_content_changed (int property)
        if (property == ContentProperty::PATH || property == ContentProperty::POSITION || property == DCPContentProperty::CAN_BE_PLAYED) {
                setup ();
        }
-               
+
        for (list<ContentSubPanel*>::iterator i = _panels.begin(); i != _panels.end(); ++i) {
                (*i)->film_content_changed (property);
        }
@@ -443,7 +443,7 @@ ContentPanel::setup ()
 {
        ContentList content = _film->content ();
        sort (content.begin(), content.end(), ContentSorter ());
-       
+
        /* First, check to see if anything has changed and bail if not; this avoids
           flickering on OS X.
        */
@@ -461,22 +461,22 @@ ContentPanel::setup ()
                if (!valid) {
                        s = _("MISSING: ") + s;
                }
-              
+
                proposed.push_back (s);
        }
-       
+
        if (existing == proposed) {
                return;
        }
-      
+
        /* Something has changed: set up the control */
-       
+
        string selected_summary;
        int const s = _content->GetNextItem (-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
        if (s != -1) {
                selected_summary = wx_to_std (_content->GetItemText (s));
        }
-       
+
        _content->DeleteAllItems ();
 
        for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
@@ -486,7 +486,7 @@ ContentPanel::setup ()
                bool const needs_kdm = dcp && !dcp->can_be_played ();
 
                string s = (*i)->summary ();
-               
+
                if (!valid) {
                        s = _("MISSING: ") + s;
                }
@@ -518,7 +518,7 @@ ContentPanel::files_dropped (wxDropFilesEvent& event)
        if (!_film) {
                return;
        }
-       
+
        wxString* paths = event.GetFiles ();
        list<boost::filesystem::path> path_list;
        for (int i = 0; i < event.GetNumberOfFiles(); i++) {
@@ -534,7 +534,7 @@ ContentPanel::add_files (list<boost::filesystem::path> paths)
        /* It has been reported that the paths returned from e.g. wxFileDialog are not always sorted;
           I can't reproduce that, but sort them anyway.
        */
-       
+
        paths.sort (ImageFilenameSorter ());
 
        /* XXX: check for lots of files here and do something */
index bb7353a9ba9fbab6dd307a8d6dbab8843f4ffd54..452d4a4f853c259584d5c53b4930fe9cfdbc61e1 100644 (file)
@@ -65,8 +65,8 @@ public:
        FFmpegContentList selected_ffmpeg ();
 
        void add_file_clicked ();
-       
-private:       
+
+private:
        void selection_changed ();
        void add_folder_clicked ();
        void remove_clicked ();
index feb2c6a4631a7b2bac65f0b7a50bbd2e23257166..7fb0cccbab2e42962a281c685148bcb851a8bfeb 100644 (file)
@@ -54,7 +54,7 @@ ContentPropertiesDialog::ContentPropertiesDialog (wxWindow* parent, shared_ptr<C
        }
 
        /* XXX: this could be better wrt audio streams */
-       
+
        shared_ptr<SingleStreamAudioContent> single = dynamic_pointer_cast<SingleStreamAudioContent> (content);
        if (single) {
                add_property (
@@ -62,7 +62,7 @@ ContentPropertiesDialog::ContentPropertiesDialog (wxWindow* parent, shared_ptr<C
                        std_to_wx (raw_convert<string> (single->audio_stream()->channels ()))
                        );
        }
-       
+
        layout ();
 }
 
index 6f406dadbc926e92c094b74d53366327b6d08093..3fa1f0ddc20c168d6d45d0cdf773c2d872f93db9 100644 (file)
@@ -90,7 +90,7 @@ public:
                }
 
                _connections.clear ();
-               
+
                _content = content;
 
                _wrapped->Enable (!_content.empty ());
@@ -141,9 +141,9 @@ public:
                }
                _ignore_model_changes = false;
        }
-       
+
 private:
-       
+
        void set_single ()
        {
                if (_wrapped->IsShown ()) {
@@ -162,7 +162,7 @@ private:
                if (_button->IsShown ()) {
                        return;
                }
-               
+
                _wrapped->Hide ();
                _sizer->Detach (_wrapped);
                _button->Show ();
@@ -184,7 +184,7 @@ private:
                        update_from_model ();
                }
        }
-       
+
        T* _wrapped;
        wxGridBagSizer* _sizer;
        wxGBPosition _position;
index 11db3466fd74d482f0d707351a4bac13d44b84fc..0f5ec5afc7d3bfcd178a7a3ab8adbd8b467b0e7d 100644 (file)
@@ -61,16 +61,16 @@ DCPPanel::DCPPanel (wxNotebook* n, boost::shared_ptr<Film> film)
        _sizer->Add (grid, 0, wxEXPAND | wxALL, 8);
 
        int r = 0;
-       
+
        add_label_to_grid_bag_sizer (grid, _panel, _("Name"), true, wxGBPosition (r, 0));
        _name = new wxTextCtrl (_panel, wxID_ANY);
        grid->Add (_name, wxGBPosition(r, 1), wxDefaultSpan, wxEXPAND | wxLEFT | wxRIGHT);
        ++r;
-       
+
        int flags = wxALIGN_CENTER_VERTICAL;
 #ifdef __WXOSX__
        flags |= wxALIGN_RIGHT;
-#endif 
+#endif
 
        _use_isdcf_name = new wxCheckBox (_panel, wxID_ANY, _("Use ISDCF name"));
        grid->Add (_use_isdcf_name, wxGBPosition (r, 0), wxDefaultSpan, flags);
@@ -106,11 +106,11 @@ DCPPanel::DCPPanel (wxNotebook* n, boost::shared_ptr<Film> film)
 
        _notebook->AddPage (make_video_panel (), _("Video"), false);
        _notebook->AddPage (make_audio_panel (), _("Audio"), false);
-       
+
        _signed = new wxCheckBox (_panel, wxID_ANY, _("Signed"));
        grid->Add (_signed, wxGBPosition (r, 0), wxGBSpan (1, 2));
        ++r;
-       
+
        _encrypted = new wxCheckBox (_panel, wxID_ANY, _("Encrypted"));
        grid->Add (_encrypted, wxGBPosition (r, 0), wxGBSpan (1, 2));
        ++r;
@@ -129,7 +129,7 @@ DCPPanel::DCPPanel (wxNotebook* n, boost::shared_ptr<Film> film)
                grid->Add (s, wxGBPosition (r, 1));
                ++r;
        }
-       
+
        add_label_to_grid_bag_sizer (grid, _panel, _("Standard"), true, wxGBPosition (r, 0));
        _standard = new wxChoice (_panel, wxID_ANY);
        grid->Add (_standard, wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
@@ -182,7 +182,7 @@ DCPPanel::j2k_bandwidth_changed ()
        if (!_film) {
                return;
        }
-       
+
        _film->set_j2k_bandwidth (_j2k_bandwidth->GetValue() * 1000000);
 }
 
@@ -215,7 +215,7 @@ DCPPanel::encrypted_toggled ()
 
        _film->set_encrypted (_encrypted->GetValue ());
 }
-                              
+
 /** Called when the frame rate choice widget has been changed */
 void
 DCPPanel::frame_rate_choice_changed ()
@@ -400,7 +400,7 @@ DCPPanel::setup_container ()
                ++i;
                ++n;
        }
-       
+
        if (i == ratios.end()) {
                checked_set (_container, -1);
                checked_set (_container_size, wxT (""));
@@ -409,9 +409,9 @@ DCPPanel::setup_container ()
                dcp::Size const size = fit_ratio_within (_film->container()->ratio(), _film->full_frame ());
                checked_set (_container_size, wxString::Format ("%dx%d", size.width, size.height));
        }
-       
+
        setup_dcp_name ();
-}      
+}
 
 /** Called when the container widget has been changed */
 void
@@ -447,7 +447,7 @@ void
 DCPPanel::set_film (shared_ptr<Film> film)
 {
        _film = film;
-       
+
        film_changed (Film::NAME);
        film_changed (Film::USE_ISDCF_NAME);
        film_changed (Film::CONTENT);
@@ -483,7 +483,7 @@ DCPPanel::set_general_sensitivity (bool s)
        }
        _burn_subtitles->Enable (s);
        _signed->Enable (si);
-       
+
        _encrypted->Enable (s);
        _key->Enable (s && _film && _film->encrypted ());
        _edit_key->Enable (s && _film && _film->encrypted ());
@@ -534,7 +534,7 @@ DCPPanel::best_frame_rate_clicked ()
        if (!_film) {
                return;
        }
-       
+
        _film->set_video_frame_rate (_film->best_video_frame_rate ());
 }
 
@@ -579,7 +579,7 @@ DCPPanel::make_video_panel ()
        panel->SetSizer (sizer);
 
        int r = 0;
-       
+
        add_label_to_grid_bag_sizer (grid, panel, _("Container"), true, wxGBPosition (r, 0));
        {
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
@@ -671,7 +671,7 @@ DCPPanel::minimum_allowed_audio_channels () const
        }
 
        return min;
-}      
+}
 
 void
 DCPPanel::setup_audio_channels_choice ()
@@ -694,7 +694,7 @@ DCPPanel::make_audio_panel ()
        panel->SetSizer (sizer);
 
        int r = 0;
-       
+
        add_label_to_grid_bag_sizer (grid, panel, _("Channels"), true, wxGBPosition (r, 0));
        _audio_channels = new wxChoice (panel, wxID_ANY);
        setup_audio_channels_choice ();
@@ -750,7 +750,7 @@ DCPPanel::show_audio_clicked ()
                _audio_dialog->Destroy ();
                _audio_dialog = 0;
        }
-       
+
        AudioDialog* d = new AudioDialog (_panel, _film);
        d->Show ();
 }
index ac6792dddf7649adff8ed7756c5fe4d4e98229ca..055de67a61156f5310a41ec758a823693b6bfa66 100644 (file)
@@ -72,7 +72,7 @@ private:
        void edit_key_clicked ();
        void audio_processor_changed ();
        void show_audio_clicked ();
-       
+
        void setup_frame_rate_widget ();
        void setup_container ();
        void setup_dcp_name ();
index fad545283acfb47aa3d20c0c37b885a35a76e952..fe4937edf5cc8002f24dfff543b188167723b516 100644 (file)
@@ -46,7 +46,7 @@ void
 DirPickerCtrl::SetPath (wxString p)
 {
        _path = p;
-               
+
        if (_path == wxStandardPaths::Get().GetDocumentsDir()) {
                _folder->SetLabel (_("My Documents"));
        } else {
index 8d596cefc6d98b1fa184c03aa439960ea94308a5..df6cbffa63afe15621dbe39d15a4272249adc393 100644 (file)
@@ -29,7 +29,7 @@ public:
 
 private:
        void browse_clicked ();
-       
+
        wxStaticText* _folder;
        wxButton* _browse;
        wxString _path;
index ad43f64795fb731eb77d46b20690cd04f5a43acd..49c2f01d755ee18ec3288c9c053d771a05a33e41 100644 (file)
@@ -39,7 +39,7 @@ DolbyCertificateDialog::DolbyCertificateDialog (wxWindow* parent, boost::functio
        add (_("Country"), true);
        _country = add (new wxChoice (this, wxID_ANY));
        _country->Append (N_("Hashemite Kingdom of Jordan"));
-       
+
        add (_("Cinema"), true);
        _cinema = add (new wxChoice (this, wxID_ANY));
        _cinema->Append (N_("Motion Picture Solutions London Mobile & QC"));
@@ -72,7 +72,7 @@ DolbyCertificateDialog::setup_countries ()
                /* Already set up */
                return;
        }
-       
+
        _country->Append (_("Fetching..."));
        _country->SetSelection (0);
 
@@ -102,7 +102,7 @@ DolbyCertificateDialog::country_selected ()
 
 #ifdef DCPOMATIC_OSX
        wxMilliSleep (200);
-#endif 
+#endif
        signal_manager->when_idle (boost::bind (&DolbyCertificateDialog::finish_country_selected, this));
 }
 
index 578a7a72da1c7d706fc92d60d5a34e6982b2b435..74f19fcc902a7b81286e06e23ee4d21536c18d17 100644 (file)
@@ -54,10 +54,10 @@ DoremiCertificateDialog::download ()
        downloaded (false);
        _message->SetLabel (_("Downloading certificate"));
 
-#ifdef DCPOMATIC_OSX   
+#ifdef DCPOMATIC_OSX
        /* This is necessary on OS X, otherwise the SetLabel() above has no visible effect */
        wxMilliSleep (200);
-#endif 
+#endif
 
        signal_manager->when_idle (boost::bind (&DoremiCertificateDialog::finish_download, this, serial));
 }
index a0c41fd765901e4b60067caf3ee0af55d278382e..90d383298e6a77ff696e00d890e2269556f8ec46 100644 (file)
@@ -45,7 +45,7 @@ DownloadCertificateDialog::add_common_widgets ()
        font.SetStyle (wxFONTSTYLE_ITALIC);
        font.SetPointSize (font.GetPointSize() - 1);
        _message->SetFont (font);
-       
+
        _download->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&DownloadCertificateDialog::download, this));
        _download->Enable (false);
 
@@ -62,4 +62,4 @@ DownloadCertificateDialog::downloaded (bool done)
        ok->Enable (done);
 }
 
-       
+
index 40e11de45619bbaec1b8b960c77316a50fd1688d..85d8f15ab592d2689477b3354dce6362eb41f929 100644 (file)
@@ -33,7 +33,7 @@ public:
 protected:
        void add_common_widgets ();
        void downloaded (bool done);
-       
+
        boost::function<void (boost::filesystem::path)> _load;
        wxStaticText* _message;
        wxButton* _download;
index c6cb28a452e8df35fe339d5498a0987812163705..be79f67e66597dd2e437ab16c51b55c50017dd1a 100644 (file)
@@ -85,14 +85,14 @@ public:
        void refresh ()
        {
                _list->DeleteAllItems ();
-               
+
                std::vector<T> current = _get ();
                for (typename std::vector<T>::iterator i = current.begin (); i != current.end(); ++i) {
                        add_to_control (*i);
                }
-       }               
+       }
 
-private:       
+private:
 
        void add_to_control (T item)
        {
@@ -121,11 +121,11 @@ private:
                dialog->ShowModal ();
 
                add_to_control (dialog->get ());
-               
+
                std::vector<T> all = _get ();
                all.push_back (dialog->get ());
                _set (all);
-               
+
                dialog->Destroy ();
        }
 
@@ -141,7 +141,7 @@ private:
 
                T copy (all[item]);
                add_to_control (copy);
-               
+
                all.push_back (copy);
                _set (all);
        }
@@ -161,7 +161,7 @@ private:
                dialog->ShowModal ();
                all[item] = dialog->get ();
                dialog->Destroy ();
-               
+
                for (int i = 0; i < _columns; ++i) {
                        _list->SetItem (item, i, std_to_wx (_column (all[item], i)));
                }
@@ -175,7 +175,7 @@ private:
                if (i == -1) {
                        return;
                }
-               
+
                _list->DeleteItem (i);
                std::vector<T> all = _get ();
                all.erase (all.begin() + i);
index ce3791faa79d27351f54b92e701992f328c37dde..545eaf56ea610f13099c3e25784373b78a97dbe9 100644 (file)
@@ -49,7 +49,7 @@ FilmEditor::FilmEditor (wxWindow* parent, FilmViewer* viewer)
        _main_notebook->AddPage (_content_panel->panel (), _("Content"), true);
        _dcp_panel = new DCPPanel (_main_notebook, _film);
        _main_notebook->AddPage (_dcp_panel->panel (), _("DCP"), false);
-       
+
        JobManager::instance()->ActiveJobsChanged.connect (
                bind (&FilmEditor::active_jobs_changed, this, _1)
                );
@@ -67,7 +67,7 @@ void
 FilmEditor::film_changed (Film::Property p)
 {
        ensure_ui_thread ();
-       
+
        if (!_film) {
                return;
        }
@@ -85,7 +85,7 @@ void
 FilmEditor::film_content_changed (int property)
 {
        ensure_ui_thread ();
-       
+
        if (!_film) {
                /* We call this method ourselves (as well as using it as a signal handler)
                   so _film can be 0.
@@ -106,7 +106,7 @@ FilmEditor::set_film (shared_ptr<Film> film)
        if (_film == film) {
                return;
        }
-       
+
        _film = film;
 
        _content_panel->set_film (_film);
index 768be9d3cd826fd15a2b429e6cac80bdc7bd9527..43a1214c2c915aad424bd63178c8852201cb823f 100644 (file)
@@ -16,7 +16,7 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 */
+
 /** @file src/wx/film_editor.h
  *  @brief FilmEditor class.
  */
@@ -48,7 +48,7 @@ public:
        ContentPanel* content_panel () const {
                return _content_panel;
        }
-       
+
        boost::shared_ptr<Film> film () const {
                return _film;
        }
index a9b0907a1726abb0eab3abc2a9b819d612169f8d..4e155e05d9e11d221c1f53cba945fdc79e2a880a 100644 (file)
@@ -71,9 +71,9 @@ FilmViewer::FilmViewer (wxWindow* p)
 #ifndef __WXOSX__
        _panel->SetDoubleBuffered (true);
 #endif
-       
+
        _panel->SetBackgroundStyle (wxBG_STYLE_PAINT);
-       
+
        _v_sizer = new wxBoxSizer (wxVERTICAL);
        SetSizer (_v_sizer);
 
@@ -111,7 +111,7 @@ FilmViewer::FilmViewer (wxWindow* p)
        _forward_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED,       boost::bind (&FilmViewer::forward_clicked, this));
 
        set_film (shared_ptr<Film> ());
-       
+
        JobManager::instance()->ActiveJobsChanged.connect (
                bind (&FilmViewer::active_jobs_changed, this, _1)
                );
@@ -129,10 +129,10 @@ FilmViewer::set_film (shared_ptr<Film> film)
        _film = film;
 
        _frame.reset ();
-       
+
        update_position_slider ();
        update_position_label ();
-       
+
        if (!_film) {
                return;
        }
@@ -149,7 +149,7 @@ FilmViewer::set_film (shared_ptr<Film> film)
           in the preview.
        */
        _player->set_burn_subtitles (true);
-       
+
        _film_connection = _film->Changed.connect (boost::bind (&FilmViewer::film_changed, this, _1));
 
        _player_connection = _player->Changed.connect (boost::bind (&FilmViewer::player_changed, this, _1));
@@ -180,7 +180,7 @@ FilmViewer::get (DCPTime p, bool accurate)
        } catch (exception& e) {
                error_dialog (this, wxString::Format (_("Could not get video for view (%s)"), std_to_wx(e.what()).data()));
        }
-       
+
        if (!pvf.empty ()) {
                try {
                        _frame = pvf.front()->image (PIX_FMT_RGB24, true, boost::bind (&Log::dcp_log, _film->log().get(), _1, _2));
@@ -189,7 +189,7 @@ FilmViewer::get (DCPTime p, bool accurate)
                        if (pvf.front()->colour_conversion()) {
                                yuv_to_rgb = pvf.front()->colour_conversion().get().yuv_to_rgb();
                        }
-                       
+
                        _frame = _frame->scale (_frame->size(), yuv_to_rgb, PIX_FMT_RGB24, false);
                        _position = pvf.front()->time ();
                        _inter_position = pvf.front()->inter_position ();
@@ -229,7 +229,7 @@ FilmViewer::timer ()
        } else {
                get (_position + frame, true);
        }
-       
+
        update_position_label ();
        update_position_slider ();
 }
@@ -308,10 +308,10 @@ FilmViewer::calculate_sizes ()
        }
 
        Ratio const * container = _film->container ();
-       
+
        float const panel_ratio = _panel_size.ratio ();
        float const film_ratio = container ? container->ratio () : 1.78;
-                       
+
        if (panel_ratio < film_ratio) {
                /* panel is less widscreen than the film; clamp width */
                _out_size.width = _panel_size.width;
@@ -341,7 +341,7 @@ FilmViewer::check_play_state ()
        if (!_film || _film->video_frame_rate() == 0) {
                return;
        }
-       
+
        if (_play_button->GetValue()) {
                _timer.Start (1000 / _film->video_frame_rate());
        } else {
@@ -356,7 +356,7 @@ FilmViewer::update_position_slider ()
                _slider->SetValue (0);
                return;
        }
-       
+
        DCPTime const len = _film->length ();
 
        if (len.get ()) {
@@ -387,17 +387,17 @@ FilmViewer::active_jobs_changed (bool a)
 {
        if (a) {
                list<shared_ptr<Job> > jobs = JobManager::instance()->get ();
-               list<shared_ptr<Job> >::iterator i = jobs.begin ();             
+               list<shared_ptr<Job> >::iterator i = jobs.begin ();
                while (i != jobs.end() && boost::dynamic_pointer_cast<ExamineContentJob> (*i) == 0) {
                        ++i;
                }
-               
+
                if (i == jobs.end() || (*i)->finished()) {
                        /* no examine content job running, so we're ok to use the viewer */
                        a = false;
                }
        }
-                       
+
        _slider->Enable (!a);
        _play_button->Enable (!a);
 }
@@ -440,7 +440,7 @@ void
 FilmViewer::setup_sensitivity ()
 {
        bool const c = _film && !_film->content().empty ();
-       
+
        _slider->Enable (c);
        _back_button->Enable (c);
        _forward_button->Enable (c);
index 13907ae0cb9c468b63b88715b29d2f7ece4a6d46..306ee749dcc568c325e14d0a2a0758caed62f795 100644 (file)
@@ -46,7 +46,7 @@ FilterDialog::FilterDialog (wxWindow* parent, vector<Filter const *> const & f)
        sizer->Layout ();
        sizer->SetSizeHints (this);
 }
-       
+
 
 void
 FilterDialog::active_changed ()
index d54e6f2e452c6c047dfc2cfb970eb668690142b7..6ca1f68868d4f1ce0b28ba45689751a39ffb90d6 100644 (file)
@@ -40,6 +40,6 @@ public:
 
 private:
        void active_changed ();
-       
+
        FilterEditor* _filters;
 };
index 4dd18004bfcae15547363c413b99d59f93236a6a..6b5b8505e465c4558572995327a2653408525169 100644 (file)
@@ -34,7 +34,7 @@ FilterEditor::FilterEditor (wxWindow* parent, vector<Filter const *> const & act
 {
        wxBoxSizer* sizer = new wxBoxSizer (wxVERTICAL);
        SetSizer (sizer);
-       
+
        vector<Filter const *> filters = Filter::all ();
 
        typedef map<string, list<Filter const *> > CategoryMap;
index aa9fd1540a2b8d67f217aa40c45a98b33abd4e06..092faf9e6c0e96cb2de50daf41aabd56696b9deb 100644 (file)
@@ -41,7 +41,7 @@ FontsDialog::FontsDialog (wxWindow* parent, shared_ptr<SubtitleContent> content)
                ip.SetWidth (100);
                _fonts->InsertColumn (0, ip);
        }
-       
+
        {
                wxListItem ip;
                ip.SetId (1);
@@ -85,7 +85,7 @@ FontsDialog::setup ()
        if (!content) {
                return;
        }
-       
+
        _fonts->DeleteAllItems ();
        list<shared_ptr<Font> > fonts = content->fonts ();
        size_t n = 0;
@@ -113,7 +113,7 @@ FontsDialog::set_file_clicked ()
        if (item == -1) {
                return;
        }
-       
+
        /* The wxFD_CHANGE_DIR here prevents a `could not set working directory' error 123 on Windows when using
           non-Latin filenames or paths.
        */
index 76eae3ec2a4518ca0687bba7489ea2a8ed272882..0d4bcfd7e8752b79980e9c0193e14606e8dc84c1 100644 (file)
@@ -33,7 +33,7 @@ private:
        void set_file_clicked ();
        void update_sensitivity ();
        void selection_changed ();
-       
+
        boost::weak_ptr<SubtitleContent> _content;
        wxListCtrl* _fonts;
        wxButton* _set_file;
index d49dfae70841acca22765d9c824bb53d0af83ab7..133d84c21719cfa30b0718898636987f3f43a5ce 100644 (file)
@@ -41,7 +41,7 @@ GainCalculatorDialog::wanted_fader () const
        if (_wanted->GetValue().IsEmpty()) {
                return 0;
        }
-       
+
        return lexical_cast<float> (wx_to_std (_wanted->GetValue ()));
 }
 
index 40f1f3377f9fe8704d14ea88b22d837042aab60b..36c9eb6c8e54f4ddefc311a19b5620d124c58a04 100644 (file)
@@ -63,14 +63,14 @@ HintsDialog::film_changed ()
 {
        _text->Clear ();
        bool hint = false;
-       
+
        boost::shared_ptr<Film> film = _film.lock ();
        if (!film) {
                return;
        }
 
        ContentList content = film->content ();
-       
+
        _text->BeginStandardBullet (N_("standard/circle"), 1, 50);
 
        bool big_font_files = false;
@@ -132,7 +132,7 @@ HintsDialog::film_changed ()
                _text->WriteText (_("All of your content is at 1.85:1 or narrower but your DCP's container is Scope (2.39:1).  This will pillar-box your content inside a Flat (1.85:1) frame.  You may prefer to set your DCP's container to Flat (1.85:1) in the \"DCP\" tab."));
                _text->Newline ();
        }
-       
+
        if (film->video_frame_rate() != 24 && film->video_frame_rate() != 48) {
                hint = true;
                _text->WriteText (wxString::Format (_("Your DCP frame rate (%d fps) may cause problems in a few (mostly older) projectors.  Use 24 or 48 frames per second to be on the safe side."), film->video_frame_rate()));
index 88b2fa1ba6617fcffae5573ece72110fbbfac47a..f4ef00aa2edcfbb820fe23b16147ba0eeeec08bb 100644 (file)
@@ -30,7 +30,7 @@ public:
 
 private:
        void film_changed ();
-       
+
        boost::weak_ptr<Film> _film;
        wxRichTextCtrl* _text;
 
index 3df393a30bdc1d45794593e3511b6b91d81e6c7c..47d159cb984a8a01a879bdeb0bdefe35b9f3d74a 100644 (file)
@@ -37,7 +37,7 @@ ISDCFMetadataDialog::ISDCFMetadataDialog (wxWindow* parent, ISDCFMetadata dm)
 
        add (_("Subtitle Language (e.g. FR)"), true);
        _subtitle_language = add (new wxTextCtrl (this, wxID_ANY));
-       
+
        add (_("Territory (e.g. UK)"), true);
        _territory = add (new wxTextCtrl (this, wxID_ANY));
 
@@ -70,7 +70,7 @@ ISDCFMetadataDialog::ISDCFMetadataDialog (wxWindow* parent, ISDCFMetadata dm)
 
        add (_("Mastered luminance (e.g. 14fl)"), true);
        _mastered_luminance = add (new wxTextCtrl (this, wxID_ANY));
-       
+
        _content_version->SetRange (1, 1024);
 
        _content_version->SetValue (dm.content_version);
index 826c468110f7749d7e2c08a1a772fe4d82cf60c8..24cacf6b01ec88bd43b91745416e035220b3f6b0 100644 (file)
@@ -55,26 +55,26 @@ public:
                gauge_message->Add (_message, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxALL, 6);
                table->Insert (n, gauge_message, 1, wxEXPAND | wxLEFT | wxRIGHT);
                ++n;
-       
+
                _cancel = new wxButton (panel, wxID_ANY, _("Cancel"));
                _cancel->Bind (wxEVT_COMMAND_BUTTON_CLICKED, &JobRecord::cancel_clicked, this);
                table->Insert (n, _cancel, 1, wxALIGN_CENTER_VERTICAL | wxALL, 3);
                ++n;
-       
+
                _pause = new wxButton (_panel, wxID_ANY, _("Pause"));
                _pause->Bind (wxEVT_COMMAND_BUTTON_CLICKED, &JobRecord::pause_clicked, this);
                table->Insert (n, _pause, 1, wxALIGN_CENTER_VERTICAL | wxALL, 3);
                ++n;
-       
+
                _details = new wxButton (_panel, wxID_ANY, _("Details..."));
                _details->Bind (wxEVT_COMMAND_BUTTON_CLICKED, &JobRecord::details_clicked, this);
                _details->Enable (false);
                table->Insert (n, _details, 1, wxALIGN_CENTER_VERTICAL | wxALL, 3);
                ++n;
-       
+
                _progress_connection = job->Progress.connect (boost::bind (&JobRecord::progress, this));
                _finished_connection = job->Finished.connect (boost::bind (&JobRecord::finished, this));
-       
+
                table->Layout ();
        }
 
@@ -106,11 +106,11 @@ private:
        void finished ()
        {
                progress ();
-               
+
                if (!_job->finished_cancelled ()) {
                        _gauge->SetValue (100);
                }
-               
+
                _cancel->Enable (false);
                _pause->Enable (false);
                if (!_job->error_details().empty ()) {
@@ -124,7 +124,7 @@ private:
                s[0] = toupper (s[0]);
                error_dialog (_window, std_to_wx (String::compose ("%1.\n\n%2", s, _job->error_details())));
        }
-       
+
        void cancel_clicked (wxCommandEvent &)
        {
                _job->cancel ();
@@ -140,7 +140,7 @@ private:
                        _pause->SetLabel (_("Resume"));
                }
        }
-       
+
        boost::shared_ptr<Job> _job;
        wxScrolledWindow* _window;
        wxPanel* _panel;
index 244299a400a7bbf411f4575738eddf53fb4a6d71..a83b481dc874027f54aeeecee18afe0c168e1df8 100644 (file)
@@ -43,6 +43,6 @@ private:
        wxPanel* _panel;
        wxFlexGridSizer* _table;
        boost::shared_ptr<wxTimer> _timer;
-               
+
        std::list<boost::shared_ptr<JobRecord> > _job_records;
 };
index 8f4f8622df0ca3dd93c43b7e326b2e93d97a4367..67e1a99515527b3b3dc7a0d6dcaf4942d2b0328e 100644 (file)
@@ -60,7 +60,7 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film)
        wxStaticText* h = new wxStaticText (this, wxID_ANY, _("Screens"));
        h->SetFont (subheading_font);
        vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL);
-       
+
        wxBoxSizer* targets = new wxBoxSizer (wxHORIZONTAL);
        _targets = new wxTreeCtrl (this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_HIDE_ROOT | wxTR_MULTIPLE | wxTR_HAS_BUTTONS);
        targets->Add (_targets, 1, wxEXPAND | wxTOP | wxRIGHT, DCPOMATIC_SIZER_GAP);
@@ -82,7 +82,7 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film)
        target_buttons->Add (_edit_cinema, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
        _remove_cinema = new wxButton (this, wxID_ANY, _("Remove Cinema"));
        target_buttons->Add (_remove_cinema, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
-       
+
        _add_screen = new wxButton (this, wxID_ANY, _("Add Screen..."));
        target_buttons->Add (_add_screen, 1, wxEXPAND | wxALL, DCPOMATIC_BUTTON_STACK_GAP);
        _edit_screen = new wxButton (this, wxID_ANY, _("Edit Screen..."));
@@ -99,7 +99,7 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film)
        h = new wxStaticText (this, wxID_ANY, S_("KDM|Timing"));
        h->SetFont (subheading_font);
        vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
-       
+
        wxFlexGridSizer* table = new wxFlexGridSizer (3, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
        add_label_to_sizer (table, this, _("From"), true);
        wxDateTime from;
@@ -125,7 +125,7 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film)
        h = new wxStaticText (this, wxID_ANY, _("CPL"));
        h->SetFont (subheading_font);
        vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
-       
+
        /* CPL choice */
        wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
        add_label_to_sizer (s, this, _("CPL"), true);
@@ -147,16 +147,16 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film)
        _cpl_annotation_text = new wxStaticText (this, wxID_ANY, "");
        table->Add (_cpl_annotation_text);
        vertical->Add (table, 0, wxEXPAND | wxTOP, DCPOMATIC_SIZER_GAP + 2);
-       
+
        _cpls = film->cpls ();
        update_cpl_choice ();
-       
+
 
        /* Sub-heading: Output */
        h = new wxStaticText (this, wxID_ANY, _("Output"));
        h->SetFont (subheading_font);
        vertical->Add (h, 0, wxALIGN_CENTER_VERTICAL | wxTOP, DCPOMATIC_SIZER_Y_GAP * 2);
-       
+
        table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, 0);
 
        add_label_to_sizer (table, this, _("KDM type"), true);
@@ -173,19 +173,19 @@ KDMDialog::KDMDialog (wxWindow* parent, boost::shared_ptr<const Film> film)
        table->Add (_write_to, 1, wxEXPAND);
 
 #ifdef DCPOMATIC_USE_OWN_DIR_PICKER
-       _folder = new DirPickerCtrl (this); 
-#else  
+       _folder = new DirPickerCtrl (this);
+#else
        _folder = new wxDirPickerCtrl (this, wxID_ANY, wxEmptyString, wxDirSelectorPromptStr, wxDefaultPosition, wxSize (300, -1));
 #endif
 
        _folder->SetPath (wxStandardPaths::Get().GetDocumentsDir());
-       
+
        table->Add (_folder, 1, wxEXPAND);
 
        _email = new wxRadioButton (this, wxID_ANY, _("Send by email"));
        table->Add (_email, 1, wxEXPAND);
        table->AddSpacer (0);
-       
+
        vertical->Add (table, 0, wxEXPAND | wxTOP, DCPOMATIC_SIZER_GAP);
 
        /* Make an overall sizer to get a nice border, and put some buttons in */
@@ -265,10 +265,10 @@ KDMDialog::setup_sensitivity ()
        bool const sc = selected_cinemas().size() == 1;
        bool const ss = selected_screens().size() == 1;
        bool const sd = _cpl->GetSelection() != -1;
-       
+
        _edit_cinema->Enable (sc);
        _remove_cinema->Enable (sc);
-       
+
        _add_screen->Enable (sc);
        _edit_screen->Enable (ss);
        _remove_screen->Enable (ss);
@@ -328,7 +328,7 @@ KDMDialog::edit_cinema_clicked ()
        }
 
        pair<wxTreeItemId, shared_ptr<Cinema> > c = selected_cinemas().front();
-       
+
        CinemaDialog* d = new CinemaDialog (this, "Edit cinema", c.second->name, c.second->email);
        if (d->ShowModal () == wxID_OK) {
                c.second->name = d->name ();
@@ -337,7 +337,7 @@ KDMDialog::edit_cinema_clicked ()
                Config::instance()->changed ();
        }
 
-       d->Destroy ();  
+       d->Destroy ();
 }
 
 void
@@ -361,7 +361,7 @@ KDMDialog::add_screen_clicked ()
        }
 
        shared_ptr<Cinema> c = selected_cinemas().front().second;
-       
+
        ScreenDialog* d = new ScreenDialog (this, "Add Screen");
        if (d->ShowModal () != wxID_OK) {
                return;
@@ -384,7 +384,7 @@ KDMDialog::edit_screen_clicked ()
        }
 
        pair<wxTreeItemId, shared_ptr<Screen> > s = selected_screens().front();
-       
+
        ScreenDialog* d = new ScreenDialog (this, "Edit screen", s.second->name, s.second->certificate);
        if (d->ShowModal () == wxID_OK) {
                s.second->name = d->name ();
@@ -500,7 +500,7 @@ void
 KDMDialog::update_cpl_choice ()
 {
        _cpl->Clear ();
-       
+
        for (vector<CPLSummary>::const_iterator i = _cpls.begin(); i != _cpls.end(); ++i) {
                _cpl->Append (std_to_wx (i->cpl_id));
 
@@ -556,7 +556,7 @@ KDMDialog::cpl_browse_clicked ()
                error_dialog (this, _("This is not a valid CPL file"));
                return;
        }
-       
+
        update_cpl_choice ();
        _cpl->SetSelection (_cpls.size() - 1);
        update_cpl_summary ();
index 0fc95db8443dee447023e7170b3ee964c0daef85..1cf4ddde8a3b1f569bca6618cc9d314c77c4a9d7 100644 (file)
@@ -44,7 +44,7 @@ public:
        boost::posix_time::ptime from () const;
        /** @return KDM until time in local time */
        boost::posix_time::ptime until () const;
-       
+
        boost::filesystem::path cpl () const;
        boost::filesystem::path directory () const;
        bool write_to () const;
@@ -67,7 +67,7 @@ private:
        void cpl_browse_clicked ();
 
        static boost::posix_time::ptime posix_time (wxDatePickerCtrl *, wxTimePickerCtrl *);
-       
+
        wxTreeCtrl* _targets;
        wxButton* _add_cinema;
        wxButton* _edit_cinema;
index 70229c7a90babaebdb7ca5953db533f7803b9c2a..6133e85834a350ea8514f335379082c1891a27ed 100644 (file)
@@ -40,7 +40,7 @@ KeyDialog::KeyDialog (wxWindow* parent, dcp::Key key)
         }
 
         validator.SetIncludes (list);
-       
+
        _key = add (new wxTextCtrl (this, wxID_ANY, _(""), wxDefaultPosition, size, 0, validator));
        _key->SetValue (std_to_wx (key.hex ()));
        _key->SetMaxLength (32);
index 81402d46e830a3da56285551a9156044bb431fec..b04566212d38a11e22ee2867a90486b94c28c525 100644 (file)
@@ -30,7 +30,7 @@ public:
 private:
        void key_changed ();
        void random ();
-       
+
        wxTextCtrl* _key;
        wxButton* _random;
 };
index fc6391a941e90816aa67d74e61ed66edc79820c6..6d018c0dc021ebb109612a8b0b225d987e46d6f5 100644 (file)
@@ -44,7 +44,7 @@ public:
        std::string leaf_common_name () const {
                return wx_to_std (_leaf_common_name->GetValue ());
        }
-       
+
 
 private:
        wxTextCtrl* _organisation;
@@ -53,4 +53,4 @@ private:
        wxTextCtrl* _intermediate_common_name;
        wxTextCtrl* _leaf_common_name;
 };
-       
+
index 8f317f42ffa665f72d007579da3e90ec3dfc1337..96c8a0b0c59fef512ba3791c3d01ae5dca4b440f 100644 (file)
@@ -40,15 +40,15 @@ NewFilmDialog::NewFilmDialog (wxWindow* parent)
        add (_("Create in folder"), true);
 
 #ifdef DCPOMATIC_USE_OWN_DIR_PICKER
-       _folder = new DirPickerCtrl (this); 
-#else  
+       _folder = new DirPickerCtrl (this);
+#else
        _folder = new wxDirPickerCtrl (this, wxID_ANY, wxEmptyString, wxDirSelectorPromptStr, wxDefaultPosition, wxSize (300, -1));
 #endif
 
        if (!_directory) {
                _directory = Config::instance()->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir()));
        }
-       
+
        _folder->SetPath (std_to_wx (_directory.get().string()));
        add (_folder);
 
index 5ec5863c67340901357e4d7fca2db4dd0451e961..6ce3d6e3a20cffb7a68862156cbc69bd28bb4a7a 100644 (file)
@@ -36,8 +36,8 @@ private:
        wxTextCtrl* _name;
 #ifdef DCPOMATIC_USE_OWN_DIR_PICKER
        DirPickerCtrl* _folder;
-#else  
+#else
        wxDirPickerCtrl* _folder;
-#endif 
+#endif
        static boost::optional<boost::filesystem::path> _directory;
 };
index ae9b1d3ed2f40fc007503aef5a22028c7d03dc98..971619dafffab76df647dfe979d161eded09de13 100644 (file)
@@ -49,7 +49,7 @@ ReportProblemDialog::ReportProblemDialog (wxWindow* parent, shared_ptr<Film> fil
 #ifdef __WXOSX__
        flags |= wxALIGN_RIGHT;
        t += wxT (":");
-#endif 
+#endif
        wxStaticText* m = new wxStaticText (this, wxID_ANY, t);
        _table->Add (m, 1, flags, 6);
 
index 3e110d230bb4c48bfa6e9fe16e8de939c12efb33..69d0fff81b7f7e29da6a11310bfae1245ceef8c6 100644 (file)
@@ -31,13 +31,13 @@ public:
 
        std::string name () const;
        boost::optional<dcp::Certificate> certificate () const;
-       
+
 private:
        void select_certificate ();
        void load_certificate (boost::filesystem::path);
        void download_certificate ();
        void setup_sensitivity ();
-       
+
        wxTextCtrl* _name;
        wxChoice* _manufacturer;
        wxButton* _load_certificate;
index 299ce2f20aee0c2e339515a7049655994afca96c..13c6df70729746ba40d7556e14fa2e5d8fdd3c5f 100644 (file)
@@ -31,7 +31,7 @@ ServersListDialog::ServersListDialog (wxWindow* parent)
 {
        wxBoxSizer* s = new wxBoxSizer (wxVERTICAL);
        SetSizer (s);
-       
+
        _list = new wxListCtrl (this, wxID_ANY, wxDefaultPosition, wxSize (400, 200), wxLC_REPORT | wxLC_SINGLE_SEL);
 
        {
@@ -60,7 +60,7 @@ ServersListDialog::ServersListDialog (wxWindow* parent)
        SetSizer (s);
        s->Layout ();
        s->SetSizeHints (this);
-       
+
        _server_finder_connection = ServerFinder::instance()->connect (boost::bind (&ServersListDialog::server_found, this, _1));
 }
 
index 1e137f23326955484e3378f8f302c5d8d5b5ef32..9823df7a753606b43774080bac9f60b846cdeb1b 100644 (file)
@@ -67,7 +67,7 @@ SubtitlePanel::SubtitlePanel (ContentPanel* p)
                add_label_to_sizer (s, this, _("%"), false);
                grid->Add (s);
        }
-       
+
        {
                add_label_to_sizer (grid, this, _("X Scale"), true);
                wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
@@ -89,7 +89,7 @@ SubtitlePanel::SubtitlePanel (ContentPanel* p)
        add_label_to_sizer (grid, this, _("Language"), true);
        _language = new wxTextCtrl (this, wxID_ANY);
        grid->Add (_language, 1, wxEXPAND);
-       
+
        add_label_to_sizer (grid, this, _("Stream"), true);
        _stream = new wxChoice (this, wxID_ANY);
        grid->Add (_stream, 1, wxEXPAND);
@@ -101,7 +101,7 @@ SubtitlePanel::SubtitlePanel (ContentPanel* p)
        _fonts_dialog_button = new wxButton (this, wxID_ANY, _("Fonts..."));
        grid->Add (_fonts_dialog_button);
        grid->AddSpacer (0);
-       
+
        _x_offset->SetRange (-100, 100);
        _y_offset->SetRange (-100, 100);
        _x_scale->SetRange (10, 1000);
@@ -149,7 +149,7 @@ SubtitlePanel::film_content_changed (int property)
                        for (vector<shared_ptr<FFmpegSubtitleStream> >::iterator i = s.begin(); i != s.end(); ++i) {
                                _stream->Append (std_to_wx ((*i)->name), new wxStringClientData (std_to_wx ((*i)->identifier ())));
                        }
-                       
+
                        if (fcs->subtitle_stream()) {
                                checked_set (_stream, fcs->subtitle_stream()->identifier ());
                        } else {
@@ -205,10 +205,10 @@ SubtitlePanel::setup_sensitivity ()
                        ++any_subs;
                }
        }
-               
+
        _use->Enable (any_subs > 0);
        bool const use = _use->GetValue ();
-       
+
        _x_offset->Enable (any_subs > 0 && use);
        _y_offset->Enable (any_subs > 0 && use);
        _x_scale->Enable (any_subs > 0 && use);
@@ -228,7 +228,7 @@ SubtitlePanel::stream_changed ()
        }
 
        shared_ptr<FFmpegContent> fcs = fc.front ();
-       
+
        vector<shared_ptr<FFmpegSubtitleStream> > a = fcs->subtitle_streams ();
        vector<shared_ptr<FFmpegSubtitleStream> >::iterator i = a.begin ();
        string const s = string_client_data (_stream->GetClientObject (_stream->GetSelection ()));
@@ -311,17 +311,17 @@ SubtitlePanel::subtitle_view_clicked ()
        DCPOMATIC_ASSERT (c.size() == 1);
 
        shared_ptr<SubtitleDecoder> decoder;
-       
+
        shared_ptr<SubRipContent> sr = dynamic_pointer_cast<SubRipContent> (c.front ());
        if (sr) {
                decoder.reset (new SubRipDecoder (sr));
        }
-       
+
        shared_ptr<DCPSubtitleContent> dc = dynamic_pointer_cast<DCPSubtitleContent> (c.front ());
        if (dc) {
                decoder.reset (new DCPSubtitleDecoder (dc));
        }
-       
+
        if (decoder) {
                _subtitle_view = new SubtitleView (this, _parent->film(), decoder, c.front()->position ());
                _subtitle_view->Show ();
index ef94adb5468ca959457aa5722e97e6c10ee43f09..5a39f3bcd5e0b437a9946c7566e1a8b99d283363 100644 (file)
@@ -32,7 +32,7 @@ public:
        void film_changed (Film::Property);
        void film_content_changed (int);
        void content_selection_changed ();
-       
+
 private:
        void use_toggled ();
        void x_offset_changed ();
@@ -45,7 +45,7 @@ private:
        void fonts_dialog_clicked ();
 
        void setup_sensitivity ();
-       
+
        wxCheckBox* _use;
        wxSpinCtrl* _x_offset;
        wxSpinCtrl* _y_offset;
index b58af3019db6357aebf9eb07901ba731ae1f9775..33ef7cfda14817326ca1de8a3f75011df7aa4026 100644 (file)
@@ -47,7 +47,7 @@ SubtitleView::SubtitleView (wxWindow* parent, shared_ptr<Film> film, shared_ptr<
                ip.SetText (_("End"));
                ip.SetWidth (100);
                _list->InsertColumn (1, ip);
-       }               
+       }
 
        {
                wxListItem ip;
index 338742afcaac5575f35bc58bc895b9757967106b..f5a61890bba83c48068b55b133bb68790f4dcbcd 100644 (file)
@@ -28,6 +28,6 @@ class SubtitleView : public wxDialog
 public:
        SubtitleView (wxWindow *, boost::shared_ptr<Film>, boost::shared_ptr<SubtitleDecoder>, DCPTime position);
 
-private:       
+private:
        wxListCtrl* _list;
 };
index 571fcf3a4465b8956a9ea02eeebdf82f350804a8..b3937fd1868212b2a19c965076824c25b9388e6a 100644 (file)
@@ -35,7 +35,7 @@ TableDialog::TableDialog (wxWindow* parent, wxString title, int columns, bool ca
        if (cancel) {
                flags |= wxCANCEL;
        }
-       
+
        wxSizer* buttons = CreateSeparatedButtonSizer (flags);
        if (buttons) {
                _overall_sizer->Add (buttons, wxSizerFlags().Expand().DoubleBorder());
index 23017c3b635c2d4652e229e0aa67cbbd3d262493..f04c2027ca4d8feba8b5397fc8330b9c16390edf 100644 (file)
@@ -36,10 +36,10 @@ protected:
 
        void add (wxString text, bool label);
        void add_spacer ();
-       
+
        void layout ();
 
-private:       
+private:
        wxSizer* _overall_sizer;
        wxFlexGridSizer* _table;
 };
index 291a6ba5889ab9edd223bf9f309f320638e09cc5..8029d2f6aef6677ceb3937aa752f818135ccf6a3 100644 (file)
@@ -30,7 +30,7 @@ TimecodeBase::TimecodeBase (wxWindow* parent)
        : wxPanel (parent)
 {
        wxSize const s = TimecodeBase::size (parent);
-       
+
        wxTextValidator validator (wxFILTER_INCLUDE_CHAR_LIST);
        wxArrayString list;
 
@@ -42,7 +42,7 @@ TimecodeBase::TimecodeBase (wxWindow* parent)
        validator.SetIncludes (list);
 
        _sizer = new wxBoxSizer (wxHORIZONTAL);
-       
+
        _editable = new wxPanel (this);
        wxSizer* editable_sizer = new wxBoxSizer (wxHORIZONTAL);
        _hours = new wxTextCtrl (_editable, wxID_ANY, wxT(""), wxDefaultPosition, s, 0, validator);
@@ -66,7 +66,7 @@ TimecodeBase::TimecodeBase (wxWindow* parent)
        _sizer->Add (_editable);
 
        _fixed = add_label_to_sizer (_sizer, this, wxT ("42"), false);
-       
+
        _hours->Bind      (wxEVT_COMMAND_TEXT_UPDATED,   boost::bind (&TimecodeBase::changed, this));
        _minutes->Bind    (wxEVT_COMMAND_TEXT_UPDATED,   boost::bind (&TimecodeBase::changed, this));
        _seconds->Bind    (wxEVT_COMMAND_TEXT_UPDATED,   boost::bind (&TimecodeBase::changed, this));
index 620782567fabf789b51523c7a2facc7c46955334..45a421c4d71774d5ad76eb161f8a842e57a6efb5 100644 (file)
@@ -42,7 +42,7 @@ public:
 protected:
        void changed ();
        void set_clicked ();
-       
+
        wxSizer* _sizer;
        wxPanel* _editable;
        wxTextCtrl* _hours;
@@ -70,12 +70,12 @@ public:
                int s;
                int f;
                t.split (fps, h, m, s, f);
-               
+
                checked_set (_hours, boost::lexical_cast<std::string> (h));
                checked_set (_minutes, boost::lexical_cast<std::string> (m));
                checked_set (_seconds, boost::lexical_cast<std::string> (s));
                checked_set (_frames, boost::lexical_cast<std::string> (f));
-               
+
                checked_set (_fixed, t.timecode (fps));
        }
 
@@ -90,7 +90,7 @@ public:
                t += T::from_seconds (boost::lexical_cast<int> (s.empty() ? "0" : s));
                std::string const f = wx_to_std (_frames->GetValue());
                t += T::from_seconds (boost::lexical_cast<double> (f.empty() ? "0" : f) / fps);
-               
+
                return t;
        }
 };
index 8c8692aa1acca5c8fc7f6a43d5abdffd0bac19bd..4f0eef0e12358286aa8eefee285bff8e878bc9d7 100644 (file)
@@ -55,7 +55,7 @@ Timeline::Timeline (wxWindow* parent, ContentPanel* cp, shared_ptr<Film> film)
 {
 #ifndef __WXOSX__
        SetDoubleBuffered (true);
-#endif 
+#endif
 
        Bind (wxEVT_PAINT,      boost::bind (&Timeline::paint,       this));
        Bind (wxEVT_LEFT_DOWN,  boost::bind (&Timeline::left_down,   this, _1));
@@ -176,21 +176,21 @@ Timeline::assign_tracks ()
                                        ++j;
                                        continue;
                                }
-                               
+
                                shared_ptr<Content> test_content = test->content();
-                                       
+
                                if (test && test->track() && test->track().get() == t) {
                                        bool const no_overlap =
                                                (content->position() < test_content->position() && content->end() < test_content->position()) ||
                                                (content->position() > test_content->end()      && content->end() > test_content->end());
-                                       
+
                                        if (!no_overlap) {
                                                /* we have an overlap on track `t' */
                                                ++t;
                                                break;
                                        }
                                }
-                               
+
                                ++j;
                        }
 
@@ -258,11 +258,11 @@ Timeline::left_down (wxMouseEvent& ev)
                if (!cv) {
                        continue;
                }
-               
+
                if (!ev.ShiftDown ()) {
                        cv->set_selected (view == *i);
                }
-               
+
                if (view == *i) {
                        _content_panel->set_selection (cv->content ());
                }
@@ -360,9 +360,9 @@ Timeline::set_position_from_event (wxMouseEvent& ev)
        if (!_down_view) {
                return;
        }
-       
+
        DCPTime new_position = _down_view_position + DCPTime::from_seconds ((p.x - _down_point.x) / pps);
-       
+
        if (_snap) {
 
                DCPTime const new_end = new_position + _down_view->content()->length_after_trim () - DCPTime (1);
@@ -370,7 +370,7 @@ Timeline::set_position_from_event (wxMouseEvent& ev)
                   positive is right).
                */
                optional<DCPTime> nearest_distance;
-               
+
                /* Find the nearest content edge; this is inefficient */
                for (TimelineViewList::iterator i = _views.begin(); i != _views.end(); ++i) {
                        shared_ptr<TimelineContentView> cv = dynamic_pointer_cast<TimelineContentView> (*i);
@@ -383,7 +383,7 @@ Timeline::set_position_from_event (wxMouseEvent& ev)
                        maybe_snap (cv->content()->end() + DCPTime (1), new_position, nearest_distance);
                        maybe_snap (cv->content()->end() + DCPTime (1), new_end, nearest_distance);
                }
-               
+
                if (nearest_distance) {
                        /* Snap if it's close; `close' means within a proportion of the time on the timeline */
                        if (nearest_distance.get().abs() < DCPTime::from_seconds ((width() / pps) / 64)) {
@@ -391,13 +391,13 @@ Timeline::set_position_from_event (wxMouseEvent& ev)
                        }
                }
        }
-       
+
        if (new_position < DCPTime ()) {
                new_position = DCPTime ();
        }
 
        _down_view->content()->set_position (new_position);
-       
+
        shared_ptr<Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
        film->set_sequence_video (false);
@@ -436,7 +436,7 @@ TimelineContentViewList
 Timeline::selected_views () const
 {
        TimelineContentViewList sel;
-       
+
        for (TimelineViewList::const_iterator i = _views.begin(); i != _views.end(); ++i) {
                shared_ptr<TimelineContentView> cv = dynamic_pointer_cast<TimelineContentView> (*i);
                if (cv && cv->selected()) {
@@ -452,7 +452,7 @@ Timeline::selected_content () const
 {
        ContentList sel;
        TimelineContentViewList views = selected_views ();
-       
+
        for (TimelineContentViewList::const_iterator i = views.begin(); i != views.end(); ++i) {
                sel.push_back ((*i)->content ());
        }
index 23c5c6d8572a3ef1a02065c5959ca47af4b3274d..6f1a383deecfc1952fa8d41100ee7271353c8712 100644 (file)
@@ -26,7 +26,7 @@ class TimelineAudioContentView : public TimelineContentView
 {
 public:
        TimelineAudioContentView (Timeline& tl, boost::shared_ptr<Content> c);
-       
+
 private:
        wxString type () const;
        wxColour background_colour () const;
index b72ba48c80bcac62605972092dc7b8e6b2b0954d..df0772be935dde20472dbffd1d7d54f7f3246850 100644 (file)
@@ -37,13 +37,13 @@ dcpomatic::Rect<int>
 TimelineContentView::bbox () const
 {
        DCPOMATIC_ASSERT (_track);
-       
+
        shared_ptr<const Film> film = _timeline.film ();
        shared_ptr<const Content> content = _content.lock ();
        if (!film || !content) {
                return dcpomatic::Rect<int> ();
        }
-       
+
        return dcpomatic::Rect<int> (
                time_x (content->position ()) - 8,
                y_pos (_track.get()) - 8,
@@ -93,18 +93,18 @@ void
 TimelineContentView::do_paint (wxGraphicsContext* gc)
 {
        DCPOMATIC_ASSERT (_track);
-       
+
        shared_ptr<const Film> film = _timeline.film ();
        shared_ptr<const Content> cont = content ();
        if (!film || !cont) {
                return;
        }
-       
+
        DCPTime const position = cont->position ();
        DCPTime const len = cont->length_after_trim ();
-       
+
        wxColour selected (background_colour().Red() / 2, background_colour().Green() / 2, background_colour().Blue() / 2);
-       
+
        gc->SetPen (*wxThePenList->FindOrCreatePen (foreground_colour(), 4, wxPENSTYLE_SOLID));
        if (_selected) {
                gc->SetBrush (*wxTheBrushList->FindOrCreateBrush (selected, wxBRUSHSTYLE_SOLID));
@@ -120,14 +120,14 @@ TimelineContentView::do_paint (wxGraphicsContext* gc)
        path.AddLineToPoint (time_x (position),       y_pos (_track.get()) + 4);
        gc->StrokePath (path);
        gc->FillPath (path);
-       
+
        wxString name = wxString::Format (wxT ("%s [%s]"), std_to_wx (cont->summary()).data(), type().data());
        wxDouble name_width;
        wxDouble name_height;
        wxDouble name_descent;
        wxDouble name_leading;
        gc->GetTextExtent (name, &name_width, &name_height, &name_descent, &name_leading);
-       
+
        gc->Clip (wxRegion (time_x (position), y_pos (_track.get()), len.seconds() * _timeline.pixels_per_second().get_value_or(0), _timeline.track_height()));
        gc->SetFont (gc->CreateFont (*wxNORMAL_FONT, foreground_colour ()));
        gc->DrawText (name, time_x (position) + 12, y_pos (_track.get() + 1) - name_height - 4);
@@ -144,11 +144,11 @@ void
 TimelineContentView::content_changed (int p, bool frequent)
 {
        ensure_ui_thread ();
-       
+
        if (p == ContentProperty::POSITION || p == ContentProperty::LENGTH) {
                force_redraw ();
        }
-       
+
        if (!frequent) {
                _timeline.setup_pixels_per_second ();
                _timeline.Refresh ();
index d5c9126c07fa7d3a94ffd52544a55a64679b62bd..3262f13f37ad71cecdd36b519e850c431504f323 100644 (file)
@@ -46,7 +46,7 @@ public:
        virtual wxString type () const = 0;
        virtual wxColour background_colour () const = 0;
        virtual wxColour foreground_colour () const = 0;
-       
+
 private:
 
        void do_paint (wxGraphicsContext* gc);
index 6ec52ff382c1a9d0369841d211a7cb43c67930c9..ab2162b3964181ae65cf0ee5b7be4695d019855d 100644 (file)
@@ -70,7 +70,7 @@ TimelineDialog::sequence_video_toggled ()
        if (!film) {
                return;
        }
-               
+
        film->set_sequence_video (_sequence_video->GetValue ());
 }
 
index 0ee3451543d9248a71e19219c5a0fa506e695010..b760c2c5b22f54162680468a661db44d1d1fcef5 100644 (file)
@@ -33,7 +33,7 @@ private:
        void snap_toggled ();
        void sequence_video_toggled ();
        void film_changed (Film::Property);
-       
+
        boost::weak_ptr<Film> _film;
        Timeline _timeline;
        wxCheckBox* _snap;
index 407997b0f350ddf40a9001c06fe38bda9e8bd77a..3d1766391eb678291c2939083bddfbb299738360 100644 (file)
@@ -42,7 +42,7 @@ TimelineSubtitleContentView::background_colour () const
        if (!sc || !sc->use_subtitles ()) {
                return wxColour (210, 210, 210, 128);
        }
-       
+
        return wxColour (163, 255, 154, 255);
 }
 
@@ -53,6 +53,6 @@ TimelineSubtitleContentView::foreground_colour () const
        if (!sc || !sc->use_subtitles ()) {
                return wxColour (180, 180, 180, 128);
        }
-       
+
        return wxColour (0, 0, 0, 255);
 }
index 88236c64ff18cf41840186ea114d24f366e53d0f..7882c1231d2041e0023e8d645013a6fb70f501fb 100644 (file)
@@ -28,7 +28,7 @@ TimelineTimeAxisView::TimelineTimeAxisView (Timeline& tl, int y)
 {
 
 }
-       
+
 dcpomatic::Rect<int>
 TimelineTimeAxisView::bbox () const
 {
@@ -48,11 +48,11 @@ TimelineTimeAxisView::do_paint (wxGraphicsContext* gc)
        if (!_timeline.pixels_per_second()) {
                return;
        }
-       
+
        double const pps = _timeline.pixels_per_second().get ();
-       
+
        gc->SetPen (*wxThePenList->FindOrCreatePen (wxColour (0, 0, 0), 1, wxPENSTYLE_SOLID));
-       
+
        double mark_interval = rint (128 / pps);
        if (mark_interval > 5) {
                mark_interval -= int (rint (mark_interval)) % 5;
@@ -66,18 +66,18 @@ TimelineTimeAxisView::do_paint (wxGraphicsContext* gc)
        if (mark_interval > 3600) {
                mark_interval -= int (rint (mark_interval)) % 3600;
        }
-       
+
        if (mark_interval < 1) {
                mark_interval = 1;
        }
-       
+
        wxGraphicsPath path = gc->CreatePath ();
        path.MoveToPoint (_timeline.x_offset(), _y);
        path.AddLineToPoint (_timeline.width(), _y);
        gc->StrokePath (path);
-       
+
        gc->SetFont (gc->CreateFont (*wxNORMAL_FONT));
-       
+
        /* Time in seconds */
        DCPTime t;
        while ((t.seconds() * pps) < _timeline.width()) {
@@ -85,26 +85,26 @@ TimelineTimeAxisView::do_paint (wxGraphicsContext* gc)
                path.MoveToPoint (time_x (t), _y - 4);
                path.AddLineToPoint (time_x (t), _y + 4);
                gc->StrokePath (path);
-               
+
                double tc = t.seconds ();
                int const h = tc / 3600;
                tc -= h * 3600;
                int const m = tc / 60;
                tc -= m * 60;
                int const s = tc;
-               
+
                wxString str = wxString::Format (wxT ("%02d:%02d:%02d"), h, m, s);
                wxDouble str_width;
                wxDouble str_height;
                wxDouble str_descent;
                wxDouble str_leading;
                gc->GetTextExtent (str, &str_width, &str_height, &str_descent, &str_leading);
-               
+
                int const tx = _timeline.x_offset() + t.seconds() * pps;
                if ((tx + str_width) < _timeline.width()) {
                        gc->DrawText (str, time_x (t), _y + 16);
                }
-               
+
                t += DCPTime::from_seconds (mark_interval);
        }
 }
index 4b17c099d7744d6d54e0e2cd08d20924cb23eae8..f72acd4a7fefe23ffa8266f626ea390b2edbbc7d 100644 (file)
@@ -27,7 +27,7 @@ public:
        dcpomatic::Rect<int> bbox () const;
        void set_y (int y);
 
-private:       
+private:
        void do_paint (wxGraphicsContext* gc);
 
 private:
index 667c54485e633bc228f7c546acd5a5ccff3d458a..3dd76140a32d654e922ab1956b387313df597be9 100644 (file)
@@ -27,7 +27,7 @@ class TimelineVideoContentView : public TimelineContentView
 public:
        TimelineVideoContentView (Timeline& tl, boost::shared_ptr<Content> c);
 
-private:       
+private:
        wxString type () const;
        wxColour background_colour () const;
        wxColour foreground_colour () const;
index dbcbe025911bb902dc00d1edc87bdae833fd7cfa..0d2fca381f9c078af348eb88a54afca561ac7d32 100644 (file)
@@ -26,7 +26,7 @@
 TimelineView::TimelineView (Timeline& t)
        : _timeline (t)
 {
-       
+
 }
 
 void
index e52e28d471005e2f39dff41c695d994a1e5139d1..55fd64d51bfc453dc61545203a8439914347c6a4 100644 (file)
@@ -35,7 +35,7 @@ class TimelineView : public boost::noncopyable
 public:
        TimelineView (Timeline& t);
        virtual ~TimelineView () {}
-               
+
        void paint (wxGraphicsContext* g);
        void force_redraw ();
 
@@ -43,9 +43,9 @@ public:
 
 protected:
        virtual void do_paint (wxGraphicsContext *) = 0;
-       
+
        int time_x (DCPTime t) const;
-       
+
        Timeline& _timeline;
 
 private:
index 03189ecf5fd259be68927273d4d1263c399b1e55..4baafe9db8faff4070a81a74fed302d48706eff4 100644 (file)
@@ -43,35 +43,35 @@ TimingPanel::TimingPanel (ContentPanel* p, FilmViewer* viewer)
        _sizer->Add (grid, 0, wxALL, 8);
 
        wxSize size = TimecodeBase::size (this);
-               
+
        wxSizer* labels = new wxBoxSizer (wxHORIZONTAL);
        //// TRANSLATORS: this is an abbreviation for "hours"
        wxStaticText* t = new wxStaticText (this, wxID_ANY, _("h"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
 #ifdef DCPOMATIC_LINUX
        /* Hack to work around failure to centre text on GTK */
        gtk_label_set_line_wrap (GTK_LABEL (t->GetHandle()), FALSE);
-#endif         
+#endif
        labels->Add (t, 1, wxEXPAND);
        add_label_to_sizer (labels, this, wxT (":"), false);
        //// TRANSLATORS: this is an abbreviation for "minutes"
        t = new wxStaticText (this, wxID_ANY, _("m"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
 #ifdef DCPOMATIC_LINUX
        gtk_label_set_line_wrap (GTK_LABEL (t->GetHandle()), FALSE);
-#endif         
+#endif
        labels->Add (t, 1, wxEXPAND);
        add_label_to_sizer (labels, this, wxT (":"), false);
        //// TRANSLATORS: this is an abbreviation for "seconds"
        t = new wxStaticText (this, wxID_ANY, _("s"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
 #ifdef DCPOMATIC_LINUX
        gtk_label_set_line_wrap (GTK_LABEL (t->GetHandle()), FALSE);
-#endif         
+#endif
        labels->Add (t, 1, wxEXPAND);
        add_label_to_sizer (labels, this, wxT (":"), false);
        //// TRANSLATORS: this is an abbreviation for "frames"
        t = new wxStaticText (this, wxID_ANY, _("f"), wxDefaultPosition, size, wxALIGN_CENTRE_HORIZONTAL);
 #ifdef DCPOMATIC_LINUX
        gtk_label_set_line_wrap (GTK_LABEL (t->GetHandle()), FALSE);
-#endif         
+#endif
        labels->Add (t, 1, wxEXPAND);
        grid->Add (new wxStaticText (this, wxID_ANY, wxT ("")));
        grid->Add (labels);
@@ -128,7 +128,7 @@ TimingPanel::TimingPanel (ContentPanel* p, FilmViewer* viewer)
                        ++current;
                }
        }
-       
+
        t = new wxStaticText (this, wxID_ANY, wxT (""));
        t->SetLabelMarkup (out);
        grid->Add (t, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 6);
@@ -153,7 +153,7 @@ TimingPanel::update_full_length ()
        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 (), _parent->film()->video_frame_rate ());
        } else {
@@ -170,7 +170,7 @@ TimingPanel::update_play_length ()
        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 (), _parent->film()->video_frame_rate ());
        } else {
@@ -187,7 +187,7 @@ TimingPanel::film_content_changed (int property)
        /* 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) {
 
                set<DCPTime> check;
@@ -200,7 +200,7 @@ TimingPanel::film_content_changed (int property)
                } else {
                        _position->clear ();
                }
-               
+
        } else if (
                property == ContentProperty::LENGTH ||
                property == VideoContentProperty::VIDEO_FRAME_RATE ||
@@ -215,20 +215,20 @@ TimingPanel::film_content_changed (int property)
                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->clear ();
                }
-               
+
        } else if (property == ContentProperty::TRIM_END) {
 
                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 {
@@ -359,7 +359,7 @@ TimingPanel::content_selection_changed ()
        _trim_end->Enable (e);
        _play_length->Enable (e);
        _video_frame_rate->Enable (e);
-       
+
        film_content_changed (ContentProperty::POSITION);
        film_content_changed (ContentProperty::LENGTH);
        film_content_changed (ContentProperty::TRIM_START);
@@ -395,6 +395,6 @@ TimingPanel::trim_end_to_playhead_clicked ()
                if (i->position() < ph && ph < i->end ()) {
                        i->set_trim_end (i->position() + i->full_length() - i->trim_start() - ph);
                }
-               
+
        }
 }
index e300e4975cf32b698dca2a1b2b452b9d164070d2..100945731a2c6cef2109bd87299053d56ac8b1f4 100644 (file)
@@ -30,7 +30,7 @@ public:
        void film_changed (Film::Property);
        void film_content_changed (int);
        void content_selection_changed ();
-       
+
 private:
        void position_changed ();
        void full_length_changed ();
@@ -45,7 +45,7 @@ private:
        void update_play_length ();
 
        FilmViewer* _viewer;
-       
+
        Timecode<DCPTime>* _position;
        Timecode<DCPTime>* _full_length;
        Timecode<DCPTime>* _trim_start;
index c8c90d86e499a22b0ea44ba5716ffa8578cac7f2..e0c08ef158a1356ccf9f06e225fadfa0b02f6a71 100644 (file)
@@ -46,19 +46,19 @@ UpdateDialog::UpdateDialog (wxWindow* parent, optional<string> stable, optional<
                wxHyperlinkCtrl* h = new wxHyperlinkCtrl (this, wxID_ANY, "dcpomatic.com/download", "http://dcpomatic.com/download");
                table->Add (h);
        }
-       
+
        if (test) {
                add_label_to_sizer (table, this, _("Test version ") + std_to_wx (test.get ()), true);
                wxHyperlinkCtrl* h = new wxHyperlinkCtrl (this, wxID_ANY, "dcpomatic.com/test-download", "http://dcpomatic.com/test-download");
                table->Add (h);
        }
-       
+
        overall_sizer->Add (table, 1, wxEXPAND | wxLEFT | wxRIGHT | wxTOP, DCPOMATIC_DIALOG_BORDER);
 
        wxSizer* buttons = CreateButtonSizer (wxOK);
        if (buttons) {
                overall_sizer->Add (buttons, 1, wxEXPAND | wxALL);
        }
-       
+
        SetSizerAndFit (overall_sizer);
 }
index 0cef2504f52951f10368112f8618f771fd60949a..a0775023c147d29c9cfe9f9da8550771ed074ad3 100644 (file)
@@ -114,7 +114,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
        _right_crop->add (crop, wxGBPosition (cr, 3));
 
        ++cr;
-       
+
        add_label_to_grid_bag_sizer (crop, this, _("Top"), true, wxGBPosition (cr, 0));
        _top_crop = new ContentSpinCtrl<VideoContent> (
                this,
@@ -147,7 +147,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
        _fade_out = new Timecode<ContentTime> (this);
        grid->Add (_fade_out, wxGBPosition (r, 1), wxGBSpan (1, 3));
        ++r;
-       
+
        add_label_to_grid_bag_sizer (grid, this, _("Scale to"), true, wxGBPosition (r, 0));
        _scale = new ContentChoice<VideoContent, VideoContentScale> (
                this,
@@ -189,10 +189,10 @@ VideoPanel::VideoPanel (ContentPanel* p)
                }
                _colour_conversion->Append (_("Custom"));
                s->Add (_colour_conversion, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM | wxRIGHT, 6);
-               
+
                _edit_colour_conversion_button = new wxButton (this, wxID_ANY, _("Edit..."));
                s->Add (_edit_colour_conversion_button, 0, wxALIGN_CENTER_VERTICAL);
-               
+
                grid->Add (s, wxGBPosition (r, 1), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
        }
        ++r;
@@ -225,7 +225,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
 
        _fade_in->Changed.connect (boost::bind (&VideoPanel::fade_in_changed, this));
        _fade_out->Changed.connect (boost::bind (&VideoPanel::fade_out_changed, this));
-       
+
        _filters_button->Bind                (wxEVT_COMMAND_BUTTON_CLICKED,  boost::bind (&VideoPanel::edit_filters_clicked, this));
        _colour_conversion->Bind             (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&VideoPanel::colour_conversion_changed, this));
        _edit_colour_conversion_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED,  boost::bind (&VideoPanel::edit_colour_conversion_clicked, this));
@@ -255,7 +255,7 @@ VideoPanel::film_content_changed (int property)
                vcs = vc.front ();
                fcs = dynamic_pointer_cast<FFmpegContent> (vcs);
        }
-       
+
        if (property == VideoContentProperty::VIDEO_FRAME_TYPE) {
                setup_description ();
        } else if (property == VideoContentProperty::VIDEO_CROP) {
@@ -299,7 +299,7 @@ VideoPanel::film_content_changed (int property)
                for (VideoContentList::const_iterator i = vc.begin (); i != vc.end(); ++i) {
                        check.insert ((*i)->fade_in ());
                }
-               
+
                if (check.size() == 1) {
                        _fade_in->set (ContentTime::from_frames (vc.front()->fade_in (), vc.front()->video_frame_rate ()), vc.front()->video_frame_rate ());
                } else {
@@ -310,7 +310,7 @@ VideoPanel::film_content_changed (int property)
                for (VideoContentList::const_iterator i = vc.begin (); i != vc.end(); ++i) {
                        check.insert ((*i)->fade_out ());
                }
-               
+
                if (check.size() == 1) {
                        _fade_out->set (ContentTime::from_frames (vc.front()->fade_out (), vc.front()->video_frame_rate ()), vc.front()->video_frame_rate ());
                } else {
@@ -397,7 +397,7 @@ VideoPanel::content_selection_changed ()
 {
        VideoContentList video_sel = _parent->selected_video ();
        FFmpegContentList ffmpeg_sel = _parent->selected_ffmpeg ();
-       
+
        bool const single = video_sel.size() == 1;
 
        _frame_type->set_content (video_sel);
index 218b24b02dee1943f05ae8ca387a94a4fb8f7557..c05a271f7bfbfa6c8095b6eefcfe01db5c570618 100644 (file)
@@ -52,7 +52,7 @@ add_label_to_sizer (wxSizer* s, wxWindow* p, wxString t, bool, int prop)
                flags |= wxALIGN_RIGHT;
                t += wxT (":");
        }
-#endif 
+#endif
        wxStaticText* m = new wxStaticText (p, wxID_ANY, t);
        s->Add (m, prop, flags, 6);
        return m;
@@ -71,7 +71,7 @@ add_label_to_grid_bag_sizer (wxGridBagSizer* s, wxWindow* p, wxString t, bool, w
                flags |= wxALIGN_RIGHT;
                t += wxT (":");
        }
-#endif 
+#endif
        wxStaticText* m = new wxStaticText (p, wxID_ANY, t);
        s->Add (m, pos, span, flags);
        return m;
@@ -97,7 +97,7 @@ confirm_dialog (wxWindow* parent, wxString m)
        d->Destroy ();
        return r == wxID_YES;
 }
-       
+
 
 /** @param s wxWidgets string.
  *  @return Corresponding STL string.
@@ -169,7 +169,7 @@ checked_set (wxChoice* widget, string value)
        if (widget->GetSelection() != -1) {
                o = widget->GetClientObject (widget->GetSelection ());
        }
-       
+
        if (!o || string_client_data(o) != value) {
                for (unsigned int i = 0; i < widget->GetCount(); ++i) {
                        if (string_client_data (widget->GetClientObject (i)) == value) {
@@ -269,7 +269,7 @@ dcpomatic_setup_i18n ()
 
 #ifdef DCPOMATIC_WINDOWS
                locale->AddCatalogLookupPathPrefix (std_to_wx (mo_path().string()));
-#endif         
+#endif
 
 #ifdef DCPOMATIC_LINUX
                locale->AddCatalogLookupPathPrefix (LINUX_LOCALE_PREFIX);
@@ -279,11 +279,11 @@ dcpomatic_setup_i18n ()
                   of wxWidgets.
                */
                locale->AddCatalog (wxT ("dcpomatic2-wxstd"));
-#endif         
-               
+#endif
+
                locale->AddCatalog (wxT ("libdcpomatic2-wx"));
                locale->AddCatalog (wxT ("dcpomatic2"));
-               
+
                if (!locale->IsOk()) {
                        delete locale;
                        locale = new wxLocale (wxLANGUAGE_ENGLISH);
index 6c05916ab6aa78aef9c9a3fe640ff5e6cf7e8320..94ad96a29223fe0b4185348964ca83d15d865f7a 100644 (file)
@@ -44,9 +44,9 @@ BOOST_AUTO_TEST_CASE (audio_analysis_serialisation_test)
 {
        int const channels = 3;
        int const points = 4096;
-       
+
        srand (1);
-       
+
        AudioAnalysis a (3);
        for (int i = 0; i < channels; ++i) {
                for (int j = 0; j < points; ++j) {
@@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_serialisation_test)
                        BOOST_CHECK_CLOSE (p[AudioPoint::RMS],  random_float (), 1);
                }
        }
-       
+
        BOOST_CHECK (b.peak ());
        BOOST_CHECK_CLOSE (b.peak().get(), peak, 1);
        BOOST_CHECK (b.peak_time ());
@@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_negative_delay_test)
        c->set_audio_delay (-250);
        film->examine_and_add_content (c);
        wait_for_jobs ();
-       
+
        shared_ptr<AnalyseAudioJob> job (new AnalyseAudioJob (film));
        job->Finished.connect (boost::bind (&finished));
        JobManager::instance()->add (job);
@@ -129,7 +129,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_test2)
        shared_ptr<AudioContent> c (new FFmpegContent (film, private_data / "3d_thx_broadway_2010_lossless.m2ts"));
        film->examine_and_add_content (c);
        wait_for_jobs ();
-       
+
        shared_ptr<AnalyseAudioJob> job (new AnalyseAudioJob (film));
        job->Finished.connect (boost::bind (&finished));
        JobManager::instance()->add (job);
index 15f91847089c366ca6ef636404a615ef7b3e4910..044a4c22caec4c5be2cb7090a9d9d43b50c1d9ee 100644 (file)
@@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE (audio_buffers_make_silent_test)
        random_fill (buffers);
 
        buffers.make_silent ();
-       
+
        for (int i = 0; i < 9933; ++i) {
                for (int c = 0; c < 9; ++c) {
                        BOOST_CHECK_EQUAL (buffers.data(c)[i], 0);
@@ -248,7 +248,7 @@ BOOST_AUTO_TEST_CASE (audio_buffers_move)
        for (int i = 0; i < from * 7; ++i) {
                random_float ();
        }
-       
+
        random_check (buffers, to, frames);
 }
 
@@ -258,7 +258,7 @@ BOOST_AUTO_TEST_CASE (audio_buffers_accumulate_channel)
        AudioBuffers a (3, 256);
        srand (38);
        random_fill (a);
-       
+
        AudioBuffers b (3, 256);
        random_fill (b);
 
@@ -283,7 +283,7 @@ BOOST_AUTO_TEST_CASE (audio_buffers_accumulate_frames)
        AudioBuffers a (3, 256);
        srand (38);
        random_fill (a);
-       
+
        AudioBuffers b (3, 256);
        random_fill (b);
 
index cd86b73e76942207c7580b28190fac23954673fc..6816c1fbb45532dc184ccd6f2afa5fb83b11cdb9 100644 (file)
@@ -49,7 +49,7 @@ public:
        DCPTime full_length () const {
                return DCPTime::from_seconds (float (audio_length()) / audio_stream()->frame_rate ());
        }
-       
+
        Frame audio_length () const {
                return rint (61.2942 * audio_stream()->frame_rate ());
        }
@@ -125,7 +125,7 @@ BOOST_AUTO_TEST_CASE (audio_decoder_get_audio_test)
 
        content.reset (new TestAudioContent (film));
        decoder.reset (new TestAudioDecoder (content));
-       
+
        /* Simple reads */
        check (0, 48000);
        check (44, 9123);
@@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE (audio_decoder_get_audio_test)
        Frame const from = content->resampled_audio_frame_rate() * 61;
        Frame const length = content->resampled_audio_frame_rate() * 4;
        ContentAudio ca = get (from, length);
-       
+
        for (int i = 0; i < content->audio_stream()->channels(); ++i) {
                for (int j = 0; j < ca.audio->frames(); ++j) {
                        BOOST_REQUIRE_EQUAL (ca.audio->data(i)[j], j + from);
index 05384873f850a46340a2de918fdb8f0cd226310f..d36672a8a2f60f605a302c6d34d017f8c6e54dce 100644 (file)
@@ -44,7 +44,7 @@ static
 void test_audio_delay (int delay_in_ms)
 {
        BOOST_TEST_MESSAGE ("Testing delay of " << delay_in_ms);
-       
+
        string const film_name = "audio_delay_test_" + lexical_cast<string> (delay_in_ms);
        shared_ptr<Film> film = new_test_film (film_name);
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("FTR"));
@@ -78,7 +78,7 @@ void test_audio_delay (int delay_in_ms)
        while (n < sound_asset->asset()->intrinsic_duration()) {
                shared_ptr<const dcp::SoundFrame> sound_frame = sound_asset->asset()->get_frame (frame++);
                uint8_t const * d = sound_frame->data ();
-               
+
                for (int i = 0; i < sound_frame->size(); i += (3 * sound_asset->asset()->channels())) {
 
                        /* Mono input so it will appear on centre */
index bcd16fd4e607c7974dcadfe6023a007d544cef85..c3d799b3bdd71c1afb7bd6bf261ec3582b61a5b3 100644 (file)
@@ -40,7 +40,7 @@ audio_filter_impulse_test_one (AudioFilter& f, int block_size, int num_blocks)
                }
 
                shared_ptr<AudioBuffers> out = f.run (in);
-               
+
                for (int j = 0; j < out->frames(); ++j) {
                        BOOST_CHECK_EQUAL (out->data()[0][j], c + j);
                }
@@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE (audio_filter_impulse_input_test)
        shared_ptr<AudioBuffers> in (new AudioBuffers (1, 1751));
        in->make_silent ();
        in->data(0)[0] = 1;
-       
+
        shared_ptr<AudioBuffers> out = lpf.run (in);
        for (int j = 0; j < out->frames(); ++j) {
                if (j <= lpf._M) {
@@ -92,7 +92,7 @@ BOOST_AUTO_TEST_CASE (audio_filter_impulse_input_test)
        in.reset (new AudioBuffers (1, 9133));
        in->make_silent ();
        in->data(0)[0] = 1;
-       
+
        out = hpf.run (in);
        for (int j = 0; j < out->frames(); ++j) {
                if (j <= hpf._M) {
index 511e913d9b4e95dce3826fe945462b2b0fb44ca0..e97abcec5b34c3003d6ee57fe84d8e85c08c3c58 100644 (file)
@@ -45,7 +45,7 @@ do_remote_encode (shared_ptr<DCPVideo> frame, ServerDescription description, Dat
 {
        Data remotely_encoded;
        BOOST_CHECK_NO_THROW (remotely_encoded = frame->encode_remotely (description));
-       
+
        BOOST_CHECK_EQUAL (locally_encoded.size(), remotely_encoded.size());
        BOOST_CHECK_EQUAL (memcmp (locally_encoded.data().get(), remotely_encoded.data().get(), locally_encoded.size()), 0);
 }
@@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE (client_server_test_rgb)
 {
        shared_ptr<Image> image (new Image (PIX_FMT_RGB24, dcp::Size (1998, 1080), true));
        uint8_t* p = image->data()[0];
-       
+
        for (int y = 0; y < 1080; ++y) {
                uint8_t* q = p;
                for (int x = 0; x < 1998; ++x) {
@@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE (client_server_test_rgb)
                );
 
        Data locally_encoded = frame->encode_locally (boost::bind (&Log::dcp_log, log.get(), _1, _2));
-       
+
        Server* server = new Server (log, true);
 
        new thread (boost::bind (&Server::run, server, 2));
@@ -191,7 +191,7 @@ BOOST_AUTO_TEST_CASE (client_server_test_yuv)
                );
 
        Data locally_encoded = frame->encode_locally (boost::bind (&Log::dcp_log, log.get(), _1, _2));
-       
+
        Server* server = new Server (log, true);
 
        new thread (boost::bind (&Server::run, server, 2));
index 2c34c437d4151b140c26937f11bff43f18ce071e..aac32edc0882c747a6823bad6070d29c4f10bb86 100644 (file)
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test)
        film->examine_and_add_content (c);
 
        wait_for_jobs ();
-       
+
        c->set_scale (VideoContentScale (Ratio::from_id ("185")));
 
        film->set_container (Ratio::from_id ("185"));
@@ -76,7 +76,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test)
        while (n < sound_asset->asset()->intrinsic_duration()) {
                shared_ptr<const dcp::SoundFrame> sound_frame = sound_asset->asset()->get_frame (frame++);
                uint8_t const * d = sound_frame->data ();
-               
+
                for (int i = 0; i < sound_frame->size(); i += (3 * sound_asset->asset()->channels())) {
 
                        if (sound_asset->asset()->channels() > 0) {
@@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_audio_test)
                                int const sample = d[i + 2] | (d[i + 3] << 8);
                                BOOST_CHECK_EQUAL (sample, 0);
                        }
-                       
+
                        if (sound_asset->asset()->channels() > 2) {
                                /* Mono input so it will appear on centre */
                                int const sample = d[i + 7] | (d[i + 8] << 8);
index 797af8736989015e19528b5e8dc9f2de303ed7d4..ce8ecad6bfcfa7a2fffe708f82aca99ba6e84c93 100644 (file)
@@ -42,9 +42,9 @@ BOOST_AUTO_TEST_CASE (ffmpeg_dcp_test)
        film->examine_and_add_content (c);
 
        wait_for_jobs ();
-       
+
        c->set_scale (VideoContentScale (Ratio::from_id ("185")));
-       
+
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
        film->make_dcp ();
@@ -70,6 +70,6 @@ BOOST_AUTO_TEST_CASE (ffmpeg_have_dcp_test)
        if (i != boost::filesystem::directory_iterator ()) {
                boost::filesystem::remove (i->path ());
        }
-       
+
        BOOST_CHECK (film->cpls().empty());
 }
index c15bf8c98525c72d939dc601a45d70b59dfe3120..c81b7389c418dcc95a932445a23a849177a9530a 100644 (file)
@@ -59,7 +59,7 @@ test (boost::filesystem::path file, vector<int> frames)
        }
 
        shared_ptr<Film> film = new_test_film ("ffmpeg_decoder_seek_test_" + file.string());
-       shared_ptr<FFmpegContent> content (new FFmpegContent (film, path)); 
+       shared_ptr<FFmpegContent> content (new FFmpegContent (film, path));
        film->examine_and_add_content (content);
        wait_for_jobs ();
        shared_ptr<Log> log (new NullLog);
@@ -73,7 +73,7 @@ test (boost::filesystem::path file, vector<int> frames)
 BOOST_AUTO_TEST_CASE (ffmpeg_decoder_seek_test)
 {
        vector<int> frames;
-       
+
        frames.clear ();
        frames.push_back (0);
        frames.push_back (42);
@@ -82,13 +82,13 @@ BOOST_AUTO_TEST_CASE (ffmpeg_decoder_seek_test)
 
        test ("boon_telly.mkv", frames);
        test ("Sintel_Trailer1.480p.DivX_Plus_HD.mkv", frames);
-       
+
        frames.clear ();
        frames.push_back (15);
        frames.push_back (42);
        frames.push_back (999);
        frames.push_back (15);
-       
+
        test ("prophet_clip.mkv", frames);
 }
 
index 98c7bf9e2acffea10a4d24f5419794da987b1b79..601dd1c59db7b4137f121d4e0507561d1a8d3b9d 100644 (file)
@@ -46,25 +46,25 @@ test (boost::filesystem::path file, float fps, int gaps)
        }
 
        shared_ptr<Film> film = new_test_film ("ffmpeg_decoder_seek_test_" + file.string());
-       shared_ptr<FFmpegContent> content (new FFmpegContent (film, path)); 
+       shared_ptr<FFmpegContent> content (new FFmpegContent (film, path));
        film->examine_and_add_content (content);
        wait_for_jobs ();
        shared_ptr<Log> log (new NullLog);
        shared_ptr<FFmpegDecoder> decoder (new FFmpegDecoder (content, log));
 
        BOOST_CHECK_CLOSE (decoder->video_content()->video_frame_rate(), fps, 0.01);
-       
+
        Frame const N = decoder->video_content()->video_length();
-#ifdef DCPOMATIC_DEBUG 
+#ifdef DCPOMATIC_DEBUG
        decoder->test_gaps = 0;
-#endif 
+#endif
        for (Frame i = 0; i < N; ++i) {
                list<ContentVideo> v;
                v = decoder->get_video (i, true);
                BOOST_CHECK_EQUAL (v.size(), 1U);
                BOOST_CHECK_EQUAL (v.front().frame, i);
        }
-#ifdef DCPOMATIC_DEBUG 
+#ifdef DCPOMATIC_DEBUG
        BOOST_CHECK_EQUAL (decoder->test_gaps, gaps);
 #endif
 }
index 888834511677c8d95f7cffa76a2c921b0dc3fff9..9b70bd9448daec6c8ee75e8ad8622866b64cc180 100644 (file)
@@ -36,7 +36,7 @@ BOOST_AUTO_TEST_CASE (file_group_test)
        for (int i = 0; i < 65536; ++i) {
                data[i] = rand() & 0xff;
        }
-       
+
        int const num_files = 4;
 
        int length[] = {
index 851fffb3f20d8e8a2002b28b140a4890487cc836..423bc4cccd7467c1532fe9d5190b1e2977199fba 100644 (file)
@@ -58,7 +58,7 @@ BOOST_AUTO_TEST_CASE (film_metadata_test)
        BOOST_CHECK_EQUAL (g->name(), "fred");
        BOOST_CHECK_EQUAL (g->dcp_content_type(), DCPContentType::from_pretty_name ("Short"));
        BOOST_CHECK_EQUAL (g->container(), Ratio::from_id ("185"));
-       
+
        g->write_metadata ();
        check_xml ("test/data/metadata.xml.ref", dir.string() + "/metadata.xml", ignore);
 }
index cf3dc261275ee64d6b4c746b814e2ecc523aeed4..0133431eea78234b4197fbb292be9b3271fbb98f 100644 (file)
@@ -43,9 +43,9 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/test.mp4"));
        film->add_content (content);
        wait_for_jobs ();
-       
+
        /* Run some tests with a limited range of allowed rates */
-       
+
        std::list<int> afr;
        afr.push_back (24);
        afr.push_back (25);
@@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.repeat, 1);
        BOOST_CHECK_EQUAL (frc.change_speed, false);
        BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1);
-       
+
        content->_video_frame_rate = 50;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (50, best);
@@ -96,7 +96,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.repeat, 1);
        BOOST_CHECK_EQUAL (frc.change_speed, true);
        BOOST_CHECK_CLOSE (frc.speed_up, 30 / 29.97, 0.1);
-       
+
        content->_video_frame_rate = 25;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (25, best);
@@ -168,7 +168,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.repeat, 1);
        BOOST_CHECK_EQUAL (frc.change_speed, false);
        BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1);
-       
+
        content->_video_frame_rate = 50;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (50, best);
@@ -188,7 +188,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1);
 
        /* Check some out-there conversions (not the best) */
-       
+
        frc = FrameRateChange (14.99, 24);
        BOOST_CHECK_EQUAL (frc.skip, false);
        BOOST_CHECK_EQUAL (frc.repeat, 2);
@@ -225,7 +225,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_double)
        wait_for_jobs ();
 
        /* Run some tests with a limited range of allowed rates */
-       
+
        std::list<int> afr;
        afr.push_back (24);
        afr.push_back (25);
@@ -244,7 +244,7 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test)
        shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/test.mp4"));
        film->examine_and_add_content (content);
        wait_for_jobs ();
-       
+
        std::list<int> afr;
        afr.push_back (24);
        afr.push_back (25);
@@ -286,7 +286,7 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test)
        BOOST_CHECK_EQUAL (content->resampled_audio_frame_rate(), 50000);
 
        /* Check some out-there conversions (not the best) */
-       
+
        content->_video_frame_rate = 14.99;
        film->set_video_frame_rate (25);
        stream->_frame_rate = 16000;
index 5561f021c5a57afb3c489910a6de6213a9778ce3..21363b5efd24b73885c32e23730bcf23074c7c0e 100644 (file)
@@ -186,7 +186,7 @@ crop_scale_window_single (AVPixelFormat in_format, dcp::Size in_size, Crop crop,
                        }
                }
        }
-                               
+
        /* Convert using separate methods */
        boost::shared_ptr<Image> sep = test->crop (crop, true);
        sep = sep->scale (inter_size, dcp::YUV_TO_RGB_REC601, PIX_FMT_RGB24, true);
@@ -235,7 +235,7 @@ BOOST_AUTO_TEST_CASE (crop_scale_window_test)
 BOOST_AUTO_TEST_CASE (alpha_blend_test)
 {
        int const stride = 48 * 4;
-       
+
        shared_ptr<Image> A (new Image (AV_PIX_FMT_RGBA, dcp::Size (48, 48), false));
        A->make_black ();
        uint8_t* a = A->data()[0];
@@ -289,7 +289,7 @@ BOOST_AUTO_TEST_CASE (alpha_blend_test)
 BOOST_AUTO_TEST_CASE (merge_test1)
 {
        int const stride = 48 * 4;
-       
+
        shared_ptr<Image> A (new Image (AV_PIX_FMT_RGBA, dcp::Size (48, 48), false));
        A->make_transparent ();
        uint8_t* a = A->data()[0];
index b54ce205fdb0df2e0d74b7c3b3ab39573c94c4ec..38cd5456907b66a9bb4207724b46cb78500db5ac 100644 (file)
@@ -84,7 +84,7 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test)
 
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("XSN"));
        BOOST_CHECK_EQUAL (film->isdcf_name(false), "MyNiceFilmWith_XSN-2_F-133_DE-FR_US-R_4K_DI_20140704_PP_SMPTE_VF");
-       
+
        /* Test 3D */
 
        film->set_three_d (true);
@@ -123,7 +123,7 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test)
        BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-FR_US-R_4K_DI_20140704_PP_SMPTE_VF");
 
        /* Test audio channel markup */
-       
+
        film->set_audio_channels (6);
        shared_ptr<SndfileContent> sound (new SndfileContent (film, "test/data/sine_440.wav"));
        film->examine_and_add_content (sound);
index b0243310bbacd2b9bfd9a23809195eab2763d212..ec5aa6999950e7dae157ada78ce404a2c0e13dea 100644 (file)
@@ -75,13 +75,13 @@ BOOST_AUTO_TEST_CASE (make_black_test)
        pix_fmts.push_back (AV_PIX_FMT_YUVA422P16LE);
        pix_fmts.push_back (AV_PIX_FMT_YUVA444P16LE);
        pix_fmts.push_back (AV_PIX_FMT_RGB555LE); // 46
-       
+
        int N = 0;
        for (list<AVPixelFormat>::const_iterator i = pix_fmts.begin(); i != pix_fmts.end(); ++i) {
                boost::shared_ptr<Image> foo (new Image (*i, in_size, true));
                foo->make_black ();
                boost::shared_ptr<Image> bar = foo->scale (out_size, dcp::YUV_TO_RGB_REC601, PIX_FMT_RGB24, true);
-               
+
                uint8_t* p = bar->data()[0];
                for (int y = 0; y < bar->size().height; ++y) {
                        uint8_t* q = p;
index 68d225e6efa36dc6b69a5b30f8319b7e6da74eaa..f99bd717cdbe0d70c0c4ea4e3ad6a5d204a7c6cd 100644 (file)
@@ -51,7 +51,7 @@ struct Case
                bpp[1] = b1;
                bpp[2] = b2;
        }
-       
+
        AVPixelFormat format;
        int components;
        int lines[3];
index dcf8e7f6dd323e264ecc5d8d1197f4956355ea77..8ad2180b8adb341ee8c97536e5705c6a825f7a03 100644 (file)
@@ -62,7 +62,7 @@ public:
                if (_queue.empty ()) {
                        return optional<Video> ();
                }
-               
+
                Video v = _queue.back ();
                _queue.pop_back ();
                return v;
@@ -97,7 +97,7 @@ BOOST_AUTO_TEST_CASE (play_test)
        wait_for_jobs ();
 
        BOOST_CHECK_EQUAL (B->video_length_after_3d_combine(), 16);
-       
+
        /* Film should have been set to 25fps */
        BOOST_CHECK_EQUAL (film->video_frame_rate(), 25);
 
index b9038dcce09fb374ba635553013913a83ac5f438..87e7fda8a2ab748c42c322e02f89ca19809d46ca 100644 (file)
@@ -88,7 +88,7 @@ BOOST_AUTO_TEST_CASE (player_silence_padding_test)
        shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
        film->set_container (Ratio::from_id ("185"));
        film->set_audio_channels (6);
-       
+
        film->examine_and_add_content (c);
        wait_for_jobs ();
 
index 07b38083829aedb80853691f751ddf9844a64f5e..ef60a56ab99704f6c92d25b92e6ebce1b011d858 100644 (file)
@@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE (recover_test)
                video,
                "build/test/recover_test/original.mxf"
                );
-       
+
        boost::filesystem::resize_file (video, 2 * 1024 * 1024);
 
        film->make_dcp ();
index d836fcbddf4e47e6c7f2c3961d2b2b08e34aee5c..2e325af25a102f12aead78ba9c9570c14b7ad611 100644 (file)
@@ -45,7 +45,7 @@ BOOST_AUTO_TEST_CASE (repeat_frame_test)
        wait_for_jobs ();
 
        c->set_scale (VideoContentScale (Ratio::from_id ("185")));
-       
+
        film->set_video_frame_rate (48);
        film->make_dcp ();
        wait_for_jobs ();
index 0fc05685b565c2c0b01d2238a643652868f300e1..d633f75c192f31a4cd3110688bcadc27d8b5304d 100644 (file)
@@ -37,15 +37,15 @@ resampler_test_one (int from, int to)
 
        /* 3 hours */
        int64_t const N = int64_t (from) * 60 * 60 * 3;
-               
+
        /* XXX: no longer checks anything */
        for (int64_t i = 0; i < N; i += 1000) {
                shared_ptr<AudioBuffers> a (new AudioBuffers (1, 1000));
                a->make_silent ();
                shared_ptr<const AudioBuffers> r = resamp.run (a);
        }
-}      
-               
+}
+
 BOOST_AUTO_TEST_CASE (resampler_test)
 {
        resampler_test_one (44100, 48000);
index 8d9df8977198a353eb1d12de3c85fbd0d2f6c308..b6b38e1260e58ec4f98385a1f2f788c623eb842b 100644 (file)
@@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE (scaling_test)
        film->examine_and_add_content (imc);
 
        wait_for_jobs ();
-       
+
        imc->set_video_length (1);
 
        /* F-133: 133 image in a flat container */
index 3aef113734fbebfd7092d2aa121a28808bf40819..7f661b21cf11183ead22b494a080146837f5c0c6 100644 (file)
@@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE (seek_zero_test)
        film->examine_and_add_content (content);
        wait_for_jobs ();
        content->set_scale (VideoContentScale (Ratio::from_id ("185")));
-       
+
        /* Work out the first video frame index that we will be given, taking into account
         * the difference between first video and first audio.
         */
index 9a797aab574f542bf996e90cf3e59362a3350880..30f7e106e3494acd385790e8b681f3f13deca43b 100644 (file)
@@ -73,7 +73,7 @@ test_silence_padding (int channels)
        while (n < sound_asset->asset()->intrinsic_duration()) {
                shared_ptr<const dcp::SoundFrame> sound_frame = sound_asset->asset()->get_frame (frame++);
                uint8_t const * d = sound_frame->data ();
-               
+
                for (int i = 0; i < sound_frame->size(); i += (3 * sound_asset->asset()->channels())) {
 
                        if (sound_asset->asset()->channels() > 0) {
@@ -87,7 +87,7 @@ test_silence_padding (int channels)
                                int const sample = d[i + 2] | (d[i + 3] << 8);
                                BOOST_CHECK_EQUAL (sample, 0);
                        }
-                       
+
                        if (sound_asset->asset()->channels() > 2) {
                                /* Mono input so it will appear on centre */
                                int const sample = d[i + 7] | (d[i + 8] << 8);
@@ -116,7 +116,7 @@ test_silence_padding (int channels)
                        ++n;
                }
        }
-       
+
 }
 
 BOOST_AUTO_TEST_CASE (silence_padding_test)
index 2279308e1bb446e14cac37eb2f647cd0929fe181..64249a118ce322134fedc39b4a38a7510a2bbe93 100644 (file)
@@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test2)
        content->set_use_subtitles (true);
        /* Use test/data/subrip2.srt as if it were a font file  */
        content->fonts().front()->set_file ("test/data/subrip2.srt");
-       
+
        film->make_dcp ();
        wait_for_jobs ();
 
index 800bbd049c0c64cc1401378b39d4fca963d40a36..ec211a929772a15a89d6307a4ea2f4c4f33df1f6 100644 (file)
@@ -42,7 +42,7 @@ BOOST_AUTO_TEST_CASE (stream_test)
        root->add_child("Channels")->add_child_text ("2");
 
        /* This is the state file version 5 description of the mapping */
-       
+
        xmlpp::Element* mapping = root->add_child("Mapping");
        mapping->add_child("ContentChannels")->add_child_text ("2");
        {
@@ -69,7 +69,7 @@ BOOST_AUTO_TEST_CASE (stream_test)
                map->add_child("ContentIndex")->add_child_text ("1");
                map->add_child("DCP")->add_child_text ("2");
        }
-               
+
        FFmpegAudioStream a (cxml::NodePtr (new cxml::Node (root)), 5);
 
        BOOST_CHECK_EQUAL (a.identifier(), "4");
index bdd17e6a1dc5d66442808754295b792122136e38..1080aec793f4ecd1b5f4efa9f9d5ccb33297e1e7 100644 (file)
@@ -106,7 +106,7 @@ new_test_film (string name)
        if (boost::filesystem::exists (p)) {
                boost::filesystem::remove_all (p);
        }
-       
+
        shared_ptr<Film> film = shared_ptr<Film> (new Film (p.string()));
        film->write_metadata ();
        return film;
@@ -119,7 +119,7 @@ check_audio_file (boost::filesystem::path ref, boost::filesystem::path check)
        ref_info.format = 0;
        SNDFILE* ref_file = sf_open (ref.string().c_str(), SFM_READ, &ref_info);
        BOOST_CHECK (ref_file);
-       
+
        SF_INFO check_info;
        check_info.format = 0;
        SNDFILE* check_file = sf_open (check.string().c_str(), SFM_READ, &check_info);
@@ -134,7 +134,7 @@ check_audio_file (boost::filesystem::path ref, boost::filesystem::path check)
        sf_count_t const buffer_size = 65536 * ref_info.channels;
        scoped_array<int32_t> ref_buffer (new int32_t[buffer_size]);
        scoped_array<int32_t> check_buffer (new int32_t[buffer_size]);
-       
+
        sf_count_t N = ref_info.frames;
        while (N) {
                sf_count_t this_time = min (buffer_size, N);
@@ -160,14 +160,14 @@ check_file (boost::filesystem::path ref, boost::filesystem::path check)
        BOOST_CHECK (ref_file);
        FILE* check_file = fopen_boost (check, "rb");
        BOOST_CHECK (check_file);
-       
+
        int const buffer_size = 65536;
        uint8_t* ref_buffer = new uint8_t[buffer_size];
        uint8_t* check_buffer = new uint8_t[buffer_size];
 
        SafeStringStream error;
        error << "File " << check.string() << " differs from reference " << ref.string();
-       
+
        while (N) {
                uintmax_t this_time = min (uintmax_t (buffer_size), N);
                size_t r = fread (ref_buffer, 1, this_time, ref_file);
@@ -179,7 +179,7 @@ check_file (boost::filesystem::path ref, boost::filesystem::path check)
                if (memcmp (ref_buffer, check_buffer, this_time)) {
                        break;
                }
-               
+
                N -= this_time;
        }
 
@@ -214,7 +214,7 @@ check_dcp (boost::filesystem::path ref, boost::filesystem::path check)
        options.reel_annotation_texts_can_differ = true;
        options.reel_hashes_can_differ = true;
        options.issue_dates_can_differ = true;
-       
+
        BOOST_CHECK (ref_dcp.equals (check_dcp, options, boost::bind (note, _1, _2)));
 }
 
@@ -291,7 +291,7 @@ wait_for_jobs ()
        }
 
        cout << "Waiting for jobs: all finished; errors=" << jm->errors() << ".\n";
-       
+
        if (jm->errors ()) {
                int N = 0;
                for (list<shared_ptr<Job> >::iterator i = jm->_jobs.begin(); i != jm->_jobs.end(); ++i) {
@@ -327,7 +327,7 @@ write_image (shared_ptr<const Image> image, boost::filesystem::path file)
                using namespace MagickCore;
 #else
                using namespace MagickLib;
-#endif         
+#endif
 
        Magick::Image m (image->size().width, image->size().height, "ARGB", CharPixel, (void *) image->data()[0]);
        m.write (file.string ());
index f51a77109a6ccda11e1d5eb0546d7b866d18ebb4..a4b1566ef1210e55880109f0b2fa0cd56ac97e94 100644 (file)
@@ -42,7 +42,7 @@ BOOST_AUTO_TEST_CASE (threed_test)
        wait_for_jobs ();
 
        c->set_scale (VideoContentScale (Ratio::from_id ("185")));
-       
+
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_pretty_name ("Test"));
        film->set_three_d (true);
index 2a66cb855842a22c17f43b84f7813ebbb04b3ad0..e296229e1ad3d42c3242071d731dd1e01532022a 100644 (file)
@@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE (md5_digest_test)
        p.push_back ("test/data/md5.test2");
        p.push_back ("test/data/md5.test4");
        BOOST_CHECK_EQUAL (md5_digest_head_tail (p, 1024), "52ccf111e4e72b58bb7b2aaa6bd45ea5");
-       
+
        p.clear ();
        p.push_back ("foobar");
        BOOST_CHECK_THROW (md5_digest_head_tail (p, 1024), OpenFileError);
@@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE (dcptime_round_up_test)
        BOOST_CHECK_EQUAL (DCPTime (1).round_up (DCPTime::HZ / 2), DCPTime (2));
        BOOST_CHECK_EQUAL (DCPTime (2).round_up (DCPTime::HZ / 2), DCPTime (2));
        BOOST_CHECK_EQUAL (DCPTime (3).round_up (DCPTime::HZ / 2), DCPTime (4));
-       
+
        BOOST_CHECK_EQUAL (DCPTime (0).round_up (DCPTime::HZ / 42), DCPTime (0));
        BOOST_CHECK_EQUAL (DCPTime (1).round_up (DCPTime::HZ / 42), DCPTime (42));
        BOOST_CHECK_EQUAL (DCPTime (42).round_up (DCPTime::HZ / 42), DCPTime (42));
index d2ee4c0d83c8408b0b98eaf9e2be744279a7668f..80367274dc4c2288ecfc6f936828747d4b8ee212 100644 (file)
@@ -105,7 +105,7 @@ test (dcp::Size content_size, dcp::Size display_size, dcp::Size film_size, Crop
        }
        BOOST_CHECK (answer == correct);
 }
-      
+
 /* Test scale and stretch to specified ratio */
 BOOST_AUTO_TEST_CASE (video_content_scale_test_to_ratio)
 {
@@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE (video_content_scale_test_to_ratio)
                true,
                dcp::Size (1998, 837)
                );
-       
+
        // Flat in scope container
        test (
                dcp::Size (400, 200),
@@ -144,7 +144,7 @@ BOOST_AUTO_TEST_CASE (video_content_scale_test_to_ratio)
                dcp::Size (1587, 858)
                );
 
-       
+
        /* To player */
 
        // Flat in flat container
@@ -168,7 +168,7 @@ BOOST_AUTO_TEST_CASE (video_content_scale_test_to_ratio)
                true,
                dcp::Size (185, 78)
                );
-       
+
        // Flat in scope container
        test (
                dcp::Size (400, 200),
index 85dafd93ff8bb0099c870691786dd029f86d29b7..25f7548535e8b793869e3b4a1687310d02c3bd58 100644 (file)
@@ -34,7 +34,7 @@ BOOST_AUTO_TEST_CASE (video_decoder_fill_test1)
 
        decoder.fill_2d (0, 4);
        BOOST_CHECK_EQUAL (decoder._decoded_video.size(), 4U);
-       list<ContentVideo>::iterator i = decoder._decoded_video.begin();        
+       list<ContentVideo>::iterator i = decoder._decoded_video.begin();
        for (int j = 0; j < 4; ++j) {
                BOOST_CHECK_EQUAL (i->frame, j);
                ++i;
@@ -44,7 +44,7 @@ BOOST_AUTO_TEST_CASE (video_decoder_fill_test1)
 
        decoder.fill_2d (0, 7);
        BOOST_CHECK_EQUAL (decoder._decoded_video.size(), 7);
-       i = decoder._decoded_video.begin();     
+       i = decoder._decoded_video.begin();
        for (int j = 0; j < 7; ++j) {
                BOOST_CHECK_EQUAL (i->frame, j);
                ++i;
@@ -59,7 +59,7 @@ BOOST_AUTO_TEST_CASE (video_decoder_fill_test2)
 
        decoder.fill_3d (0, 4, EYES_LEFT);
        BOOST_CHECK_EQUAL (decoder._decoded_video.size(), 8);
-       list<ContentVideo>::iterator i = decoder._decoded_video.begin();        
+       list<ContentVideo>::iterator i = decoder._decoded_video.begin();
        for (int j = 0; j < 8; ++j) {
                BOOST_CHECK_EQUAL (i->frame, j / 2);
                BOOST_CHECK_EQUAL (i->eyes, (j % 2) == 0 ? EYES_LEFT : EYES_RIGHT);
@@ -68,7 +68,7 @@ BOOST_AUTO_TEST_CASE (video_decoder_fill_test2)
 
        decoder.fill_3d (0, 7, EYES_RIGHT);
        BOOST_CHECK_EQUAL (decoder._decoded_video.size(), 15);
-       i = decoder._decoded_video.begin();     
+       i = decoder._decoded_video.begin();
        for (int j = 0; j < 15; ++j) {
                BOOST_CHECK_EQUAL (i->frame, j / 2);
                BOOST_CHECK_EQUAL (i->eyes, (j % 2) == 0 ? EYES_LEFT : EYES_RIGHT);