X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fasset.h;h=cc6fbcb7c374f7ec06ed98afd004fc2b3e875d1b;hb=4aed3e564381267a36d8707b80f35cafba39fa98;hp=51e5dc5426c7cf6db0a953bf5f91a9048a31c2cd;hpb=4f6b9809ed4c9291e2577ee8e0f3bebf15ca2629;p=libdcp.git diff --git a/src/asset.h b/src/asset.h index 51e5dc54..cc6fbcb7 100644 --- a/src/asset.h +++ b/src/asset.h @@ -25,7 +25,8 @@ #define LIBDCP_ASSET_H #include -#include +#include +#include #include "types.h" namespace ASDCP { @@ -43,13 +44,12 @@ class Asset { public: /** Construct an Asset. - * @param directory Directory where MXF file is. - * @param mxf_name Name of MXF file. - * @param progress Signal to inform of progress. - * @param fps Frames per second. - * @param length Length in frames. + * @param directory Directory where our XML or MXF file is. + * @param file_name Name of our file within directory, or empty to make one up based on UUID. */ - Asset (std::string directory, std::string mxf_path, sigc::signal1* progress, int fps, int length); + Asset (std::string directory, std::string file_name = ""); + + virtual ~Asset() {} /** Write details of the asset to a CPL stream. * @param s Stream. @@ -66,35 +66,28 @@ public: */ void write_to_assetmap (std::ostream& s) const; - virtual std::list equals (boost::shared_ptr other, EqualityFlags flags, double max_mean, double max_std_dev) const; + std::string uuid () const { + return _uuid; + } + + virtual bool equals (boost::shared_ptr other, EqualityOptions opt, std::list& notes) const = 0; protected: friend class PictureAsset; friend class SoundAsset; - /** Fill in a ADSCP::WriteInfo struct. - * @param w struct to fill in. - */ - void fill_writer_info (ASDCP::WriterInfo* w) const; - - boost::filesystem::path mxf_path () const; std::string digest () const; + boost::filesystem::path path () const; - /** Directory that our MXF file is in */ + /** Directory that our MXF or XML file is in */ std::string _directory; - /** Name of our MXF file */ - std::string _mxf_name; - /** Signal to emit to report progress */ - sigc::signal1* _progress; - /** Frames per second */ - int _fps; - /** Length in frames */ - int _length; + /** Name of our MXF or XML file */ + std::string _file_name; /** Our UUID */ std::string _uuid; private: - /** Digest of our MXF */ + /** Digest of our MXF or XML file */ mutable std::string _digest; };