X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_video_frame.h;h=7393efde699d1a4ad1f6560c50a102dddcb0eb8e;hb=45e6a6df959188bfdb8dfc4906c35d1a3c234b0a;hp=4c545b6ef06b09a64d842e130dacb8557e5e0e85;hpb=d5c23e121ec9ed85a350e552a885162db82de950;p=dcpomatic.git diff --git a/src/lib/dcp_video_frame.h b/src/lib/dcp_video_frame.h index 4c545b6ef..7393efde6 100644 --- a/src/lib/dcp_video_frame.h +++ b/src/lib/dcp_video_frame.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington Taken from code Copyright (C) 2010-2011 Terrence Meiczinger This program is free software; you can redistribute it and/or modify @@ -18,8 +18,7 @@ */ -#include -#include +#include #include "util.h" /** @file src/dcp_video_frame.h @@ -32,6 +31,7 @@ class Scaler; class Image; class Log; class Subtitle; +class PlayerVideoFrame; /** @class EncodedData * @brief Container for J2K-encoded data. @@ -42,13 +42,13 @@ public: /** @param s Size of data, in bytes */ EncodedData (int s); - EncodedData (std::string f); + EncodedData (boost::filesystem::path); virtual ~EncodedData (); void send (boost::shared_ptr socket); - void write (boost::shared_ptr, int) const; - void write_info (boost::shared_ptr, int, libdcp::FrameInfo) const; + void write (boost::shared_ptr, int, Eyes) const; + void write_info (boost::shared_ptr, int, Eyes, dcp::FrameInfo) const; /** @return data */ uint8_t* data () const { @@ -101,20 +101,27 @@ public: class DCPVideoFrame : public boost::noncopyable { public: - DCPVideoFrame (boost::shared_ptr, int, int, int, boost::shared_ptr); + DCPVideoFrame (boost::shared_ptr, int, int, int, Resolution, boost::shared_ptr); + DCPVideoFrame (boost::shared_ptr, cxml::ConstNodePtr, boost::shared_ptr); boost::shared_ptr encode_locally (); - boost::shared_ptr encode_remotely (ServerDescription const *); + boost::shared_ptr encode_remotely (ServerDescription); - int frame () const { - return _frame; + int index () const { + return _index; } + + Eyes eyes () const; private: - boost::shared_ptr _image; - int _frame; ///< frame index within the DCP's intrinsic duration + + void add_metadata (xmlpp::Element *) const; + + boost::shared_ptr _frame; + int _index; ///< frame index within the DCP's intrinsic duration int _frames_per_second; ///< Frames per second that we will use for the DCP int _j2k_bandwidth; ///< J2K bandwidth to use + Resolution _resolution; ///< Resolution (2K or 4K) boost::shared_ptr _log; ///< log };