From a0c931b6bfb05b56996a75bbfcf378cd44ef18e1 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 commit is mostly just for the backend. We also need a fair few checks/restrictions in the UI: - any present atmos content dictates the project frame rate - no mixed edit rates of atmos content - probably some other things I haven't thought of --- 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