From ca981c8cfa23111e92be329f1c2dfbe3a07b4247 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 19 Jun 2020 13:30:02 +0200 Subject: Make Atmos content work more like other content. Now its MXFs are re-written, meaning that they can be encrypted. This (along with the libdcp update) also fixes assorted Atmos bugs. --- src/lib/util.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/lib/util.cc') diff --git a/src/lib/util.cc b/src/lib/util.cc index f9877523a..74951fc64 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -52,6 +52,7 @@ #include #include #include +#include extern "C" { #include #include @@ -727,6 +728,21 @@ audio_asset_filename (shared_ptr asset, int reel_index, int ree return Config::instance()->dcp_asset_filename_format().get(values, "_" + asset->id() + ".mxf"); } + +string +atmos_asset_filename (shared_ptr asset, int reel_index, int reel_count, optional summary) +{ + dcp::NameFormat::Map values; + values['t'] = "atmos"; + values['r'] = raw_convert (reel_index + 1); + values['n'] = raw_convert (reel_count); + if (summary) { + values['c'] = careful_string_filter (summary.get()); + } + return Config::instance()->dcp_asset_filename_format().get(values, "_" + asset->id() + ".mxf"); +} + + float relaxed_string_to_float (string s) { -- cgit v1.2.3