diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-06-10 10:55:22 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-06-10 10:55:22 +0100 |
| commit | 8771c1f7b00ab0fb5c252adaa437d753155b7c18 (patch) | |
| tree | f1f4c6109c1b64c795a05ff2a6188f246028e767 /src/subtitle_asset.h | |
| parent | 91e1e17b4c9771e00b48d9fcc0dcbe2bdfa94c17 (diff) | |
Rename Font -> FontAsset; add dcpdumpsub tool.
Diffstat (limited to 'src/subtitle_asset.h')
| -rw-r--r-- | src/subtitle_asset.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/subtitle_asset.h b/src/subtitle_asset.h index 4cbbff0d..c28f6446 100644 --- a/src/subtitle_asset.h +++ b/src/subtitle_asset.h @@ -23,6 +23,7 @@ #include "asset.h" #include "dcp_time.h" #include "subtitle_string.h" +#include "data.h" #include <libcxml/cxml.h> #include <boost/shared_array.hpp> @@ -69,6 +70,7 @@ public: void add (SubtitleString); virtual void add_font (std::string id, boost::filesystem::path file) = 0; + std::map<std::string, Data> fonts () const; virtual void write (boost::filesystem::path) const = 0; virtual Glib::ustring xml_as_string () const = 0; @@ -88,17 +90,14 @@ protected: /** All our subtitles, in no particular order */ std::list<SubtitleString> _subtitles; - class FontData { + class FileData : public Data { public: - FontData () {} + FileData () {} - FontData (boost::shared_array<uint8_t> data_, boost::uintmax_t size_) - : data (data_) - , size (size_) + FileData (boost::shared_array<uint8_t> data_, boost::uintmax_t size_) + : Data (data_, size_) {} - boost::shared_array<uint8_t> data; - boost::uintmax_t size; /** .ttf file that this data was last written to */ mutable boost::optional<boost::filesystem::path> file; }; @@ -107,7 +106,7 @@ protected: * For Interop, the string is the font ID from the subtitle file. * For SMPTE, the string is the font's URN from the subtitle file. */ - std::map<std::string, FontData> _fonts; + std::map<std::string, FileData> _fonts; private: /** @struct ParseState |
