#define LIBDCP_ASSET_H
#include <string>
+#include <boost/filesystem.hpp>
#include <sigc++/sigc++.h>
+#include "types.h"
namespace ASDCP {
class WriterInfo;
{
public:
/** Construct an Asset.
- * @param mxf_path Pathname 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.
*/
- Asset (std::string mxf_path, sigc::signal1<void, float>* progress, int fps, int length);
+ Asset (std::string directory, std::string file_name);
/** Write details of the asset to a CPL stream.
* @param s Stream.
*/
void write_to_assetmap (std::ostream& s) const;
+ virtual std::list<std::string> equals (boost::shared_ptr<const Asset> other, EqualityOptions opt) const = 0;
+
protected:
- /** Fill in a ADSCP::WriteInfo struct.
- * @param w struct to fill in.
- */
- void fill_writer_info (ASDCP::WriterInfo* w) const;
-
- /** Path to our MXF file */
- std::string _mxf_path;
- /** Signal to emit to report progress */
- sigc::signal1<void, float>* _progress;
- /** Frames per second */
- int _fps;
- /** Length in frames */
- int _length;
+ friend class PictureAsset;
+ friend class SoundAsset;
+
+ std::string digest () const;
+ boost::filesystem::path path () const;
+
+ /** Directory that our MXF or XML file is in */
+ std::string _directory;
+ /** Name of our MXF or XML file */
+ std::string _file_name;
/** Our UUID */
std::string _uuid;
- /** Digest of our MXF */
- std::string _digest;
+
+private:
+ /** Digest of our MXF or XML file */
+ mutable std::string _digest;
};
}