summaryrefslogtreecommitdiff
path: root/src/dcp.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-07-18 00:23:28 +0100
committerCarl Hetherington <cth@carlh.net>2012-07-18 00:23:28 +0100
commitca45f479876579c91b9d438c47c5166b1a178704 (patch)
tree2757a90d01307b66a39ecbca5544c47ffdf324fc /src/dcp.cc
parent2194158985f9c1300ffe24c7c6fb786cb39bbdb5 (diff)
Allow functor to obtain content paths.
Diffstat (limited to 'src/dcp.cc')
-rw-r--r--src/dcp.cc24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index ca2a2d14..c466396c 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -44,7 +44,7 @@ DCP::DCP (string directory, string name, ContentType content_type, int fps, int
}
void
-DCP::add_sound_asset (list<string> const & files)
+DCP::add_sound_asset (vector<string> const & files)
{
filesystem::path p;
p /= _directory;
@@ -53,12 +53,30 @@ DCP::add_sound_asset (list<string> const & files)
}
void
-DCP::add_picture_asset (list<string> const & files, int w, int h)
+DCP::add_sound_asset (sigc::slot<string, Channel> get_path, int channels)
+{
+ filesystem::path p;
+ p /= _directory;
+ p /= "audio.mxf";
+ _assets.push_back (shared_ptr<SoundAsset> (new SoundAsset (get_path, p.string(), &Progress, _fps, _length, channels)));
+}
+
+void
+DCP::add_picture_asset (vector<string> const & files, int width, int height)
+{
+ filesystem::path p;
+ p /= _directory;
+ p /= "video.mxf";
+ _assets.push_back (shared_ptr<PictureAsset> (new PictureAsset (files, p.string(), &Progress, _fps, _length, width, height)));
+}
+
+void
+DCP::add_picture_asset (sigc::slot<string, int> get_path, int width, int height)
{
filesystem::path p;
p /= _directory;
p /= "video.mxf";
- _assets.push_back (shared_ptr<PictureAsset> (new PictureAsset (files, p.string(), &Progress, _fps, _length, w, h)));
+ _assets.push_back (shared_ptr<PictureAsset> (new PictureAsset (get_path, p.string(), &Progress, _fps, _length, width, height)));
}
void