summaryrefslogtreecommitdiff
path: root/src/asset.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-26 21:35:02 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-26 21:35:02 +0000
commit59886567974bd3e79d30a4a9425d86d50bf425f3 (patch)
tree68e583a64144f5cbffede882e1187ecf737b2e43 /src/asset.h
parent0703842433013ac1d5f79c09d7a8361dc2e565c8 (diff)
It builds again.
Diffstat (limited to 'src/asset.h')
-rw-r--r--src/asset.h42
1 files changed, 40 insertions, 2 deletions
diff --git a/src/asset.h b/src/asset.h
index f3546cd8..e8867ae5 100644
--- a/src/asset.h
+++ b/src/asset.h
@@ -17,23 +17,61 @@
*/
+/** @file src/asset.h
+ * @brief Asset class.
+ */
+
#ifndef LIBDCP_ASSET_H
#define LIBDCP_ASSET_H
#include "object.h"
+#include "types.h"
+#include <boost/filesystem.hpp>
+#include <boost/function.hpp>
+
+namespace xmlpp {
+ class Node;
+}
namespace dcp {
/** @class Asset
- * @brief Parent class for DCP assets, i.e. picture/sound/subtitles, CPLs and PKLs.
+ * @brief Parent class for DCP assets, i.e. picture/sound/subtitles and CPLs.
+ *
+ * Note that this class is not used for ReelAssets; they are just for the metadata
+ * that gets put into <Reel>s.
*/
-
class Asset : public Object
{
public:
Asset ();
+ Asset (boost::filesystem::path file);
Asset (std::string id);
+ virtual std::string pkl_type () const = 0;
+ virtual bool equals (boost::shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> note) const;
+
+ /** Write details of the asset to a PKL AssetList node.
+ * @param node Parent node.
+ */
+ void write_to_pkl (xmlpp::Node* node) const;
+ void write_to_assetmap (xmlpp::Node* node) const;
+
+ boost::filesystem::path file () const {
+ return _file;
+ }
+
+ void set_file (boost::filesystem::path file) {
+ _file = file;
+ }
+
+ std::string hash () const;
+
+protected:
+ friend class MXFWriter;
+
+ boost::filesystem::path _file;
+ mutable std::string _hash;
};
}