diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-11 00:11:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-12-11 00:19:21 +0100 |
| commit | 53d472f6e4531586fb91e649c386fdfaecb6ecaf (patch) | |
| tree | 5cdba704efae6c978eb7e9dbfd76ee661d1ca87c | |
| parent | a3ef6c08705798ac1cd8b62b77697c35c3506567 (diff) | |
Extract named_channel.h
| -rw-r--r-- | src/lib/audio_content.h | 5 | ||||
| -rw-r--r-- | src/lib/audio_processor.h | 2 | ||||
| -rw-r--r-- | src/lib/film.h | 1 | ||||
| -rw-r--r-- | src/lib/named_channel.cc | 30 | ||||
| -rw-r--r-- | src/lib/named_channel.h | 46 | ||||
| -rw-r--r-- | src/lib/types.cc | 6 | ||||
| -rw-r--r-- | src/lib/types.h | 15 | ||||
| -rw-r--r-- | src/lib/wscript | 1 | ||||
| -rw-r--r-- | src/wx/audio_mapping_view.h | 1 |
9 files changed, 83 insertions, 24 deletions
diff --git a/src/lib/audio_content.h b/src/lib/audio_content.h index bd5a25b98..18f826ee6 100644 --- a/src/lib/audio_content.h +++ b/src/lib/audio_content.h @@ -28,9 +28,10 @@ #define DCPOMATIC_AUDIO_CONTENT_H -#include "content_part.h" -#include "audio_stream.h" #include "audio_mapping.h" +#include "audio_stream.h" +#include "content_part.h" +#include "named_channel.h" /** @class AudioContentProperty diff --git a/src/lib/audio_processor.h b/src/lib/audio_processor.h index e24506acd..4cfda1def 100644 --- a/src/lib/audio_processor.h +++ b/src/lib/audio_processor.h @@ -28,7 +28,7 @@ #define DCPOMATIC_AUDIO_PROCESSOR_H -#include "types.h" +#include "named_channel.h" #include <memory> #include <string> #include <vector> diff --git a/src/lib/film.h b/src/lib/film.h index 55412c2e8..f3e05f083 100644 --- a/src/lib/film.h +++ b/src/lib/film.h @@ -33,6 +33,7 @@ #include "dcp_text_track.h" #include "dcpomatic_time.h" #include "frame_rate_change.h" +#include "named_channel.h" #include "resolution.h" #include "signaller.h" #include "transcode_job.h" diff --git a/src/lib/named_channel.cc b/src/lib/named_channel.cc new file mode 100644 index 000000000..f352b2120 --- /dev/null +++ b/src/lib/named_channel.cc @@ -0,0 +1,30 @@ +/* + Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net> + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>. + +*/ + + +#include "named_channel.h" + + +bool operator== (NamedChannel const& a, NamedChannel const& b) +{ + return a.name == b.name && a.index == b.index; +} + + diff --git a/src/lib/named_channel.h b/src/lib/named_channel.h new file mode 100644 index 000000000..f6a3fcf8c --- /dev/null +++ b/src/lib/named_channel.h @@ -0,0 +1,46 @@ +/* + Copyright (C) 2013-2021 Carl Hetherington <cth@carlh.net> + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>. + +*/ + + +#ifndef DCPOMATIC_NAMED_CHANNEL_H +#define DCPOMATIC_NAMED_CHANNEL_H + + +#include <string> + + +class NamedChannel +{ +public: + NamedChannel (std::string name_, int index_) + : name(name_) + , index(index_) + {} + + std::string name; + int index; +}; + + +bool operator== (NamedChannel const& a, NamedChannel const& b); + + +#endif + diff --git a/src/lib/types.cc b/src/lib/types.cc index d9108a942..69d27a1ce 100644 --- a/src/lib/types.cc +++ b/src/lib/types.cc @@ -167,12 +167,6 @@ CPLSummary::CPLSummary (boost::filesystem::path p) } -bool operator== (NamedChannel const& a, NamedChannel const& b) -{ - return a.name == b.name && a.index == b.index; -} - - string video_range_to_string (VideoRange r) { diff --git a/src/lib/types.h b/src/lib/types.h index ad9158c8c..9bf4c80b1 100644 --- a/src/lib/types.h +++ b/src/lib/types.h @@ -199,19 +199,4 @@ enum class EmailProtocol { }; -class NamedChannel -{ -public: - NamedChannel (std::string name_, int index_) - : name(name_) - , index(index_) - {} - - std::string name; - int index; -}; - - -bool operator== (NamedChannel const& a, NamedChannel const& b); - #endif diff --git a/src/lib/wscript b/src/lib/wscript index 447c0f478..f3e16fad8 100644 --- a/src/lib/wscript +++ b/src/lib/wscript @@ -146,6 +146,7 @@ sources = """ maths_util.cc memory_util.cc mid_side_decoder.cc + named_channel.cc overlaps.cc pixel_quanta.cc player.cc diff --git a/src/wx/audio_mapping_view.h b/src/wx/audio_mapping_view.h index 873fc5c93..3bdc8f1a9 100644 --- a/src/wx/audio_mapping_view.h +++ b/src/wx/audio_mapping_view.h @@ -25,6 +25,7 @@ #include "lib/audio_mapping.h" +#include "lib/named_channel.h" #include "lib/types.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS |
