X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplayer_video.h;h=d24620c7e793b7ebbc8b345cdcedc34dd66151bb;hb=3799e91d126d243d41c44dcb0ca1bfa66b53a57e;hp=faf5d6832637f12be510028a78568615f3275a27;hpb=dd9be86db6cde0afa5da0d1d1ac43b42e05dca26;p=dcpomatic.git diff --git a/src/lib/player_video.h b/src/lib/player_video.h index faf5d6832..d24620c7e 100644 --- a/src/lib/player_video.h +++ b/src/lib/player_video.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2020 Carl Hetherington + Copyright (C) 2013-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,55 +18,66 @@ */ + #ifndef DCPOMATIC_PLAYER_VIDEO_H #define DCPOMATIC_PLAYER_VIDEO_H -#include "types.h" -#include "position.h" -#include "dcpomatic_time.h" + #include "colour_conversion.h" +#include "dcpomatic_time.h" +#include "image.h" +#include "position.h" #include "position_image.h" +#include "types.h" extern "C" { #include } #include -#include + class Image; class ImageProxy; class Film; class Socket; + /** Everything needed to describe a video frame coming out of the player, but with the * 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 : public boost::noncopyable +class PlayerVideo { public: PlayerVideo ( - std::shared_ptr, - Crop, - boost::optional, - dcp::Size, - dcp::Size, - Eyes, - Part, - boost::optional, + std::shared_ptr image, + Crop crop, + boost::optional fade, + dcp::Size inter_size, + dcp::Size out_size, + Eyes eyes, + Part part, + boost::optional colour_conversion, VideoRange video_range, - std::weak_ptr, - boost::optional, + std::weak_ptr content, + boost::optional video_frame, bool error ); PlayerVideo (std::shared_ptr, std::shared_ptr); + PlayerVideo (PlayerVideo const&) = delete; + PlayerVideo& operator= (PlayerVideo const&) = delete; + std::shared_ptr shallow_copy () const; void set_text (PositionImage); + boost::optional text () const { + return _text; + } - void prepare (boost::function pixel_format, VideoRange video_range, bool aligned, bool fast); - std::shared_ptr image (boost::function pixel_format, VideoRange video_range, bool aligned, bool fast) const; + void prepare (std::function pixel_format, VideoRange video_range, Image::Alignment alignment, bool fast, bool proxy_only); + std::shared_ptr image (std::function pixel_format, VideoRange video_range, Image::Alignment alignment, bool fast) const; + std::shared_ptr raw_image () const; static AVPixelFormat force (AVPixelFormat, AVPixelFormat); static AVPixelFormat keep_xyz_or_rgb (AVPixelFormat); @@ -99,6 +110,10 @@ public: return _inter_size; } + dcp::Size out_size () const { + return _out_size; + } + bool same (std::shared_ptr other) const; size_t memory_used () const; @@ -112,7 +127,7 @@ public: } private: - void make_image (boost::function pixel_format, VideoRange video_range, bool aligned, bool fast) const; + void make_image (std::function pixel_format, VideoRange video_range, Image::Alignment alignment, bool fast) const; std::shared_ptr _in; Crop _crop; @@ -143,4 +158,5 @@ private: mutable bool _error; }; + #endif