Various text fixes.
authorCarl Hetherington <cth@carlh.net>
Fri, 13 May 2016 14:42:44 +0000 (15:42 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 18 May 2016 10:50:29 +0000 (11:50 +0100)
src/lib/film.cc
src/lib/playlist.cc
src/lib/playlist.h
test/audio_decoder_test.cc
test/data
test/frame_rate_test.cc

index 87a317e5769db7ab40c60e1a2dc3e6f14d9e68f6..e2e90cd27012bf5ca5f90543dc865b90dc11f26d 100644 (file)
@@ -887,7 +887,7 @@ Film::signal_changed (Property p)
 
        switch (p) {
        case Film::CONTENT:
-               set_video_frame_rate (_playlist->best_dcp_frame_rate ());
+               set_video_frame_rate (_playlist->best_video_frame_rate ());
                break;
        case Film::VIDEO_FRAME_RATE:
        case Film::SEQUENCE:
@@ -1082,7 +1082,7 @@ Film::length () const
 int
 Film::best_video_frame_rate () const
 {
-       return _playlist->best_dcp_frame_rate ();
+       return _playlist->best_video_frame_rate ();
 }
 
 FrameRateChange
@@ -1097,7 +1097,7 @@ Film::playlist_content_changed (weak_ptr<Content> c, int p, bool frequent)
        _dirty = true;
 
        if (p == ContentProperty::VIDEO_FRAME_RATE) {
-               set_video_frame_rate (_playlist->best_dcp_frame_rate ());
+               set_video_frame_rate (_playlist->best_video_frame_rate ());
        } else if (p == AudioContentProperty::STREAMS) {
                signal_changed (NAME);
        }
index b473bee8a059882a039bc9ab5920f41bc1b6761d..bd6abc31d0a98455bf9bfe996eec876015743d96 100644 (file)
@@ -240,7 +240,7 @@ public:
 };
 
 int
-Playlist::best_dcp_frame_rate () const
+Playlist::best_video_frame_rate () const
 {
        list<int> const allowed_dcp_frame_rates = Config::instance()->allowed_dcp_frame_rates ();
 
index 0ad70b52421ece5984664373b62e0ccc52428cbd..c3890ce8c5d23d441efcf74d45c1d918b4c8fadc 100644 (file)
@@ -61,7 +61,7 @@ public:
        boost::optional<DCPTime> start () const;
        int64_t required_disk_space (int j2k_bandwidth, int audio_channels, int audio_frame_rate) const;
 
-       int best_dcp_frame_rate () const;
+       int best_video_frame_rate () const;
        DCPTime video_end () const;
        DCPTime subtitle_end () const;
        FrameRateChange active_frame_rate_change (DCPTime, int dcp_frame_rate) const;
index 45617bc41547c49b451b06831019da8dbc427c59..d196a0243cfbb297c6591b8ff361fafffadfd383 100644 (file)
@@ -54,7 +54,7 @@ public:
        }
 
        Frame audio_length () const {
-               return llrint (61.2942 * audio->stream()->frame_rate ());
+               return llrint (61.2942 * 48000);
        }
 };
 
index caafd158432719c233e4a6c255f32b78c1c545a2..f70fddede90fdb87ff8ee2339f208d2658c665aa 160000 (submodule)
--- a/test/data
+++ b/test/data
@@ -1 +1 @@
-Subproject commit caafd158432719c233e4a6c255f32b78c1c545a2
+Subproject commit f70fddede90fdb87ff8ee2339f208d2658c665aa
index 68846470525cf86a77ff346430c3c8e56057ab78..8a4aed43b250c796ff3d32df5284a84ecbedcbd0 100644 (file)
@@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_single)
        shared_ptr<Film> film = new_test_film ("best_dcp_frame_rate_test_single");
        /* Get any piece of content, it doesn't matter what */
        shared_ptr<FFmpegContent> content (new FFmpegContent (film, "test/data/test.mp4"));
-       film->add_content (content);
+       film->examine_and_add_content (content);
        wait_for_jobs ();
 
        /* Run some tests with a limited range of allowed rates */
@@ -221,9 +221,9 @@ BOOST_AUTO_TEST_CASE (best_dcp_frame_rate_test_double)
        shared_ptr<Film> film = new_test_film ("best_dcp_frame_rate_test_double");
        /* Get any old content, it doesn't matter what */
        shared_ptr<FFmpegContent> A (new FFmpegContent (film, "test/data/test.mp4"));
-       film->add_content (A);
+       film->examine_and_add_content (A);
        shared_ptr<FFmpegContent> B (new FFmpegContent (film, "test/data/test.mp4"));
-       film->add_content (B);
+       film->examine_and_add_content (B);
        wait_for_jobs ();
 
        /* Run some tests with a limited range of allowed rates */
@@ -262,6 +262,7 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test)
        Config::instance()->set_allowed_dcp_frame_rates (afr);
 
        shared_ptr<FFmpegAudioStream> stream (new FFmpegAudioStream ("foo", 0, 0, 0, 0));
+       content->audio.reset (new AudioContent (content.get()));
        content->audio->add_stream (stream);
        content->_video_frame_rate = 24;
        film->set_video_frame_rate (24);