Extract named_channel.h
authorCarl Hetherington <cth@carlh.net>
Sat, 10 Dec 2022 23:11:51 +0000 (00:11 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 10 Dec 2022 23:19:21 +0000 (00:19 +0100)
src/lib/audio_content.h
src/lib/audio_processor.h
src/lib/film.h
src/lib/named_channel.cc [new file with mode: 0644]
src/lib/named_channel.h [new file with mode: 0644]
src/lib/types.cc
src/lib/types.h
src/lib/wscript
src/wx/audio_mapping_view.h

index bd5a25b98ccd4bd102b41b5a5fb571a3fd2a3b6e..18f826ee6dbe9751f9a3d96efbbdd7373a20326a 100644 (file)
 #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
index e24506acdf4dd287d659542e5c6dbac9e0840bcc..4cfda1defb5d84800594fc13717a985c26abc917 100644 (file)
@@ -28,7 +28,7 @@
 #define DCPOMATIC_AUDIO_PROCESSOR_H
 
 
-#include "types.h"
+#include "named_channel.h"
 #include <memory>
 #include <string>
 #include <vector>
index 55412c2e88b03936ef35e297b7f77699adebb55e..f3e05f083f5690944dac5e1caa922e4cfc128cfb 100644 (file)
@@ -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 (file)
index 0000000..f352b21
--- /dev/null
@@ -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 (file)
index 0000000..f6a3fcf
--- /dev/null
@@ -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
+
index d9108a94219dcb82aef96d66aa03e4a8f6a16fdb..69d27a1ce2776bea1bbabf9ea592fedcfd78becb 100644 (file)
@@ -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)
 {
index ad9158c8c232914c5cdf07752c1d57d96973b45c..9bf4c80b1b732560d133114f932ab2ff27344731 100644 (file)
@@ -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
index 447c0f4783d832de4b80e7bd9fbd677d1012ea62..f3e16fad871a6819e1c469872a0bcb7af5429379 100644 (file)
@@ -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
index 873fc5c93800fd74d5e761165fdbd712ecb49b9f..3bdc8f1a99154c9d7a10b6217de35572906bdeef 100644 (file)
@@ -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