From 05ef423e0fa4c1730c70770ff9528ee45f70e064 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 16 Jul 2013 12:11:17 +0100 Subject: [PATCH] Rename Film::player to reflect the fact that it creates a new Player on each call. --- src/lib/film.cc | 2 +- src/lib/film.h | 2 +- src/lib/transcoder.cc | 2 +- src/wx/film_viewer.cc | 2 +- test/play_test.cc | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/film.cc b/src/lib/film.cc index d216e303f..eb86775e0 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -706,7 +706,7 @@ Film::have_dcp () const } shared_ptr -Film::player () const +Film::make_player () const { return shared_ptr (new Player (shared_from_this (), _playlist)); } diff --git a/src/lib/film.h b/src/lib/film.h index bf89c6f2c..24c43419a 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -98,7 +98,7 @@ public: bool have_dcp () const; - boost::shared_ptr player () const; + boost::shared_ptr make_player () const; boost::shared_ptr playlist () const; OutputAudioFrame dcp_audio_frame_rate () const; diff --git a/src/lib/transcoder.cc b/src/lib/transcoder.cc index f4a52639a..7022965bd 100644 --- a/src/lib/transcoder.cc +++ b/src/lib/transcoder.cc @@ -64,7 +64,7 @@ audio_proxy (weak_ptr encoder, shared_ptr audio) */ Transcoder::Transcoder (shared_ptr f, shared_ptr j) : _job (j) - , _player (f->player ()) + , _player (f->make_player ()) , _encoder (new Encoder (f, j)) { _player->Video.connect (bind (video_proxy, _encoder, _1, _2)); diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index cd331a25a..d42829880 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -126,7 +126,7 @@ FilmViewer::set_film (shared_ptr 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)); diff --git a/test/play_test.cc b/test/play_test.cc index 12f80a282..0a15bfed2 100644 --- a/test/play_test.cc +++ b/test/play_test.cc @@ -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 = film->player (); + shared_ptr player = film->make_player (); PlayerWrapper wrap (player); /* Seek and audio don't get on at the moment */ player->disable_audio (); -- 2.30.2