/*
- Copyright (C) 2013-2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2020 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>
#include <boost/thread/mutex.hpp>
+#include <boost/noncopyable.hpp>
class Image;
class ImageProxy;
* bits still their raw form. We may want to combine the bits on a remote machine,
* or maybe not even bother to combine them at all.
*/
-class PlayerVideo
+class PlayerVideo : public boost::noncopyable
{
public:
PlayerVideo (
void set_text (PositionImage);
- 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;
+ void prepare (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast);
+ boost::shared_ptr<Image> image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast) const;
static AVPixelFormat force (AVPixelFormat, AVPixelFormat);
static AVPixelFormat keep_xyz_or_rgb (AVPixelFormat);
bool reset_metadata (boost::shared_ptr<const Film> film, dcp::Size video_container_size, dcp::Size film_frame_size);
bool has_j2k () const;
- dcp::Data j2k () const;
+ boost::shared_ptr<const dcp::Data> j2k () const;
Eyes eyes () const {
return _eyes;
}
private:
- void make_image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
+ void make_image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool aligned, bool fast) const;
boost::shared_ptr<const ImageProxy> _in;
Crop _crop;
boost::optional<ColourConversion> _colour_conversion;
VideoRange _video_range;
boost::optional<PositionImage> _text;
- /** Content that we came from. This is so that reset_metadata() can work, and also
- * for variant:swaroop's non-skippable ads.
- */
+ /** Content that we came from. This is so that reset_metadata() can work. */
boost::weak_ptr<Content> _content;
/** Video frame that we came from. Again, this is for reset_metadata() */
boost::optional<Frame> _video_frame;