summaryrefslogtreecommitdiff
path: root/src/lib/player.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/player.h')
-rw-r--r--src/lib/player.h36
1 files changed, 7 insertions, 29 deletions
diff --git a/src/lib/player.h b/src/lib/player.h
index 4d911a83b..bf6260c0a 100644
--- a/src/lib/player.h
+++ b/src/lib/player.h
@@ -39,28 +39,8 @@ class AudioContent;
class Piece;
class Image;
class Resampler;
-
-/** A wrapper for an Image which contains some pending operations; these may
- * not be necessary if the receiver of the PlayerImage throws it away.
- */
-class PlayerImage
-{
-public:
- PlayerImage (boost::shared_ptr<const Image>, Crop, libdcp::Size, libdcp::Size, Scaler const *);
-
- void set_subtitle (boost::shared_ptr<const Image>, Position<int>);
-
- boost::shared_ptr<Image> image ();
-
-private:
- boost::shared_ptr<const Image> _in;
- Crop _crop;
- libdcp::Size _inter_size;
- libdcp::Size _out_size;
- Scaler const * _scaler;
- boost::shared_ptr<const Image> _subtitle_image;
- Position<int> _subtitle_position;
-};
+class PlayerVideoFrame;
+class ImageProxy;
/** @class Player
* @brief A class which can `play' a Playlist; emitting its audio and video.
@@ -86,12 +66,10 @@ public:
/** Emitted when a video frame is ready.
* First parameter is the video image.
- * Second parameter is the eye(s) that should see this image.
- * Third parameter is the colour conversion that should be used for this image.
- * Fourth parameter is true if the image is the same as the last one that was emitted.
- * Fifth parameter is the time.
+ * Second parameter is true if the frame is the same as the last one that was emitted.
+ * Third parameter is the time.
*/
- boost::signals2::signal<void (boost::shared_ptr<PlayerImage>, Eyes, ColourConversion, bool, Time)> Video;
+ boost::signals2::signal<void (boost::shared_ptr<PlayerVideoFrame>, bool, Time)> Video;
/** Emitted when some audio data is ready */
boost::signals2::signal<void (boost::shared_ptr<const AudioBuffers>, Time)> Audio;
@@ -108,7 +86,7 @@ private:
friend class PlayerWrapper;
friend class Piece;
- void process_video (boost::weak_ptr<Piece>, boost::shared_ptr<const Image>, Eyes, bool, VideoContent::Frame, Time);
+ void process_video (boost::weak_ptr<Piece>, boost::shared_ptr<const ImageProxy>, Eyes, Part, bool, VideoContent::Frame, Time);
void process_audio (boost::weak_ptr<Piece>, boost::shared_ptr<const AudioBuffers>, AudioContent::Frame);
void process_subtitle (boost::weak_ptr<Piece>, boost::shared_ptr<Image>, dcpomatic::Rect<double>, Time, Time);
void setup_pieces ();
@@ -140,7 +118,7 @@ private:
AudioMerger<Time, AudioContent::Frame> _audio_merger;
libdcp::Size _video_container_size;
- boost::shared_ptr<PlayerImage> _black_frame;
+ boost::shared_ptr<PlayerVideoFrame> _black_frame;
std::map<boost::shared_ptr<AudioContent>, boost::shared_ptr<Resampler> > _resamplers;
std::list<Subtitle> _subtitles;