diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-06-19 13:30:02 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-06-19 15:07:30 +0200 |
| commit | ca981c8cfa23111e92be329f1c2dfbe3a07b4247 (patch) | |
| tree | 2a0ceab2864691f910c9c7d70127542868f9f8e5 /src/lib/util.cc | |
| parent | cabe0934c60fb6e74bf4c3023bdcb5c68753e5d9 (diff) | |
Make Atmos content work more like other content. Now its MXFsv2.15.82
are re-written, meaning that they can be encrypted.
This (along with the libdcp update) also fixes assorted Atmos bugs.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 16 |
1 files changed, 16 insertions, 0 deletions
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 <dcp/picture_asset.h> #include <dcp/sound_asset.h> #include <dcp/subtitle_asset.h> +#include <dcp/atmos_asset.h> extern "C" { #include <libavfilter/avfilter.h> #include <libavformat/avformat.h> @@ -727,6 +728,21 @@ audio_asset_filename (shared_ptr<dcp::SoundAsset> asset, int reel_index, int ree return Config::instance()->dcp_asset_filename_format().get(values, "_" + asset->id() + ".mxf"); } + +string +atmos_asset_filename (shared_ptr<dcp::AtmosAsset> asset, int reel_index, int reel_count, optional<string> summary) +{ + dcp::NameFormat::Map values; + values['t'] = "atmos"; + values['r'] = raw_convert<string> (reel_index + 1); + values['n'] = raw_convert<string> (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) { |
