*/
+/** @file src/asset.cc
+ * @brief Parent class for assets of DCPs.
+ */
+
+#include <iostream>
#include <boost/filesystem.hpp>
#include "AS_DCP.h"
#include "KM_util.h"
using namespace boost;
using namespace libdcp;
-/** Construct an Asset.
- * @param p Pathname of MXF file.
- * @param fps Frames per second.
- * @param len Length in frames.
- */
-
-Asset::Asset (string p, int fps, int len)
- : _mxf_path (p)
+Asset::Asset (string mxf_path, sigc::signal1<void, float>* progress, int fps, int length)
+ : _mxf_path (mxf_path)
+ , _progress (progress)
, _fps (fps)
- , _length (len)
+ , _length (length)
, _uuid (make_uuid ())
{
writer_info->ProductName = Tags::instance()->product_name.c_str();
writer_info->LabelSetType = ASDCP::LS_MXF_SMPTE;
- Kumu::GenRandomUUID (writer_info->AssetUUID);
+ unsigned int c;
+ Kumu::hex2bin (_uuid.c_str(), writer_info->AssetUUID, Kumu::UUID_Length, &c);
+ assert (c == Kumu::UUID_Length);
}