/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
files in the program, then also delete it here.
*/
+
/** @file src/interop_subtitle_asset.h
- * @brief InteropSubtitleAsset class.
+ * @brief InteropSubtitleAsset class
*/
+
#include "subtitle_asset.h"
#include <boost/filesystem.hpp>
+
namespace dcp {
+
class InteropLoadFontNode;
+
/** @class InteropSubtitleAsset
- * @brief A set of subtitles to be read and/or written in the Inter-Op format.
+ * @brief A set of subtitles to be read and/or written in the Inter-Op format
*
* Inter-Op subtitles are sometimes known as CineCanvas.
*/
explicit InteropSubtitleAsset (boost::filesystem::path file);
bool equals (
- boost::shared_ptr<const Asset>,
+ std::shared_ptr<const Asset>,
EqualityOptions,
NoteHandler note
) const;
void write_to_assetmap (xmlpp::Node* node, boost::filesystem::path root) const;
- void add_to_pkl (boost::shared_ptr<PKL> pkl, boost::filesystem::path root) const;
+ void add_to_pkl (std::shared_ptr<PKL> pkl, boost::filesystem::path root) const;
- std::list<boost::shared_ptr<LoadFontNode> > load_font_nodes () const;
+ std::vector<std::shared_ptr<LoadFontNode>> load_font_nodes () const;
- void add_font (std::string load_id, boost::filesystem::path file);
+ void add_font (std::string load_id, dcp::ArrayData data);
std::string xml_as_string () const;
+
+ /** Write this content to an XML file with its fonts alongside */
void write (boost::filesystem::path path) const;
- void resolve_fonts (std::list<boost::shared_ptr<Asset> > assets);
- void add_font_assets (std::list<boost::shared_ptr<Asset> >& assets);
+
+ void resolve_fonts (std::vector<std::shared_ptr<Asset>> assets);
+ void add_font_assets (std::vector<std::shared_ptr<Asset>>& assets);
void set_font_file (std::string load_id, boost::filesystem::path file);
/** Set the reel number or sub-element identifier
return _movie_title;
}
+ int time_code_rate () const {
+ /* Interop can use either; just pick one */
+ return 1000;
+ }
+
static std::string static_pkl_type (Standard) {
return "text/xml;asdcpKind=Subtitle";
}
std::string _reel_number;
std::string _language;
std::string _movie_title;
- std::list<boost::shared_ptr<InteropLoadFontNode> > _load_font_nodes;
+ std::vector<std::shared_ptr<InteropLoadFontNode>> _load_font_nodes;
};
}