40 #ifndef LIBDCP_ASSET_H
41 #define LIBDCP_ASSET_H
47 #include <boost/filesystem.hpp>
48 #include <boost/function.hpp>
49 #include <boost/optional.hpp>
84 Asset (std::string
id, boost::filesystem::path
file);
87 std::shared_ptr<const Asset> other,
92 virtual void write_to_assetmap (xmlpp::Node* node, boost::filesystem::path root)
const;
94 virtual void add_to_pkl (std::shared_ptr<PKL> pkl, boost::filesystem::path root)
const;
97 boost::optional<boost::filesystem::path>
file ()
const {
115 std::string
hash (boost::function<
void (
float)> progress = {})
const;
117 void set_hash (std::string
hash);
122 mutable boost::optional<boost::filesystem::path>
_file;
124 static void write_file_to_assetmap (xmlpp::Node* node, boost::filesystem::path root, boost::filesystem::path
file, std::string
id);
127 friend struct ::asset_test;
130 virtual std::string
pkl_type (Standard standard)
const = 0;
133 mutable boost::optional<std::string>
_hash;
Parent class for DCP assets, i.e. picture, sound, subtitles, closed captions, CPLs,...
virtual std::string pkl_type(Standard standard) const =0
boost::optional< boost::filesystem::path > file() const
boost::optional< boost::filesystem::path > _file
Asset(boost::filesystem::path file)
boost::optional< std::string > _hash
void set_file(boost::filesystem::path file) const
Asset(std::string id, boost::filesystem::path file)
std::string hash(boost::function< void(float)> progress={}) const
Some part of a DCP that has a UUID.
Namespace for everything in libdcp.
A class to describe what "equality" means for a particular test.