summaryrefslogtreecommitdiff
path: root/src/sound_asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-09-25 17:19:59 +0100
committerCarl Hetherington <cth@carlh.net>2013-09-25 17:19:59 +0100
commite563727ee7b72881ee163db9b777559c8ceb5074 (patch)
tree691966d59ee49912c6c020f67759ee13ece0a925 /src/sound_asset.cc
parent43465aa4037cec6d351a842a6624a50685d6c127 (diff)
Add round-trip KDM test. Fix various bugs in KDM generation. Some string -> path.
Diffstat (limited to 'src/sound_asset.cc')
-rw-r--r--src/sound_asset.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/sound_asset.cc b/src/sound_asset.cc
index 026c44ef..984d8f0f 100644
--- a/src/sound_asset.cc
+++ b/src/sound_asset.cc
@@ -43,8 +43,8 @@ using boost::lexical_cast;
using namespace libdcp;
SoundAsset::SoundAsset (
- vector<string> const & files,
- string directory,
+ vector<boost::filesystem::path> const & files,
+ boost::filesystem::path directory,
string mxf_name,
boost::signals2::signal<void (float)>* progress,
int fps,
@@ -62,8 +62,8 @@ SoundAsset::SoundAsset (
}
SoundAsset::SoundAsset (
- boost::function<string (Channel)> get_path,
- string directory,
+ boost::function<boost::filesystem::path (Channel)> get_path,
+ boost::filesystem::path directory,
string mxf_name,
boost::signals2::signal<void (float)>* progress,
int fps,
@@ -81,7 +81,7 @@ SoundAsset::SoundAsset (
construct (get_path, interop, metadata);
}
-SoundAsset::SoundAsset (string directory, string mxf_name)
+SoundAsset::SoundAsset (boost::filesystem::path directory, string mxf_name)
: MXFAsset (directory, mxf_name)
, _channels (0)
{
@@ -102,7 +102,7 @@ SoundAsset::SoundAsset (string directory, string mxf_name)
_intrinsic_duration = desc.ContainerDuration;
}
-SoundAsset::SoundAsset (string directory, string mxf_name, int fps, int channels, int sampling_rate)
+SoundAsset::SoundAsset (boost::filesystem::path directory, string mxf_name, int fps, int channels, int sampling_rate)
: MXFAsset (directory, mxf_name, 0, fps, 0)
, _channels (channels)
, _sampling_rate (sampling_rate)
@@ -110,8 +110,8 @@ SoundAsset::SoundAsset (string directory, string mxf_name, int fps, int channels
}
-string
-SoundAsset::path_from_channel (Channel channel, vector<string> const & files)
+boost::filesystem::path
+SoundAsset::path_from_channel (Channel channel, vector<boost::filesystem::path> const & files)
{
unsigned int const c = int (channel);
assert (c < files.size ());
@@ -119,7 +119,7 @@ SoundAsset::path_from_channel (Channel channel, vector<string> const & files)
}
void
-SoundAsset::construct (boost::function<string (Channel)> get_path, bool interop, MXFMetadata const & metadata)
+SoundAsset::construct (boost::function<boost::filesystem::path (Channel)> get_path, bool interop, MXFMetadata const & metadata)
{
ASDCP::Rational asdcp_edit_rate (_edit_rate, 1);
@@ -154,7 +154,7 @@ SoundAsset::construct (boost::function<string (Channel)> get_path, bool interop,
for (int i = 0; i < _channels; ++i) {
- string const path = get_path (channels[i]);
+ boost::filesystem::path const path = get_path (channels[i]);
if (ASDCP_FAILURE (pcm_parser_channel[i].OpenRead (path.c_str(), asdcp_edit_rate))) {
boost::throw_exception (FileError ("could not open WAV file for reading", path));