diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-06-19 13:30:02 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-06-19 13:42:24 +0200 |
| commit | a0c931b6bfb05b56996a75bbfcf378cd44ef18e1 (patch) | |
| tree | d02d8cb5ef0fd0f8ce0751bf17fab9c98ffd1868 /src/lib/util.cc | |
| parent | cabe0934c60fb6e74bf4c3023bdcb5c68753e5d9 (diff) | |
Make Atmos content work more like other content. Now its MXFsencrypt-atmos
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
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) { |
