From c1d782e29c4fd0ae6de7a3c5b0f47833580293bd Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 24 Apr 2022 21:39:42 +0200 Subject: wip: add AssetMap and fix everything up. --- src/dcp.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'src/dcp.h') diff --git a/src/dcp.h b/src/dcp.h index c3f4e0fd..9403340a 100644 --- a/src/dcp.h +++ b/src/dcp.h @@ -41,6 +41,7 @@ #define LIBDCP_DCP_H +#include "asset_map.h" #include "certificate.h" #include "compose.hpp" #include "metadata.h" @@ -165,7 +166,11 @@ public: /** @return Standard of a DCP that was read in */ boost::optional standard () const { - return _standard; + if (!_asset_map) { + return {}; + } + + return _asset_map->standard(); } boost::filesystem::path directory () const { @@ -180,7 +185,11 @@ public: } boost::optional asset_map_path () { - return _asset_map; + if (!_asset_map) { + return {}; + } + + return _asset_map->path(); } static std::vector directories_from_files (std::vector files); @@ -200,15 +209,11 @@ private: /** The directory that we are writing to */ boost::filesystem::path _directory; + boost::optional _asset_map; /** The CPLs that make up this DCP */ std::vector> _cpls; /** The PKLs that make up this DCP */ std::vector> _pkls; - /** File that the ASSETMAP was read from or last written to */ - mutable boost::optional _asset_map; - - /** Standard of DCP that was read in */ - boost::optional _standard; }; -- cgit v1.2.3