summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-10-19 11:38:36 +0100
committerCarl Hetherington <cth@carlh.net>2013-10-19 11:38:36 +0100
commitd86d3f66f88623bea44033db4855206dd3a5e830 (patch)
tree6e94746c03a46ebf6b6d3fb4ff4bebf032bb5060
parent58645afe4a843e69ff1c72ffbd772746d8edbef1 (diff)
Some more boost::filesystem::path.
-rw-r--r--src/asset.cc6
-rw-r--r--src/asset.h4
-rw-r--r--src/mono_picture_asset.cc2
-rw-r--r--src/mono_picture_asset.h2
-rw-r--r--src/mxf_asset.cc4
-rw-r--r--src/mxf_asset.h2
-rw-r--r--src/picture_asset.cc2
-rw-r--r--src/picture_asset.h2
-rw-r--r--src/stereo_picture_asset.cc2
-rw-r--r--src/stereo_picture_asset.h2
-rw-r--r--src/subtitle_asset.cc2
11 files changed, 15 insertions, 15 deletions
diff --git a/src/asset.cc b/src/asset.cc
index 4e17f855..d99043cf 100644
--- a/src/asset.cc
+++ b/src/asset.cc
@@ -37,7 +37,7 @@ using namespace std;
using namespace boost;
using namespace libdcp;
-Asset::Asset (boost::filesystem::path directory, string file_name)
+Asset::Asset (boost::filesystem::path directory, boost::filesystem::path file_name)
: _directory (directory)
, _file_name (file_name)
, _uuid (make_uuid ())
@@ -56,7 +56,7 @@ Asset::write_to_pkl (xmlpp::Node* node) const
{
xmlpp::Node* asset = node->add_child ("Asset");
asset->add_child("Id")->add_child_text ("urn:uuid:" + _uuid);
- asset->add_child("AnnotationText")->add_child_text (_file_name);
+ asset->add_child("AnnotationText")->add_child_text (_file_name.string ());
asset->add_child("Hash")->add_child_text (digest ());
asset->add_child("Size")->add_child_text (lexical_cast<string> (filesystem::file_size(path())));
asset->add_child("Type")->add_child_text ("application/mxf");
@@ -69,7 +69,7 @@ Asset::write_to_assetmap (xmlpp::Node* node) const
asset->add_child("Id")->add_child_text ("urn:uuid:" + _uuid);
xmlpp::Node* chunk_list = asset->add_child ("ChunkList");
xmlpp::Node* chunk = chunk_list->add_child ("Chunk");
- chunk->add_child("Path")->add_child_text (_file_name);
+ chunk->add_child("Path")->add_child_text (_file_name.string ());
chunk->add_child("VolumeIndex")->add_child_text ("1");
chunk->add_child("Offset")->add_child_text ("0");
chunk->add_child("Length")->add_child_text (lexical_cast<string> (filesystem::file_size(path())));
diff --git a/src/asset.h b/src/asset.h
index ec1385e6..34176d0d 100644
--- a/src/asset.h
+++ b/src/asset.h
@@ -53,7 +53,7 @@ public:
* @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 (boost::filesystem::path directory, std::string file_name = "");
+ Asset (boost::filesystem::path directory, boost::filesystem::path file_name = "");
virtual ~Asset() {}
@@ -136,7 +136,7 @@ protected:
/** Directory that our MXF or XML file is in */
boost::filesystem::path _directory;
/** Name of our MXF or XML file */
- std::string _file_name;
+ boost::filesystem::path _file_name;
/** Our UUID */
std::string _uuid;
/** The edit rate; this is normally equal to the number of video frames per second */
diff --git a/src/mono_picture_asset.cc b/src/mono_picture_asset.cc
index 1a724127..52c87738 100644
--- a/src/mono_picture_asset.cc
+++ b/src/mono_picture_asset.cc
@@ -31,7 +31,7 @@ using boost::dynamic_pointer_cast;
using boost::lexical_cast;
using namespace libdcp;
-MonoPictureAsset::MonoPictureAsset (boost::filesystem::path directory, string mxf_name)
+MonoPictureAsset::MonoPictureAsset (boost::filesystem::path directory, boost::filesystem::path mxf_name)
: PictureAsset (directory, mxf_name)
{
diff --git a/src/mono_picture_asset.h b/src/mono_picture_asset.h
index 6ade93bd..d2029e00 100644
--- a/src/mono_picture_asset.h
+++ b/src/mono_picture_asset.h
@@ -28,7 +28,7 @@ namespace libdcp {
class MonoPictureAsset : public PictureAsset
{
public:
- MonoPictureAsset (boost::filesystem::path directory, std::string mxf_name);
+ MonoPictureAsset (boost::filesystem::path directory, boost::filesystem::path mxf_name);
void read ();
void create (std::vector<boost::filesystem::path> const & files);
diff --git a/src/mxf_asset.cc b/src/mxf_asset.cc
index 7bffc9f2..9f480794 100644
--- a/src/mxf_asset.cc
+++ b/src/mxf_asset.cc
@@ -43,7 +43,7 @@ using boost::lexical_cast;
using boost::dynamic_pointer_cast;
using namespace libdcp;
-MXFAsset::MXFAsset (boost::filesystem::path directory, string file_name)
+MXFAsset::MXFAsset (boost::filesystem::path directory, boost::filesystem::path file_name)
: Asset (directory, file_name)
, _progress (0)
, _encryption_context (0)
@@ -117,7 +117,7 @@ MXFAsset::write_to_cpl (xmlpp::Element* node, bool interop) const
a->set_attribute (attr.first, attr.second);
}
a->add_child ("Id")->add_child_text ("urn:uuid:" + _uuid);
- a->add_child ("AnnotationText")->add_child_text (_file_name);
+ a->add_child ("AnnotationText")->add_child_text (_file_name.string ());
a->add_child ("EditRate")->add_child_text (lexical_cast<string> (_edit_rate) + " 1");
a->add_child ("IntrinsicDuration")->add_child_text (lexical_cast<string> (_intrinsic_duration));
a->add_child ("EntryPoint")->add_child_text (lexical_cast<string> (_entry_point));
diff --git a/src/mxf_asset.h b/src/mxf_asset.h
index b7144281..dda69a9a 100644
--- a/src/mxf_asset.h
+++ b/src/mxf_asset.h
@@ -45,7 +45,7 @@ public:
* @param directory Directory where MXF file is.
* @param file_name Name of MXF file.
*/
- MXFAsset (boost::filesystem::path directory, std::string file_name);
+ MXFAsset (boost::filesystem::path directory, boost::filesystem::path file_name);
~MXFAsset ();
diff --git a/src/picture_asset.cc b/src/picture_asset.cc
index 63f59638..10bd8140 100644
--- a/src/picture_asset.cc
+++ b/src/picture_asset.cc
@@ -53,7 +53,7 @@ using boost::dynamic_pointer_cast;
using boost::lexical_cast;
using namespace libdcp;
-PictureAsset::PictureAsset (boost::filesystem::path directory, string mxf_name)
+PictureAsset::PictureAsset (boost::filesystem::path directory, boost::filesystem::path mxf_name)
: MXFAsset (directory, mxf_name)
{
diff --git a/src/picture_asset.h b/src/picture_asset.h
index 7d669eb3..e08efb1d 100644
--- a/src/picture_asset.h
+++ b/src/picture_asset.h
@@ -51,7 +51,7 @@ public:
* @param directory Directory where MXF file is.
* @param mxf_name Name of MXF file.
*/
- PictureAsset (boost::filesystem::path directory, std::string mxf_name);
+ PictureAsset (boost::filesystem::path directory, boost::filesystem::path mxf_name);
/** Start a progressive write to this asset.
* @param overwrite true to overwrite an existing MXF file; in this mode, writing can be resumed to a partially-written MXF; false if the
diff --git a/src/stereo_picture_asset.cc b/src/stereo_picture_asset.cc
index 2490fca0..5e692794 100644
--- a/src/stereo_picture_asset.cc
+++ b/src/stereo_picture_asset.cc
@@ -87,7 +87,7 @@ StereoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt,
return true;
}
-StereoPictureAsset::StereoPictureAsset (boost::filesystem::path directory, string mxf_name)
+StereoPictureAsset::StereoPictureAsset (boost::filesystem::path directory, boost::filesystem::path mxf_name)
: PictureAsset (directory, mxf_name)
{
diff --git a/src/stereo_picture_asset.h b/src/stereo_picture_asset.h
index 6a321532..6a96bf02 100644
--- a/src/stereo_picture_asset.h
+++ b/src/stereo_picture_asset.h
@@ -28,7 +28,7 @@ namespace libdcp {
class StereoPictureAsset : public PictureAsset
{
public:
- StereoPictureAsset (boost::filesystem::path directory, std::string mxf_name);
+ StereoPictureAsset (boost::filesystem::path directory, boost::filesystem::path mxf_name);
void read ();
diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc
index 866a6d25..d48d4ac0 100644
--- a/src/subtitle_asset.cc
+++ b/src/subtitle_asset.cc
@@ -285,7 +285,7 @@ SubtitleAsset::write_to_cpl (xmlpp::Element* node, bool) const
xmlpp::Node* ms = node->add_child ("MainSubtitle");
ms->add_child("Id")->add_child_text("urn:uuid:" + _uuid);
- ms->add_child("AnnotationText")->add_child_text (_file_name);
+ ms->add_child("AnnotationText")->add_child_text (_file_name.string ());
/* XXX */
ms->add_child("EntryPoint")->add_child_text ("0");
}