Rename Film::player to reflect the fact that it creates a new Player on each call.
authorCarl Hetherington <cth@carlh.net>
Tue, 16 Jul 2013 11:11:17 +0000 (12:11 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 16 Jul 2013 11:11:17 +0000 (12:11 +0100)
src/lib/film.cc
src/lib/film.h
src/lib/transcoder.cc
src/wx/film_viewer.cc
test/play_test.cc

index d216e303f65f235a33a2cf962fd3df8696b4ba94..eb86775e05345dc6c9daec6c15f472d524598378 100644 (file)
@@ -706,7 +706,7 @@ Film::have_dcp () const
 }
 
 shared_ptr<Player>
-Film::player () const
+Film::make_player () const
 {
        return shared_ptr<Player> (new Player (shared_from_this (), _playlist));
 }
index bf89c6f2c6327d09eef9f375d43ee6d9de401ef7..24c43419a0032534772318915c19d67f91e03178 100644 (file)
@@ -98,7 +98,7 @@ public:
 
        bool have_dcp () const;
 
-       boost::shared_ptr<Player> player () const;
+       boost::shared_ptr<Player> make_player () const;
        boost::shared_ptr<Playlist> playlist () const;
 
        OutputAudioFrame dcp_audio_frame_rate () const;
index f4a52639a3cc5a887f3ae7c79991171e41527ac4..7022965bd47d5e7bd13d7386b9045758c44fc928 100644 (file)
@@ -64,7 +64,7 @@ audio_proxy (weak_ptr<Encoder> encoder, shared_ptr<const AudioBuffers> audio)
  */
 Transcoder::Transcoder (shared_ptr<const Film> f, shared_ptr<Job> j)
        : _job (j)
-       , _player (f->player ())
+       , _player (f->make_player ())
        , _encoder (new Encoder (f, j))
 {
        _player->Video.connect (bind (video_proxy, _encoder, _1, _2));
index cd331a25a4c859ee08bc017c248b0eaa1b583062..d42829880876959638afabcfdcf1d202a0c6d7fa 100644 (file)
@@ -126,7 +126,7 @@ FilmViewer::set_film (shared_ptr<Film> f)
                return;
        }
 
-       _player = f->player ();
+       _player = f->make_player ();
        _player->disable_audio ();
        _player->Video.connect (boost::bind (&FilmViewer::process_video, this, _1, _3));
        _player->Changed.connect (boost::bind (&FilmViewer::player_changed, this, _1));
index 12f80a282c0e29c0a7254e5f1e2f39ddaf5bf85d..0a15bfed2c9cded8787bd056eab9a3d576fd5f54 100644 (file)
@@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE (play_test)
        /* A is 16 frames long at 25 fps */
        BOOST_CHECK_EQUAL (B->start(), 16 * TIME_HZ / 25);
 
-       shared_ptr<Player> player = film->player ();
+       shared_ptr<Player> player = film->make_player ();
        PlayerWrapper wrap (player);
        /* Seek and audio don't get on at the moment */
        player->disable_audio ();