summaryrefslogtreecommitdiff
path: root/src/lib/player.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-10-26 19:41:12 +0200
committerCarl Hetherington <cth@carlh.net>2022-10-26 19:41:12 +0200
commit1a43dcc9b0d4c40cb8a19f2ff475c67ace4ef6a2 (patch)
tree9e25a824e06e0161f991ad38f9d739b228e23b44 /src/lib/player.h
parent1cd4002ee3c82b1d9552aaa3ef6c52e3919b47b2 (diff)
Allow move construction of Player.
Diffstat (limited to 'src/lib/player.h')
-rw-r--r--src/lib/player.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/player.h b/src/lib/player.h
index 6e83da103..894f74bfc 100644
--- a/src/lib/player.h
+++ b/src/lib/player.h
@@ -80,8 +80,11 @@ public:
Player (std::shared_ptr<const Film>, Image::Alignment subtitle_alignment);
Player (std::shared_ptr<const Film>, std::shared_ptr<const Playlist> playlist);
- Player (Player const& Player) = delete;
- Player& operator= (Player const& Player) = delete;
+ Player (Player const&) = delete;
+ Player& operator= (Player const&) = delete;
+
+ Player(Player&& other);
+ Player& operator=(Player&& other);
bool pass ();
void seek (dcpomatic::DCPTime time, bool accurate);
@@ -137,6 +140,7 @@ private:
friend struct overlap_video_test1;
void construct ();
+ void connect();
void setup_pieces ();
void film_change (ChangeType, Film::Property);
void playlist_change (ChangeType);
@@ -173,9 +177,9 @@ private:
*/
mutable boost::mutex _mutex;
- std::weak_ptr<const Film> const _film;
+ std::weak_ptr<const Film> _film;
/** Playlist, or 0 if we are using the one from the _film */
- std::shared_ptr<const Playlist> const _playlist;
+ std::shared_ptr<const Playlist> _playlist;
/** > 0 if we are suspended (i.e. pass() and seek() do nothing) */
boost::atomic<int> _suspended;
@@ -198,7 +202,7 @@ private:
/** true if we should try to be fast rather than high quality */
boost::atomic<bool> _fast;
/** true if we should keep going in the face of `survivable' errors */
- bool const _tolerant;
+ bool _tolerant;
/** true if we should `play' (i.e output) referenced DCP data (e.g. for preview) */
boost::atomic<bool> _play_referenced;
@@ -242,7 +246,7 @@ private:
boost::atomic<dcpomatic::DCPTime> _playback_length;
/** Alignment for subtitle images that we create */
- Image::Alignment const _subtitle_alignment = Image::Alignment::PADDED;
+ Image::Alignment _subtitle_alignment = Image::Alignment::PADDED;
boost::signals2::scoped_connection _film_changed_connection;
boost::signals2::scoped_connection _playlist_change_connection;