From ca45f479876579c91b9d438c47c5166b1a178704 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 18 Jul 2012 00:23:28 +0100 Subject: Allow functor to obtain content paths. --- src/dcp.cc | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'src/dcp.cc') 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 const & files) +DCP::add_sound_asset (vector const & files) { filesystem::path p; p /= _directory; @@ -53,12 +53,30 @@ DCP::add_sound_asset (list const & files) } void -DCP::add_picture_asset (list const & files, int w, int h) +DCP::add_sound_asset (sigc::slot get_path, int channels) +{ + filesystem::path p; + p /= _directory; + p /= "audio.mxf"; + _assets.push_back (shared_ptr (new SoundAsset (get_path, p.string(), &Progress, _fps, _length, channels))); +} + +void +DCP::add_picture_asset (vector const & files, int width, int height) +{ + filesystem::path p; + p /= _directory; + p /= "video.mxf"; + _assets.push_back (shared_ptr (new PictureAsset (files, p.string(), &Progress, _fps, _length, width, height))); +} + +void +DCP::add_picture_asset (sigc::slot get_path, int width, int height) { filesystem::path p; p /= _directory; p /= "video.mxf"; - _assets.push_back (shared_ptr (new PictureAsset (files, p.string(), &Progress, _fps, _length, w, h))); + _assets.push_back (shared_ptr (new PictureAsset (get_path, p.string(), &Progress, _fps, _length, width, height))); } void -- cgit v1.2.3