summaryrefslogtreecommitdiff
path: root/src/picture_asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-07-31 00:23:59 +0100
committerCarl Hetherington <cth@carlh.net>2012-07-31 00:23:59 +0100
commitfe3476307bead95b72efc7d47a2ce3da31c35d88 (patch)
treeed5ad2faed0b556be9936920f4b17fd0d100b6bb /src/picture_asset.cc
parentb3ae1623ed44ade680236b4af283543083bceea3 (diff)
path -> dir, name for MXFs.
Diffstat (limited to 'src/picture_asset.cc')
-rw-r--r--src/picture_asset.cc26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/picture_asset.cc b/src/picture_asset.cc
index 2f8a622a..db3f02c3 100644
--- a/src/picture_asset.cc
+++ b/src/picture_asset.cc
@@ -38,13 +38,14 @@ using namespace libdcp;
PictureAsset::PictureAsset (
sigc::slot<string, int> get_path,
- string mxf_path,
+ string directory,
+ string mxf_name,
sigc::signal1<void, float>* progress,
int fps,
int length,
int width,
int height)
- : Asset (mxf_path, progress, fps, length)
+ : Asset (directory, mxf_name, progress, fps, length)
, _width (width)
, _height (height)
{
@@ -53,21 +54,22 @@ PictureAsset::PictureAsset (
PictureAsset::PictureAsset (
vector<string> const & files,
- string mxf_path,
+ string directory,
+ string mxf_name,
sigc::signal1<void, float>* progress,
int fps,
int length,
int width,
int height)
- : Asset (mxf_path, progress, fps, length)
+ : Asset (directory, mxf_name, progress, fps, length)
, _width (width)
, _height (height)
{
construct (sigc::bind (sigc::mem_fun (*this, &PictureAsset::path_from_list), files));
}
-PictureAsset::PictureAsset (string mxf_path, int fps, int length, int width, int height)
- : Asset (mxf_path, 0, fps, length)
+PictureAsset::PictureAsset (string directory, string mxf_name, int fps, int length, int width, int height)
+ : Asset (directory, mxf_name, 0, fps, length)
, _width (width)
, _height (height)
{
@@ -97,8 +99,8 @@ PictureAsset::construct (sigc::slot<string, int> get_path)
fill_writer_info (&writer_info);
ASDCP::JP2K::MXFWriter mxf_writer;
- if (ASDCP_FAILURE (mxf_writer.OpenWrite (_mxf_path.c_str(), writer_info, picture_desc))) {
- throw FileError ("could not open MXF file for writing", _mxf_path);
+ if (ASDCP_FAILURE (mxf_writer.OpenWrite (mxf_path().c_str(), writer_info, picture_desc))) {
+ throw FileError ("could not open MXF file for writing", mxf_path().string());
}
for (int i = 0; i < _length; ++i) {
@@ -121,7 +123,7 @@ PictureAsset::construct (sigc::slot<string, int> get_path)
throw MiscError ("error in finalising video MXF");
}
- _digest = make_digest (_mxf_path, _progress);
+ _digest = make_digest (mxf_path().string(), _progress);
}
void
@@ -129,11 +131,7 @@ PictureAsset::write_to_cpl (ostream& s) const
{
s << " <MainPicture>\n"
<< " <Id>urn:uuid:" << _uuid << "</Id>\n"
-#if BOOST_FILESYSTEM_VERSION == 3
- << " <AnnotationText>" << filesystem::path(_mxf_path).filename().string() << "</AnnotationText>\n"
-#else
- << " <AnnotationText>" << filesystem::path(_mxf_path).filename() << "</AnnotationText>\n"
-#endif
+ << " <AnnotationText>" << _mxf_name << "</AnnotationText>\n"
<< " <EditRate>" << _fps << " 1</EditRate>\n"
<< " <IntrinsicDuration>" << _length << "</IntrinsicDuration>\n"
<< " <EntryPoint>0</EntryPoint>\n"