X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fplayer_video.h;h=e2968749c48dc3ebf2e693e05550aee9b4a51192;hb=557afd0041173da9d67a850c04b6c8f7ce674860;hp=8134c8d4e564715dc1f296cac4f6334bedd24806;hpb=7245e46453a82886739a45bd78fcdf9e8401367c;p=dcpomatic.git diff --git a/src/lib/player_video.h b/src/lib/player_video.h index 8134c8d4e..e2968749c 100644 --- a/src/lib/player_video.h +++ b/src/lib/player_video.h @@ -23,11 +23,12 @@ #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 } @@ -58,7 +59,7 @@ public: boost::optional colour_conversion, VideoRange video_range, std::weak_ptr content, - boost::optional video_frame, + boost::optional video_time, bool error ); @@ -70,15 +71,18 @@ public: std::shared_ptr shallow_copy () const; void set_text (PositionImage); + boost::optional text () const { + return _text; + } - void prepare (std::function pixel_format, VideoRange video_range, bool aligned, bool fast, bool proxy_only); - std::shared_ptr image (std::function pixel_format, VideoRange video_range, bool aligned, bool fast) const; - std::shared_ptr raw_image () 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, bool fast) const; + std::shared_ptr raw_image () const; - static AVPixelFormat force (AVPixelFormat, AVPixelFormat); + static AVPixelFormat force (AVPixelFormat); static AVPixelFormat keep_xyz_or_rgb (AVPixelFormat); - void add_metadata (xmlpp::Node* node) const; + void add_metadata(xmlpp::Element* element) const; void write_to_socket (std::shared_ptr socket) const; bool reset_metadata (std::shared_ptr film, dcp::Size player_video_container_size); @@ -106,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; @@ -119,7 +127,7 @@ public: } private: - void make_image (std::function pixel_format, VideoRange video_range, bool aligned, bool fast) const; + void make_image (std::function pixel_format, VideoRange video_range, bool fast) const; std::shared_ptr _in; Crop _crop; @@ -133,8 +141,8 @@ private: boost::optional _text; /** Content that we came from. This is so that reset_metadata() can work. */ std::weak_ptr _content; - /** Video frame that we came from. Again, this is for reset_metadata() */ - boost::optional _video_frame; + /** Video time that we came from. Again, this is for reset_metadata() */ + boost::optional _video_time; mutable boost::mutex _mutex; mutable std::shared_ptr _image;