summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-05-08 23:56:32 +0100
committerCarl Hetherington <cth@carlh.net>2019-05-10 23:43:55 +0100
commitf41818f14369f170475b7f2bde1a2dd856517b14 (patch)
tree2fd7d07fb63e46e8ad2964917cff5704d1893f85
parentc4403784febdbdd42e9c32e67fadb147f11fe566 (diff)
Put Font and Screen into dcpomatic namespace.
-rw-r--r--src/lib/cinema.cc1
-rw-r--r--src/lib/cinema.h12
-rw-r--r--src/lib/film.h7
-rw-r--r--src/lib/font.cc5
-rw-r--r--src/lib/font.h4
-rw-r--r--src/lib/player.h7
-rw-r--r--src/lib/player_text.cc1
-rw-r--r--src/lib/player_text.h8
-rw-r--r--src/lib/reel_writer.h7
-rw-r--r--src/lib/render_text.h6
-rw-r--r--src/lib/screen.cc1
-rw-r--r--src/lib/screen.h4
-rw-r--r--src/lib/screen_kdm.h10
-rw-r--r--src/lib/send_kdm_email_job.h7
-rw-r--r--src/lib/text_content.h12
-rw-r--r--src/lib/writer.h11
-rw-r--r--src/tools/dcpomatic_kdm.cc1
-rw-r--r--src/tools/dcpomatic_kdm_cli.cc1
-rw-r--r--src/wx/fonts_dialog.cc1
-rw-r--r--src/wx/kdm_dialog.h5
-rw-r--r--src/wx/screens_panel.cc1
-rw-r--r--src/wx/screens_panel.h11
22 files changed, 85 insertions, 38 deletions
diff --git a/src/lib/cinema.cc b/src/lib/cinema.cc
index 61862fa6d..1902f15f9 100644
--- a/src/lib/cinema.cc
+++ b/src/lib/cinema.cc
@@ -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"))
diff --git a/src/lib/cinema.h b/src/lib/cinema.h
index 6a3d89845..86245953b 100644
--- a/src/lib/cinema.h
+++ b/src/lib/cinema.h
@@ -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.
*/
diff --git a/src/lib/film.h b/src/lib/film.h
index 7d762f599..87ea700b7 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -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,
diff --git a/src/lib/font.cc b/src/lib/font.cc
index 333539aa4..019c9ab07 100644
--- a/src/lib/font.cc
+++ b/src/lib/font.cc
@@ -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);
}
diff --git a/src/lib/font.h b/src/lib/font.h
index b2ae86daf..5876bf8a4 100644
--- a/src/lib/font.h
+++ b/src/lib/font.h
@@ -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
diff --git a/src/lib/player.h b/src/lib/player.h
index 381aa80b7..9f3dc7e71 100644
--- a/src/lib/player.h
+++ b/src/lib/player.h
@@ -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);
diff --git a/src/lib/player_text.cc b/src/lib/player_text.cc
index 16e89b0f1..d31c7d024 100644
--- a/src/lib/player_text.cc
+++ b/src/lib/player_text.cc
@@ -24,6 +24,7 @@
using std::list;
using boost::shared_ptr;
+using namespace dcpomatic;
void
PlayerText::add_fonts (list<shared_ptr<Font> > fonts_)
diff --git a/src/lib/player_text.h b/src/lib/player_text.h
index 3f5066314..fb1d846d8 100644
--- a/src/lib/player_text.h
+++ b/src/lib/player_text.h
@@ -25,14 +25,16 @@
#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;
diff --git a/src/lib/reel_writer.h b/src/lib/reel_writer.h
index 9ea576d7a..fff2e0b9e 100644
--- a/src/lib/reel_writer.h
+++ b/src/lib/reel_writer.h
@@ -26,9 +26,12 @@
#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;
diff --git a/src/lib/render_text.h b/src/lib/render_text.h
index f235fb459..7187ca30b 100644
--- a/src/lib/render_text.h
+++ b/src/lib/render_text.h
@@ -23,9 +23,11 @@
#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
);
diff --git a/src/lib/screen.cc b/src/lib/screen.cc
index 5ec00f9c1..fe62a5e6c 100644
--- a/src/lib/screen.cc
+++ b/src/lib/screen.cc
@@ -25,6 +25,7 @@
using std::string;
using std::vector;
+using namespace dcpomatic;
Screen::Screen (cxml::ConstNodePtr node)
: name (node->string_child("Name"))
diff --git a/src/lib/screen.h b/src/lib/screen.h
index eff2e5ffe..829df2373 100644
--- a/src/lib/screen.h
+++ b/src/lib/screen.h
@@ -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
diff --git a/src/lib/screen_kdm.h b/src/lib/screen_kdm.h
index 9ab73b851..351c2f1c2 100644
--- a/src/lib/screen_kdm.h
+++ b/src/lib/screen_kdm.h
@@ -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.
@@ -25,13 +25,15 @@
#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;
};
diff --git a/src/lib/send_kdm_email_job.h b/src/lib/send_kdm_email_job.h
index b4e007e3b..0b64db7a8 100644
--- a/src/lib/send_kdm_email_job.h
+++ b/src/lib/send_kdm_email_job.h
@@ -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.
@@ -23,7 +23,10 @@
#include <dcp/name_format.h>
#include <boost/filesystem.hpp>
-class Screen;
+namespace dcpomatic {
+ class Screen;
+}
+
class CinemaKDMs;
class Log;
diff --git a/src/lib/text_content.h b/src/lib/text_content.h
index c7d1b590d..5eda8764f 100644
--- a/src/lib/text_content.h
+++ b/src/lib/text_content.h
@@ -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;
diff --git a/src/lib/writer.h b/src/lib/writer.h
index ce1d04ced..5fe96a3ac 100644
--- a/src/lib/writer.h
+++ b/src/lib/writer.h
@@ -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;
};
diff --git a/src/tools/dcpomatic_kdm.cc b/src/tools/dcpomatic_kdm.cc
index 8ee4c72d4..60bb54f59 100644
--- a/src/tools/dcpomatic_kdm.cc
+++ b/src/tools/dcpomatic_kdm.cc
@@ -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,
diff --git a/src/tools/dcpomatic_kdm_cli.cc b/src/tools/dcpomatic_kdm_cli.cc
index 21f9ec734..79912a36a 100644
--- a/src/tools/dcpomatic_kdm_cli.cc
+++ b/src/tools/dcpomatic_kdm_cli.cc
@@ -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 ()
diff --git a/src/wx/fonts_dialog.cc b/src/wx/fonts_dialog.cc
index 88fcb2dce..66f8ab0e4 100644
--- a/src/wx/fonts_dialog.cc
+++ b/src/wx/fonts_dialog.cc
@@ -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"))
diff --git a/src/wx/kdm_dialog.h b/src/wx/kdm_dialog.h
index 099db951b..a240ec1b6 100644
--- a/src/wx/kdm_dialog.h
+++ b/src/wx/kdm_dialog.h
@@ -25,8 +25,11 @@
#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;
diff --git a/src/wx/screens_panel.cc b/src/wx/screens_panel.cc
index e89173eb2..7e012b522 100644
--- a/src/wx/screens_panel.cc
+++ b/src/wx/screens_panel.cc
@@ -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)
diff --git a/src/wx/screens_panel.h b/src/wx/screens_panel.h
index 3e9accde5..510297efb 100644
--- a/src/wx/screens_panel.h
+++ b/src/wx/screens_panel.h
@@ -26,8 +26,11 @@
#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;