From fe9d2a290682021cd12a00bf21fa4db3012e2049 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 29 Jul 2016 15:54:09 +0100 Subject: Basics of custom DCP filename components. --- src/lib/util.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/lib/util.cc') diff --git a/src/lib/util.cc b/src/lib/util.cc index 4a0965858..09f32dfda 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -619,13 +619,19 @@ split_get_request (string url) string video_asset_filename (shared_ptr asset) { - return "j2c_" + asset->id() + ".mxf"; + dcp::NameFormat::Map values; + values["type"] = "j2c"; + values["id"] = asset->id(); + return Config::instance()->dcp_filename_format().get(values) + ".mxf"; } string audio_asset_filename (shared_ptr asset) { - return "pcm_" + asset->id() + ".mxf"; + dcp::NameFormat::Map values; + values["type"] = "pcm"; + values["id"] = asset->id(); + return Config::instance()->dcp_filename_format().get(values) + ".mxf"; } float -- cgit v1.2.3