summaryrefslogtreecommitdiff
path: root/src/subtitle_asset.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-09 14:02:20 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-09 14:02:20 +0100
commite4b8bed37b4fcfb932e2b899003f2a95df908ba0 (patch)
tree6af8acd73fdfdaa0025dca758cc29e488c4ce8a4 /src/subtitle_asset.h
parent2ac1dbfeaffa5166f104ef4a01fedc41f542cacf (diff)
Handle storing/recovery of fonts in SMPTE MXF files.
Diffstat (limited to 'src/subtitle_asset.h')
-rw-r--r--src/subtitle_asset.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/subtitle_asset.h b/src/subtitle_asset.h
index 481556aa..4cbbff0d 100644
--- a/src/subtitle_asset.h
+++ b/src/subtitle_asset.h
@@ -31,6 +31,7 @@ namespace xmlpp {
}
struct interop_dcp_font_test;
+struct smpte_dcp_font_test;
namespace dcp
{
@@ -78,6 +79,7 @@ public:
protected:
friend struct ::interop_dcp_font_test;
+ friend struct ::smpte_dcp_font_test;
void parse_subtitles (boost::shared_ptr<cxml::Document> xml, std::list<boost::shared_ptr<FontNode> > font_nodes);
void subtitles_as_xml (xmlpp::Element* root, int time_code_rate, std::string xmlns) const;
@@ -94,20 +96,16 @@ protected:
: data (data_)
, size (size_)
{}
-
- FontData (boost::shared_array<uint8_t> data_, boost::uintmax_t size_, boost::filesystem::path file_)
- : data (data_)
- , size (size_)
- , file (file_)
- {}
boost::shared_array<uint8_t> data;
boost::uintmax_t size;
- mutable boost::filesystem::path file;
+ /** .ttf file that this data was last written to */
+ mutable boost::optional<boost::filesystem::path> file;
};
/** Font data, keyed by a subclass-dependent identifier.
- * For Interop fonts, the string is the font ID from the subtitle file.
+ * 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;