summaryrefslogtreecommitdiff
path: root/src/lib/player.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-04-27 23:41:26 +0100
committerCarl Hetherington <cth@carlh.net>2014-04-27 23:41:26 +0100
commit7f2e74604a51b984e4c8cbb5d5f4bb642677ec00 (patch)
treebe2da9736a298d9367c8c8f1aa231c43251ccaab /src/lib/player.h
parent243dff6782db2783648c9efc0e6cd17b1c6cdaae (diff)
parentab43240870523c96c68493d107b8bc8c5294629b (diff)
Merge master.
Diffstat (limited to 'src/lib/player.h')
-rw-r--r--src/lib/player.h29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/lib/player.h b/src/lib/player.h
index d83045ab1..62ba89e6c 100644
--- a/src/lib/player.h
+++ b/src/lib/player.h
@@ -31,6 +31,7 @@
#include "dcpomatic_time.h"
#include "content_subtitle.h"
#include "position_image.h"
+#include "piece.h"
class Job;
class Film;
@@ -73,18 +74,26 @@ public:
void dump (boost::shared_ptr<Log>) const;
};
-class Piece
+/** 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:
- Piece (boost::shared_ptr<Content> c, boost::shared_ptr<Decoder> d, FrameRateChange f)
- : content (c)
- , decoder (d)
- , frc (f)
- {}
-
- boost::shared_ptr<Content> content;
- boost::shared_ptr<Decoder> decoder;
- FrameRateChange frc;
+ PlayerImage (boost::shared_ptr<const Image>, Crop, dcp::Size, dcp::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;
+ dcp::Size _inter_size;
+ dcp::Size _out_size;
+ Scaler const * _scaler;
+ boost::shared_ptr<const Image> _subtitle_image;
+ Position<int> _subtitle_position;
};
/** @class Player