Hence Player does not need Playlist.
authorCarl Hetherington <cth@carlh.net>
Wed, 17 Jun 2015 15:05:42 +0000 (16:05 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 17 Jun 2015 15:05:42 +0000 (16:05 +0100)
src/lib/analyse_audio_job.cc
src/lib/film.cc
src/lib/player.cc
src/lib/player.h

index b17dd07dcb0869cb1891aecbe7068319a433a1f0..8800e2657784d4e0516c8f77141335bd2e36a2ee 100644 (file)
@@ -62,7 +62,7 @@ AnalyseAudioJob::json_name () const
 void
 AnalyseAudioJob::run ()
 {
-       shared_ptr<Player> player (new Player (_film, _playlist));
+       shared_ptr<Player> player (new Player (_film));
        player->set_ignore_video ();
        
        int64_t const len = _film->length().frames (_film->audio_frame_rate());
index 19aa6ae9b344e36ef64277f19de0e21585ae49a3..d650fa3d38e2286e0403185fcd2b4374fc4473fa 100644 (file)
@@ -898,7 +898,7 @@ Film::cpls () const
 shared_ptr<Player>
 Film::make_player () const
 {
-       return shared_ptr<Player> (new Player (shared_from_this (), _playlist));
+       return shared_ptr<Player> (new Player (shared_from_this ()));
 }
 
 void
index 235cc8bda61983b80226891b116ebe155c6f81c8..56e2d2749179b5fab685b8d28e82e97af1bd2835 100644 (file)
@@ -30,7 +30,6 @@
 #include "subrip_decoder.h"
 #include "subrip_content.h"
 #include "dcp_content.h"
-#include "playlist.h"
 #include "job.h"
 #include "image.h"
 #include "raw_image_proxy.h"
@@ -69,9 +68,8 @@ using boost::weak_ptr;
 using boost::dynamic_pointer_cast;
 using boost::optional;
 
-Player::Player (shared_ptr<const Film> f, shared_ptr<const Playlist> p)
+Player::Player (shared_ptr<const Film> f)
        : _film (f)
-       , _playlist (p)
        , _have_valid_pieces (false)
        , _ignore_video (false)
        , _burn_subtitles (f->burn_subtitles ())
@@ -89,7 +87,7 @@ Player::setup_pieces ()
        list<shared_ptr<Piece> > old_pieces = _pieces;
        _pieces.clear ();
 
-       ContentList content = _playlist->content ();
+       ContentList content = _film->content ();
 
        for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
 
index a9504ba051caa66a42b00a604995ad94d5a4f4c4..e515fced345bdd39a610e70c24c1a9383866663a 100644 (file)
@@ -20,7 +20,6 @@
 #ifndef DCPOMATIC_PLAYER_H
 #define DCPOMATIC_PLAYER_H
 
-#include "playlist.h"
 #include "content.h"
 #include "film.h"
 #include "rect.h"
@@ -37,7 +36,6 @@
 
 class Job;
 class Film;
-class Playlist;
 class AudioContent;
 class Piece;
 class Image;
@@ -45,6 +43,7 @@ class Decoder;
 class Resampler;
 class PlayerVideo;
 class ImageProxy;
+class Font;
  
 class PlayerStatistics
 {
@@ -79,12 +78,12 @@ public:
 };
 
 /** @class Player
- *  @brief A class which can `play' a Playlist.
+ *  @brief A class which can `play' a Film.
  */
 class Player : public boost::enable_shared_from_this<Player>, public boost::noncopyable
 {
 public:
-       Player (boost::shared_ptr<const Film>, boost::shared_ptr<const Playlist>);
+       Player (boost::shared_ptr<const Film>);
 
        std::list<boost::shared_ptr<PlayerVideo> > get_video (DCPTime time, bool accurate);
        boost::shared_ptr<AudioBuffers> get_audio (DCPTime time, DCPTime length, bool accurate);
@@ -147,7 +146,6 @@ private:
        }
        
        boost::shared_ptr<const Film> _film;
-       boost::shared_ptr<const Playlist> _playlist;
 
        /** Our pieces are ready to go; if this is false the pieces must be (re-)created before they are used */
        bool _have_valid_pieces;