Put Font and Screen into dcpomatic namespace.
authorCarl Hetherington <cth@carlh.net>
Wed, 8 May 2019 22:56:32 +0000 (23:56 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 10 May 2019 22:43:55 +0000 (23:43 +0100)
22 files changed:
src/lib/cinema.cc
src/lib/cinema.h
src/lib/film.h
src/lib/font.cc
src/lib/font.h
src/lib/player.h
src/lib/player_text.cc
src/lib/player_text.h
src/lib/reel_writer.h
src/lib/render_text.h
src/lib/screen.cc
src/lib/screen.h
src/lib/screen_kdm.h
src/lib/send_kdm_email_job.h
src/lib/text_content.h
src/lib/writer.h
src/tools/dcpomatic_kdm.cc
src/tools/dcpomatic_kdm_cli.cc
src/wx/fonts_dialog.cc
src/wx/kdm_dialog.h
src/wx/screens_panel.cc
src/wx/screens_panel.h

index 61862fa6dd9554f369aa6d7733d66acf5ef55eaf..1902f15f9f4f091433f3fc10e12c8f4b5a301381 100644 (file)
@@ -31,6 +31,7 @@ using std::list;
 using std::string;
 using boost::shared_ptr;
 using dcp::raw_convert;
+using dcpomatic::Screen;
 
 Cinema::Cinema (cxml::ConstNodePtr node)
        : name (node->string_child ("Name"))
index 6a3d89845dbc11b747a694338ab34e5f6688b6a5..86245953b85b830d4031b3c5bbec0025a598ef2e 100644 (file)
@@ -29,7 +29,9 @@ namespace xmlpp {
        class Element;
 }
 
-class Screen;
+namespace dcpomatic {
+       class Screen;
+}
 
 /** @class Cinema
  *  @brief A description of a Cinema for KDM generation.
@@ -54,8 +56,8 @@ public:
 
        void as_xml (xmlpp::Element *) const;
 
-       void add_screen (boost::shared_ptr<Screen>);
-       void remove_screen (boost::shared_ptr<Screen>);
+       void add_screen (boost::shared_ptr<dcpomatic::Screen>);
+       void remove_screen (boost::shared_ptr<dcpomatic::Screen>);
 
        void set_utc_offset_hour (int h);
        void set_utc_offset_minute (int m);
@@ -72,12 +74,12 @@ public:
                return _utc_offset_minute;
        }
 
-       std::list<boost::shared_ptr<Screen> > screens () const {
+       std::list<boost::shared_ptr<dcpomatic::Screen> > screens () const {
                return _screens;
        }
 
 private:
-       std::list<boost::shared_ptr<Screen> > _screens;
+       std::list<boost::shared_ptr<dcpomatic::Screen> > _screens;
        /** Offset such that the equivalent time in UTC can be determined
            by subtracting the offset from the local time.
        */
index 7d762f5995bbd80c0112b6d6b711084cecd9eb33..87ea700b7cc19e4d52e4ea8fcdeaf79eab8dd852 100644 (file)
@@ -45,12 +45,15 @@ namespace xmlpp {
        class Document;
 }
 
+namespace dcpomatic {
+       class Screen;
+}
+
 class DCPContentType;
 class Log;
 class Content;
 class Playlist;
 class AudioContent;
-class Screen;
 class AudioProcessor;
 class AudioMapping;
 class Ratio;
@@ -140,7 +143,7 @@ public:
                ) const;
 
        std::list<ScreenKDM> make_kdms (
-               std::list<boost::shared_ptr<Screen> > screens,
+               std::list<boost::shared_ptr<dcpomatic::Screen> > screens,
                boost::filesystem::path cpl_file,
                boost::posix_time::ptime from,
                boost::posix_time::ptime until,
index 333539aa4b7cbc6441dbc2e5c75dae4d0f7752a3..019c9ab076fe8f83e362c8030f2542b4beceb1df 100644 (file)
@@ -24,6 +24,7 @@
 #include <boost/foreach.hpp>
 
 using std::string;
+using namespace dcpomatic;
 
 Font::Font (cxml::NodePtr node)
        : _id (node->string_child ("Id"))
@@ -47,7 +48,7 @@ Font::as_xml (xmlpp::Node* node)
 
 
 bool
-operator== (Font const & a, Font const & b)
+dcpomatic::operator== (Font const & a, Font const & b)
 {
        if (a.id() != b.id()) {
                return false;
@@ -57,7 +58,7 @@ operator== (Font const & a, Font const & b)
 }
 
 bool
-operator!= (Font const & a, Font const & b)
+dcpomatic::operator!= (Font const & a, Font const & b)
 {
        return !(a == b);
 }
index b2ae86daff328d208a1e5c59d4f6b2ae83fe4b2f..5876bf8a46052cbbbd75ad2adb941a581b2c7029 100644 (file)
@@ -27,6 +27,8 @@
 #include <boost/filesystem.hpp>
 #include <string>
 
+namespace dcpomatic {
+
 class Font
 {
 public:
@@ -61,4 +63,6 @@ private:
 bool operator!= (Font const & a, Font const & b);
 bool operator== (Font const & a, Font const & b);
 
+}
+
 #endif
index 381aa80b71c113ab3b615bf5151a10487b9d8596..9f3dc7e71c9c2cea77d0705c2c2fa5913bbdaf5f 100644 (file)
@@ -41,9 +41,12 @@ namespace dcp {
        class ReelAsset;
 }
 
+namespace dcpomatic {
+       class Font;
+}
+
 class PlayerVideo;
 class Playlist;
-class Font;
 class AudioBuffers;
 class ReferencedReelAsset;
 class Shuffler;
@@ -70,7 +73,7 @@ public:
        bool pass ();
        void seek (dcpomatic::DCPTime time, bool accurate);
 
-       std::list<boost::shared_ptr<Font> > get_subtitle_fonts ();
+       std::list<boost::shared_ptr<dcpomatic::Font> > get_subtitle_fonts ();
        std::list<ReferencedReelAsset> get_reel_assets ();
        dcp::Size video_container_size () const {
                boost::mutex::scoped_lock lm (_mutex);
index 16e89b0f10681d756724dd9e0cd49cf8f57aaff0..d31c7d02467b0507e83fc93e1485a5abcda4fa61 100644 (file)
@@ -24,6 +24,7 @@
 
 using std::list;
 using boost::shared_ptr;
+using namespace dcpomatic;
 
 void
 PlayerText::add_fonts (list<shared_ptr<Font> > fonts_)
index 3f5066314cc256ae198a70290660134dce14ca71..fb1d846d8217d2c4f85af36c7b81270deff45db4 100644 (file)
 #include "dcpomatic_time.h"
 #include "string_text.h"
 
-class Font;
+namespace dcpomatic {
+       class Font;
+}
 
 /** A set of text (subtitle/CCAP) which span the same time period */
 class PlayerText
 {
 public:
-       void add_fonts (std::list<boost::shared_ptr<Font> > fonts_);
-       std::list<boost::shared_ptr<Font> > fonts;
+       void add_fonts (std::list<boost::shared_ptr<dcpomatic::Font> > fonts_);
+       std::list<boost::shared_ptr<dcpomatic::Font> > fonts;
 
        /** BitmapTexts, with their rectangles transformed as specified by their content */
        std::list<BitmapText> bitmap;
index 9ea576d7ab371dd01ba659cd519c2f1cf512030b..fff2e0b9ea7568d646b4ef0b18b86e5104757799 100644 (file)
 #include <dcp/picture_asset_writer.h>
 #include <boost/shared_ptr.hpp>
 
+namespace dcpomatic {
+       class Font;
+}
+
 class Film;
 class Job;
-class Font;
 class AudioBuffers;
 
 namespace dcp {
@@ -64,7 +67,7 @@ public:
        void write (PlayerText text, TextType type, boost::optional<DCPTextTrack> track, dcpomatic::DCPTimePeriod period);
 
        void finish ();
-       boost::shared_ptr<dcp::Reel> create_reel (std::list<ReferencedReelAsset> const & refs, std::list<boost::shared_ptr<Font> > const & fonts);
+       boost::shared_ptr<dcp::Reel> create_reel (std::list<ReferencedReelAsset> const & refs, std::list<boost::shared_ptr<dcpomatic::Font> > const & fonts);
        void calculate_digests (boost::function<void (float)> set_progress);
 
        Frame start () const;
index f235fb45971d69241c1abea7212b31feb095475d..7187ca30b5c0c28ea2a9d9ff5ddcbd1fc43dde3a 100644 (file)
 #include "string_text.h"
 #include <dcp/util.h>
 
-class Font;
+namespace dcpomatic {
+       class Font;
+}
 
 std::string marked_up (std::list<StringText> subtitles, int target_height, float fade_factor);
 std::list<PositionImage> render_text (
-       std::list<StringText>, std::list<boost::shared_ptr<Font> > fonts, dcp::Size, dcpomatic::DCPTime, int
+       std::list<StringText>, std::list<boost::shared_ptr<dcpomatic::Font> > fonts, dcp::Size, dcpomatic::DCPTime, int
        );
index 5ec00f9c152ed7e04f56fe000f0dcfae4ef2b211..fe62a5e6cdd9841394e03760601aea466f80065c 100644 (file)
@@ -25,6 +25,7 @@
 
 using std::string;
 using std::vector;
+using namespace dcpomatic;
 
 Screen::Screen (cxml::ConstNodePtr node)
        : name (node->string_child("Name"))
index eff2e5ffe71c96b4ca390cf634673f83347a786c..829df23739629e35bba3423c23e0ed055b5d56cb 100644 (file)
@@ -46,6 +46,8 @@ private:
        boost::optional<std::string> _thumbprint;
 };
 
+namespace dcpomatic {
+
 /** @class Screen
  *  @brief A representation of a Screen for KDM generation.
  *
@@ -74,4 +76,6 @@ public:
        std::vector<TrustedDevice> trusted_devices;
 };
 
+}
+
 #endif
index 9ab73b8515ac69a3c3d23b54c5250bb9da2b6708..351c2f1c2617de141a79a097184fc59a2f088a8c 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2016 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2019 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 #include <dcp/name_format.h>
 #include <boost/shared_ptr.hpp>
 
-class Screen;
+namespace dcpomatic {
+       class Screen;
+}
 
 /** Simple class to collect a screen and an encrypted KDM */
 class ScreenKDM
 {
 public:
-       ScreenKDM (boost::shared_ptr<Screen> s, dcp::EncryptedKDM k)
+       ScreenKDM (boost::shared_ptr<dcpomatic::Screen> s, dcp::EncryptedKDM k)
                : screen (s)
                , kdm (k)
        {}
@@ -42,7 +44,7 @@ public:
                boost::function<bool (boost::filesystem::path)> confirm_overwrite
                );
 
-       boost::shared_ptr<Screen> screen;
+       boost::shared_ptr<dcpomatic::Screen> screen;
        dcp::EncryptedKDM kdm;
 };
 
index b4e007e3ba51cac9d576c115b90e4bac20245070..0b64db7a8879c64bf4baf5392444e72b3ba4f204 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2019 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
 #include <dcp/name_format.h>
 #include <boost/filesystem.hpp>
 
-class Screen;
+namespace dcpomatic {
+       class Screen;
+}
+
 class CinemaKDMs;
 class Log;
 
index c7d1b590d101cbdf5e5acb4c08a822c3c6a0c231..5eda8764ffeaa91ea5c20758fb46c2cad71e1844 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2019 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -27,7 +27,9 @@
 #include <dcp/types.h>
 #include <boost/signals2.hpp>
 
-class Font;
+namespace dcpomatic {
+       class Font;
+}
 
 class TextContentProperty
 {
@@ -67,7 +69,7 @@ public:
        std::string identifier () const;
        void take_settings_from (boost::shared_ptr<const TextContent> c);
 
-       void add_font (boost::shared_ptr<Font> font);
+       void add_font (boost::shared_ptr<dcpomatic::Font> font);
 
        void set_use (bool);
        void set_burn (bool);
@@ -122,7 +124,7 @@ public:
                return _y_scale;
        }
 
-       std::list<boost::shared_ptr<Font> > fonts () const {
+       std::list<boost::shared_ptr<dcpomatic::Font> > fonts () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _fonts;
        }
@@ -211,7 +213,7 @@ private:
        double _x_scale;
        /** y scale factor to apply to subtitles */
        double _y_scale;
-       std::list<boost::shared_ptr<Font> > _fonts;
+       std::list<boost::shared_ptr<dcpomatic::Font> > _fonts;
        boost::optional<dcp::Colour> _colour;
        boost::optional<dcp::Effect> _effect;
        boost::optional<dcp::Colour> _effect_colour;
index ce1d04cedb8c239087bd444c05daa4f859f20b14..5fe96a3ac94eee955cd9ac1429e86986e4da2f15 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2019 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -36,10 +36,13 @@ namespace dcp {
        class Data;
 }
 
+namespace dcpomatic {
+       class Font;
+}
+
 class Film;
 class AudioBuffers;
 class Job;
-class Font;
 class ReferencedReelAsset;
 class ReelWriter;
 
@@ -106,7 +109,7 @@ public:
        void repeat (Frame, Eyes);
        void write (boost::shared_ptr<const AudioBuffers>, dcpomatic::DCPTime time);
        void write (PlayerText text, TextType type, boost::optional<DCPTextTrack>, dcpomatic::DCPTimePeriod period);
-       void write (std::list<boost::shared_ptr<Font> > fonts);
+       void write (std::list<boost::shared_ptr<dcpomatic::Font> > fonts);
        void write (ReferencedReelAsset asset);
        void finish ();
 
@@ -163,5 +166,5 @@ private:
 
        std::list<ReferencedReelAsset> _reel_assets;
 
-       std::list<boost::shared_ptr<Font> > _fonts;
+       std::list<boost::shared_ptr<dcpomatic::Font> > _fonts;
 };
index 8ee4c72d40f27c2c1670b178bc63b27eac42227b..60bb54f5914c3b9c0e1a876b0420cd71b4089e1b 100644 (file)
@@ -74,6 +74,7 @@ using boost::bind;
 using boost::optional;
 using boost::ref;
 using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
 
 enum {
        ID_help_report_a_problem = 1,
index 21f9ec7340d198ac70dd584106cadbd4ebfc1bce..79912a36a8d33fb46814e4b730b9c1b3d2ae2391 100644 (file)
@@ -47,6 +47,7 @@ using boost::shared_ptr;
 using boost::optional;
 using boost::bind;
 using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
 
 static void
 help ()
index 88fcb2dce5de2f65d9d7a9d2d7c05380bf921aed..66f8ab0e486dfab24dde0c3f6c36c1aa49933ed9 100644 (file)
@@ -33,6 +33,7 @@ using std::list;
 using std::string;
 using std::cout;
 using boost::shared_ptr;
+using namespace dcpomatic;
 
 FontsDialog::FontsDialog (wxWindow* parent, shared_ptr<Content> content, shared_ptr<TextContent> caption)
        : wxDialog (parent, wxID_ANY, _("Fonts"))
index 099db951beede0d9fde2b4d3622bdc60cb8398f5..a240ec1b6bb85040cf854b62cf9fd05a99546e65 100644 (file)
 #include <boost/date_time/posix_time/posix_time.hpp>
 #include <map>
 
+namespace dcpomatic {
+       class Screen;
+}
+
 class Cinema;
-class Screen;
 class Film;
 class ScreensPanel;
 class KDMTimingPanel;
index e89173eb27dd82f43f209e43ecffb2643187b85b..7e012b522e3212fd1ccb0198b93e9e1001c743cb 100644 (file)
@@ -36,6 +36,7 @@ using std::string;
 using std::make_pair;
 using boost::shared_ptr;
 using boost::optional;
+using namespace dcpomatic;
 
 ScreensPanel::ScreensPanel (wxWindow* parent)
        : wxPanel (parent, wxID_ANY)
index 3e9accde556b91f1b69c72ef04cb09acb21577e7..510297efb67a285e2bc06b722042b3e90519182d 100644 (file)
 #include <list>
 #include <map>
 
+namespace dcpomatic {
+       class Screen;
+}
+
 class Cinema;
-class Screen;
 
 class ScreensPanel : public wxPanel
 {
@@ -35,7 +38,7 @@ public:
        explicit ScreensPanel (wxWindow* parent);
        ~ScreensPanel ();
 
-       std::list<boost::shared_ptr<Screen> > screens () const;
+       std::list<boost::shared_ptr<dcpomatic::Screen> > screens () const;
        void setup_sensitivity ();
 
        boost::signals2::signal<void ()> ScreensChanged;
@@ -43,7 +46,7 @@ public:
 private:
        void add_cinemas ();
        void add_cinema (boost::shared_ptr<Cinema>);
-       boost::optional<wxTreeItemId> add_screen (boost::shared_ptr<Cinema>, boost::shared_ptr<Screen>);
+       boost::optional<wxTreeItemId> add_screen (boost::shared_ptr<Cinema>, boost::shared_ptr<dcpomatic::Screen>);
        void add_cinema_clicked ();
        void edit_cinema_clicked ();
        void remove_cinema_clicked ();
@@ -65,7 +68,7 @@ private:
        wxTreeItemId _root;
 
        typedef std::map<wxTreeItemId, boost::shared_ptr<Cinema> > CinemaMap;
-       typedef std::map<wxTreeItemId, boost::shared_ptr<Screen> > ScreenMap;
+       typedef std::map<wxTreeItemId, boost::shared_ptr<dcpomatic::Screen> > ScreenMap;
 
        CinemaMap _cinemas;
        ScreenMap _screens;