diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-06 14:42:08 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-06 14:42:08 +0100 |
| commit | 8750efb9e072cf3b42e6c3c29521c7031c0b5dfd (patch) | |
| tree | 0f0dd00b0413763b678ed2388b849cfe45a88468 /src/lib/util.cc | |
| parent | 1bff0990433ab0ce588acaef7c589fa623bd998b (diff) | |
Basics of content dialogs.
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index e0de82c64..1e60b43fc 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -914,58 +914,6 @@ audio_channel_name (int c) return channels[c]; } -AudioMapping::AudioMapping (int c) - : _source_channels (c) -{ - -} - -optional<libdcp::Channel> -AudioMapping::source_to_dcp (int c) const -{ - if (c >= _source_channels) { - return optional<libdcp::Channel> (); - } - - if (_source_channels == 1) { - /* mono sources to centre */ - return libdcp::CENTRE; - } - - return static_cast<libdcp::Channel> (c); -} - -optional<int> -AudioMapping::dcp_to_source (libdcp::Channel c) const -{ - if (_source_channels == 1) { - if (c == libdcp::CENTRE) { - return 0; - } else { - return optional<int> (); - } - } - - if (static_cast<int> (c) >= _source_channels) { - return optional<int> (); - } - - return static_cast<int> (c); -} - -int -AudioMapping::dcp_channels () const -{ - if (_source_channels == 1) { - /* The source is mono, so to put the mono channel into - the centre we need to generate a 5.1 soundtrack. - */ - return 6; - } - - return _source_channels; -} - FrameRateConversion::FrameRateConversion (float source, int dcp) : skip (false) , repeat (false) |
