diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-07-29 23:15:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-07-29 23:15:26 +0100 |
| commit | 49fc9b8c4282d0e973ac1f4e31357735cf6be218 (patch) | |
| tree | 45c8818a324d5628d70de82e80aed2441ea06b7e /src/lib/util.cc | |
| parent | f4964573a60155545e02cbbebc47199f7480cf14 (diff) | |
Add reel index/count to DCP filename format.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 59974c24c..c8d0561be 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -617,20 +617,24 @@ split_get_request (string url) } string -video_asset_filename (shared_ptr<dcp::PictureAsset> asset) +video_asset_filename (shared_ptr<dcp::PictureAsset> asset, int reel_index, int reel_count) { dcp::NameFormat::Map values; values['t'] = "j2c"; values['i'] = asset->id(); + values['r'] = raw_convert<string> (reel_index + 1); + values['n'] = raw_convert<string> (reel_count); return Config::instance()->dcp_filename_format().get(values) + ".mxf"; } string -audio_asset_filename (shared_ptr<dcp::SoundAsset> asset) +audio_asset_filename (shared_ptr<dcp::SoundAsset> asset, int reel_index, int reel_count) { dcp::NameFormat::Map values; values['t'] = "pcm"; values['i'] = asset->id(); + values['r'] = raw_convert<string> (reel_index + 1); + values['n'] = raw_convert<string> (reel_count); return Config::instance()->dcp_filename_format().get(values) + ".mxf"; } |
