Rename video/audio/subtitle part methods.
authorCarl Hetherington <cth@carlh.net>
Thu, 14 Apr 2016 01:06:18 +0000 (02:06 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 18 May 2016 10:50:29 +0000 (11:50 +0100)
57 files changed:
src/lib/analyse_audio_job.cc
src/lib/audio_analysis.cc
src/lib/audio_content.cc
src/lib/audio_content.h
src/lib/audio_decoder_stream.cc
src/lib/dcp_content.cc
src/lib/dcp_decoder.cc
src/lib/dcp_subtitle_content.cc
src/lib/ffmpeg_content.cc
src/lib/ffmpeg_decoder.cc
src/lib/film.cc
src/lib/image_content.cc
src/lib/image_decoder.cc
src/lib/image_examiner.cc
src/lib/player.cc
src/lib/playlist.cc
src/lib/sndfile_content.cc
src/lib/subtitle_content.cc
src/lib/subtitle_content.h
src/lib/text_subtitle_content.cc
src/lib/transcoder.cc
src/lib/video_content.cc
src/lib/video_content.h
src/lib/video_content_scale.cc
src/lib/video_decoder.cc
src/lib/video_examiner.h
src/tools/dcpomatic_cli.cc
src/tools/dcpomatic_create.cc
src/wx/audio_dialog.cc
src/wx/audio_panel.cc
src/wx/content_menu.cc
src/wx/content_panel.cc
src/wx/dcp_panel.cc
src/wx/hints_dialog.cc
src/wx/subtitle_panel.cc
src/wx/timeline.cc
src/wx/timeline_subtitle_content_view.cc
src/wx/timing_panel.cc
src/wx/video_panel.cc
test/audio_analysis_test.cc
test/audio_decoder_test.cc
test/audio_delay_test.cc
test/black_fill_test.cc
test/dcp_subtitle_test.cc
test/ffmpeg_decoder_sequential_test.cc
test/ffmpeg_pts_offset_test.cc
test/frame_rate_test.cc
test/isdcf_name_test.cc
test/recover_test.cc
test/reels_test.cc
test/scaling_test.cc
test/seek_zero_test.cc
test/srt_subtitle_test.cc
test/threed_test.cc
test/time_calculation_test.cc
test/video_content_scale_test.cc
test/xml_subtitle_test.cc

index 9a24a9188bfc708bc74e92d27f16f70f2acf7d32..fefb8bc16240cf0b80c9a5b4af35ffb7b91971cc 100644 (file)
@@ -147,7 +147,7 @@ AnalyseAudioJob::run ()
                */
                shared_ptr<const AudioContent> ac = _playlist->content().front()->audio;
                DCPOMATIC_ASSERT (ac);
-               _analysis->set_analysis_gain (ac->audio_gain ());
+               _analysis->set_analysis_gain (ac->gain ());
        }
 
        _analysis->write (_film->audio_analysis_path (_playlist));
index d99b01ce641abe8f75fc42009ebb8d9c97921083..e04468ba28f7e6868b854455a1259eb36c375f9f 100644 (file)
@@ -154,7 +154,7 @@ AudioAnalysis::gain_correction (shared_ptr<const Playlist> playlist)
                   what correction is now needed to make it look `right'.
                */
                DCPOMATIC_ASSERT (playlist->content().front()->audio);
-               return playlist->content().front()->audio->audio_gain() - analysis_gain().get ();
+               return playlist->content().front()->audio->gain() - analysis_gain().get ();
        }
 
        return 0.0f;
index 2832e257578ccad10f06714ea96cd201f9f8dceb..983d502b82434e943203c3282f73c83fa4e002f4 100644 (file)
@@ -44,15 +44,21 @@ using boost::dynamic_pointer_cast;
 using boost::optional;
 
 /** Something stream-related has changed */
+<<<<<<< 17dbd967c18aff2f3007eb86b5eee5b43f23bc4b
 int const AudioContentProperty::AUDIO_STREAMS = 200;
 int const AudioContentProperty::AUDIO_GAIN = 201;
 int const AudioContentProperty::AUDIO_DELAY = 202;
 int const AudioContentProperty::AUDIO_VIDEO_FRAME_RATE = 203;
+=======
+int const AudioContentProperty::STREAMS = 200;
+int const AudioContentProperty::GAIN = 201;
+int const AudioContentProperty::DELAY = 202;
+>>>>>>> Rename video/audio/subtitle part methods.
 
 AudioContent::AudioContent (Content* parent, shared_ptr<const Film> film)
        : ContentPart (parent, film)
-       , _audio_gain (0)
-       , _audio_delay (Config::instance()->default_audio_delay ())
+       , _gain (0)
+       , _delay (Config::instance()->default_audio_delay ())
 {
 
 }
@@ -60,9 +66,9 @@ AudioContent::AudioContent (Content* parent, shared_ptr<const Film> film)
 AudioContent::AudioContent (Content* parent, shared_ptr<const Film> film, cxml::ConstNodePtr node)
        : ContentPart (parent, film)
 {
-       _audio_gain = node->number_child<double> ("AudioGain");
-       _audio_delay = node->number_child<int> ("AudioDelay");
-       _audio_video_frame_rate = node->optional_number_child<double> ("AudioVideoFrameRate");
+       _gain = node->number_child<double> ("AudioGain");
+       _delay = node->number_child<int> ("AudioDelay");
+       _video_frame_rate = node->optional_number_child<double> ("AudioVideoFrameRate");
 }
 
 AudioContent::AudioContent (Content* parent, shared_ptr<const Film> film, vector<shared_ptr<Content> > c)
@@ -72,11 +78,11 @@ AudioContent::AudioContent (Content* parent, shared_ptr<const Film> film, vector
        DCPOMATIC_ASSERT (ref);
 
        for (size_t i = 1; i < c.size(); ++i) {
-               if (c[i]->audio->audio_gain() != ref->audio_gain()) {
+               if (c[i]->audio->gain() != ref->gain()) {
                        throw JoinError (_("Content to be joined must have the same audio gain."));
                }
 
-               if (c[i]->audio->audio_delay() != ref->audio_delay()) {
+               if (c[i]->audio->delay() != ref->delay()) {
                        throw JoinError (_("Content to be joined must have the same audio delay."));
                }
 
@@ -85,10 +91,10 @@ AudioContent::AudioContent (Content* parent, shared_ptr<const Film> film, vector
                }
        }
 
-       _audio_gain = ref->audio_gain ();
-       _audio_delay = ref->audio_delay ();
+       _gain = ref->audio_gain ();
+       _delay = ref->audio_delay ();
        /* Preserve the optional<> part of this */
-       _audio_video_frame_rate = ref->_audio_video_frame_rate;
+       _video_frame_rate = ref->_audio_video_frame_rate;
        _streams = ref->streams ();
 }
 
@@ -96,23 +102,23 @@ void
 AudioContent::as_xml (xmlpp::Node* node) const
 {
        boost::mutex::scoped_lock lm (_mutex);
-       node->add_child("AudioGain")->add_child_text (raw_convert<string> (_audio_gain));
-       node->add_child("AudioDelay")->add_child_text (raw_convert<string> (_audio_delay));
+       node->add_child("AudioGain")->add_child_text (raw_convert<string> (_gain));
+       node->add_child("AudioDelay")->add_child_text (raw_convert<string> (_delay));
        if (_audio_video_frame_rate) {
                node->add_child("AudioVideoFrameRate")->add_child_text (raw_convert<string> (_audio_video_frame_rate.get()));
        }
 }
 
 void
-AudioContent::set_audio_gain (double g)
+AudioContent::set_gain (double g)
 {
-       maybe_set (_audio_gain, g, AudioContentProperty::AUDIO_GAIN);
+       maybe_set (_gain, g, AudioContentProperty::GAIN);
 }
 
 void
-AudioContent::set_audio_delay (int d)
+AudioContent::set_delay (int d)
 {
-       maybe_set (_audio_delay, d, AudioContentProperty::AUDIO_DELAY);
+       maybe_set (_delay, d, AudioContentProperty::DELAY);
 }
 
 string
@@ -127,7 +133,7 @@ AudioContent::technical_summary () const
 }
 
 void
-AudioContent::set_audio_mapping (AudioMapping mapping)
+AudioContent::set_mapping (AudioMapping mapping)
 {
        int c = 0;
        BOOST_FOREACH (AudioStreamPtr i, streams ()) {
@@ -141,11 +147,11 @@ AudioContent::set_audio_mapping (AudioMapping mapping)
                i->set_mapping (stream_mapping);
        }
 
-       _parent->signal_changed (AudioContentProperty::AUDIO_STREAMS);
+       _parent->signal_changed (AudioContentProperty::STREAMS);
 }
 
 AudioMapping
-AudioContent::audio_mapping () const
+AudioContent::mapping () const
 {
        int channels = 0;
        BOOST_FOREACH (AudioStreamPtr i, streams ()) {
@@ -177,7 +183,7 @@ AudioContent::audio_mapping () const
  *  that it is in sync with the active video content at its start time.
  */
 int
-AudioContent::resampled_audio_frame_rate () const
+AudioContent::resampled_frame_rate () const
 {
        /* Resample to a DCI-approved sample rate */
        double t = has_rate_above_48k() ? 96000 : 48000;
@@ -218,7 +224,7 @@ AudioContent::processing_description () const
 
        optional<int> common_frame_rate;
        BOOST_FOREACH (AudioStreamPtr i, streams()) {
-               if (i->frame_rate() != resampled_audio_frame_rate()) {
+               if (i->frame_rate() != resampled_frame_rate()) {
                        resampled = true;
                } else {
                        not_resampled = true;
@@ -235,14 +241,14 @@ AudioContent::processing_description () const
        }
 
        if (not_resampled && resampled) {
-               return String::compose (_("Some audio will be resampled to %1kHz"), resampled_audio_frame_rate ());
+               return String::compose (_("Some audio will be resampled to %1kHz"), resampled_frame_rate ());
        }
 
        if (!not_resampled && resampled) {
                if (same) {
-                       return String::compose (_("Audio will be resampled from %1kHz to %2kHz"), common_frame_rate.get(), resampled_audio_frame_rate ());
+                       return String::compose (_("Audio will be resampled from %1kHz to %2kHz"), common_frame_rate.get(), resampled_frame_rate ());
                } else {
-                       return String::compose (_("Audio will be resampled to %1kHz"), resampled_audio_frame_rate ());
+                       return String::compose (_("Audio will be resampled to %1kHz"), resampled_frame_rate ());
                }
        }
 
@@ -264,7 +270,7 @@ AudioContent::has_rate_above_48k () const
 
 /** @return User-visible names of each of our audio channels */
 vector<string>
-AudioContent::audio_channel_names () const
+AudioContent::channel_names () const
 {
        vector<string> n;
 
@@ -312,7 +318,7 @@ AudioContent::add_properties (list<UserProperty>& p) const
                        );
        }
 
-       p.push_back (UserProperty (_("Audio"), _("DCP frame rate"), resampled_audio_frame_rate (), _("Hz")));
+       p.push_back (UserProperty (_("Audio"), _("DCP frame rate"), resampled_frame_rate (), _("Hz")));
        p.push_back (UserProperty (_("Length"), _("Full length in video frames at DCP rate"), c.frames_round (frc.dcp)));
 
        if (stream) {
@@ -320,7 +326,7 @@ AudioContent::add_properties (list<UserProperty>& p) const
                        UserProperty (
                                _("Length"),
                                _("Full length in audio frames at DCP rate"),
-                               c.frames_round (resampled_audio_frame_rate ())
+                               c.frames_round (resampled_frame_rate ())
                                )
                        );
        }
@@ -360,7 +366,7 @@ AudioContent::set_streams (vector<AudioStreamPtr> streams)
                _streams = streams;
        }
 
-       _parent->signal_changed (AudioContentProperty::AUDIO_STREAMS);
+       _parent->signal_changed (AudioContentProperty::STREAMS);
 }
 
 AudioStreamPtr
@@ -379,7 +385,7 @@ AudioContent::add_stream (AudioStreamPtr stream)
                _streams.push_back (stream);
        }
 
-       _parent->signal_changed (AudioContentProperty::AUDIO_STREAMS);
+       _parent->signal_changed (AudioContentProperty::STREAMS);
 }
 
 void
@@ -391,5 +397,5 @@ AudioContent::set_stream (AudioStreamPtr stream)
                _streams.push_back (stream);
        }
 
-       _parent->signal_changed (AudioContentProperty::AUDIO_STREAMS);
+       _parent->signal_changed (AudioContentProperty::STREAMS);
 }
index 3aa9678b01119f5e3499ea94bc7c83e5ca103376..09e7a0d12d1978812be8268b7991a59143d58854 100644 (file)
 class AudioContentProperty
 {
 public:
+<<<<<<< 17dbd967c18aff2f3007eb86b5eee5b43f23bc4b
        static int const AUDIO_STREAMS;
        static int const AUDIO_GAIN;
        static int const AUDIO_DELAY;
        static int const AUDIO_VIDEO_FRAME_RATE;
+=======
+       static int const STREAMS;
+       static int const GAIN;
+       static int const DELAY;
+>>>>>>> Rename video/audio/subtitle part methods.
 };
 
 class AudioContent : public ContentPart
@@ -50,23 +56,23 @@ public:
        void as_xml (xmlpp::Node *) const;
        std::string technical_summary () const;
 
-       AudioMapping audio_mapping () const;
-       void set_audio_mapping (AudioMapping);
-       int resampled_audio_frame_rate () const;
+       AudioMapping mapping () const;
+       void set_mapping (AudioMapping);
+       int resampled_frame_rate () const;
        bool has_rate_above_48k () const;
-       std::vector<std::string> audio_channel_names () const;
+       std::vector<std::string> channel_names () const;
 
-       void set_audio_gain (double);
-       void set_audio_delay (int);
+       void set_gain (double);
+       void set_delay (int);
 
-       double audio_gain () const {
+       double gain () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _audio_gain;
+               return _gain;
        }
 
-       int audio_delay () const {
+       int delay () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _audio_delay;
+               return _delay;
        }
 
        double audio_video_frame_rate () const;
@@ -89,10 +95,10 @@ public:
 private:
 
        /** Gain to apply to audio in dB */
-       double _audio_gain;
+       double _gain;
        /** Delay to apply to audio (positive moves audio later) in milliseconds */
-       int _audio_delay;
-       boost::optional<double> _audio_video_frame_rate;
+       int _delay;
+       boost::optional<double> _video_frame_rate;
        std::vector<AudioStreamPtr> _streams;
 };
 
index 7037d9f47c21eb6a99bd8eb0fbbcc52df9bdaf24..cd2e3a38811d8fe9794564aa17ed7b72c7c45dbe 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -45,8 +45,8 @@ AudioDecoderStream::AudioDecoderStream (shared_ptr<const AudioContent> content,
        , _decoder (decoder)
        , _log (log)
 {
-       if (content->resampled_audio_frame_rate() != _stream->frame_rate() && _stream->channels() > 0) {
-               _resampler.reset (new Resampler (_stream->frame_rate(), content->resampled_audio_frame_rate(), _stream->channels (), decoder->fast ()));
+       if (content->resampled_frame_rate() != _stream->frame_rate() && _stream->channels() > 0) {
+               _resampler.reset (new Resampler (_stream->frame_rate(), content->resampled_frame_rate(), _stream->channels (), decoder->fast ()));
        }
 
        reset_decoded ();
@@ -69,7 +69,7 @@ AudioDecoderStream::get (Frame frame, Frame length, bool accurate)
 
        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);
+               seek (ContentTime::from_frames (frame, _content->resampled_frame_rate()), accurate);
        }
 
        /* Offset of the data that we want from the start of _decoded.audio
@@ -148,7 +148,7 @@ AudioDecoderStream::audio (shared_ptr<const AudioBuffers> data, ContentTime time
                data = _resampler->run (data);
        }
 
-       Frame const frame_rate = _content->resampled_audio_frame_rate ();
+       Frame const frame_rate = _content->resampled_frame_rate ();
 
        if (_seek_reference) {
                /* We've had an accurate seek and now we're seeing some data */
@@ -217,7 +217,7 @@ AudioDecoderStream::add (shared_ptr<const AudioBuffers> data)
        _position = _position.get() + data->frames ();
 
        /* Limit the amount of data we keep in case nobody is asking for it */
-       int const max_frames = _content->resampled_audio_frame_rate () * 10;
+       int const max_frames = _content->resampled_frame_rate () * 10;
        if (_decoded.audio->frames() > max_frames) {
                int const to_remove = _decoded.audio->frames() - max_frames;
                _decoded.frame += to_remove;
index cfd19fe31a972cb530c22112b98a2b777ac6d4e2..d47c5227306b0587ac523e932e6f04962a0d3756 100644 (file)
@@ -116,7 +116,7 @@ DCPContent::examine (shared_ptr<Job> job)
        Content::examine (job);
 
        shared_ptr<DCPExaminer> examiner (new DCPExaminer (shared_from_this ()));
-       video->take_from_video_examiner (examiner);
+       video->take_from_examiner (examiner);
        set_default_colour_conversion ();
 
        {
@@ -129,7 +129,7 @@ DCPContent::examine (shared_ptr<Job> job)
                as->set_mapping (m);
        }
 
-       signal_changed (AudioContentProperty::AUDIO_STREAMS);
+       signal_changed (AudioContentProperty::STREAMS);
 
        {
                boost::mutex::scoped_lock lm (_mutex);
@@ -187,8 +187,8 @@ DCPContent::as_xml (xmlpp::Node* node) const
 DCPTime
 DCPContent::full_length () const
 {
-       FrameRateChange const frc (video->video_frame_rate (), film()->video_frame_rate ());
-       return DCPTime::from_frames (llrint (video->video_length () * frc.factor ()), film()->video_frame_rate ());
+       FrameRateChange const frc (video->frame_rate (), film()->video_frame_rate ());
+       return DCPTime::from_frames (llrint (video->length () * frc.factor ()), film()->video_frame_rate ());
 }
 
 string
@@ -358,7 +358,7 @@ DCPContent::can_reference_subtitle (list<string>& why_not) const
 void
 DCPContent::changed (int property)
 {
-       if (property == VideoContentProperty::VIDEO_FRAME_RATE && subtitle) {
-               subtitle->set_subtitle_video_frame_rate (video->video_frame_rate ());
+       if (property == VideoContentProperty::FRAME_RATE && subtitle) {
+               subtitle->set_video_frame_rate (video->frame_rate ());
        }
 }
index 4e28dc7582bea298c5641b054ad4ee585069460e..1c25587e0aab2771255b0852978ee509896fd5de 100644 (file)
@@ -74,7 +74,7 @@ DCPDecoder::pass (PassReason reason, bool)
                ++i;
        }
 
-       double const vfr = _dcp_content->video->video_frame_rate ();
+       double const vfr = _dcp_content->video->frame_rate ();
 
        /* Frame within the (played part of the) reel that is coming up next */
        int64_t const frame = _next.frames_round (vfr);
@@ -157,8 +157,8 @@ DCPDecoder::seek (ContentTime t, bool accurate)
        SubtitleDecoder::seek (t, accurate);
 
        _reel = _reels.begin ();
-       while (_reel != _reels.end() && t >= ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->video->video_frame_rate ())) {
-               t -= ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->video->video_frame_rate ());
+       while (_reel != _reels.end() && t >= ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->video->frame_rate ())) {
+               t -= ContentTime::from_frames ((*_reel)->main_picture()->duration(), _dcp_content->video->frame_rate ());
                ++_reel;
        }
 
@@ -178,7 +178,7 @@ DCPDecoder::text_subtitles_during (ContentTimePeriod period, bool starting) cons
        /* XXX: inefficient */
 
        list<ContentTimePeriod> ctp;
-       double const vfr = _dcp_content->video->video_frame_rate ();
+       double const vfr = _dcp_content->video->frame_rate ();
 
        BOOST_FOREACH (shared_ptr<dcp::Reel> r, _reels) {
                if (!r->main_subtitle ()) {
index 3feb8947abc13261fad49575fffbff8325bd9142..eabcaaafe14680c5054c6bd29769bd37a4534a2d 100644 (file)
@@ -56,18 +56,18 @@ DCPSubtitleContent::examine (shared_ptr<Job> job)
        shared_ptr<dcp::SubtitleAsset> sc = load (path (0));
 
        /* Default to turning these subtitles on */
-       subtitle->set_use_subtitles (true);
+       subtitle->set_use (true);
 
        boost::mutex::scoped_lock lm (_mutex);
 
        shared_ptr<dcp::InteropSubtitleAsset> iop = dynamic_pointer_cast<dcp::InteropSubtitleAsset> (sc);
        if (iop) {
-               subtitle->set_subtitle_language (iop->language ());
+               subtitle->set_language (iop->language ());
        }
        shared_ptr<dcp::SMPTESubtitleAsset> smpte = dynamic_pointer_cast<dcp::SMPTESubtitleAsset> (sc);
        if (smpte) {
-               subtitle->set_subtitle_language (smpte->language().get_value_or (""));
-               subtitle->set_subtitle_video_frame_rate (smpte->edit_rate().numerator);
+               subtitle->set_language (smpte->language().get_value_or (""));
+               subtitle->set_video_frame_rate (smpte->edit_rate().numerator);
        }
 
        _length = ContentTime::from_seconds (sc->latest_subtitle_out().as_seconds ());
@@ -80,7 +80,7 @@ DCPSubtitleContent::examine (shared_ptr<Job> job)
 DCPTime
 DCPSubtitleContent::full_length () const
 {
-       FrameRateChange const frc (subtitle->subtitle_video_frame_rate(), film()->video_frame_rate());
+       FrameRateChange const frc (subtitle->video_frame_rate(), film()->video_frame_rate());
        return DCPTime (_length, frc);
 }
 
index c67d643a5980ea4cf03ae579479b2f8019f39933..d9941685d08d43cbbf6eb523c34d8049aeaeb2af 100644 (file)
@@ -133,7 +133,7 @@ FFmpegContent::FFmpegContent (shared_ptr<const Film> film, vector<boost::shared_
 
        for (size_t i = 0; i < c.size(); ++i) {
                shared_ptr<FFmpegContent> fc = dynamic_pointer_cast<FFmpegContent> (c[i]);
-               if (fc->subtitle->use_subtitles() && *(fc->_subtitle_stream.get()) != *(ref->_subtitle_stream.get())) {
+               if (fc->subtitle->use() && *(fc->_subtitle_stream.get()) != *(ref->_subtitle_stream.get())) {
                        throw JoinError (_("Content to be joined must use the same subtitle stream."));
                }
        }
@@ -201,7 +201,7 @@ FFmpegContent::examine (shared_ptr<Job> job)
        Content::examine (job);
 
        shared_ptr<FFmpegExaminer> examiner (new FFmpegExaminer (shared_from_this (), job));
-       video->take_from_video_examiner (examiner);
+       video->take_from_examiner (examiner);
        set_default_colour_conversion ();
 
        {
@@ -296,8 +296,8 @@ operator!= (FFmpegStream const & a, FFmpegStream const & b)
 DCPTime
 FFmpegContent::full_length () const
 {
-       FrameRateChange const frc (video->video_frame_rate (), film()->video_frame_rate ());
-       return DCPTime::from_frames (llrint (video->video_length_after_3d_combine() * frc.factor()), film()->video_frame_rate());
+       FrameRateChange const frc (video->frame_rate (), film()->video_frame_rate ());
+       return DCPTime::from_frames (llrint (video->length_after_3d_combine() * frc.factor()), film()->video_frame_rate());
 }
 
 void
@@ -382,7 +382,7 @@ FFmpegContent::has_text_subtitles () const
 void
 FFmpegContent::set_default_colour_conversion ()
 {
-       dcp::Size const s = video->video_size ();
+       dcp::Size const s = video->size ();
 
        boost::mutex::scoped_lock lm (_mutex);
 
@@ -536,7 +536,7 @@ FFmpegContent::signal_subtitle_stream_changed ()
 void
 FFmpegContent::changed (int property)
 {
-       if (property == VideoContentProperty::VIDEO_FRAME_RATE && subtitle) {
-               subtitle->set_subtitle_video_frame_rate (video->video_frame_rate ());
+       if (property == VideoContentProperty::FRAME_RATE && subtitle) {
+               subtitle->set_video_frame_rate (video->frame_rate ());
        }
 }
index 8e4a1cc23715ed02950c30b92e83515c1a24a9ab..57327b63d8a070c6259493ad8d34a852b072832f 100644 (file)
@@ -77,7 +77,7 @@ FFmpegDecoder::FFmpegDecoder (shared_ptr<const FFmpegContent> c, shared_ptr<Log>
        , SubtitleDecoder (c->subtitle)
        , FFmpeg (c)
        , _log (log)
-       , _pts_offset (pts_offset (c->ffmpeg_audio_streams(), c->first_video(), c->video->video_frame_rate()))
+       , _pts_offset (pts_offset (c->ffmpeg_audio_streams(), c->first_video(), c->video->frame_rate()))
 {
 }
 
@@ -413,7 +413,7 @@ FFmpegDecoder::decode_video_packet ()
                        double const pts = i->second * av_q2d (_format_context->streams[_video_stream]->time_base) + _pts_offset.seconds ();
                        video (
                                shared_ptr<ImageProxy> (new RawImageProxy (image)),
-                               llrint (pts * _ffmpeg_content->video->video_frame_rate ())
+                               llrint (pts * _ffmpeg_content->video->frame_rate ())
                                );
                } else {
                        LOG_WARNING_NC ("Dropping frame without PTS");
@@ -547,7 +547,7 @@ FFmpegDecoder::decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTimeP
                out_p += image->stride()[0] / sizeof (uint32_t);
        }
 
-       dcp::Size const vs = _ffmpeg_content->video->video_size ();
+       dcp::Size const vs = _ffmpeg_content->video->size ();
        dcpomatic::Rect<double> const scaled_rect (
                static_cast<double> (rect->x) / vs.width,
                static_cast<double> (rect->y) / vs.height,
index 49a0a9b13c0a41ab62045445291e53415ac46146..3d5d625e18326f4de7e0e3bde33aeed9985a8730 100644 (file)
@@ -250,7 +250,7 @@ Film::audio_analysis_path (shared_ptr<const Playlist> playlist) const
                }
 
                digester.add (i->digest ());
-               digester.add (i->audio->audio_mapping().digest ());
+               digester.add (i->audio->mapping().digest ());
                if (playlist->content().size() != 1) {
                        /* Analyses should be considered equal regardless of gain
                           if they were made from just one piece of content.  This
@@ -258,7 +258,7 @@ Film::audio_analysis_path (shared_ptr<const Playlist> playlist) const
                           analysis at the plotting stage rather than having to
                           recompute it.
                        */
-                       digester.add (i->audio->audio_gain ());
+                       digester.add (i->audio->gain ());
                }
        }
 
@@ -620,7 +620,7 @@ Film::isdcf_name (bool if_created_now) const
                                if (i->video->scale().ratio ()) {
                                        content_ratio = i->video->scale().ratio ();
                                } else {
-                                       content_ratio = Ratio::from_ratio (i->video->video_size().ratio ());
+                                       content_ratio = Ratio::from_ratio (i->video->size().ratio ());
                                }
                                break;
                        }
@@ -641,7 +641,7 @@ Film::isdcf_name (bool if_created_now) const
                                        continue;
                                }
 
-                               if (i->subtitle->use_subtitles() && !i->subtitle->burn_subtitles()) {
+                               if (i->subtitle->use() && !i->subtitle->burn()) {
                                        burnt_in = false;
                                }
                        }
@@ -1096,9 +1096,9 @@ Film::playlist_content_changed (weak_ptr<Content> c, int p, bool frequent)
 {
        _dirty = true;
 
-       if (p == VideoContentProperty::VIDEO_FRAME_RATE) {
+       if (p == VideoContentProperty::FRAME_RATE) {
                set_video_frame_rate (_playlist->best_dcp_frame_rate ());
-       } else if (p == AudioContentProperty::AUDIO_STREAMS) {
+       } else if (p == AudioContentProperty::STREAMS) {
                signal_changed (NAME);
        }
 
@@ -1268,7 +1268,7 @@ Film::subtitle_language () const
        ContentList cl = content ();
        BOOST_FOREACH (shared_ptr<Content>& c, cl) {
                if (c->subtitle) {
-                       languages.insert (c->subtitle->subtitle_language ());
+                       languages.insert (c->subtitle->language ());
                }
        }
 
index 231eb9f8c163c117c5b88941f9c52350613e1554..29af451b7edcaa03ca8a543b34a95c0b83b27098 100644 (file)
@@ -115,7 +115,7 @@ ImageContent::examine (shared_ptr<Job> job)
        DCPOMATIC_ASSERT (film);
 
        shared_ptr<ImageExaminer> examiner (new ImageExaminer (film, shared_from_this(), job));
-       video->take_from_video_examiner (examiner);
+       video->take_from_examiner (examiner);
        set_default_colour_conversion ();
 }
 
@@ -124,8 +124,8 @@ ImageContent::full_length () const
 {
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
-       FrameRateChange const frc (video->video_frame_rate(), film->video_frame_rate());
-       return DCPTime::from_frames (llrint (video->video_length_after_3d_combine() * frc.factor ()), film->video_frame_rate ());
+       FrameRateChange const frc (video->frame_rate(), film->video_frame_rate());
+       return DCPTime::from_frames (llrint (video->length_after_3d_combine() * frc.factor ()), film->video_frame_rate ());
 }
 
 string
@@ -134,7 +134,7 @@ ImageContent::identifier () const
        SafeStringStream s;
        s << Content::identifier();
        s << "_" << video->identifier ();
-       s << "_" << video->video_length();
+       s << "_" << video->length();
        return s.str ();
 }
 
index e26574f610ab2a19868037953cc684906570f229..c3a11ce971f3895aa3b6ccc8407105dff9757151 100644 (file)
@@ -45,7 +45,7 @@ ImageDecoder::ImageDecoder (shared_ptr<const ImageContent> c, shared_ptr<Log> lo
 bool
 ImageDecoder::pass (PassReason, bool)
 {
-       if (_video_position >= _image_content->video->video_length()) {
+       if (_video_position >= _image_content->video->length()) {
                return true;
        }
 
@@ -56,7 +56,7 @@ ImageDecoder::pass (PassReason, bool)
                        /* We can't extract image size from a JPEG2000 codestream without decoding it,
                           so pass in the image content's size here.
                        */
-                       _image.reset (new J2KImageProxy (path, _image_content->video->video_size ()));
+                       _image.reset (new J2KImageProxy (path, _image_content->video->size ()));
                } else {
                        _image.reset (new MagickImageProxy (path));
                }
@@ -71,5 +71,5 @@ void
 ImageDecoder::seek (ContentTime time, bool accurate)
 {
        VideoDecoder::seek (time, accurate);
-       _video_position = time.frames_round (_image_content->video->video_frame_rate ());
+       _video_position = time.frames_round (_image_content->video->frame_rate ());
 }
index 0102754292f09c8edb1c8c1738a481c04a965b73..8e15a9d4836b8aee38c2eb0c3893587c8eb1be02 100644 (file)
@@ -85,9 +85,9 @@ ImageExaminer::video_size () const
 optional<double>
 ImageExaminer::video_frame_rate () const
 {
-       if (_image_content->video->has_own_video_frame_rate()) {
+       if (_image_content->video->has_own_frame_rate()) {
                /* The content already knows what frame rate it should be */
-               return _image_content->video->video_frame_rate();
+               return _image_content->video->frame_rate();
        }
 
        /* Don't know */
index ce048ed79b19bb8138e803305edc03cd89220bac..d37910ad8fdcd3dd816cb165e9ccef72a7c91f84 100644 (file)
@@ -114,13 +114,13 @@ Player::setup_pieces ()
                shared_ptr<const FFmpegContent> fc = dynamic_pointer_cast<const FFmpegContent> (i);
                if (fc) {
                        decoder.reset (new FFmpegDecoder (fc, _film->log(), _fast));
-                       frc = FrameRateChange (fc->video->video_frame_rate(), _film->video_frame_rate());
+                       frc = FrameRateChange (fc->video->frame_rate(), _film->video_frame_rate());
                }
 
                shared_ptr<const DCPContent> dc = dynamic_pointer_cast<const DCPContent> (i);
                if (dc) {
                        decoder.reset (new DCPDecoder (dc, _film->log(), _fast));
-                       frc = FrameRateChange (dc->video->video_frame_rate(), _film->video_frame_rate());
+                       frc = FrameRateChange (dc->video->frame_rate(), _film->video_frame_rate());
                }
 
                /* ImageContent */
@@ -138,7 +138,7 @@ Player::setup_pieces ()
                                decoder.reset (new ImageDecoder (ic, _film->log()));
                        }
 
-                       frc = FrameRateChange (ic->video->video_frame_rate(), _film->video_frame_rate());
+                       frc = FrameRateChange (ic->video->frame_rate(), _film->video_frame_rate());
                }
 
                /* SndfileContent */
@@ -162,7 +162,7 @@ Player::setup_pieces ()
                        }
 
                        if (best_overlap) {
-                               frc = FrameRateChange (best_overlap->video->video_frame_rate(), _film->video_frame_rate ());
+                               frc = FrameRateChange (best_overlap->video->frame_rate(), _film->video_frame_rate ());
                        } else {
                                /* No video overlap; e.g. if the DCP is just audio */
                                frc = FrameRateChange (_film->video_frame_rate(), _film->video_frame_rate ());
@@ -178,14 +178,14 @@ Player::setup_pieces ()
                shared_ptr<const TextSubtitleContent> rc = dynamic_pointer_cast<const TextSubtitleContent> (i);
                if (rc) {
                        decoder.reset (new TextSubtitleDecoder (rc));
-                       frc = FrameRateChange (rc->subtitle->subtitle_video_frame_rate(), _film->video_frame_rate());
+                       frc = FrameRateChange (rc->subtitle->video_frame_rate(), _film->video_frame_rate());
                }
 
                /* DCPSubtitleContent */
                shared_ptr<const DCPSubtitleContent> dsc = dynamic_pointer_cast<const DCPSubtitleContent> (i);
                if (dsc) {
                        decoder.reset (new DCPSubtitleDecoder (dsc));
-                       frc = FrameRateChange (dsc->subtitle->subtitle_video_frame_rate(), _film->video_frame_rate());
+                       frc = FrameRateChange (dsc->subtitle->video_frame_rate(), _film->video_frame_rate());
                }
 
                shared_ptr<VideoDecoder> vd = dynamic_pointer_cast<VideoDecoder> (decoder);
@@ -218,11 +218,11 @@ Player::playlist_content_changed (weak_ptr<Content> w, int property, bool freque
                property == ContentProperty::TRIM_START ||
                property == ContentProperty::TRIM_END ||
                property == ContentProperty::PATH ||
-               property == VideoContentProperty::VIDEO_FRAME_TYPE ||
+               property == VideoContentProperty::FRAME_TYPE ||
                property == DCPContentProperty::CAN_BE_PLAYED ||
-               property == SubtitleContentProperty::SUBTITLE_COLOUR ||
-               property == SubtitleContentProperty::SUBTITLE_OUTLINE ||
-               property == SubtitleContentProperty::SUBTITLE_OUTLINE_COLOUR ||
+               property == SubtitleContentProperty::COLOUR ||
+               property == SubtitleContentProperty::OUTLINE ||
+               property == SubtitleContentProperty::OUTLINE_COLOUR ||
                property == FFmpegContentProperty::SUBTITLE_STREAM
                ) {
 
@@ -230,17 +230,17 @@ Player::playlist_content_changed (weak_ptr<Content> w, int property, bool freque
                Changed (frequent);
 
        } else if (
-               property == SubtitleContentProperty::USE_SUBTITLES ||
-               property == SubtitleContentProperty::SUBTITLE_X_OFFSET ||
-               property == SubtitleContentProperty::SUBTITLE_Y_OFFSET ||
-               property == SubtitleContentProperty::SUBTITLE_X_SCALE ||
-               property == SubtitleContentProperty::SUBTITLE_Y_SCALE ||
+               property == SubtitleContentProperty::USE ||
+               property == SubtitleContentProperty::X_OFFSET ||
+               property == SubtitleContentProperty::Y_OFFSET ||
+               property == SubtitleContentProperty::X_SCALE ||
+               property == SubtitleContentProperty::Y_SCALE ||
                property == SubtitleContentProperty::FONTS ||
-               property == VideoContentProperty::VIDEO_CROP ||
-               property == VideoContentProperty::VIDEO_SCALE ||
-               property == VideoContentProperty::VIDEO_FRAME_RATE ||
-               property == VideoContentProperty::VIDEO_FADE_IN ||
-               property == VideoContentProperty::VIDEO_FADE_OUT ||
+               property == VideoContentProperty::CROP ||
+               property == VideoContentProperty::SCALE ||
+               property == VideoContentProperty::FRAME_RATE ||
+               property == VideoContentProperty::FADE_IN ||
+               property == VideoContentProperty::FADE_OUT ||
                property == VideoContentProperty::COLOUR_CONVERSION
                ) {
 
@@ -397,7 +397,7 @@ Player::get_video (DCPTime time, bool accurate)
        } else {
                /* Some video content at this time */
                shared_ptr<Piece> last = *(ov.rbegin ());
-               VideoFrameType const last_type = last->content->video->video_frame_type ();
+               VideoFrameType const last_type = last->content->video->frame_type ();
 
                /* Get video from appropriate piece(s) */
                BOOST_FOREACH (shared_ptr<Piece> piece, ov) {
@@ -414,8 +414,8 @@ Player::get_video (DCPTime time, bool accurate)
                                /* always use the last video */
                                piece == last ||
                                /* with a corresponding L/R eye if appropriate */
-                               (last_type == VIDEO_FRAME_TYPE_3D_LEFT && piece->content->video->video_frame_type() == VIDEO_FRAME_TYPE_3D_RIGHT) ||
-                               (last_type == VIDEO_FRAME_TYPE_3D_RIGHT && piece->content->video->video_frame_type() == VIDEO_FRAME_TYPE_3D_LEFT);
+                               (last_type == VIDEO_FRAME_TYPE_3D_LEFT && piece->content->video->frame_type() == VIDEO_FRAME_TYPE_3D_RIGHT) ||
+                               (last_type == VIDEO_FRAME_TYPE_3D_RIGHT && piece->content->video->frame_type() == VIDEO_FRAME_TYPE_3D_LEFT);
 
                        if (use) {
                                /* We want to use this piece */
@@ -499,7 +499,7 @@ Player::get_audio (DCPTime time, DCPTime length, bool accurate)
                DCPOMATIC_ASSERT (decoder);
 
                /* The time that we should request from the content */
-               DCPTime request = time - DCPTime::from_seconds (i->content->audio->audio_delay() / 1000.0);
+               DCPTime request = time - DCPTime::from_seconds (i->content->audio->delay() / 1000.0);
                Frame request_frames = length_frames;
                DCPTime offset;
                if (request < DCPTime ()) {
@@ -527,9 +527,9 @@ Player::get_audio (DCPTime time, DCPTime length, bool accurate)
                        ContentAudio all = decoder->get_audio (j, content_frame, request_frames, accurate);
 
                        /* Gain */
-                       if (i->content->audio->audio_gain() != 0) {
+                       if (i->content->audio->gain() != 0) {
                                shared_ptr<AudioBuffers> gain (new AudioBuffers (all.audio));
-                               gain->apply_gain (i->content->audio->audio_gain ());
+                               gain->apply_gain (i->content->audio->gain ());
                                all.audio = gain;
                        }
 
@@ -628,7 +628,7 @@ Player::get_subtitles (DCPTime time, DCPTime length, bool starting, bool burnt,
        PlayerSubtitles ps (time, length);
 
        for (list<shared_ptr<Piece> >::const_iterator j = subs.begin(); j != subs.end(); ++j) {
-               if (!(*j)->content->subtitle->use_subtitles () || (!_always_burn_subtitles && (burnt != (*j)->content->subtitle->burn_subtitles ()))) {
+               if (!(*j)->content->subtitle->use () || (!_always_burn_subtitles && (burnt != (*j)->content->subtitle->burn ()))) {
                        continue;
                }
 
@@ -646,16 +646,16 @@ Player::get_subtitles (DCPTime time, DCPTime length, bool starting, bool burnt,
                for (list<ContentImageSubtitle>::iterator i = image.begin(); i != image.end(); ++i) {
 
                        /* Apply content's subtitle offsets */
-                       i->sub.rectangle.x += (*j)->content->subtitle->subtitle_x_offset ();
-                       i->sub.rectangle.y += (*j)->content->subtitle->subtitle_y_offset ();
+                       i->sub.rectangle.x += (*j)->content->subtitle->x_offset ();
+                       i->sub.rectangle.y += (*j)->content->subtitle->y_offset ();
 
                        /* Apply content's subtitle scale */
-                       i->sub.rectangle.width *= (*j)->content->subtitle->subtitle_x_scale ();
-                       i->sub.rectangle.height *= (*j)->content->subtitle->subtitle_y_scale ();
+                       i->sub.rectangle.width *= (*j)->content->subtitle->x_scale ();
+                       i->sub.rectangle.height *= (*j)->content->subtitle->y_scale ();
 
                        /* Apply a corrective translation to keep the subtitle centred after that scale */
-                       i->sub.rectangle.x -= i->sub.rectangle.width * ((*j)->content->subtitle->subtitle_x_scale() - 1);
-                       i->sub.rectangle.y -= i->sub.rectangle.height * ((*j)->content->subtitle->subtitle_y_scale() - 1);
+                       i->sub.rectangle.x -= i->sub.rectangle.width * ((*j)->content->subtitle->x_scale() - 1);
+                       i->sub.rectangle.y -= i->sub.rectangle.height * ((*j)->content->subtitle->y_scale() - 1);
 
                        ps.image.push_back (i->sub);
                }
@@ -663,10 +663,10 @@ Player::get_subtitles (DCPTime time, DCPTime length, bool starting, bool burnt,
                list<ContentTextSubtitle> text = subtitle_decoder->get_text_subtitles (ContentTimePeriod (from, to), starting, accurate);
                BOOST_FOREACH (ContentTextSubtitle& ts, text) {
                        BOOST_FOREACH (dcp::SubtitleString s, ts.subs) {
-                               s.set_h_position (s.h_position() + (*j)->content->subtitle->subtitle_x_offset ());
-                               s.set_v_position (s.v_position() + (*j)->content->subtitle->subtitle_y_offset ());
-                               float const xs = (*j)->content->subtitle->subtitle_x_scale();
-                               float const ys = (*j)->content->subtitle->subtitle_y_scale();
+                               s.set_h_position (s.h_position() + (*j)->content->subtitle->x_offset ());
+                               s.set_v_position (s.v_position() + (*j)->content->subtitle->y_offset ());
+                               float const xs = (*j)->content->subtitle->x_scale();
+                               float const ys = (*j)->content->subtitle->y_scale();
                                float size = s.size();
 
                                /* Adjust size to express the common part of the scaling;
index 092060fa0376a44f23403a7e296a600628bc1ece..24a38f2cda97c45d39d63150a2ce69ca43865223 100644 (file)
@@ -67,7 +67,7 @@ Playlist::~Playlist ()
 void
 Playlist::content_changed (weak_ptr<Content> content, int property, bool frequent)
 {
-       if (property == ContentProperty::LENGTH || property == VideoContentProperty::VIDEO_FRAME_TYPE) {
+       if (property == ContentProperty::LENGTH || property == VideoContentProperty::FRAME_TYPE) {
                /* Don't respond to position changes here, as:
                   - sequencing after earlier/later changes is handled by move_earlier/move_later
                   - any other position changes will be timeline drags which should not result in content
@@ -115,7 +115,7 @@ Playlist::maybe_sequence ()
                        continue;
                }
 
-               if (i->video->video_frame_type() == VIDEO_FRAME_TYPE_3D_RIGHT) {
+               if (i->video->frame_type() == VIDEO_FRAME_TYPE_3D_RIGHT) {
                        i->set_position (next_right);
                        next_right = i->end();
                } else {
@@ -150,7 +150,7 @@ Playlist::video_identifier () const
        string t;
 
        BOOST_FOREACH (shared_ptr<const Content> i, _content) {
-               if (i->video || (i->subtitle && i->subtitle->burn_subtitles())) {
+               if (i->video || (i->subtitle && i->subtitle->burn())) {
                        t += i->identifier ();
                }
        }
@@ -266,14 +266,14 @@ Playlist::best_dcp_frame_rate () const
 
                float this_error = 0;
                BOOST_FOREACH (shared_ptr<Content> j, _content) {
-                       if (!j->video || !j->video->has_own_video_frame_rate()) {
+                       if (!j->video || !j->video->has_own_frame_rate()) {
                                continue;
                        }
 
                        /* Best error for this content; we could use the content as-is or double its rate */
                        float best_error = min (
-                               float (fabs (i->source - j->video->video_frame_rate ())),
-                               float (fabs (i->source - j->video->video_frame_rate () * 2))
+                               float (fabs (i->source - j->video->frame_rate ())),
+                               float (fabs (i->source - j->video->frame_rate () * 2))
                                );
 
                        /* Use the largest difference between DCP and source as the "error" */
@@ -375,7 +375,7 @@ Playlist::active_frame_rate_change (DCPTime t, int dcp_video_frame_rate) const
                        /* This is the first piece of content (going backwards...) that starts before t,
                           so it's the active one.
                        */
-                       return FrameRateChange ((*i)->video->video_frame_rate(), dcp_video_frame_rate);
+                       return FrameRateChange ((*i)->video->frame_rate(), dcp_video_frame_rate);
                }
        }
 
index d023b27d611e351174e2151e6695e9db38b70c3d..ed7e67c3c5198bfa624772124ca03b9967364b8e 100644 (file)
@@ -113,7 +113,7 @@ SndfileContent::take_from_audio_examiner (shared_ptr<AudioExaminer> examiner)
                _audio_length = examiner->audio_length ();
        }
 
-       signal_changed (AudioContentProperty::AUDIO_STREAMS);
+       signal_changed (AudioContentProperty::STREAMS);
 }
 
 DCPTime
index 089e3a3fcaae3003c92883ef72d535496e48bfdc..2066793fb94e79b966d53aa73bc0c85c6f56558f 100644 (file)
@@ -39,27 +39,27 @@ using std::list;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
 
-int const SubtitleContentProperty::SUBTITLE_X_OFFSET = 500;
-int const SubtitleContentProperty::SUBTITLE_Y_OFFSET = 501;
-int const SubtitleContentProperty::SUBTITLE_X_SCALE = 502;
-int const SubtitleContentProperty::SUBTITLE_Y_SCALE = 503;
-int const SubtitleContentProperty::USE_SUBTITLES = 504;
-int const SubtitleContentProperty::BURN_SUBTITLES = 505;
-int const SubtitleContentProperty::SUBTITLE_LANGUAGE = 506;
+int const SubtitleContentProperty::X_OFFSET = 500;
+int const SubtitleContentProperty::Y_OFFSET = 501;
+int const SubtitleContentProperty::X_SCALE = 502;
+int const SubtitleContentProperty::Y_SCALE = 503;
+int const SubtitleContentProperty::USE = 504;
+int const SubtitleContentProperty::BURN = 505;
+int const SubtitleContentProperty::LANGUAGE = 506;
 int const SubtitleContentProperty::FONTS = 507;
-int const SubtitleContentProperty::SUBTITLE_VIDEO_FRAME_RATE = 508;
-int const SubtitleContentProperty::SUBTITLE_COLOUR = 509;
-int const SubtitleContentProperty::SUBTITLE_OUTLINE = 510;
-int const SubtitleContentProperty::SUBTITLE_OUTLINE_COLOUR = 511;
+int const SubtitleContentProperty::VIDEO_FRAME_RATE = 508;
+int const SubtitleContentProperty::COLOUR = 509;
+int const SubtitleContentProperty::OUTLINE = 510;
+int const SubtitleContentProperty::OUTLINE_COLOUR = 511;
 
 SubtitleContent::SubtitleContent (Content* parent, shared_ptr<const Film> film)
        : ContentPart (parent, film)
-       , _use_subtitles (false)
-       , _burn_subtitles (false)
-       , _subtitle_x_offset (0)
-       , _subtitle_y_offset (0)
-       , _subtitle_x_scale (1)
-       , _subtitle_y_scale (1)
+       , _use (false)
+       , _burn (false)
+       , _x_offset (0)
+       , _y_offset (0)
+       , _x_scale (1)
+       , _y_scale (1)
        , _colour (255, 255, 255)
        , _outline (false)
        , _outline_colour (0, 0, 0)
@@ -69,12 +69,12 @@ SubtitleContent::SubtitleContent (Content* parent, shared_ptr<const Film> film)
 
 SubtitleContent::SubtitleContent (Content* parent, shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
        : ContentPart (parent, film)
-       , _use_subtitles (false)
-       , _burn_subtitles (false)
-       , _subtitle_x_offset (0)
-       , _subtitle_y_offset (0)
-       , _subtitle_x_scale (1)
-       , _subtitle_y_scale (1)
+       , _use (false)
+       , _burn (false)
+       , _x_offset (0)
+       , _y_offset (0)
+       , _x_scale (1)
+       , _y_scale (1)
        , _colour (
                node->optional_number_child<int>("Red").get_value_or(255),
                node->optional_number_child<int>("Green").get_value_or(255),
@@ -89,25 +89,25 @@ SubtitleContent::SubtitleContent (Content* parent, shared_ptr<const Film> film,
        , _frame_rate (node->optional_number_child<double>("SubtitleFrameRate"))
 {
        if (version >= 32) {
-               _use_subtitles = node->bool_child ("UseSubtitles");
-               _burn_subtitles = node->bool_child ("BurnSubtitles");
+               _use = node->bool_child ("UseSubtitles");
+               _burn = node->bool_child ("BurnSubtitles");
        }
 
        if (version >= 7) {
-               _subtitle_x_offset = node->number_child<double> ("SubtitleXOffset");
-               _subtitle_y_offset = node->number_child<double> ("SubtitleYOffset");
+               _x_offset = node->number_child<double> ("SubtitleXOffset");
+               _y_offset = node->number_child<double> ("SubtitleYOffset");
        } else {
-               _subtitle_y_offset = node->number_child<double> ("SubtitleOffset");
+               _y_offset = node->number_child<double> ("SubtitleOffset");
        }
 
        if (version >= 10) {
-               _subtitle_x_scale = node->number_child<double> ("SubtitleXScale");
-               _subtitle_y_scale = node->number_child<double> ("SubtitleYScale");
+               _x_scale = node->number_child<double> ("SubtitleXScale");
+               _y_scale = node->number_child<double> ("SubtitleYScale");
        } else {
-               _subtitle_x_scale = _subtitle_y_scale = node->number_child<double> ("SubtitleScale");
+               _x_scale = _y_scale = node->number_child<double> ("SubtitleScale");
        }
 
-       _subtitle_language = node->optional_string_child ("SubtitleLanguage").get_value_or ("");
+       _language = node->optional_string_child ("SubtitleLanguage").get_value_or ("");
 
        list<cxml::NodePtr> fonts = node->node_children ("Font");
        for (list<cxml::NodePtr>::const_iterator i = fonts.begin(); i != fonts.end(); ++i) {
@@ -126,27 +126,27 @@ SubtitleContent::SubtitleContent (Content* parent, shared_ptr<const Film> film,
 
        for (size_t i = 1; i < c.size(); ++i) {
 
-               if (c[i]->subtitle->use_subtitles() != ref->use_subtitles()) {
+               if (c[i]->subtitle->use() != ref->use()) {
                        throw JoinError (_("Content to be joined must have the same 'use subtitles' setting."));
                }
 
-               if (c[i]->subtitle->burn_subtitles() != ref->burn_subtitles()) {
+               if (c[i]->subtitle->burn() != ref->burn()) {
                        throw JoinError (_("Content to be joined must have the same 'burn subtitles' setting."));
                }
 
-               if (c[i]->subtitle->subtitle_x_offset() != ref->subtitle_x_offset()) {
+               if (c[i]->subtitle->x_offset() != ref->x_offset()) {
                        throw JoinError (_("Content to be joined must have the same subtitle X offset."));
                }
 
-               if (c[i]->subtitle->subtitle_y_offset() != ref->subtitle_y_offset()) {
+               if (c[i]->subtitle->y_offset() != ref->y_offset()) {
                        throw JoinError (_("Content to be joined must have the same subtitle Y offset."));
                }
 
-               if (c[i]->subtitle->subtitle_x_scale() != ref->subtitle_x_scale()) {
+               if (c[i]->subtitle->x_scale() != ref->x_scale()) {
                        throw JoinError (_("Content to be joined must have the same subtitle X scale."));
                }
 
-               if (c[i]->subtitle->subtitle_y_scale() != ref->subtitle_y_scale()) {
+               if (c[i]->subtitle->y_scale() != ref->y_scale()) {
                        throw JoinError (_("Content to be joined must have the same subtitle Y scale."));
                }
 
@@ -167,13 +167,13 @@ SubtitleContent::SubtitleContent (Content* parent, shared_ptr<const Film> film,
                }
        }
 
-       _use_subtitles = ref->use_subtitles ();
-       _burn_subtitles = ref->burn_subtitles ();
-       _subtitle_x_offset = ref->subtitle_x_offset ();
-       _subtitle_y_offset = ref->subtitle_y_offset ();
-       _subtitle_x_scale = ref->subtitle_x_scale ();
-       _subtitle_y_scale = ref->subtitle_y_scale ();
-       _subtitle_language = ref->subtitle_language ();
+       _use = ref->use ();
+       _burn = ref->burn ();
+       _x_offset = ref->x_offset ();
+       _y_offset = ref->y_offset ();
+       _x_scale = ref->x_scale ();
+       _y_scale = ref->y_scale ();
+       _language = ref->language ();
        _fonts = ref_fonts;
 
        connect_to_fonts ();
@@ -185,13 +185,13 @@ 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("BurnSubtitles")->add_child_text (raw_convert<string> (_burn_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));
-       root->add_child("SubtitleXScale")->add_child_text (raw_convert<string> (_subtitle_x_scale));
-       root->add_child("SubtitleYScale")->add_child_text (raw_convert<string> (_subtitle_y_scale));
-       root->add_child("SubtitleLanguage")->add_child_text (_subtitle_language);
+       root->add_child("UseSubtitles")->add_child_text (raw_convert<string> (_use));
+       root->add_child("BurnSubtitles")->add_child_text (raw_convert<string> (_burn));
+       root->add_child("SubtitleXOffset")->add_child_text (raw_convert<string> (_x_offset));
+       root->add_child("SubtitleYOffset")->add_child_text (raw_convert<string> (_y_offset));
+       root->add_child("SubtitleXScale")->add_child_text (raw_convert<string> (_x_scale));
+       root->add_child("SubtitleYScale")->add_child_text (raw_convert<string> (_y_scale));
+       root->add_child("SubtitleLanguage")->add_child_text (_language);
        root->add_child("Red")->add_child_text (raw_convert<string> (_colour.r));
        root->add_child("Green")->add_child_text (raw_convert<string> (_colour.g));
        root->add_child("Blue")->add_child_text (raw_convert<string> (_colour.b));
@@ -209,10 +209,10 @@ string
 SubtitleContent::identifier () const
 {
        SafeStringStream s;
-       s << raw_convert<string> (subtitle_x_scale())
-         << "_" << raw_convert<string> (subtitle_y_scale())
-         << "_" << raw_convert<string> (subtitle_x_offset())
-         << "_" << raw_convert<string> (subtitle_y_offset());
+       s << raw_convert<string> (x_scale())
+         << "_" << raw_convert<string> (y_scale())
+         << "_" << raw_convert<string> (x_offset())
+         << "_" << raw_convert<string> (y_offset());
 
        /* XXX: I suppose really _fonts shouldn't be in here, since not all
           types of subtitle content involve fonts.
@@ -260,71 +260,71 @@ SubtitleContent::font_changed ()
 void
 SubtitleContent::set_colour (dcp::Colour colour)
 {
-       maybe_set (_colour, colour, SubtitleContentProperty::SUBTITLE_COLOUR);
+       maybe_set (_colour, colour, SubtitleContentProperty::COLOUR);
 }
 
 void
 SubtitleContent::set_outline (bool o)
 {
-       maybe_set (_outline, o, SubtitleContentProperty::SUBTITLE_OUTLINE);
+       maybe_set (_outline, o, SubtitleContentProperty::OUTLINE);
 }
 
 void
 SubtitleContent::set_outline_colour (dcp::Colour colour)
 {
-       maybe_set (_outline_colour, colour, SubtitleContentProperty::SUBTITLE_OUTLINE_COLOUR);
+       maybe_set (_outline_colour, colour, SubtitleContentProperty::OUTLINE_COLOUR);
 }
 
 void
-SubtitleContent::set_use_subtitles (bool u)
+SubtitleContent::set_use (bool u)
 {
-       maybe_set (_use_subtitles, u, SubtitleContentProperty::USE_SUBTITLES);
+       maybe_set (_use, u, SubtitleContentProperty::USE);
 }
 
 void
-SubtitleContent::set_burn_subtitles (bool b)
+SubtitleContent::set_burn (bool b)
 {
-       maybe_set (_burn_subtitles, b, SubtitleContentProperty::BURN_SUBTITLES);
+       maybe_set (_burn, b, SubtitleContentProperty::BURN);
 }
 
 void
-SubtitleContent::set_subtitle_x_offset (double o)
+SubtitleContent::set_x_offset (double o)
 {
-       maybe_set (_subtitle_x_offset, o, SubtitleContentProperty::SUBTITLE_X_OFFSET);
+       maybe_set (_x_offset, o, SubtitleContentProperty::X_OFFSET);
 }
 
 void
-SubtitleContent::set_subtitle_y_offset (double o)
+SubtitleContent::set_y_offset (double o)
 {
-       maybe_set (_subtitle_y_offset, o, SubtitleContentProperty::SUBTITLE_Y_OFFSET);
+       maybe_set (_y_offset, o, SubtitleContentProperty::Y_OFFSET);
 }
 
 void
-SubtitleContent::set_subtitle_x_scale (double s)
+SubtitleContent::set_x_scale (double s)
 {
-       maybe_set (_subtitle_x_scale, s, SubtitleContentProperty::SUBTITLE_X_SCALE);
+       maybe_set (_x_scale, s, SubtitleContentProperty::X_SCALE);
 }
 
 void
-SubtitleContent::set_subtitle_y_scale (double s)
+SubtitleContent::set_y_scale (double s)
 {
-       maybe_set (_subtitle_y_scale, s, SubtitleContentProperty::SUBTITLE_Y_SCALE);
+       maybe_set (_y_scale, s, SubtitleContentProperty::Y_SCALE);
 }
 
 void
-SubtitleContent::set_subtitle_language (string language)
+SubtitleContent::set_language (string language)
 {
-       maybe_set (_subtitle_language, language, SubtitleContentProperty::SUBTITLE_LANGUAGE);
+       maybe_set (_language, language, SubtitleContentProperty::LANGUAGE);
 }
 
 void
-SubtitleContent::set_subtitle_video_frame_rate (double r)
+SubtitleContent::set_video_frame_rate (double r)
 {
-       maybe_set (_frame_rate, r, SubtitleContentProperty::SUBTITLE_VIDEO_FRAME_RATE);
+       maybe_set (_frame_rate, r, SubtitleContentProperty::VIDEO_FRAME_RATE);
 }
 
 double
-SubtitleContent::subtitle_video_frame_rate () const
+SubtitleContent::video_frame_rate () const
 {
        {
                boost::mutex::scoped_lock lm (_mutex);
index 0adb12c0d3c6c1321f230f768fbec56943a292ce..cb61ad9a8e3efb03e688c2586555c9008b6a38e3 100644 (file)
@@ -30,18 +30,18 @@ class Font;
 class SubtitleContentProperty
 {
 public:
-       static int const SUBTITLE_X_OFFSET;
-       static int const SUBTITLE_Y_OFFSET;
-       static int const SUBTITLE_X_SCALE;
-       static int const SUBTITLE_Y_SCALE;
-       static int const USE_SUBTITLES;
-       static int const BURN_SUBTITLES;
-       static int const SUBTITLE_LANGUAGE;
+       static int const X_OFFSET;
+       static int const Y_OFFSET;
+       static int const X_SCALE;
+       static int const Y_SCALE;
+       static int const USE;
+       static int const BURN;
+       static int const LANGUAGE;
        static int const FONTS;
-       static int const SUBTITLE_VIDEO_FRAME_RATE;
-       static int const SUBTITLE_COLOUR;
-       static int const SUBTITLE_OUTLINE;
-       static int const SUBTITLE_OUTLINE_COLOUR;
+       static int const VIDEO_FRAME_RATE;
+       static int const COLOUR;
+       static int const OUTLINE;
+       static int const OUTLINE_COLOUR;
 };
 
 class SubtitleContent : public ContentPart
@@ -61,42 +61,42 @@ public:
 
        void add_font (boost::shared_ptr<Font> font);
 
-       void set_use_subtitles (bool);
-       void set_burn_subtitles (bool);
-       void set_subtitle_x_offset (double);
-       void set_subtitle_y_offset (double);
-       void set_subtitle_x_scale (double);
-       void set_subtitle_y_scale (double);
-       void set_subtitle_language (std::string language);
+       void set_use (bool);
+       void set_burn (bool);
+       void set_x_offset (double);
+       void set_y_offset (double);
+       void set_x_scale (double);
+       void set_y_scale (double);
+       void set_language (std::string language);
 
-       bool use_subtitles () const {
+       bool use () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _use_subtitles;
+               return _use;
        }
 
-       bool burn_subtitles () const {
+       bool burn () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _burn_subtitles;
+               return _burn;
        }
 
-       double subtitle_x_offset () const {
+       double x_offset () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _subtitle_x_offset;
+               return _x_offset;
        }
 
-       double subtitle_y_offset () const {
+       double y_offset () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _subtitle_y_offset;
+               return _y_offset;
        }
 
-       double subtitle_x_scale () const {
+       double x_scale () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _subtitle_x_scale;
+               return _x_scale;
        }
 
-       double subtitle_y_scale () const {
+       double y_scale () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _subtitle_y_scale;
+               return _y_scale;
        }
 
        std::list<boost::shared_ptr<Font> > fonts () const {
@@ -104,9 +104,9 @@ public:
                return _fonts;
        }
 
-       std::string subtitle_language () const {
+       std::string language () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _subtitle_language;
+               return _language;
        }
 
        void set_colour (dcp::Colour);
@@ -130,32 +130,32 @@ public:
                return _outline_colour;
        }
 
-       double subtitle_video_frame_rate () const;
-       void set_subtitle_video_frame_rate (double r);
+       double video_frame_rate () const;
+       void set_video_frame_rate (double r);
 
 protected:
        /** subtitle language (e.g. "German") or empty if it is not known */
-       std::string _subtitle_language;
+       std::string _language;
 
 private:
        friend struct ffmpeg_pts_offset_test;
        void font_changed ();
        void connect_to_fonts ();
 
-       bool _use_subtitles;
-       bool _burn_subtitles;
+       bool _use;
+       bool _burn;
        /** x offset for placing subtitles, as a proportion of the container width;
         * +ve is further right, -ve is further left.
         */
-       double _subtitle_x_offset;
+       double _x_offset;
        /** y offset for placing subtitles, as a proportion of the container height;
         *  +ve is further down the frame, -ve is further up.
         */
-       double _subtitle_y_offset;
+       double _y_offset;
        /** x scale factor to apply to subtitles */
-       double _subtitle_x_scale;
+       double _x_scale;
        /** y scale factor to apply to subtitles */
-       double _subtitle_y_scale;
+       double _y_scale;
        std::list<boost::shared_ptr<Font> > _fonts;
        dcp::Colour _colour;
        bool _outline;
index 79a225c47f14f74d7170cdad151745553214bac8..0ad41114eb6f52e13490ba7c7dbc8777cb604385 100644 (file)
@@ -55,7 +55,7 @@ TextSubtitleContent::examine (boost::shared_ptr<Job> job)
        TextSubtitle s (shared_from_this ());
 
        /* Default to turning these subtitles on */
-       subtitle->set_use_subtitles (true);
+       subtitle->set_use (true);
 
        boost::mutex::scoped_lock lm (_mutex);
        _length = s.length ();
@@ -86,6 +86,6 @@ TextSubtitleContent::as_xml (xmlpp::Node* node) const
 DCPTime
 TextSubtitleContent::full_length () const
 {
-       FrameRateChange const frc (subtitle->subtitle_video_frame_rate(), film()->video_frame_rate ());
+       FrameRateChange const frc (subtitle->video_frame_rate(), film()->video_frame_rate ());
        return DCPTime (_length, frc);
 }
index b7b0566121120dea64c6ae652b1ca5da4fd71480..ba004d634f4b6c7d2e933ce080e82b9dbfb10df3 100644 (file)
@@ -72,8 +72,8 @@ Transcoder::go ()
        int burnt_subtitles = 0;
        int non_burnt_subtitles = 0;
        BOOST_FOREACH (shared_ptr<const Content> c, _film->content ()) {
-               if (c->subtitle && c->subtitle->use_subtitles()) {
-                       if (c->subtitle->burn_subtitles()) {
+               if (c->subtitle && c->subtitle->use()) {
+                       if (c->subtitle->burn()) {
                                ++burnt_subtitles;
                        } else {
                                ++non_burnt_subtitles;
index 97d7d434384ab7cadbfb511af90a940207868bc6..0533a12e50fcdb922332f43af8ab4aadafd26419 100644 (file)
 
 #define LOG_GENERAL(...) film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL);
 
-int const VideoContentProperty::VIDEO_SIZE       = 0;
-int const VideoContentProperty::VIDEO_FRAME_RATE  = 1;
-int const VideoContentProperty::VIDEO_FRAME_TYPE  = 2;
-int const VideoContentProperty::VIDEO_CROP       = 3;
-int const VideoContentProperty::VIDEO_SCALE      = 4;
+int const VideoContentProperty::SIZE     = 0;
+int const VideoContentProperty::FRAME_RATE  = 1;
+int const VideoContentProperty::FRAME_TYPE  = 2;
+int const VideoContentProperty::CROP     = 3;
+int const VideoContentProperty::SCALE    = 4;
 int const VideoContentProperty::COLOUR_CONVERSION = 5;
-int const VideoContentProperty::VIDEO_FADE_IN     = 6;
-int const VideoContentProperty::VIDEO_FADE_OUT    = 7;
+int const VideoContentProperty::FADE_IN     = 6;
+int const VideoContentProperty::FADE_OUT    = 7;
 
 using std::string;
 using std::setprecision;
@@ -66,8 +66,8 @@ using boost::dynamic_pointer_cast;
 
 VideoContent::VideoContent (Content* parent, shared_ptr<const Film> film)
        : ContentPart (parent, film)
-       , _video_length (0)
-       , _video_frame_type (VIDEO_FRAME_TYPE_2D)
+       , _length (0)
+       , _frame_type (VIDEO_FRAME_TYPE_2D)
        , _scale (VideoContentScale (Ratio::from_id ("178")))
        , _yuv (true)
        , _fade_in (0)
@@ -79,11 +79,11 @@ VideoContent::VideoContent (Content* parent, shared_ptr<const Film> film)
 VideoContent::VideoContent (Content* parent, shared_ptr<const Film> film, cxml::ConstNodePtr node, int version)
        : ContentPart (parent, film)
 {
-       _video_size.width = node->number_child<int> ("VideoWidth");
-       _video_size.height = node->number_child<int> ("VideoHeight");
-       _video_frame_rate = node->optional_number_child<double> ("VideoFrameRate");
-       _video_length = node->number_child<Frame> ("VideoLength");
-       _video_frame_type = static_cast<VideoFrameType> (node->number_child<int> ("VideoFrameType"));
+       _size.width = node->number_child<int> ("VideoWidth");
+       _size.height = node->number_child<int> ("VideoHeight");
+       _frame_rate = node->optional_number_child<double> ("VideoFrameRate");
+       _length = node->number_child<Frame> ("VideoLength");
+       _frame_type = static_cast<VideoFrameType> (node->number_child<int> ("VideoFrameType"));
        _sample_aspect_ratio = node->optional_number_child<double> ("SampleAspectRatio");
        _crop.left = node->number_child<int> ("LeftCrop");
        _crop.right = node->number_child<int> ("RightCrop");
@@ -116,7 +116,7 @@ VideoContent::VideoContent (Content* parent, shared_ptr<const Film> film, cxml::
 
 VideoContent::VideoContent (Content* parent, shared_ptr<const Film> film, vector<shared_ptr<Content> > c)
        : ContentPart (parent, film)
-       , _video_length (0)
+       , _length (0)
        , _yuv (false)
 {
        shared_ptr<VideoContent> ref = c[0]->video;
@@ -124,15 +124,15 @@ VideoContent::VideoContent (Content* parent, shared_ptr<const Film> film, vector
 
        for (size_t i = 1; i < c.size(); ++i) {
 
-               if (c[i]->video->video_size() != ref->video_size()) {
+               if (c[i]->video->size() != ref->size()) {
                        throw JoinError (_("Content to be joined must have the same picture size."));
                }
 
-               if (c[i]->video->video_frame_rate() != ref->video_frame_rate()) {
+               if (c[i]->video->frame_rate() != ref->frame_rate()) {
                        throw JoinError (_("Content to be joined must have the same video frame rate."));
                }
 
-               if (c[i]->video->video_frame_type() != ref->video_frame_type()) {
+               if (c[i]->video->frame_type() != ref->frame_type()) {
                        throw JoinError (_("Content to be joined must have the same video frame type."));
                }
 
@@ -152,16 +152,16 @@ VideoContent::VideoContent (Content* parent, shared_ptr<const Film> film, vector
                        throw JoinError (_("Content to be joined must have the same fades."));
                }
 
-               _video_length += c[i]->video->video_length ();
+               _length += c[i]->video->length ();
 
                if (c[i]->video->yuv ()) {
                        _yuv = true;
                }
        }
 
-       _video_size = ref->video_size ();
-       _video_frame_rate = ref->video_frame_rate ();
-       _video_frame_type = ref->video_frame_type ();
+       _size = ref->size ();
+       _frame_rate = ref->frame_rate ();
+       _frame_type = ref->frame_type ();
        _crop = ref->crop ();
        _scale = ref->scale ();
        _colour_conversion = ref->colour_conversion ();
@@ -173,13 +173,13 @@ void
 VideoContent::as_xml (xmlpp::Node* node) const
 {
        boost::mutex::scoped_lock lm (_mutex);
-       node->add_child("VideoLength")->add_child_text (raw_convert<string> (_video_length));
-       node->add_child("VideoWidth")->add_child_text (raw_convert<string> (_video_size.width));
-       node->add_child("VideoHeight")->add_child_text (raw_convert<string> (_video_size.height));
-       if (_video_frame_rate) {
-               node->add_child("VideoFrameRate")->add_child_text (raw_convert<string> (_video_frame_rate.get()));
+       node->add_child("VideoLength")->add_child_text (raw_convert<string> (_length));
+       node->add_child("VideoWidth")->add_child_text (raw_convert<string> (_size.width));
+       node->add_child("VideoHeight")->add_child_text (raw_convert<string> (_size.height));
+       if (_frame_rate) {
+               node->add_child("VideoFrameRate")->add_child_text (raw_convert<string> (_frame_rate.get()));
        }
-       node->add_child("VideoFrameType")->add_child_text (raw_convert<string> (static_cast<int> (_video_frame_type)));
+       node->add_child("VideoFrameType")->add_child_text (raw_convert<string> (static_cast<int> (_frame_type)));
        if (_sample_aspect_ratio) {
                node->add_child("SampleAspectRatio")->add_child_text (raw_convert<string> (_sample_aspect_ratio.get ()));
        }
@@ -194,7 +194,7 @@ VideoContent::as_xml (xmlpp::Node* node) const
 }
 
 void
-VideoContent::take_from_video_examiner (shared_ptr<VideoExaminer> d)
+VideoContent::take_from_examiner (shared_ptr<VideoExaminer> d)
 {
        /* These examiner calls could call other content methods which take a lock on the mutex */
        dcp::Size const vs = d->video_size ();
@@ -205,25 +205,25 @@ VideoContent::take_from_video_examiner (shared_ptr<VideoExaminer> d)
 
        {
                boost::mutex::scoped_lock lm (_mutex);
-               _video_size = vs;
-               _video_frame_rate = vfr;
-               _video_length = vl;
+               _size = vs;
+               _frame_rate = vfr;
+               _length = vl;
                _sample_aspect_ratio = ar;
                _yuv = yuv;
 
                /* Guess correct scale from size and sample aspect ratio */
                _scale = VideoContentScale (
-                       Ratio::nearest_from_ratio (double (_video_size.width) * ar.get_value_or (1) / _video_size.height)
+                       Ratio::nearest_from_ratio (double (_size.width) * ar.get_value_or (1) / _size.height)
                        );
        }
 
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
-       LOG_GENERAL ("Video length obtained from header as %1 frames", _video_length);
+       LOG_GENERAL ("Video length obtained from header as %1 frames", _length);
 
-       _parent->signal_changed (VideoContentProperty::VIDEO_SIZE);
-       _parent->signal_changed (VideoContentProperty::VIDEO_FRAME_RATE);
-       _parent->signal_changed (VideoContentProperty::VIDEO_SCALE);
+       _parent->signal_changed (VideoContentProperty::SIZE);
+       _parent->signal_changed (VideoContentProperty::FRAME_RATE);
+       _parent->signal_changed (VideoContentProperty::SCALE);
        _parent->signal_changed (ContentProperty::LENGTH);
 }
 
@@ -252,10 +252,10 @@ VideoContent::technical_summary () const
 {
        string s = String::compose (
                N_("video: length %1 frames, size %2x%3, rate %4"),
-               video_length_after_3d_combine(),
-               video_size().width,
-               video_size().height,
-               video_frame_rate()
+               length_after_3d_combine(),
+               size().width,
+               size().height,
+               frame_rate()
                );
 
        if (sample_aspect_ratio ()) {
@@ -266,10 +266,10 @@ VideoContent::technical_summary () const
 }
 
 dcp::Size
-VideoContent::video_size_after_3d_split () const
+VideoContent::size_after_3d_split () const
 {
-       dcp::Size const s = video_size ();
-       switch (video_frame_type ()) {
+       dcp::Size const s = size ();
+       switch (frame_type ()) {
        case VIDEO_FRAME_TYPE_2D:
        case VIDEO_FRAME_TYPE_3D_ALTERNATE:
        case VIDEO_FRAME_TYPE_3D_LEFT:
@@ -286,9 +286,9 @@ VideoContent::video_size_after_3d_split () const
 
 /** @return Video size after 3D split and crop */
 dcp::Size
-VideoContent::video_size_after_crop () const
+VideoContent::size_after_crop () const
 {
-       return crop().apply (video_size_after_3d_split ());
+       return crop().apply (size_after_3d_split ());
 }
 
 void
@@ -298,7 +298,7 @@ VideoContent::scale_and_crop_to_fit_width ()
        DCPOMATIC_ASSERT (film);
        set_scale (VideoContentScale (film->container ()));
 
-       int const crop = max (0, int (video_size().height - double (film->frame_size().height) * video_size().width / film->frame_size().width));
+       int const crop = max (0, int (size().height - double (film->frame_size().height) * size().width / film->frame_size().width));
        set_left_crop (0);
        set_right_crop (0);
        set_top_crop (crop / 2);
@@ -312,7 +312,7 @@ VideoContent::scale_and_crop_to_fit_height ()
        DCPOMATIC_ASSERT (film);
        set_scale (VideoContentScale (film->container ()));
 
-       int const crop = max (0, int (video_size().width - double (film->frame_size().width) * video_size().height / film->frame_size().height));
+       int const crop = max (0, int (size().width - double (film->frame_size().width) * size().height / film->frame_size().height));
        set_left_crop (crop / 2);
        set_right_crop (crop / 2);
        set_top_crop (0);
@@ -325,12 +325,12 @@ VideoContent::fade (Frame f) const
 {
        DCPOMATIC_ASSERT (f >= 0);
 
-       Frame const ts = _parent->trim_start().frames_round(video_frame_rate());
+       Frame const ts = _parent->trim_start().frames_round(frame_rate());
        if ((f - ts) < fade_in()) {
                return double (f - ts) / fade_in();
        }
 
-       Frame fade_out_start = video_length() - _parent->trim_end().frames_round(video_frame_rate()) - fade_out();
+       Frame fade_out_start = length() - _parent->trim_end().frames_round(frame_rate()) - fade_out();
        if (f >= fade_out_start) {
                return 1 - double (f - fade_out_start) / fade_out();
        }
@@ -344,15 +344,15 @@ VideoContent::processing_description () const
        /* stringstream is OK here as this string is just for presentation to the user */
        SafeStringStream d;
 
-       if (video_size().width && video_size().height) {
+       if (size().width && size().height) {
                d << String::compose (
                        _("Content video is %1x%2"),
-                       video_size_after_3d_split().width,
-                       video_size_after_3d_split().height
+                       size_after_3d_split().width,
+                       size_after_3d_split().height
                        );
 
 
-               double ratio = video_size_after_3d_split().ratio ();
+               double ratio = size_after_3d_split().ratio ();
 
                if (sample_aspect_ratio ()) {
                        d << ", " << _("pixel aspect ratio") << " " << fixed << setprecision(2) << sample_aspect_ratio().get () << ":1";
@@ -362,8 +362,8 @@ VideoContent::processing_description () const
                d << "\n" << _("Display aspect ratio") << " " << fixed << setprecision(2) << ratio << ":1\n";
        }
 
-       if ((crop().left || crop().right || crop().top || crop().bottom) && video_size() != dcp::Size (0, 0)) {
-               dcp::Size cropped = video_size_after_crop ();
+       if ((crop().left || crop().right || crop().top || crop().bottom) && size() != dcp::Size (0, 0)) {
+               dcp::Size cropped = size_after_crop ();
                d << String::compose (
                        _("Cropped to %1x%2"),
                        cropped.width, cropped.height
@@ -377,7 +377,7 @@ VideoContent::processing_description () const
        dcp::Size const container_size = film->frame_size ();
        dcp::Size const scaled = scale().size (shared_from_this(), container_size, container_size);
 
-       if (scaled != video_size_after_crop ()) {
+       if (scaled != size_after_crop ()) {
                d << String::compose (
                        _("Scaled to %1x%2"),
                        scaled.width, scaled.height
@@ -397,9 +397,9 @@ VideoContent::processing_description () const
        }
 
        d << _("Content frame rate");
-       d << " " << fixed << setprecision(4) << video_frame_rate() << "\n";
+       d << " " << fixed << setprecision(4) << frame_rate() << "\n";
 
-       FrameRateChange frc (video_frame_rate(), film->video_frame_rate ());
+       FrameRateChange frc (frame_rate(), film->video_frame_rate ());
        d << frc.description () << "\n";
 
        return d.str ();
@@ -408,66 +408,66 @@ VideoContent::processing_description () const
 void
 VideoContent::add_properties (list<UserProperty>& p) const
 {
-       p.push_back (UserProperty (_("Video"), _("Length"), raw_convert<string> (video_length ()), _("video frames")));
-       p.push_back (UserProperty (_("Video"), _("Size"), raw_convert<string> (video_size().width) + "x" + raw_convert<string> (video_size().height)));
-       p.push_back (UserProperty (_("Video"), _("Frame rate"), raw_convert<string> (video_frame_rate(), 5), _("frames per second")));
+       p.push_back (UserProperty (_("Video"), _("Length"), raw_convert<string> (length ()), _("video frames")));
+       p.push_back (UserProperty (_("Video"), _("Size"), raw_convert<string> (size().width) + "x" + raw_convert<string> (size().height)));
+       p.push_back (UserProperty (_("Video"), _("Frame rate"), raw_convert<string> (frame_rate(), 5), _("frames per second")));
 }
 
 double
-VideoContent::video_frame_rate () const
+VideoContent::frame_rate () const
 {
        boost::mutex::scoped_lock lm (_mutex);
        shared_ptr<const Film> film = _film.lock ();
        DCPOMATIC_ASSERT (film);
-       return _video_frame_rate.get_value_or (film->video_frame_rate ());
+       return _frame_rate.get_value_or (film->video_frame_rate ());
 }
 
 void
-VideoContent::set_video_length (Frame len)
+VideoContent::set_length (Frame len)
 {
-       maybe_set (_video_length, len, ContentProperty::LENGTH);
+       maybe_set (_length, len, ContentProperty::LENGTH);
 }
 
 void
 VideoContent::set_left_crop (int c)
 {
-       maybe_set (_crop.left, c, VideoContentProperty::VIDEO_CROP);
+       maybe_set (_crop.left, c, VideoContentProperty::CROP);
 }
 
 void
 VideoContent::set_right_crop (int c)
 {
-       maybe_set (_crop.right, c, VideoContentProperty::VIDEO_CROP);
+       maybe_set (_crop.right, c, VideoContentProperty::CROP);
 }
 
 void
 VideoContent::set_top_crop (int c)
 {
-       maybe_set (_crop.top, c, VideoContentProperty::VIDEO_CROP);
+       maybe_set (_crop.top, c, VideoContentProperty::CROP);
 }
 
 void
 VideoContent::set_bottom_crop (int c)
 {
-       maybe_set (_crop.bottom, c, VideoContentProperty::VIDEO_CROP);
+       maybe_set (_crop.bottom, c, VideoContentProperty::CROP);
 }
 
 void
 VideoContent::set_scale (VideoContentScale s)
 {
-       maybe_set (_scale, s, VideoContentProperty::VIDEO_SCALE);
+       maybe_set (_scale, s, VideoContentProperty::SCALE);
 }
 
 void
-VideoContent::set_video_frame_rate (double r)
+VideoContent::set_frame_rate (double r)
 {
-       maybe_set (_video_frame_rate, r, VideoContentProperty::VIDEO_FRAME_RATE);
+       maybe_set (_frame_rate, r, VideoContentProperty::FRAME_RATE);
 }
 
 void
-VideoContent::set_video_frame_type (VideoFrameType t)
+VideoContent::set_frame_type (VideoFrameType t)
 {
-       maybe_set (_video_frame_type, t, VideoContentProperty::VIDEO_FRAME_TYPE);
+       maybe_set (_frame_type, t, VideoContentProperty::FRAME_TYPE);
 }
 
 void
@@ -485,11 +485,11 @@ VideoContent::set_colour_conversion (ColourConversion c)
 void
 VideoContent::set_fade_in (Frame t)
 {
-       maybe_set (_fade_in, t, VideoContentProperty::VIDEO_FADE_IN);
+       maybe_set (_fade_in, t, VideoContentProperty::FADE_IN);
 }
 
 void
 VideoContent::set_fade_out (Frame t)
 {
-       maybe_set (_fade_out, t, VideoContentProperty::VIDEO_FADE_OUT);
+       maybe_set (_fade_out, t, VideoContentProperty::FADE_OUT);
 }
index 0348969aeb959ad1ad091de59e0545724664e8fd..432775651d8d08944089c34679a846873fa486bb 100644 (file)
@@ -38,14 +38,14 @@ class Content;
 class VideoContentProperty
 {
 public:
-       static int const VIDEO_SIZE;
-       static int const VIDEO_FRAME_RATE;
-       static int const VIDEO_FRAME_TYPE;
-       static int const VIDEO_CROP;
-       static int const VIDEO_SCALE;
+       static int const SIZE;
+       static int const FRAME_RATE;
+       static int const FRAME_TYPE;
+       static int const CROP;
+       static int const SCALE;
        static int const COLOUR_CONVERSION;
-       static int const VIDEO_FADE_IN;
-       static int const VIDEO_FADE_OUT;
+       static int const FADE_IN;
+       static int const FADE_OUT;
 };
 
 class VideoContent : public ContentPart, public boost::enable_shared_from_this<VideoContent>
@@ -59,37 +59,37 @@ public:
        std::string technical_summary () const;
        std::string identifier () const;
 
-       Frame video_length () const {
+       Frame length () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _video_length;
+               return _length;
        }
 
-       Frame video_length_after_3d_combine () const {
+       Frame length_after_3d_combine () const {
                boost::mutex::scoped_lock lm (_mutex);
-               if (_video_frame_type == VIDEO_FRAME_TYPE_3D_ALTERNATE) {
-                       return _video_length / 2;
+               if (_frame_type == VIDEO_FRAME_TYPE_3D_ALTERNATE) {
+                       return _length / 2;
                }
 
-               return _video_length;
+               return _length;
        }
 
-       dcp::Size video_size () const {
+       dcp::Size size () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _video_size;
+               return _size;
        }
 
-       double video_frame_rate () const;
+       double frame_rate () const;
 
        /** @return true if this content has a specific video frame rate, false
         *  if it should use the DCP's rate.
         */
-       bool has_own_video_frame_rate () const {
+       bool has_own_frame_rate () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return static_cast<bool>(_video_frame_rate);
+               return static_cast<bool>(_frame_rate);
        }
 
-       void set_video_frame_type (VideoFrameType);
-       void set_video_frame_rate (double);
+       void set_frame_type (VideoFrameType);
+       void set_frame_rate (double);
 
        void set_left_crop (int);
        void set_right_crop (int);
@@ -103,9 +103,9 @@ public:
        void set_fade_in (Frame);
        void set_fade_out (Frame);
 
-       VideoFrameType video_frame_type () const {
+       VideoFrameType frame_type () const {
                boost::mutex::scoped_lock lm (_mutex);
-               return _video_frame_type;
+               return _frame_type;
        }
 
        Crop crop () const {
@@ -164,10 +164,8 @@ public:
                return _fade_out;
        }
 
-       dcp::Size video_size_after_3d_split () const;
-       dcp::Size video_size_after_crop () const;
-
-       ContentTime dcp_time_to_content_time (DCPTime) const;
+       dcp::Size size_after_3d_split () const;
+       dcp::Size size_after_crop () const;
 
        boost::optional<double> fade (Frame) const;
 
@@ -176,18 +174,13 @@ public:
 
        std::string processing_description () const;
 
-       void set_video_length (Frame);
+       void set_length (Frame);
 
-       void take_from_video_examiner (boost::shared_ptr<VideoExaminer>);
+       void take_from_examiner (boost::shared_ptr<VideoExaminer>);
        void add_properties (std::list<UserProperty> &) const;
 
 private:
 
-       Frame _video_length;
-       /** Video frame rate, or not set if this content should use the DCP's frame rate */
-       boost::optional<double> _video_frame_rate;
-       boost::optional<ColourConversion> _colour_conversion;
-
        friend struct ffmpeg_pts_offset_test;
        friend struct best_dcp_frame_rate_test_single;
        friend struct best_dcp_frame_rate_test_double;
@@ -195,13 +188,15 @@ private:
 
        void setup_default_colour_conversion ();
 
-       dcp::Size _video_size;
-       VideoFrameType _video_frame_type;
+       Frame _length;
+       /** Video frame rate, or not set if this content should use the DCP's frame rate */
+       boost::optional<double> _frame_rate;
+       boost::optional<ColourConversion> _colour_conversion;
+       dcp::Size _size;
+       VideoFrameType _frame_type;
        Crop _crop;
        VideoContentScale _scale;
-       /** Sample aspect ratio obtained from the content file's header,
-           if there is one.
-       */
+       /** Sample aspect ratio obtained from the content file's header, if there is one */
        boost::optional<double> _sample_aspect_ratio;
        bool _yuv;
        Frame _fade_in;
index 775b3d9b71ac496194318af2198717e51f0bafae..3e67b82f6ee59d315873915a2c6228f6a7214825 100644 (file)
@@ -132,7 +132,7 @@ VideoContentScale::size (shared_ptr<const VideoContent> c, dcp::Size display_con
 {
        /* Work out the size of the content if it were put inside film_container */
 
-       dcp::Size const video_size_after_crop = c->video_size_after_crop ();
+       dcp::Size const video_size_after_crop = c->size_after_crop ();
 
        dcp::Size size;
 
index f68f0815c1f156c75421d853049e712b21c337be..08f79c3d8ebfebc951880163cd2f076bd914b06d 100644 (file)
@@ -45,7 +45,7 @@ VideoDecoder::VideoDecoder (shared_ptr<const VideoContent> c, shared_ptr<Log> lo
        , _last_seek_accurate (true)
        , _ignore_video (false)
 {
-       _black_image.reset (new Image (AV_PIX_FMT_RGB24, _video_content->video_size(), true));
+       _black_image.reset (new Image (AV_PIX_FMT_RGB24, _video_content->size(), true));
        _black_image->make_black ();
 }
 
@@ -83,7 +83,7 @@ VideoDecoder::get_video (Frame frame, bool accurate)
        _log->log (String::compose ("VD has request for %1", frame), LogEntry::TYPE_DEBUG_DECODE);
 
        if (_decoded_video.empty() || frame < _decoded_video.front().frame || frame > (_decoded_video.back().frame + 1)) {
-               seek (ContentTime::from_frames (frame, _video_content->video_frame_rate()), accurate);
+               seek (ContentTime::from_frames (frame, _video_content->frame_rate()), accurate);
        }
 
        list<ContentVideo> dec;
@@ -257,7 +257,7 @@ VideoDecoder::video (shared_ptr<const ImageProxy> image, Frame frame)
 
        /* Work out what we are going to push into _decoded_video next */
        list<ContentVideo> to_push;
-       switch (_video_content->video_frame_type ()) {
+       switch (_video_content->frame_type ()) {
        case VIDEO_FRAME_TYPE_2D:
                to_push.push_back (ContentVideo (image, EYES_BOTH, PART_WHOLE, frame));
                break;
@@ -297,7 +297,7 @@ VideoDecoder::video (shared_ptr<const ImageProxy> image, Frame frame)
        optional<Frame> to;
 
        if (_decoded_video.empty() && _last_seek_time && _last_seek_accurate) {
-               from = _last_seek_time->frames_round (_video_content->video_frame_rate ());
+               from = _last_seek_time->frames_round (_video_content->frame_rate ());
                to = to_push.front().frame;
        } else if (!_decoded_video.empty ()) {
                from = _decoded_video.back().frame + 1;
@@ -313,7 +313,7 @@ VideoDecoder::video (shared_ptr<const ImageProxy> image, Frame frame)
        }
 
        if (from) {
-               switch (_video_content->video_frame_type ()) {
+               switch (_video_content->frame_type ()) {
                case VIDEO_FRAME_TYPE_2D:
                        fill_one_eye (from.get(), to.get (), EYES_BOTH);
                        break;
index 3c8f71757f1cbce6d6a2c226bb023dee28ea5ed7..1a551a5c08ceda6a625dc81a9cd6fd4180fed039 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
index 63dd7f45e02f3b0dff5a2eefd6b850fffb7319ad..8809a712f6e32f2023a4d5d5ad7d377daf5351c9 100644 (file)
@@ -85,8 +85,8 @@ print_dump (shared_ptr<Film> film)
                     << " end trim " << c->trim_end().seconds () << "\n";
 
                if (c->video) {
-                       cout << "\t" << c->video->video_size().width << "x" << c->video->video_size().height << "\n"
-                            << "\t" << c->video->video_frame_rate() << "fps\n"
+                       cout << "\t" << c->video->size().width << "x" << c->video->size().height << "\n"
+                            << "\t" << c->video->frame_rate() << "fps\n"
                             << "\tcrop left " << c->video->left_crop()
                             << " right " << c->video->right_crop()
                             << " top " << c->video->top_crop()
@@ -107,8 +107,8 @@ print_dump (shared_ptr<Film> film)
                }
 
                if (c->audio) {
-                       cout << "\t" << c->audio->audio_delay() << " delay\n"
-                            << "\t" << c->audio->audio_gain() << " gain\n";
+                       cout << "\t" << c->audio->delay() << " delay\n"
+                            << "\t" << c->audio->gain() << " gain\n";
                }
        }
 }
index 0e5bee70a7402cbd50dd27ecb4886dbc30cdbbe1..68ae377db345e44b4fe8c38b843f68587048d2fa 100644 (file)
@@ -231,7 +231,7 @@ main (int argc, char* argv[])
                for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
                        shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (*i);
                        if (ic) {
-                               ic->video->set_video_length (still_length * 24);
+                               ic->video->set_length (still_length * 24);
                        }
                }
 
index 2120c3a1f0956f20745d1bfe2346ab6ecd0ab39f..a1354e9f87ee91ce8115cc4eb71c901da76d0ec5 100644 (file)
@@ -239,9 +239,9 @@ AudioDialog::channel_clicked (wxCommandEvent& ev)
 void
 AudioDialog::content_changed (int p)
 {
-       if (p == AudioContentProperty::AUDIO_STREAMS) {
+       if (p == AudioContentProperty::STREAMS) {
                try_to_load_analysis ();
-       } else if (p == AudioContentProperty::AUDIO_GAIN) {
+       } else if (p == AudioContentProperty::GAIN) {
                if (_playlist->content().size() == 1 && _analysis) {
                        /* We can use a short-cut to render the effect of this
                           change, rather than recalculating everything.
index a41e428ece43fd9881fd0d9e9670de1d7e529e06..f6a29da2aaade9448f82e0e7116672af6c9a52ee 100644 (file)
@@ -65,10 +65,10 @@ AudioPanel::AudioPanel (ContentPanel* p)
        _gain = new ContentSpinCtrlDouble<AudioContent> (
                this,
                new wxSpinCtrlDouble (this),
-               AudioContentProperty::AUDIO_GAIN,
+               AudioContentProperty::GAIN,
                &Content::audio,
-               boost::mem_fn (&AudioContent::audio_gain),
-               boost::mem_fn (&AudioContent::set_audio_gain)
+               boost::mem_fn (&AudioContent::gain),
+               boost::mem_fn (&AudioContent::set_gain)
                );
 
        _gain->add (grid, wxGBPosition (r, 1));
@@ -81,10 +81,10 @@ AudioPanel::AudioPanel (ContentPanel* p)
        _delay = new ContentSpinCtrl<AudioContent> (
                this,
                new wxSpinCtrl (this),
-               AudioContentProperty::AUDIO_DELAY,
+               AudioContentProperty::DELAY,
                &Content::audio,
-               boost::mem_fn (&AudioContent::audio_delay),
-               boost::mem_fn (&AudioContent::set_audio_delay)
+               boost::mem_fn (&AudioContent::delay),
+               boost::mem_fn (&AudioContent::set_delay)
                );
 
        _delay->add (grid, wxGBPosition (r, 1));
@@ -149,17 +149,17 @@ void
 AudioPanel::film_content_changed (int property)
 {
        ContentList ac = _parent->selected_audio ();
-       if (property == AudioContentProperty::AUDIO_STREAMS) {
+       if (property == AudioContentProperty::STREAMS) {
                if (ac.size() == 1) {
-                       _mapping->set (ac.front()->audio->audio_mapping());
-                       _mapping->set_input_channels (ac.front()->audio->audio_channel_names ());
+                       _mapping->set (ac.front()->audio->mapping());
+                       _mapping->set_input_channels (ac.front()->audio->channel_names ());
                } else {
                        _mapping->set (AudioMapping ());
                }
                setup_description ();
                setup_peak ();
                _sizer->Layout ();
-       } else if (property == AudioContentProperty::AUDIO_GAIN) {
+       } else if (property == AudioContentProperty::GAIN) {
                setup_peak ();
        } else if (property == DCPContentProperty::REFERENCE_AUDIO) {
                if (ac.size() == 1) {
@@ -218,7 +218,7 @@ AudioPanel::mapping_changed (AudioMapping m)
 {
        ContentList c = _parent->selected_audio ();
        if (c.size() == 1) {
-               c.front()->audio->set_audio_mapping (m);
+               c.front()->audio->set_mapping (m);
        }
 }
 
@@ -230,7 +230,7 @@ AudioPanel::content_selection_changed ()
        _gain->set_content (sel);
        _delay->set_content (sel);
 
-       film_content_changed (AudioContentProperty::AUDIO_STREAMS);
+       film_content_changed (AudioContentProperty::STREAMS);
        film_content_changed (DCPContentProperty::REFERENCE_AUDIO);
 
        setup_sensitivity ();
index f2e00ea426a64a08dfa6123e735df1245979e1dd..21bbc0fb0a83125705bea276d6ffdcb1aafad750 100644 (file)
@@ -206,9 +206,9 @@ ContentMenu::remove ()
                        }
 
                        if (!video && audio) {
-                               AudioMapping m = fc->audio->audio_mapping ();
+                               AudioMapping m = fc->audio->mapping ();
                                m.unmap_all ();
-                               fc->audio->set_audio_mapping (m);
+                               fc->audio->set_mapping (m);
                                handled = true;
                        }
                }
index 36f0a6bb26e0f6a9fe24f97e6c07c75f5e9a1a16..a591c72b352a43e380e0c78958f0cec393bf1023 100644 (file)
@@ -334,7 +334,7 @@ ContentPanel::add_folder_clicked ()
                        return;
                }
 
-               ic->video->set_video_frame_rate (frame_rate);
+               ic->video->set_frame_rate (frame_rate);
        }
 
        _film->examine_and_add_content (content);
index 30657f841586dad8c137f7204c9530c84f6353c6..ad6b6a9e04899f7827bb2ad74fde6f0fe28b15c8 100644 (file)
@@ -427,10 +427,10 @@ DCPPanel::film_changed (int p)
 void
 DCPPanel::film_content_changed (int property)
 {
-       if (property == AudioContentProperty::AUDIO_STREAMS ||
-           property == SubtitleContentProperty::USE_SUBTITLES ||
-           property == SubtitleContentProperty::BURN_SUBTITLES ||
-           property == VideoContentProperty::VIDEO_SCALE ||
+       if (property == AudioContentProperty::STREAMS ||
+           property == SubtitleContentProperty::USE ||
+           property == SubtitleContentProperty::BURN ||
+           property == VideoContentProperty::SCALE ||
            property == DCPContentProperty::REFERENCE_VIDEO ||
            property == DCPContentProperty::REFERENCE_AUDIO ||
            property == DCPContentProperty::REFERENCE_SUBTITLE) {
index 1c49a20684c8f94f576f391b0cc776a6f4396379..e328661c65f7ac4ecac66e0a47289be1e50e0a64 100644 (file)
@@ -160,7 +160,7 @@ HintsDialog::film_changed ()
 
        int three_d = 0;
        BOOST_FOREACH (shared_ptr<const Content> i, content) {
-               if (i->video && i->video->video_frame_type() != VIDEO_FRAME_TYPE_2D) {
+               if (i->video && i->video->frame_type() != VIDEO_FRAME_TYPE_2D) {
                        ++three_d;
                }
        }
index 6b910afae8cd519582790cdaf0f435ac46692366..3a0063c952315cf8a4287e1d39c638e9f5cbe12a 100644 (file)
@@ -185,21 +185,21 @@ SubtitlePanel::film_content_changed (int property)
                        }
                }
                setup_sensitivity ();
-       } else if (property == SubtitleContentProperty::USE_SUBTITLES) {
-               checked_set (_use, scs ? scs->subtitle->use_subtitles() : false);
+       } else if (property == SubtitleContentProperty::USE) {
+               checked_set (_use, scs ? scs->subtitle->use() : false);
                setup_sensitivity ();
-       } else if (property == SubtitleContentProperty::BURN_SUBTITLES) {
-               checked_set (_burn, scs ? scs->subtitle->burn_subtitles() : false);
-       } else if (property == SubtitleContentProperty::SUBTITLE_X_OFFSET) {
-               checked_set (_x_offset, scs ? lrint (scs->subtitle->subtitle_x_offset() * 100) : 0);
-       } else if (property == SubtitleContentProperty::SUBTITLE_Y_OFFSET) {
-               checked_set (_y_offset, scs ? lrint (scs->subtitle->subtitle_y_offset() * 100) : 0);
-       } else if (property == SubtitleContentProperty::SUBTITLE_X_SCALE) {
-               checked_set (_x_scale, scs ? lrint (scs->subtitle->subtitle_x_scale() * 100) : 100);
-       } else if (property == SubtitleContentProperty::SUBTITLE_Y_SCALE) {
-               checked_set (_y_scale, scs ? lrint (scs->subtitle->subtitle_y_scale() * 100) : 100);
-       } else if (property == SubtitleContentProperty::SUBTITLE_LANGUAGE) {
-               checked_set (_language, scs ? scs->subtitle->subtitle_language() : "");
+       } else if (property == SubtitleContentProperty::BURN) {
+               checked_set (_burn, scs ? scs->subtitle->burn() : false);
+       } else if (property == SubtitleContentProperty::X_OFFSET) {
+               checked_set (_x_offset, scs ? lrint (scs->subtitle->x_offset() * 100) : 0);
+       } else if (property == SubtitleContentProperty::Y_OFFSET) {
+               checked_set (_y_offset, scs ? lrint (scs->subtitle->y_offset() * 100) : 0);
+       } else if (property == SubtitleContentProperty::X_SCALE) {
+               checked_set (_x_scale, scs ? lrint (scs->subtitle->x_scale() * 100) : 100);
+       } else if (property == SubtitleContentProperty::Y_SCALE) {
+               checked_set (_y_scale, scs ? lrint (scs->subtitle->y_scale() * 100) : 100);
+       } else if (property == SubtitleContentProperty::LANGUAGE) {
+               checked_set (_language, scs ? scs->subtitle->language() : "");
        } else if (property == DCPContentProperty::REFERENCE_SUBTITLE) {
                if (scs) {
                        shared_ptr<DCPContent> dcp = dynamic_pointer_cast<DCPContent> (scs);
@@ -216,7 +216,7 @@ void
 SubtitlePanel::use_toggled ()
 {
        BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) {
-               i->subtitle->set_use_subtitles (_use->GetValue());
+               i->subtitle->set_use (_use->GetValue());
        }
 }
 
@@ -224,7 +224,7 @@ void
 SubtitlePanel::burn_toggled ()
 {
        BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) {
-               i->subtitle->set_burn_subtitles (_burn->GetValue());
+               i->subtitle->set_burn (_burn->GetValue());
        }
 }
 
@@ -259,7 +259,7 @@ SubtitlePanel::setup_sensitivity ()
                if (i->subtitle->has_image_subtitles ()) {
                        ++image_subs;
                        /* We must burn image subtitles at the moment */
-                       i->subtitle->set_burn_subtitles (true);
+                       i->subtitle->set_burn (true);
                }
        }
 
@@ -314,7 +314,7 @@ void
 SubtitlePanel::x_offset_changed ()
 {
        BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) {
-               i->subtitle->set_subtitle_x_offset (_x_offset->GetValue() / 100.0);
+               i->subtitle->set_x_offset (_x_offset->GetValue() / 100.0);
        }
 }
 
@@ -322,7 +322,7 @@ void
 SubtitlePanel::y_offset_changed ()
 {
        BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) {
-               i->subtitle->set_subtitle_y_offset (_y_offset->GetValue() / 100.0);
+               i->subtitle->set_y_offset (_y_offset->GetValue() / 100.0);
        }
 }
 
@@ -331,7 +331,7 @@ SubtitlePanel::x_scale_changed ()
 {
        ContentList c = _parent->selected_subtitle ();
        if (c.size() == 1) {
-               c.front()->subtitle->set_subtitle_x_scale (_x_scale->GetValue() / 100.0);
+               c.front()->subtitle->set_x_scale (_x_scale->GetValue() / 100.0);
        }
 }
 
@@ -339,7 +339,7 @@ void
 SubtitlePanel::y_scale_changed ()
 {
        BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) {
-               i->subtitle->set_subtitle_y_scale (_y_scale->GetValue() / 100.0);
+               i->subtitle->set_y_scale (_y_scale->GetValue() / 100.0);
        }
 }
 
@@ -347,7 +347,7 @@ void
 SubtitlePanel::language_changed ()
 {
        BOOST_FOREACH (shared_ptr<Content> i, _parent->selected_subtitle ()) {
-               i->subtitle->set_subtitle_language (wx_to_std (_language->GetValue()));
+               i->subtitle->set_language (wx_to_std (_language->GetValue()));
        }
 }
 
@@ -355,13 +355,13 @@ void
 SubtitlePanel::content_selection_changed ()
 {
        film_content_changed (FFmpegContentProperty::SUBTITLE_STREAMS);
-       film_content_changed (SubtitleContentProperty::USE_SUBTITLES);
-       film_content_changed (SubtitleContentProperty::BURN_SUBTITLES);
-       film_content_changed (SubtitleContentProperty::SUBTITLE_X_OFFSET);
-       film_content_changed (SubtitleContentProperty::SUBTITLE_Y_OFFSET);
-       film_content_changed (SubtitleContentProperty::SUBTITLE_X_SCALE);
-       film_content_changed (SubtitleContentProperty::SUBTITLE_Y_SCALE);
-       film_content_changed (SubtitleContentProperty::SUBTITLE_LANGUAGE);
+       film_content_changed (SubtitleContentProperty::USE);
+       film_content_changed (SubtitleContentProperty::BURN);
+       film_content_changed (SubtitleContentProperty::X_OFFSET);
+       film_content_changed (SubtitleContentProperty::Y_OFFSET);
+       film_content_changed (SubtitleContentProperty::X_SCALE);
+       film_content_changed (SubtitleContentProperty::Y_SCALE);
+       film_content_changed (SubtitleContentProperty::LANGUAGE);
        film_content_changed (SubtitleContentProperty::FONTS);
        film_content_changed (DCPContentProperty::REFERENCE_SUBTITLE);
 }
index f9fd165785a6170176ecb26a59c36835019a8ca1..08029068f6cfce3097ed53d73882a219d710191a 100644 (file)
@@ -149,7 +149,7 @@ Timeline::recreate_views ()
                        _views.push_back (shared_ptr<TimelineView> (new TimelineVideoContentView (*this, i)));
                }
 
-               if (i->audio && !i->audio->audio_mapping().mapped_output_channels().empty ()) {
+               if (i->audio && !i->audio->mapping().mapped_output_channels().empty ()) {
                        _views.push_back (shared_ptr<TimelineView> (new TimelineAudioContentView (*this, i)));
                }
 
@@ -168,7 +168,7 @@ Timeline::film_content_changed (int property, bool frequent)
 {
        ensure_ui_thread ();
 
-       if (property == AudioContentProperty::AUDIO_STREAMS) {
+       if (property == AudioContentProperty::STREAMS) {
                recreate_views ();
        } else if (!frequent) {
                setup_pixels_per_second ();
index 83360ac42306b1d02edf189262f2b00a81c38ee8..c28ac93ef62c6439e9434cae69e019a28ed55693 100644 (file)
@@ -54,5 +54,5 @@ TimelineSubtitleContentView::active () const
 {
        shared_ptr<Content> c = _content.lock ();
        DCPOMATIC_ASSERT (c);
-       return c->subtitle && c->subtitle->use_subtitles();
+       return c->subtitle && c->subtitle->use();
 }
index 573d76f4885c8a1e78606346707a67e5a9c99c1c..191106471c839c662f9bd6f416ba6e96f54e5db0 100644 (file)
@@ -210,10 +210,10 @@ TimingPanel::film_content_changed (int property)
 
        } else if (
                property == ContentProperty::LENGTH ||
-               property == VideoContentProperty::VIDEO_FRAME_RATE ||
-               property == VideoContentProperty::VIDEO_FRAME_TYPE ||
-               property == AudioContentProperty::AUDIO_VIDEO_FRAME_RATE ||
-               property == SubtitleContentProperty::SUBTITLE_VIDEO_FRAME_RATE
+               property == VideoContentProperty::FRAME_RATE ||
+               property == VideoContentProperty::FRAME_TYPE ||
+               property == AudioContentProperty::VIDEO_FRAME_RATE ||
+               property == SubtitleContentProperty::VIDEO_FRAME_RATE
                ) {
 
                update_full_length ();
@@ -249,16 +249,16 @@ TimingPanel::film_content_changed (int property)
                property == ContentProperty::LENGTH ||
                property == ContentProperty::TRIM_START ||
                property == ContentProperty::TRIM_END ||
-               property == VideoContentProperty::VIDEO_FRAME_RATE ||
-               property == VideoContentProperty::VIDEO_FRAME_TYPE ||
-               property == AudioContentProperty::AUDIO_VIDEO_FRAME_RATE ||
-               property == SubtitleContentProperty::SUBTITLE_VIDEO_FRAME_RATE
+               property == VideoContentProperty::FRAME_RATE ||
+               property == VideoContentProperty::FRAME_TYPE ||
+               property == AudioContentProperty::VIDEO_FRAME_RATE ||
+               property == SubtitleContentProperty::VIDEO_FRAME_RATE
                ) {
 
                update_play_length ();
        }
 
-       if (property == VideoContentProperty::VIDEO_FRAME_RATE || property == SubtitleContentProperty::SUBTITLE_VIDEO_FRAME_RATE) {
+       if (property == VideoContentProperty::FRAME_RATE || property == SubtitleContentProperty::VIDEO_FRAME_RATE) {
                set<double> check_vc;
                shared_ptr<const Content> vc;
                int count_ac = 0;
@@ -267,7 +267,7 @@ TimingPanel::film_content_changed (int property)
                shared_ptr<const Content> sc;
                BOOST_FOREACH (shared_ptr<const Content> i, _parent->selected ()) {
                        if (i->video) {
-                               check_vc.insert (i->video->video_frame_rate ());
+                               check_vc.insert (i->video->frame_rate ());
                                vc = i;
                        }
                        shared_ptr<const AudioContent> at = dynamic_pointer_cast<const AudioContent> (i);
@@ -288,9 +288,9 @@ TimingPanel::film_content_changed (int property)
                        if (vc) {
                                checked_set (_video_frame_rate, raw_convert<string> (vc->video->video_frame_rate (), 5));
                        } else if (ac) {
-                               checked_set (_video_frame_rate, raw_convert<string> (ac->audio->audio_video_frame_rate (), 5));
+                               checked_set (_video_frame_rate, raw_convert<string> (ac->audio->video_frame_rate (), 5));
                        } else if (sc) {
-                               checked_set (_video_frame_rate, raw_convert<string> (sc->subtitle->subtitle_video_frame_rate (), 5));
+                               checked_set (_video_frame_rate, raw_convert<string> (sc->subtitle->video_frame_rate (), 5));
                        }
                        _video_frame_rate->Enable (true);
                } else {
@@ -328,7 +328,7 @@ TimingPanel::full_length_changed ()
                shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (i);
                if (ic && ic->still ()) {
                        int const vfr = _parent->film()->video_frame_rate ();
-                       ic->video->set_video_length (_full_length->get (vfr).frames_round (vfr));
+                       ic->video->set_length (_full_length->get (vfr).frames_round (vfr));
                }
        }
 }
@@ -407,14 +407,14 @@ TimingPanel::set_video_frame_rate ()
                shared_ptr<TextSubtitleContent> tsc = dynamic_pointer_cast<TextSubtitleContent> (i);
                double const fr = raw_convert<double> (wx_to_std (_video_frame_rate->GetValue ()));
                if (i->video) {
-                       i->video->set_video_frame_rate (fr);
+                       i->video->set_frame_rate (fr);
                } else if (i->audio) {
                        /* Audio but not video, i.e. SndfileContent */
                        i->audio->set_audio_video_frame_rate (fr);
                } else if (dsc) {
-                       dsc->set_subtitle_video_frame_rate (fr);
+                       dsc->subtitle->set_video_frame_rate (fr);
                } else if (tsc) {
-                       tsc->set_subtitle_video_frame_rate (fr);
+                       tsc->subtitle->set_video_frame_rate (fr);
                }
                _set_video_frame_rate->Enable (false);
        }
@@ -429,9 +429,9 @@ TimingPanel::content_selection_changed ()
        film_content_changed (ContentProperty::LENGTH);
        film_content_changed (ContentProperty::TRIM_START);
        film_content_changed (ContentProperty::TRIM_END);
-       film_content_changed (VideoContentProperty::VIDEO_FRAME_RATE);
-       film_content_changed (SubtitleContentProperty::SUBTITLE_VIDEO_FRAME_RATE);
-       film_content_changed (AudioContentProperty::AUDIO_VIDEO_FRAME_RATE);
+       film_content_changed (VideoContentProperty::FRAME_RATE);
+       film_content_changed (SubtitleContentProperty::VIDEO_FRAME_RATE);
+       film_content_changed (AudioContentProperty::VIDEO_FRAME_RATE);
 }
 
 void
index 8bdac0076fe3b5fc0b18d059a973b7a477dcb1d0..28a26ce087612ab95db476cf11e52e4f3e25c067 100644 (file)
@@ -86,10 +86,10 @@ VideoPanel::VideoPanel (ContentPanel* p)
        _frame_type = new ContentChoice<VideoContent, VideoFrameType> (
                this,
                new wxChoice (this, wxID_ANY),
-               VideoContentProperty::VIDEO_FRAME_TYPE,
+               VideoContentProperty::FRAME_TYPE,
                &Content::video,
-               boost::mem_fn (&VideoContent::video_frame_type),
-               boost::mem_fn (&VideoContent::set_video_frame_type),
+               boost::mem_fn (&VideoContent::frame_type),
+               boost::mem_fn (&VideoContent::set_frame_type),
                &caster<int, VideoFrameType>,
                &caster<VideoFrameType, int>
                );
@@ -105,7 +105,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
        _left_crop = new ContentSpinCtrl<VideoContent> (
                this,
                new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1)),
-               VideoContentProperty::VIDEO_CROP,
+               VideoContentProperty::CROP,
                &Content::video,
                boost::mem_fn (&VideoContent::left_crop),
                boost::mem_fn (&VideoContent::set_left_crop)
@@ -116,7 +116,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
        _right_crop = new ContentSpinCtrl<VideoContent> (
                this,
                new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1)),
-               VideoContentProperty::VIDEO_CROP,
+               VideoContentProperty::CROP,
                &Content::video,
                boost::mem_fn (&VideoContent::right_crop),
                boost::mem_fn (&VideoContent::set_right_crop)
@@ -129,7 +129,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
        _top_crop = new ContentSpinCtrl<VideoContent> (
                this,
                new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1)),
-               VideoContentProperty::VIDEO_CROP,
+               VideoContentProperty::CROP,
                &Content::video,
                boost::mem_fn (&VideoContent::top_crop),
                boost::mem_fn (&VideoContent::set_top_crop)
@@ -140,7 +140,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
        _bottom_crop = new ContentSpinCtrl<VideoContent> (
                this,
                new wxSpinCtrl (this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (64, -1)),
-               VideoContentProperty::VIDEO_CROP,
+               VideoContentProperty::CROP,
                &Content::video,
                boost::mem_fn (&VideoContent::bottom_crop),
                boost::mem_fn (&VideoContent::set_bottom_crop)
@@ -164,7 +164,7 @@ VideoPanel::VideoPanel (ContentPanel* p)
        _scale = new ContentChoice<VideoContent, VideoContentScale> (
                this,
                new wxChoice (this, wxID_ANY),
-               VideoContentProperty::VIDEO_SCALE,
+               VideoContentProperty::SCALE,
                &Content::video,
                boost::mem_fn (&VideoContent::scale),
                boost::mem_fn (&VideoContent::set_scale),
@@ -273,13 +273,13 @@ VideoPanel::film_content_changed (int property)
                fcs = dynamic_pointer_cast<FFmpegContent> (vcs);
        }
 
-       if (property == VideoContentProperty::VIDEO_FRAME_TYPE) {
+       if (property == VideoContentProperty::FRAME_TYPE) {
                setup_description ();
-       } else if (property == VideoContentProperty::VIDEO_CROP) {
+       } else if (property == VideoContentProperty::CROP) {
                setup_description ();
-       } else if (property == VideoContentProperty::VIDEO_SCALE) {
+       } else if (property == VideoContentProperty::SCALE) {
                setup_description ();
-       } else if (property == VideoContentProperty::VIDEO_FRAME_RATE) {
+       } else if (property == VideoContentProperty::FRAME_RATE) {
                setup_description ();
        } else if (property == VideoContentProperty::COLOUR_CONVERSION) {
                if (vcs && vcs->video->colour_conversion ()) {
@@ -308,7 +308,7 @@ VideoPanel::film_content_changed (int property)
                                checked_set (_filters, p);
                        }
                }
-       } else if (property == VideoContentProperty::VIDEO_FADE_IN) {
+       } else if (property == VideoContentProperty::FADE_IN) {
                set<Frame> check;
                BOOST_FOREACH (shared_ptr<const Content> i, vc) {
                        check.insert (i->video->fade_in ());
@@ -316,13 +316,13 @@ VideoPanel::film_content_changed (int property)
 
                if (check.size() == 1) {
                        _fade_in->set (
-                               ContentTime::from_frames (vc.front()->video->fade_in (), vc.front()->video->video_frame_rate ()),
-                               vc.front()->video->video_frame_rate ()
+                               ContentTime::from_frames (vc.front()->video->fade_in (), vc.front()->video->frame_rate ()),
+                               vc.front()->video->frame_rate ()
                                );
                } else {
                        _fade_in->clear ();
                }
-       } else if (property == VideoContentProperty::VIDEO_FADE_OUT) {
+       } else if (property == VideoContentProperty::FADE_OUT) {
                set<Frame> check;
                BOOST_FOREACH (shared_ptr<const Content> i, vc) {
                        check.insert (i->video->fade_out ());
@@ -330,8 +330,8 @@ VideoPanel::film_content_changed (int property)
 
                if (check.size() == 1) {
                        _fade_out->set (
-                               ContentTime::from_frames (vc.front()->video->fade_out (), vc.front()->video->video_frame_rate ()),
-                               vc.front()->video->video_frame_rate ()
+                               ContentTime::from_frames (vc.front()->video->fade_out (), vc.front()->video->frame_rate ()),
+                               vc.front()->video->frame_rate ()
                                );
                } else {
                        _fade_out->clear ();
@@ -433,11 +433,11 @@ VideoPanel::content_selection_changed ()
        _bottom_crop->set_content (video_sel);
        _scale->set_content (video_sel);
 
-       film_content_changed (VideoContentProperty::VIDEO_CROP);
-       film_content_changed (VideoContentProperty::VIDEO_FRAME_RATE);
+       film_content_changed (VideoContentProperty::CROP);
+       film_content_changed (VideoContentProperty::FRAME_RATE);
        film_content_changed (VideoContentProperty::COLOUR_CONVERSION);
-       film_content_changed (VideoContentProperty::VIDEO_FADE_IN);
-       film_content_changed (VideoContentProperty::VIDEO_FADE_OUT);
+       film_content_changed (VideoContentProperty::FADE_IN);
+       film_content_changed (VideoContentProperty::FADE_OUT);
        film_content_changed (FFmpegContentProperty::FILTERS);
        film_content_changed (DCPContentProperty::REFERENCE_VIDEO);
 
index 75306d8b7a22cc91e2d9550b777353969c336d7b..517e7f6408d4333b8f075dabf5202fa48a08fc9b 100644 (file)
@@ -112,7 +112,7 @@ BOOST_AUTO_TEST_CASE (audio_analysis_negative_delay_test)
        shared_ptr<Film> film = new_test_film ("audio_analysis_negative_delay_test");
        film->set_name ("audio_analysis_negative_delay_test");
        shared_ptr<FFmpegContent> c (new FFmpegContent (film, private_data / "boon_telly.mkv"));
-       c->audio->set_audio_delay (-250);
+       c->audio->set_delay (-250);
        film->examine_and_add_content (c);
        wait_for_jobs ();
 
index f714e06822e580638fc20465a24b159dbb1d96c0..21480a5c3f1da89c5246054f4e217039786680ec 100644 (file)
@@ -90,7 +90,7 @@ public:
        void seek (ContentTime t, bool accurate)
        {
                AudioDecoder::seek (t, accurate);
-               _position = t.frames_round (_test_audio_content->audio->resampled_audio_frame_rate ());
+               _position = t.frames_round (_test_audio_content->audio->resampled_frame_rate ());
        }
 
 private:
@@ -104,7 +104,7 @@ shared_ptr<TestAudioDecoder> decoder;
 static ContentAudio
 get (Frame from, Frame length)
 {
-       decoder->seek (ContentTime::from_frames (from, content->audio->resampled_audio_frame_rate ()), true);
+       decoder->seek (ContentTime::from_frames (from, content->audio->resampled_frame_rate ()), true);
        ContentAudio ca = decoder->get_audio (content->audio->stream(), from, length, true);
        BOOST_CHECK_EQUAL (ca.frame, from);
        return ca;
@@ -137,8 +137,8 @@ BOOST_AUTO_TEST_CASE (audio_decoder_get_audio_test)
 
        /* Read off the end */
 
-       Frame const from = content->audio->resampled_audio_frame_rate() * 61;
-       Frame const length = content->audio->resampled_audio_frame_rate() * 4;
+       Frame const from = content->audio->resampled_frame_rate() * 61;
+       Frame const length = content->audio->resampled_frame_rate() * 4;
        ContentAudio ca = get (from, length);
 
        for (int i = 0; i < content->audio->stream()->channels(); ++i) {
index f12e8717ea3a87742daf8c87adff1271a0a9536c..f1b804830a4bb78660afbc4a92f1e93be8a11be8 100644 (file)
@@ -54,7 +54,7 @@ void test_audio_delay (int delay_in_ms)
        film->set_name (film_name);
 
        shared_ptr<SndfileContent> content (new SndfileContent (film, "test/data/staircase.wav"));
-       content->audio->set_audio_delay (delay_in_ms);
+       content->audio->set_delay (delay_in_ms);
        film->examine_and_add_content (content);
        wait_for_jobs ();
 
index 173c256e25f7e9b10d678202f9db53a7677cdcca..02f10a31bdafeeb59f69c057840bd81a64b167d5 100644 (file)
@@ -46,10 +46,10 @@ BOOST_AUTO_TEST_CASE (black_fill_test)
        wait_for_jobs ();
 
        contentA->video->set_scale (VideoContentScale (Ratio::from_id ("185")));
-       contentA->video->set_video_length (3);
+       contentA->video->set_length (3);
        contentA->set_position (DCPTime::from_frames (2, film->video_frame_rate ()));
        contentB->video->set_scale (VideoContentScale (Ratio::from_id ("185")));
-       contentB->video->set_video_length (1);
+       contentB->video->set_length (1);
        contentB->set_position (DCPTime::from_frames (7, film->video_frame_rate ()));
 
        film->make_dcp ();
index 84ec322f8ebd629ca888a66ba217921b370ac3d0..8a46771620a32ff191fd405679e0e9847f5db3b1 100644 (file)
@@ -49,8 +49,8 @@ BOOST_AUTO_TEST_CASE (dcp_subtitle_test)
 
        BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (2));
 
-       content->subtitle->set_use_subtitles (true);
-       content->subtitle->set_burn_subtitles (false);
+       content->subtitle->set_use (true);
+       content->subtitle->set_burn (false);
        film->make_dcp ();
        wait_for_jobs ();
 
index 03bf9e2ce3adfe0de8e4de5df599e05e402577ce..9cd123890c26936debf8e6cd54d670669275fe74 100644 (file)
@@ -53,7 +53,7 @@ test (boost::filesystem::path file, float fps, int gaps, int video_length)
        shared_ptr<Log> log (new NullLog);
        shared_ptr<FFmpegDecoder> decoder (new FFmpegDecoder (content, log, false));
 
-       BOOST_CHECK_CLOSE (decoder->video_content()->video_frame_rate(), fps, 0.01);
+       BOOST_CHECK_CLOSE (decoder->video_content()->frame_rate(), fps, 0.01);
 
 #ifdef DCPOMATIC_DEBUG
        decoder->test_gaps = 0;
index 0148487eda5ad3d2d080dff1f390012e0031e776..7e3cd9cfd8676e4c3db51c828defa7764161e836 100644 (file)
@@ -35,7 +35,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_pts_offset_test)
        shared_ptr<Film> film = new_test_film ("ffmpeg_pts_offset_test");
        shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/test.mp4"));
        content->_audio_streams.push_back (shared_ptr<FFmpegAudioStream> (new FFmpegAudioStream));
-       content->video->_video_frame_rate = 24;
+       content->video->_frame_rate = 24;
 
        {
                /* Sound == video so no offset required */
index 4d865de7bd18d28c0fb2af332a64be2a32dd2fdf..68a6ffa2d7e3c842bbc0b25331ff410766a7ac22 100644 (file)
@@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        afr.push_back (30);
        Config::instance()->set_allowed_dcp_frame_rates (afr);
 
-       content->video->_video_frame_rate = 60;
+       content->video->_frame_rate = 60;
        int best = film->best_video_frame_rate ();
        FrameRateChange frc = FrameRateChange (60, best);
        BOOST_CHECK_EQUAL (best, 30);
@@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.change_speed, false);
        BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1);
 
-       content->video->_video_frame_rate = 50;
+       content->video->_frame_rate = 50;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (50, best);
        BOOST_CHECK_EQUAL (best, 25);
@@ -72,7 +72,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.change_speed, false);
        BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1);
 
-       content->video->_video_frame_rate = 48;
+       content->video->_frame_rate = 48;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (48, best);
        BOOST_CHECK_EQUAL (best, 24);
@@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.change_speed, false);
        BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1);
 
-       content->video->_video_frame_rate = 30;
+       content->video->_frame_rate = 30;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (30, best);
        BOOST_CHECK_EQUAL (best, 30);
@@ -90,7 +90,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.change_speed, false);
        BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1);
 
-       content->video->_video_frame_rate = 29.97;
+       content->video->_frame_rate = 29.97;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (29.97, best);
        BOOST_CHECK_EQUAL (best, 30);
@@ -99,7 +99,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.change_speed, true);
        BOOST_CHECK_CLOSE (frc.speed_up, 30 / 29.97, 0.1);
 
-       content->video->_video_frame_rate = 25;
+       content->video->_frame_rate = 25;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (25, best);
        BOOST_CHECK_EQUAL (best, 25);
@@ -108,7 +108,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.change_speed, false);
        BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1);
 
-       content->video->_video_frame_rate = 24;
+       content->video->_frame_rate = 24;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (24, best);
        BOOST_CHECK_EQUAL (best, 24);
@@ -117,7 +117,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.change_speed, false);
        BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1);
 
-       content->video->_video_frame_rate = 14.5;
+       content->video->_frame_rate = 14.5;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (14.5, best);
        BOOST_CHECK_EQUAL (best, 30);
@@ -126,7 +126,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.change_speed, true);
        BOOST_CHECK_CLOSE (frc.speed_up, 15 / 14.5, 0.1);
 
-       content->video->_video_frame_rate = 12.6;
+       content->video->_frame_rate = 12.6;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (12.6, best);
        BOOST_CHECK_EQUAL (best, 25);
@@ -135,7 +135,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.change_speed, true);
        BOOST_CHECK_CLOSE (frc.speed_up, 25 / 25.2, 0.1);
 
-       content->video->_video_frame_rate = 12.4;
+       content->video->_frame_rate = 12.4;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (12.4, best);
        BOOST_CHECK_EQUAL (best, 25);
@@ -144,7 +144,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.change_speed, true);
        BOOST_CHECK_CLOSE (frc.speed_up, 25 / 24.8, 0.1);
 
-       content->video->_video_frame_rate = 12;
+       content->video->_frame_rate = 12;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (12, best);
        BOOST_CHECK_EQUAL (best, 24);
@@ -162,7 +162,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        afr.push_back (60);
        Config::instance()->set_allowed_dcp_frame_rates (afr);
 
-       content->video->_video_frame_rate = 60;
+       content->video->_frame_rate = 60;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (60, best);
        BOOST_CHECK_EQUAL (best, 60);
@@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.change_speed, false);
        BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1);
 
-       content->video->_video_frame_rate = 50;
+       content->video->_frame_rate = 50;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (50, best);
        BOOST_CHECK_EQUAL (best, 50);
@@ -180,7 +180,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        BOOST_CHECK_EQUAL (frc.change_speed, false);
        BOOST_CHECK_CLOSE (frc.speed_up, 1, 0.1);
 
-       content->video->_video_frame_rate = 48;
+       content->video->_frame_rate = 48;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (48, best);
        BOOST_CHECK_EQUAL (best, 48);
@@ -203,7 +203,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        afr.push_back (24);
        Config::instance()->set_allowed_dcp_frame_rates (afr);
 
-       content->video->_video_frame_rate = 25;
+       content->video->_frame_rate = 25;
        best = film->best_video_frame_rate ();
        frc = FrameRateChange (25, best);
        BOOST_CHECK_EQUAL (best, 24);
@@ -234,16 +234,16 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_double)
        afr.push_back (30);
        Config::instance()->set_allowed_dcp_frame_rates (afr);
 
-       A->video->_video_frame_rate = 30;
-       B->video->_video_frame_rate = 24;
+       A->video->_frame_rate = 30;
+       B->video->_frame_rate = 24;
        BOOST_CHECK_EQUAL (film->best_video_frame_rate(), 25);
 
-       A->video->_video_frame_rate = 24;
-       B->video->_video_frame_rate = 24;
+       A->video->_frame_rate = 24;
+       B->video->_frame_rate = 24;
        BOOST_CHECK_EQUAL (film->best_video_frame_rate(), 24);
 
-       A->video->_video_frame_rate = 24;
-       B->video->_video_frame_rate = 48;
+       A->video->_frame_rate = 24;
+       B->video->_frame_rate = 48;
        BOOST_CHECK_EQUAL (film->best_video_frame_rate(), 24);
 }
 
@@ -263,45 +263,45 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test)
 
        shared_ptr<FFmpegAudioStream> stream (new FFmpegAudioStream ("foo", 0, 0, 0));
        content->_audio_streams.push_back (stream);
-       content->video->_video_frame_rate = 24;
+       content->video->_frame_rate = 24;
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
-       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 48000);
+       BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 48000);
 
        stream->_frame_rate = 44100;
-       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 48000);
+       BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 48000);
 
        stream->_frame_rate = 80000;
-       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 96000);
+       BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 96000);
 
-       content->video->_video_frame_rate = 23.976;
+       content->video->_frame_rate = 23.976;
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
-       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 47952);
+       BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 47952);
 
-       content->video->_video_frame_rate = 29.97;
+       content->video->_frame_rate = 29.97;
        film->set_video_frame_rate (30);
        BOOST_CHECK_EQUAL (film->video_frame_rate (), 30);
        stream->_frame_rate = 48000;
-       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 47952);
+       BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 47952);
 
-       content->video->_video_frame_rate = 25;
+       content->video->_frame_rate = 25;
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
-       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 50000);
+       BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 50000);
 
-       content->video->_video_frame_rate = 25;
+       content->video->_frame_rate = 25;
        film->set_video_frame_rate (24);
        stream->_frame_rate = 44100;
-       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), 50000);
+       BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), 50000);
 
        /* Check some out-there conversions (not the best) */
 
-       content->video->_video_frame_rate = 14.99;
+       content->video->_frame_rate = 14.99;
        film->set_video_frame_rate (25);
        stream->_frame_rate = 16000;
-       /* The FrameRateChange within resampled_audio_frame_rate should choose to double-up
+       /* The FrameRateChange within resampled_frame_rate should choose to double-up
           the 14.99 fps video to 30 and then run it slow at 25.
        */
-       BOOST_CHECK_EQUAL (content->audio->resampled_audio_frame_rate(), lrint (48000 * 2 * 14.99 / 25));
+       BOOST_CHECK_EQUAL (content->audio->resampled_frame_rate(), lrint (48000 * 2 * 14.99 / 25));
 }
index de56d476e58f1c77bca05748d8c2e7f8000c7dc5..bdd9c03136849e15966b2b4222ad845acb90dc5b 100644 (file)
@@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test)
        wait_for_jobs ();
        BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_DE-fr_US-R_10_4K_DI_20140704_PP_SMPTE_OV");
 
-       AudioMapping mapping = sound->audio->audio_mapping ();
+       AudioMapping mapping = sound->audio->mapping ();
 
        mapping.set (0, dcp::LEFT, 1.0);
        sound->audio->set_mapping (mapping);
index 006a21646fb2a502d5b6847c51261bd72b8ee0a6..5d86fb9277d18909a023e6b00c9b4f6ad32589cc 100644 (file)
@@ -87,7 +87,7 @@ BOOST_AUTO_TEST_CASE (recover_test_3d)
        film->set_three_d (true);
 
        shared_ptr<ImageContent> content (new ImageContent (film, "test/data/3d_test"));
-       content->video->set_video_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
+       content->video->set_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
        film->examine_and_add_content (content);
        wait_for_jobs ();
 
index ac4fcdd99507ad874b88c00d06408ac58dd6baf5..c30ae6c60fa6732ee24dce7c350d27b4a183574f 100644 (file)
@@ -89,21 +89,21 @@ BOOST_AUTO_TEST_CASE (reels_test2)
                shared_ptr<ImageContent> c (new ImageContent (film, "test/data/flat_red.png"));
                film->examine_and_add_content (c);
                wait_for_jobs ();
-               c->video->set_video_length (24);
+               c->video->set_length (24);
        }
 
        {
                shared_ptr<ImageContent> c (new ImageContent (film, "test/data/flat_green.png"));
                film->examine_and_add_content (c);
                wait_for_jobs ();
-               c->video->set_video_length (24);
+               c->video->set_length (24);
        }
 
        {
                shared_ptr<ImageContent> c (new ImageContent (film, "test/data/flat_blue.png"));
                film->examine_and_add_content (c);
                wait_for_jobs ();
-               c->video->set_video_length (24);
+               c->video->set_length (24);
        }
 
        film->set_reel_type (REELTYPE_BY_VIDEO_CONTENT);
@@ -193,7 +193,7 @@ BOOST_AUTO_TEST_CASE (reels_test4)
                content[i].reset (new ImageContent (film, "test/data/flat_green.png"));
                film->examine_and_add_content (content[i]);
                wait_for_jobs ();
-               content[i]->video->set_video_length (24);
+               content[i]->video->set_length (24);
        }
 
        shared_ptr<TextSubtitleContent> subs (new TextSubtitleContent (film, "test/data/subrip3.srt"));
index 25359c605dd779f8c73c659793d93fdeb6be11b5..43f5ed7e786f918478c589f8fec7fa677d5080bc 100644 (file)
@@ -65,7 +65,7 @@ BOOST_AUTO_TEST_CASE (scaling_test)
 
        wait_for_jobs ();
 
-       imc->video->set_video_length (1);
+       imc->video->set_length (1);
 
        /* F-133: 133 image in a flat container */
        scaling_test_for (film, imc, "133", "185");
index 612a5f548b2eaab572d91835ef861ff6a4677036..f05920c26718f74cd490d0132e13890658f4f78d 100644 (file)
@@ -58,7 +58,7 @@ BOOST_AUTO_TEST_CASE (seek_zero_test)
                video_delay = ContentTime ();
        }
 
-       Frame const first_frame = video_delay.round_up (content->video->video_frame_rate ()).frames_round (content->video->video_frame_rate ());
+       Frame const first_frame = video_delay.round_up (content->video->frame_rate ()).frames_round (content->video->frame_rate ());
 
        FFmpegDecoder decoder (content, film->log(), false);
        list<ContentVideo> a = decoder.get_video (first_frame, true);
index b6dce58f49b1c5014eb06f73c6f2703bffe0abaa..721e0ac5d39237693975199e2253258a6aa45e3a 100644 (file)
@@ -47,8 +47,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test)
        film->examine_and_add_content (content);
        wait_for_jobs ();
 
-       content->subtitle->set_use_subtitles (true);
-       content->subtitle->set_burn_subtitles (false);
+       content->subtitle->set_use (true);
+       content->subtitle->set_burn (false);
        film->make_dcp ();
        wait_for_jobs ();
 
@@ -67,8 +67,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test2)
        film->examine_and_add_content (content);
        wait_for_jobs ();
 
-       content->subtitle->set_use_subtitles (true);
-       content->subtitle->set_burn_subtitles (false);
+       content->subtitle->set_use (true);
+       content->subtitle->set_burn (false);
        /* Use test/data/subrip2.srt as if it were a font file  */
        content->subtitle->fonts().front()->set_file (FontFiles::NORMAL, "test/data/subrip2.srt");
 
@@ -92,8 +92,8 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test3)
        film->examine_and_add_content (content);
        wait_for_jobs ();
 
-       content->subtitle->set_use_subtitles (true);
-       content->subtitle->set_burn_subtitles (false);
+       content->subtitle->set_use (true);
+       content->subtitle->set_burn (false);
 
        film->make_dcp ();
        wait_for_jobs ();
index 05fd77a8a69ba72e6b91a865b8ebb2e038cd8320..1e728bc9b29111eb4d0243c2411b4f1683e5aedc 100644 (file)
@@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE (threed_test)
        shared_ptr<Film> film = new_test_film ("threed_test");
        film->set_name ("test_film2");
        shared_ptr<FFmpegContent> c (new FFmpegContent (film, "test/data/test.mp4"));
-       c->video->set_video_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
+       c->video->set_frame_type (VIDEO_FRAME_TYPE_3D_LEFT_RIGHT);
        film->examine_and_add_content (c);
 
        wait_for_jobs ();
index 7c8259f977454543a7e3a19885677f05b3f7bbac..353a97dd0ec8b4d990a41ee94ef7475d7a1bf1a5 100644 (file)
@@ -128,19 +128,19 @@ BOOST_AUTO_TEST_CASE (ffmpeg_time_calculation_test)
 
        /* 25fps content, 25fps DCP */
        film->set_video_frame_rate (25);
-       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->video_length() / 25.0));
+       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 25.0));
        /* 25fps content, 24fps DCP; length should be increased */
        film->set_video_frame_rate (24);
-       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->video_length() / 24.0));
+       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 24.0));
        /* 25fps content, 30fps DCP; length should be decreased */
        film->set_video_frame_rate (30);
-       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->video_length() / 30.0));
+       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 30.0));
        /* 25fps content, 50fps DCP; length should be the same */
        film->set_video_frame_rate (50);
-       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->video_length() / 25.0));
+       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() / 25.0));
        /* 25fps content, 60fps DCP; length should be decreased */
        film->set_video_frame_rate (60);
-       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->video_length() * (50.0 / 60) / 25.0));
+       BOOST_CHECK_EQUAL (content->full_length(), DCPTime::from_seconds (content->video->length() * (50.0 / 60) / 25.0));
 }
 
 /** Test Player::dcp_to_content_video */
@@ -161,7 +161,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 0, no trim, content rate = DCP rate */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -173,7 +173,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, no trim, content rate = DCP rate */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -187,7 +187,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, 1.5s trim, content rate = DCP rate */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -204,7 +204,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -216,7 +216,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, no trim, content rate 24, DCP rate 25 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -232,7 +232,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
         */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.6));
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -251,7 +251,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -263,7 +263,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -277,7 +277,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -295,7 +295,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (48);
+       content->video->set_frame_rate (48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -307,7 +307,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (48);
+       content->video->set_frame_rate (48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -321,7 +321,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->video->set_video_frame_rate (48);
+       content->video->set_frame_rate (48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -335,7 +335,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test1)
        /* Position 0s, no trim, content rate 29.9978733, DCP rate 30 */
        content->set_position (DCPTime::from_seconds (0));
        content->set_trim_start (ContentTime::from_seconds (0));
-       content->video->set_video_frame_rate (29.9978733);
+       content->video->set_frame_rate (29.9978733);
        film->set_video_frame_rate (30);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -366,7 +366,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 0, no trim, content rate = DCP rate */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -378,7 +378,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, no trim, content rate = DCP rate */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -390,7 +390,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, 1.5s trim, content rate = DCP rate */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -406,7 +406,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -418,7 +418,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, no trim, content rate 24, DCP rate 25 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -430,7 +430,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, 1.6s trim, content rate 24, DCP rate 25, so the 1.6s trim is at 24fps */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.6));
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -448,7 +448,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -460,7 +460,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -472,7 +472,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -489,7 +489,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (48);
+       content->video->set_frame_rate (48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -501,7 +501,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (48);
+       content->video->set_frame_rate (48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -513,7 +513,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test2)
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->video->set_video_frame_rate (48);
+       content->video->set_frame_rate (48);
        film->set_video_frame_rate (24);
        player->setup_pieces ();
        BOOST_REQUIRE_EQUAL (player->_pieces.size(), 1);
@@ -543,7 +543,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 0, no trim, video/audio content rate = video/audio DCP rate */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -556,7 +556,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, no trim, video/audio content rate = video/audio DCP rate */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -571,7 +571,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, 1.5s trim, video/audio content rate = video/audio DCP rate */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -586,7 +586,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 0, no trim, content video rate 24, DCP video rate 25, both audio rates still 48k */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -599,7 +599,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, no trim, content video rate 24, DCP rate 25, both audio rates still 48k. */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -616,7 +616,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.6));
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (25);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -635,7 +635,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -648,7 +648,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -663,7 +663,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -681,7 +681,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (48);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -694,7 +694,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, no trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -709,7 +709,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, 1.5s trim, content rate 24, DCP rate 48 */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
@@ -724,7 +724,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 0, no trim, video content rate = video DCP rate, content audio rate = 44.1k */
        content->set_position (DCPTime ());
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 44100;
        player->setup_pieces ();
@@ -737,7 +737,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, no trim, video content rate = video DCP rate, content audio rate = 44.1k */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime ());
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 44100;
        player->setup_pieces ();
@@ -752,7 +752,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Position 3s, 1.5s trim, video content rate = video DCP rate, content audio rate = 44.1k */
        content->set_position (DCPTime::from_seconds (3));
        content->set_trim_start (ContentTime::from_seconds (1.5));
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 44100;
        player->setup_pieces ();
@@ -767,7 +767,7 @@ BOOST_AUTO_TEST_CASE (player_time_calculation_test3)
        /* Check with a large start trim */
        content->set_position (DCPTime::from_seconds (0));
        content->set_trim_start (ContentTime::from_seconds (54143));
-       content->video->set_video_frame_rate (24);
+       content->video->set_frame_rate (24);
        film->set_video_frame_rate (24);
        stream->_frame_rate = 48000;
        player->setup_pieces ();
index 78f3bf9b0519be8ecda0e4a25b89d2c3dcbae905..9b50fa8c7afb46453e951bc4a90b04df8e9d30df 100644 (file)
@@ -100,7 +100,7 @@ test (dcp::Size content_size, dcp::Size display_size, dcp::Size film_size, Crop
 
        dcp::Size answer = sc.get().size (vc->video, display_size, film_size);
        if (answer != correct) {
-               cerr << "Testing " << vc->video->video_size().width << "x" << vc->video->video_size().height << "\n";
+               cerr << "Testing " << vc->video->size().width << "x" << vc->video->size().height << "\n";
                cerr << "Testing " << display_size.width << "x" << display_size.height << "\n";
                cerr << answer.width << "x" << answer.height << " instead of " << correct.width << "x" << correct.height << "\n";
        }
index 8b051d0d1d90be944ccc20d28c899fa2f764cc3c..dc464429fe57abe61a1392f18aa5ad3a8a7d07a1 100644 (file)
@@ -41,8 +41,8 @@ BOOST_AUTO_TEST_CASE (xml_subtitle_test)
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
        film->set_name ("frobozz");
        shared_ptr<TextSubtitleContent> content (new TextSubtitleContent (film, "test/data/subrip2.srt"));
-       content->subtitle->set_use_subtitles (true);
-       content->subtitle->set_burn_subtitles (false);
+       content->subtitle->set_use (true);
+       content->subtitle->set_burn (false);
        film->examine_and_add_content (content);
        wait_for_jobs ();
        film->make_dcp ();
@@ -62,8 +62,8 @@ BOOST_AUTO_TEST_CASE (xml_subtitle_test2)
        film->set_interop (true);
        film->set_sequence (false);
        shared_ptr<TextSubtitleContent> content (new TextSubtitleContent (film, "test/data/subrip2.srt"));
-       content->subtitle->set_use_subtitles (true);
-       content->subtitle->set_burn_subtitles (false);
+       content->subtitle->set_use (true);
+       content->subtitle->set_burn (false);
        film->examine_and_add_content (content);
        film->examine_and_add_content (content);
        wait_for_jobs ();