X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fdcp_video.h;h=e8e90260ce9955fd390be34a4135489187710a07;hb=bde76c3341775bd02da59932d285e14eade64ae0;hp=7b01966bd25f04e0cee162d843d8da788c5e0ddc;hpb=15f23b356b757a9697bf1a9ec30c243ab8070404;p=dcpomatic.git diff --git a/src/lib/dcp_video.h b/src/lib/dcp_video.h index 7b01966bd..e8e90260c 100644 --- a/src/lib/dcp_video.h +++ b/src/lib/dcp_video.h @@ -32,62 +32,7 @@ class Image; class Log; class Subtitle; class PlayerVideo; - -/** @class EncodedData - * @brief Container for J2K-encoded data. - */ -class EncodedData : public boost::noncopyable -{ -public: - /** @param s Size of data, in bytes */ - EncodedData (int s); - - EncodedData (boost::filesystem::path); - - virtual ~EncodedData (); - - void send (boost::shared_ptr socket); - 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 { - return _data; - } - - /** @return data size, in bytes */ - int size () const { - return _size; - } - -protected: - uint8_t* _data; ///< data - int _size; ///< data size in bytes -}; - -/** @class LocallyEncodedData - * @brief EncodedData that was encoded locally; this class - * just keeps a pointer to the data, but does no memory - * management. - */ -class LocallyEncodedData : public EncodedData -{ -public: - /** @param d Data (which will be copied by this class) - * @param s Size of data, in bytes. - */ - LocallyEncodedData (uint8_t* d, int s); -}; - -/** @class RemotelyEncodedData - * @brief EncodedData that is being read from a remote server; - * this class allocates and manages memory for the data. - */ -class RemotelyEncodedData : public EncodedData -{ -public: - RemotelyEncodedData (int s); -}; +class EncodedData; /** @class DCPVideo * @brief A single frame of video destined for a DCP. @@ -101,7 +46,7 @@ public: class DCPVideo : public boost::noncopyable { public: - DCPVideo (boost::shared_ptr, int, int, int, Resolution, boost::shared_ptr); + DCPVideo (boost::shared_ptr, int, int, int, Resolution, bool b, boost::shared_ptr); DCPVideo (boost::shared_ptr, cxml::ConstNodePtr, boost::shared_ptr); boost::shared_ptr encode_locally (); @@ -122,6 +67,7 @@ private: 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) + bool _burn_subtitles; ///< true to burn subtitles into the image boost::shared_ptr _log; ///< log };