projects
/
libdcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge.
[libdcp.git]
/
src
/
asset.h
diff --git
a/src/asset.h
b/src/asset.h
index 4d26a4bc83fc3930ae98cf50ba15877320441d8c..cc6fbcb7c374f7ec06ed98afd004fc2b3e875d1b 100644
(file)
--- a/
src/asset.h
+++ b/
src/asset.h
@@
-25,7
+25,8
@@
#define LIBDCP_ASSET_H
#include <string>
#define LIBDCP_ASSET_H
#include <string>
-#include <sigc++/sigc++.h>
+#include <list>
+#include <boost/filesystem.hpp>
#include "types.h"
namespace ASDCP {
#include "types.h"
namespace ASDCP {
@@
-43,13
+44,12
@@
class Asset
{
public:
/** Construct an 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<void, float>* 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.
/** Write details of the asset to a CPL stream.
* @param s Stream.
@@
-66,30
+66,29
@@
public:
*/
void write_to_assetmap (std::ostream& s) const;
*/
void write_to_assetmap (std::ostream& s) const;
- std::list<std::string> equals (boost::shared_ptr<const Asset> other, EqualityFlags flags) const;
+ std::string uuid () const {
+ return _uuid;
+ }
-protected:
- /** Fill in a ADSCP::WriteInfo struct.
- * @param w struct to fill in.
- */
- void fill_writer_info (ASDCP::WriterInfo* w) const;
+ virtual bool equals (boost::shared_ptr<const Asset> other, EqualityOptions opt, std::list<std::string>& notes) const = 0;
- boost::filesystem::path mxf_path () const;
+protected:
+ friend class PictureAsset;
+ friend class SoundAsset;
+
+ 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;
std::string _directory;
- /** Name of our MXF file */
- std::string _mxf_name;
- /** Signal to emit to report progress */
- sigc::signal1<void, float>* _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;
/** Our UUID */
std::string _uuid;
- /** Digest of our MXF */
- std::string _digest;
+
+private:
+ /** Digest of our MXF or XML file */
+ mutable std::string _digest;
};
}
};
}