summaryrefslogtreecommitdiff
path: root/src/lib/player_video.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-11-06 23:06:21 +0000
committerCarl Hetherington <cth@carlh.net>2018-11-06 23:06:21 +0000
commitf41310384889e4cfb6e709d098b316e212d8bf22 (patch)
tree01db47dfe9da145e5428b2ce3df6d23ffcda69c4 /src/lib/player_video.h
parented68bfad5c795afb342c5228f3c1dc7770a6d646 (diff)
Do image crop/scale/window in the butler prepare threads.
Diffstat (limited to 'src/lib/player_video.h')
-rw-r--r--src/lib/player_video.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/player_video.h b/src/lib/player_video.h
index 8e41e8f23..8ffe70afb 100644
--- a/src/lib/player_video.h
+++ b/src/lib/player_video.h
@@ -62,7 +62,7 @@ public:
void set_text (PositionImage);
- void prepare ();
+ void prepare (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast);
boost::shared_ptr<Image> image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
static AVPixelFormat force (AVPixelFormat, AVPixelFormat);
@@ -105,6 +105,8 @@ public:
}
private:
+ void make_image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
+
boost::shared_ptr<const ImageProxy> _in;
Crop _crop;
boost::optional<double> _fade;
@@ -120,6 +122,9 @@ private:
boost::weak_ptr<Content> _content;
/** Video frame that we came from. Again, this is for reset_metadata() */
boost::optional<Frame> _video_frame;
+
+ mutable boost::mutex _mutex;
+ mutable boost::shared_ptr<Image> _image;
};
#endif