diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-18 00:23:28 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-18 00:23:28 +0100 |
| commit | ca45f479876579c91b9d438c47c5166b1a178704 (patch) | |
| tree | 2757a90d01307b66a39ecbca5544c47ffdf324fc /src/dcp.cc | |
| parent | 2194158985f9c1300ffe24c7c6fb786cb39bbdb5 (diff) | |
Allow functor to obtain content paths.
Diffstat (limited to 'src/dcp.cc')
| -rw-r--r-- | src/dcp.cc | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -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 |
