summaryrefslogtreecommitdiff
path: root/src/lib/player_video.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-09-11 18:52:05 +0200
committerCarl Hetherington <cth@carlh.net>2021-09-27 13:41:46 +0200
commit7245e46453a82886739a45bd78fcdf9e8401367c (patch)
treed8f8b3d420eecfc958ac78df40c26f77d34f47d3 /src/lib/player_video.cc
parente9ae050b0b15c91c3f591ad84938e60d271357b3 (diff)
When the player is used in OpenGL mode, pass unscaled XYZ data through to the shader and do colourspace conversion there.
Diffstat (limited to 'src/lib/player_video.cc')
-rw-r--r--src/lib/player_video.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/player_video.cc b/src/lib/player_video.cc
index b0e75972c..0a6ce0d99 100644
--- a/src/lib/player_video.cc
+++ b/src/lib/player_video.cc
@@ -121,6 +121,14 @@ PlayerVideo::image (function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoR
return _image;
}
+
+shared_ptr<Image>
+PlayerVideo::raw_image () const
+{
+ return _in->image(_inter_size).image;
+}
+
+
/** Create an image for this frame. A lock must be held on _mutex.
* @param pixel_format Function which is called to decide what pixel format the output image should be;
* it is passed the pixel format of the input image from the ImageProxy, and should return the desired
@@ -290,11 +298,11 @@ PlayerVideo::keep_xyz_or_rgb (AVPixelFormat p)
}
void
-PlayerVideo::prepare (function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast)
+PlayerVideo::prepare (function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast, bool proxy_only)
{
_in->prepare (_inter_size);
boost::mutex::scoped_lock lm (_mutex);
- if (!_image) {
+ if (!_image && !proxy_only) {
make_image (pixel_format, video_range, aligned, fast);
}
}