summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-05-08 23:41:42 +0100
committerCarl Hetherington <cth@carlh.net>2019-05-10 23:43:55 +0100
commitc4403784febdbdd42e9c32e67fadb147f11fe566 (patch)
treea3c76832e341eedcaed2152c2ebf4dd76325b6b2
parent248fe9bd28d93a9e269093b4dfbec5d0ceb49ce1 (diff)
Put Time types in dcpomatic namespace.
-rw-r--r--src/lib/active_text.cc1
-rw-r--r--src/lib/active_text.h14
-rw-r--r--src/lib/analyse_audio_job.cc1
-rw-r--r--src/lib/analyse_audio_job.h4
-rw-r--r--src/lib/atmos_mxf_content.cc1
-rw-r--r--src/lib/atmos_mxf_content.h4
-rw-r--r--src/lib/audio_analysis.cc1
-rw-r--r--src/lib/audio_analysis.h4
-rw-r--r--src/lib/audio_content.cc1
-rw-r--r--src/lib/audio_content.h4
-rw-r--r--src/lib/audio_decoder.cc1
-rw-r--r--src/lib/audio_decoder.h6
-rw-r--r--src/lib/audio_merger.cc1
-rw-r--r--src/lib/audio_merger.h16
-rw-r--r--src/lib/audio_ring_buffers.cc1
-rw-r--r--src/lib/audio_ring_buffers.h8
-rw-r--r--src/lib/butler.cc1
-rw-r--r--src/lib/butler.h18
-rw-r--r--src/lib/content.cc1
-rw-r--r--src/lib/content.h32
-rw-r--r--src/lib/content_text.h10
-rw-r--r--src/lib/dcp_content.cc1
-rw-r--r--src/lib/dcp_content.h8
-rw-r--r--src/lib/dcp_decoder.cc1
-rw-r--r--src/lib/dcp_decoder.h8
-rw-r--r--src/lib/dcp_encoder.cc1
-rw-r--r--src/lib/dcp_encoder.h6
-rw-r--r--src/lib/dcp_subtitle_content.cc1
-rw-r--r--src/lib/dcp_subtitle_content.h6
-rw-r--r--src/lib/dcp_subtitle_decoder.cc1
-rw-r--r--src/lib/dcp_subtitle_decoder.h4
-rw-r--r--src/lib/dcpomatic_time.cc15
-rw-r--r--src/lib/dcpomatic_time.h13
-rw-r--r--src/lib/dcpomatic_time_coalesce.h4
-rw-r--r--src/lib/decoder.cc1
-rw-r--r--src/lib/decoder.h4
-rw-r--r--src/lib/decoder_part.h2
-rw-r--r--src/lib/empty.cc1
-rw-r--r--src/lib/empty.h10
-rw-r--r--src/lib/ffmpeg.cc1
-rw-r--r--src/lib/ffmpeg.h4
-rw-r--r--src/lib/ffmpeg_audio_stream.cc1
-rw-r--r--src/lib/ffmpeg_audio_stream.h2
-rw-r--r--src/lib/ffmpeg_content.cc1
-rw-r--r--src/lib/ffmpeg_content.h8
-rw-r--r--src/lib/ffmpeg_decoder.cc1
-rw-r--r--src/lib/ffmpeg_decoder.h12
-rw-r--r--src/lib/ffmpeg_encoder.cc1
-rw-r--r--src/lib/ffmpeg_encoder.h2
-rw-r--r--src/lib/ffmpeg_examiner.cc1
-rw-r--r--src/lib/ffmpeg_examiner.h10
-rw-r--r--src/lib/ffmpeg_file_encoder.cc1
-rw-r--r--src/lib/ffmpeg_file_encoder.h4
-rw-r--r--src/lib/ffmpeg_subtitle_period.h8
-rw-r--r--src/lib/film.cc1
-rw-r--r--src/lib/film.h20
-rw-r--r--src/lib/hints.cc1
-rw-r--r--src/lib/hints.h4
-rw-r--r--src/lib/image_content.cc1
-rw-r--r--src/lib/image_content.h4
-rw-r--r--src/lib/image_decoder.cc1
-rw-r--r--src/lib/image_decoder.h2
-rw-r--r--src/lib/j2k_encoder.cc1
-rw-r--r--src/lib/j2k_encoder.h4
-rw-r--r--src/lib/job.cc1
-rw-r--r--src/lib/overlaps.cc1
-rw-r--r--src/lib/overlaps.h2
-rw-r--r--src/lib/player.cc1
-rw-r--r--src/lib/player.h50
-rw-r--r--src/lib/playlist.cc1
-rw-r--r--src/lib/playlist.h12
-rw-r--r--src/lib/reel_writer.cc1
-rw-r--r--src/lib/reel_writer.h8
-rw-r--r--src/lib/referenced_reel_asset.h4
-rw-r--r--src/lib/render_text.cc1
-rw-r--r--src/lib/render_text.h2
-rw-r--r--src/lib/string_text_file.cc1
-rw-r--r--src/lib/string_text_file.h4
-rw-r--r--src/lib/string_text_file_content.cc1
-rw-r--r--src/lib/string_text_file_content.h6
-rw-r--r--src/lib/string_text_file_decoder.cc1
-rw-r--r--src/lib/string_text_file_decoder.h4
-rw-r--r--src/lib/text_content.cc1
-rw-r--r--src/lib/text_content.h12
-rw-r--r--src/lib/text_decoder.cc1
-rw-r--r--src/lib/text_decoder.h22
-rw-r--r--src/lib/text_ring_buffers.cc1
-rw-r--r--src/lib/text_ring_buffers.h6
-rw-r--r--src/lib/util.cc1
-rw-r--r--src/lib/util.h4
-rw-r--r--src/lib/video_content.cc1
-rw-r--r--src/lib/video_content.h4
-rw-r--r--src/lib/video_decoder.cc1
-rw-r--r--src/lib/video_decoder.h4
-rw-r--r--src/lib/video_mxf_content.cc1
-rw-r--r--src/lib/video_mxf_content.h4
-rw-r--r--src/lib/video_mxf_decoder.cc1
-rw-r--r--src/lib/video_mxf_decoder.h4
-rw-r--r--src/lib/video_ring_buffers.cc1
-rw-r--r--src/lib/video_ring_buffers.h6
-rw-r--r--src/lib/writer.cc1
-rw-r--r--src/lib/writer.h4
-rw-r--r--src/tools/dcpomatic_player.cc1
-rw-r--r--src/wx/audio_dialog.cc1
-rw-r--r--src/wx/audio_dialog.h2
-rw-r--r--src/wx/audio_plot.cc1
-rw-r--r--src/wx/audio_plot.h6
-rw-r--r--src/wx/closed_captions_dialog.cc1
-rw-r--r--src/wx/closed_captions_dialog.h4
-rw-r--r--src/wx/content_panel.cc1
-rw-r--r--src/wx/content_view.cc1
-rw-r--r--src/wx/controls.cc1
-rw-r--r--src/wx/controls.h2
-rw-r--r--src/wx/film_viewer.cc1
-rw-r--r--src/wx/film_viewer.h22
-rw-r--r--src/wx/markers_dialog.cc3
-rw-r--r--src/wx/move_to_dialog.cc1
-rw-r--r--src/wx/move_to_dialog.h4
-rw-r--r--src/wx/playhead_to_frame_dialog.cc1
-rw-r--r--src/wx/playhead_to_frame_dialog.h2
-rw-r--r--src/wx/playhead_to_timecode_dialog.cc2
-rw-r--r--src/wx/playhead_to_timecode_dialog.h4
-rw-r--r--src/wx/subtitle_appearance_dialog.cc1
-rw-r--r--src/wx/subtitle_appearance_dialog.h4
-rw-r--r--src/wx/swaroop_controls.cc1
-rw-r--r--src/wx/text_view.cc1
-rw-r--r--src/wx/text_view.h4
-rw-r--r--src/wx/timeline.cc1
-rw-r--r--src/wx/timeline.h8
-rw-r--r--src/wx/timeline_content_view.cc1
-rw-r--r--src/wx/timeline_reels_view.cc1
-rw-r--r--src/wx/timeline_time_axis_view.cc1
-rw-r--r--src/wx/timeline_view.cc1
-rw-r--r--src/wx/timeline_view.h2
-rw-r--r--src/wx/timing_panel.cc1
-rw-r--r--src/wx/timing_panel.h10
-rw-r--r--src/wx/video_panel.cc1
-rw-r--r--src/wx/video_panel.h4
-rw-r--r--src/wx/wx_util.cc1
-rw-r--r--src/wx/wx_util.h2
-rw-r--r--test/audio_analysis_test.cc1
-rw-r--r--test/audio_merger_test.cc1
-rw-r--r--test/audio_ring_buffers_test.cc1
-rw-r--r--test/burnt_subtitle_test.cc1
-rw-r--r--test/butler_test.cc1
-rw-r--r--test/content_test.cc1
-rw-r--r--test/dcp_playback_test.cc1
-rw-r--r--test/dcp_subtitle_test.cc1
-rw-r--r--test/dcpomatic_time_test.cc1
-rw-r--r--test/empty_test.cc1
-rw-r--r--test/ffmpeg_decoder_seek_test.cc1
-rw-r--r--test/ffmpeg_decoder_sequential_test.cc1
-rw-r--r--test/ffmpeg_encoder_test.cc1
-rw-r--r--test/ffmpeg_examiner_test.cc1
-rw-r--r--test/ffmpeg_pts_offset_test.cc1
-rw-r--r--test/player_test.cc1
-rw-r--r--test/reels_test.cc1
-rw-r--r--test/silence_padding_test.cc2
-rw-r--r--test/srt_subtitle_test.cc1
-rw-r--r--test/subtitle_trim_test.cc1
-rw-r--r--test/time_calculation_test.cc1
-rw-r--r--test/torture_test.cc1
-rw-r--r--test/upmixer_a_test.cc1
-rw-r--r--test/util_test.cc1
-rw-r--r--test/vf_test.cc1
165 files changed, 367 insertions, 259 deletions
diff --git a/src/lib/active_text.cc b/src/lib/active_text.cc
index 2988c04a3..3a7e1a27e 100644
--- a/src/lib/active_text.cc
+++ b/src/lib/active_text.cc
@@ -29,6 +29,7 @@ using std::make_pair;
using boost::weak_ptr;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
/** Get the open captions that should be burnt into a given period.
* @param period Period of interest.
diff --git a/src/lib/active_text.h b/src/lib/active_text.h
index ff4a1bd2f..90b6b533b 100644
--- a/src/lib/active_text.h
+++ b/src/lib/active_text.h
@@ -37,11 +37,11 @@ class TextContent;
class ActiveText : public boost::noncopyable
{
public:
- std::list<PlayerText> get_burnt (DCPTimePeriod period, bool always_burn_captions) const;
- void clear_before (DCPTime time);
+ std::list<PlayerText> get_burnt (dcpomatic::DCPTimePeriod period, bool always_burn_captions) const;
+ void clear_before (dcpomatic::DCPTime time);
void clear ();
- void add_from (boost::weak_ptr<const TextContent> content, PlayerText ps, DCPTime from);
- std::pair<PlayerText, DCPTime> add_to (boost::weak_ptr<const TextContent> content, DCPTime to);
+ void add_from (boost::weak_ptr<const TextContent> content, PlayerText ps, dcpomatic::DCPTime from);
+ std::pair<PlayerText, dcpomatic::DCPTime> add_to (boost::weak_ptr<const TextContent> content, dcpomatic::DCPTime to);
bool have (boost::weak_ptr<const TextContent> content) const;
private:
@@ -50,14 +50,14 @@ private:
public:
Period () {}
- Period (PlayerText s, DCPTime f)
+ Period (PlayerText s, dcpomatic::DCPTime f)
: subs (s)
, from (f)
{}
PlayerText subs;
- DCPTime from;
- boost::optional<DCPTime> to;
+ dcpomatic::DCPTime from;
+ boost::optional<dcpomatic::DCPTime> to;
};
typedef std::map<boost::weak_ptr<const TextContent>, std::list<Period> > Map;
diff --git a/src/lib/analyse_audio_job.cc b/src/lib/analyse_audio_job.cc
index e4a100c4a..9d0882b3a 100644
--- a/src/lib/analyse_audio_job.cc
+++ b/src/lib/analyse_audio_job.cc
@@ -47,6 +47,7 @@ using std::min;
using std::cout;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
int const AnalyseAudioJob::_num_points = 1024;
diff --git a/src/lib/analyse_audio_job.h b/src/lib/analyse_audio_job.h
index b88d6c2bf..5d6c091bc 100644
--- a/src/lib/analyse_audio_job.h
+++ b/src/lib/analyse_audio_job.h
@@ -56,12 +56,12 @@ public:
}
private:
- void analyse (boost::shared_ptr<const AudioBuffers>, DCPTime time);
+ void analyse (boost::shared_ptr<const AudioBuffers>, dcpomatic::DCPTime time);
boost::shared_ptr<const Playlist> _playlist;
/** playlist's audio analysis path when the job was created */
boost::filesystem::path _path;
- DCPTime _start;
+ dcpomatic::DCPTime _start;
bool _from_zero;
int64_t _done;
diff --git a/src/lib/atmos_mxf_content.cc b/src/lib/atmos_mxf_content.cc
index 5b97edcfd..fa27f600b 100644
--- a/src/lib/atmos_mxf_content.cc
+++ b/src/lib/atmos_mxf_content.cc
@@ -32,6 +32,7 @@
using std::list;
using std::string;
using boost::shared_ptr;
+using namespace dcpomatic;
AtmosMXFContent::AtmosMXFContent (boost::filesystem::path path)
: Content (path)
diff --git a/src/lib/atmos_mxf_content.h b/src/lib/atmos_mxf_content.h
index 05f36c21c..06e9e747d 100644
--- a/src/lib/atmos_mxf_content.h
+++ b/src/lib/atmos_mxf_content.h
@@ -37,8 +37,8 @@ public:
void examine (boost::shared_ptr<const Film> film, boost::shared_ptr<Job> job);
std::string summary () const;
void as_xml (xmlpp::Node* node, bool with_path) const;
- DCPTime full_length (boost::shared_ptr<const Film> film) const;
- DCPTime approximate_length () const;
+ dcpomatic::DCPTime full_length (boost::shared_ptr<const Film> film) const;
+ dcpomatic::DCPTime approximate_length () const;
static bool valid_mxf (boost::filesystem::path path);
diff --git a/src/lib/audio_analysis.cc b/src/lib/audio_analysis.cc
index 78e5741e5..13917cb5f 100644
--- a/src/lib/audio_analysis.cc
+++ b/src/lib/audio_analysis.cc
@@ -46,6 +46,7 @@ using boost::shared_ptr;
using boost::optional;
using boost::dynamic_pointer_cast;
using dcp::raw_convert;
+using namespace dcpomatic;
int const AudioAnalysis::_current_state_version = 3;
diff --git a/src/lib/audio_analysis.h b/src/lib/audio_analysis.h
index e5ee24d49..3684db96a 100644
--- a/src/lib/audio_analysis.h
+++ b/src/lib/audio_analysis.h
@@ -43,13 +43,13 @@ public:
void add_point (int c, AudioPoint const & p);
struct PeakTime {
- PeakTime (float p, DCPTime t)
+ PeakTime (float p, dcpomatic::DCPTime t)
: peak (p)
, time (t)
{}
float peak;
- DCPTime time;
+ dcpomatic::DCPTime time;
};
void set_sample_peak (std::vector<PeakTime> peak) {
diff --git a/src/lib/audio_content.cc b/src/lib/audio_content.cc
index 170b9299f..014221f2e 100644
--- a/src/lib/audio_content.cc
+++ b/src/lib/audio_content.cc
@@ -43,6 +43,7 @@ using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
using dcp::raw_convert;
+using namespace dcpomatic;
/** Something stream-related has changed */
int const AudioContentProperty::STREAMS = 200;
diff --git a/src/lib/audio_content.h b/src/lib/audio_content.h
index 98e16a457..504c2aecf 100644
--- a/src/lib/audio_content.h
+++ b/src/lib/audio_content.h
@@ -82,8 +82,8 @@ public:
void add_properties (boost::shared_ptr<const Film> film, std::list<UserProperty> &) const;
- void modify_position (boost::shared_ptr<const Film> film, DCPTime& pos) const;
- void modify_trim_start (ContentTime& pos) const;
+ void modify_position (boost::shared_ptr<const Film> film, dcpomatic::DCPTime& pos) const;
+ void modify_trim_start (dcpomatic::ContentTime& pos) const;
static boost::shared_ptr<AudioContent> from_xml (Content* parent, cxml::ConstNodePtr, int version);
diff --git a/src/lib/audio_decoder.cc b/src/lib/audio_decoder.cc
index 440510ce5..e0fb20b7e 100644
--- a/src/lib/audio_decoder.cc
+++ b/src/lib/audio_decoder.cc
@@ -35,6 +35,7 @@ using std::map;
using std::pair;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr<const AudioContent> content, bool fast)
: DecoderPart (parent)
diff --git a/src/lib/audio_decoder.h b/src/lib/audio_decoder.h
index 50e361e8f..32d71c067 100644
--- a/src/lib/audio_decoder.h
+++ b/src/lib/audio_decoder.h
@@ -47,12 +47,12 @@ class AudioDecoder : public boost::enable_shared_from_this<AudioDecoder>, public
public:
AudioDecoder (Decoder* parent, boost::shared_ptr<const AudioContent> content, bool fast);
- ContentTime position (boost::shared_ptr<const Film> film) const;
- void emit (boost::shared_ptr<const Film> film, AudioStreamPtr stream, boost::shared_ptr<const AudioBuffers>, ContentTime);
+ dcpomatic::ContentTime position (boost::shared_ptr<const Film> film) const;
+ void emit (boost::shared_ptr<const Film> film, AudioStreamPtr stream, boost::shared_ptr<const AudioBuffers>, dcpomatic::ContentTime);
void seek ();
void flush ();
- ContentTime stream_position (boost::shared_ptr<const Film> film, AudioStreamPtr stream) const;
+ dcpomatic::ContentTime stream_position (boost::shared_ptr<const Film> film, AudioStreamPtr stream) const;
/** @return Number of frames of data that were accepted */
boost::signals2::signal<void (AudioStreamPtr, ContentAudio)> Data;
diff --git a/src/lib/audio_merger.cc b/src/lib/audio_merger.cc
index a16c378c6..1cc5ff0a1 100644
--- a/src/lib/audio_merger.cc
+++ b/src/lib/audio_merger.cc
@@ -33,6 +33,7 @@ using std::cout;
using std::make_pair;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
AudioMerger::AudioMerger (int frame_rate)
: _frame_rate (frame_rate)
diff --git a/src/lib/audio_merger.h b/src/lib/audio_merger.h
index dbc0c8691..d5a6ec43a 100644
--- a/src/lib/audio_merger.h
+++ b/src/lib/audio_merger.h
@@ -33,12 +33,12 @@ class AudioMerger
public:
explicit AudioMerger (int frame_rate);
- std::list<std::pair<boost::shared_ptr<AudioBuffers>, DCPTime> > pull (DCPTime time);
- void push (boost::shared_ptr<const AudioBuffers> audio, DCPTime time);
+ std::list<std::pair<boost::shared_ptr<AudioBuffers>, dcpomatic::DCPTime> > pull (dcpomatic::DCPTime time);
+ void push (boost::shared_ptr<const AudioBuffers> audio, dcpomatic::DCPTime time);
void clear ();
private:
- Frame frames (DCPTime t) const;
+ Frame frames (dcpomatic::DCPTime t) const;
class Buffer
{
@@ -48,24 +48,24 @@ private:
* @param t Time
* @param r Frame rate.
*/
- Buffer (int c, int32_t f, DCPTime t, int r)
+ Buffer (int c, int32_t f, dcpomatic::DCPTime t, int r)
: audio (new AudioBuffers (c, f))
, time (t)
, frame_rate (r)
{}
- Buffer (boost::shared_ptr<AudioBuffers> a, DCPTime t, int r)
+ Buffer (boost::shared_ptr<AudioBuffers> a, dcpomatic::DCPTime t, int r)
: audio (a)
, time (t)
, frame_rate (r)
{}
boost::shared_ptr<AudioBuffers> audio;
- DCPTime time;
+ dcpomatic::DCPTime time;
int frame_rate;
- DCPTimePeriod period () const {
- return DCPTimePeriod (time, time + DCPTime::from_frames (audio->frames(), frame_rate));
+ dcpomatic::DCPTimePeriod period () const {
+ return dcpomatic::DCPTimePeriod (time, time + dcpomatic::DCPTime::from_frames (audio->frames(), frame_rate));
}
};
diff --git a/src/lib/audio_ring_buffers.cc b/src/lib/audio_ring_buffers.cc
index d1375cb27..cd7f4f597 100644
--- a/src/lib/audio_ring_buffers.cc
+++ b/src/lib/audio_ring_buffers.cc
@@ -31,6 +31,7 @@ using std::pair;
using std::list;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
AudioRingBuffers::AudioRingBuffers ()
: _used_in_head (0)
diff --git a/src/lib/audio_ring_buffers.h b/src/lib/audio_ring_buffers.h
index 8d830ecf7..bfaad5ec9 100644
--- a/src/lib/audio_ring_buffers.h
+++ b/src/lib/audio_ring_buffers.h
@@ -33,16 +33,16 @@ class AudioRingBuffers : public boost::noncopyable
public:
AudioRingBuffers ();
- void put (boost::shared_ptr<const AudioBuffers> data, DCPTime time, int frame_rate);
- boost::optional<DCPTime> get (float* out, int channels, int frames);
- boost::optional<DCPTime> peek () const;
+ void put (boost::shared_ptr<const AudioBuffers> data, dcpomatic::DCPTime time, int frame_rate);
+ boost::optional<dcpomatic::DCPTime> get (float* out, int channels, int frames);
+ boost::optional<dcpomatic::DCPTime> peek () const;
void clear ();
Frame size () const;
private:
mutable boost::mutex _mutex;
- std::list<std::pair<boost::shared_ptr<const AudioBuffers>, DCPTime> > _buffers;
+ std::list<std::pair<boost::shared_ptr<const AudioBuffers>, dcpomatic::DCPTime> > _buffers;
int _used_in_head;
};
diff --git a/src/lib/butler.cc b/src/lib/butler.cc
index fe331fc79..0218c1fb3 100644
--- a/src/lib/butler.cc
+++ b/src/lib/butler.cc
@@ -38,6 +38,7 @@ using boost::shared_ptr;
using boost::bind;
using boost::optional;
using boost::function;
+using namespace dcpomatic;
/** Minimum video readahead in frames */
#define MINIMUM_VIDEO_READAHEAD 10
diff --git a/src/lib/butler.h b/src/lib/butler.h
index 8c4d30efe..f1922d348 100644
--- a/src/lib/butler.h
+++ b/src/lib/butler.h
@@ -47,15 +47,15 @@ public:
~Butler ();
- void seek (DCPTime position, bool accurate);
+ void seek (dcpomatic::DCPTime position, bool accurate);
enum Error {
NONE,
AGAIN
};
- std::pair<boost::shared_ptr<PlayerVideo>, DCPTime> get_video (Error* e = 0);
- boost::optional<DCPTime> get_audio (float* out, Frame frames);
+ std::pair<boost::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> get_video (Error* e = 0);
+ boost::optional<dcpomatic::DCPTime> get_audio (float* out, Frame frames);
boost::optional<TextRingBuffers::Data> get_closed_caption ();
void disable_audio ();
@@ -64,13 +64,13 @@ public:
private:
void thread ();
- void video (boost::shared_ptr<PlayerVideo> video, DCPTime time);
- void audio (boost::shared_ptr<AudioBuffers> audio, DCPTime time, int frame_rate);
- void text (PlayerText pt, TextType type, boost::optional<DCPTextTrack> track, DCPTimePeriod period);
+ void video (boost::shared_ptr<PlayerVideo> video, dcpomatic::DCPTime time);
+ void audio (boost::shared_ptr<AudioBuffers> audio, dcpomatic::DCPTime time, int frame_rate);
+ void text (PlayerText pt, TextType type, boost::optional<DCPTextTrack> track, dcpomatic::DCPTimePeriod period);
bool should_run () const;
void prepare (boost::weak_ptr<PlayerVideo> video);
void player_change (ChangeType type, bool frequent);
- void seek_unlocked (DCPTime position, bool accurate);
+ void seek_unlocked (dcpomatic::DCPTime position, bool accurate);
boost::shared_ptr<Player> _player;
boost::thread* _thread;
@@ -93,7 +93,7 @@ private:
boost::mutex _mutex;
boost::condition _summon;
boost::condition _arrived;
- boost::optional<DCPTime> _pending_seek_position;
+ boost::optional<dcpomatic::DCPTime> _pending_seek_position;
bool _pending_seek_accurate;
int _suspended;
bool _finished;
@@ -112,7 +112,7 @@ private:
/** If we are waiting to be refilled following a seek, this is the time we were
seeking to.
*/
- boost::optional<DCPTime> _awaiting;
+ boost::optional<dcpomatic::DCPTime> _awaiting;
boost::signals2::scoped_connection _player_video_connection;
boost::signals2::scoped_connection _player_audio_connection;
diff --git a/src/lib/content.cc b/src/lib/content.cc
index 9280d2e61..a722cd15d 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -52,6 +52,7 @@ using boost::shared_ptr;
using boost::optional;
using dcp::raw_convert;
using dcp::locale_convert;
+using namespace dcpomatic;
int const ContentProperty::PATH = 400;
int const ContentProperty::POSITION = 401;
diff --git a/src/lib/content.h b/src/lib/content.h
index 4c1d55765..a2d78aa68 100644
--- a/src/lib/content.h
+++ b/src/lib/content.h
@@ -65,7 +65,7 @@ class Content : public boost::enable_shared_from_this<Content>, public Signaller
{
public:
explicit Content ();
- Content (DCPTime);
+ Content (dcpomatic::DCPTime);
Content (boost::filesystem::path);
Content (cxml::ConstNodePtr);
Content (std::vector<boost::shared_ptr<Content> >);
@@ -90,13 +90,13 @@ public:
virtual std::string technical_summary () const;
virtual void as_xml (xmlpp::Node *, bool with_paths) const;
- virtual DCPTime full_length (boost::shared_ptr<const Film>) const = 0;
- virtual DCPTime approximate_length () const = 0;
+ virtual dcpomatic::DCPTime full_length (boost::shared_ptr<const Film>) const = 0;
+ virtual dcpomatic::DCPTime approximate_length () const = 0;
virtual std::string identifier () const;
/** @return points at which to split this content when
* REELTYPE_BY_VIDEO_CONTENT is in use.
*/
- virtual std::list<DCPTime> reel_split_points (boost::shared_ptr<const Film>) const;
+ virtual std::list<dcpomatic::DCPTime> reel_split_points (boost::shared_ptr<const Film>) const;
boost::shared_ptr<Content> clone () const;
@@ -135,36 +135,36 @@ public:
return _digest;
}
- void set_position (boost::shared_ptr<const Film> film, DCPTime, bool force_emit = false);
+ void set_position (boost::shared_ptr<const Film> film, dcpomatic::DCPTime, bool force_emit = false);
- /** DCPTime that this content starts; i.e. the time that the first
+ /** dcpomatic::DCPTime that this content starts; i.e. the time that the first
* bit of the content (trimmed or not) will happen.
*/
- DCPTime position () const {
+ dcpomatic::DCPTime position () const {
boost::mutex::scoped_lock lm (_mutex);
return _position;
}
- void set_trim_start (ContentTime);
+ void set_trim_start (dcpomatic::ContentTime);
- ContentTime trim_start () const {
+ dcpomatic::ContentTime trim_start () const {
boost::mutex::scoped_lock lm (_mutex);
return _trim_start;
}
- void set_trim_end (ContentTime);
+ void set_trim_end (dcpomatic::ContentTime);
- ContentTime trim_end () const {
+ dcpomatic::ContentTime trim_end () const {
boost::mutex::scoped_lock lm (_mutex);
return _trim_end;
}
/** @return Time immediately after the last thing in this content */
- DCPTime end (boost::shared_ptr<const Film> film) const {
+ dcpomatic::DCPTime end (boost::shared_ptr<const Film> film) const {
return position() + length_after_trim(film);
}
- DCPTime length_after_trim (boost::shared_ptr<const Film> film) const;
+ dcpomatic::DCPTime length_after_trim (boost::shared_ptr<const Film> film) const;
boost::optional<double> video_frame_rate () const {
boost::mutex::scoped_lock lm (_mutex);
@@ -219,9 +219,9 @@ private:
std::vector<std::time_t> _last_write_times;
std::string _digest;
- DCPTime _position;
- ContentTime _trim_start;
- ContentTime _trim_end;
+ dcpomatic::DCPTime _position;
+ dcpomatic::ContentTime _trim_start;
+ dcpomatic::ContentTime _trim_end;
/** The video frame rate that this content is or was prepared to be used with,
* or empty if the effective rate of this content should be dictated by something
* else (either some video happening at the same time, or the rate of the DCP).
diff --git a/src/lib/content_text.h b/src/lib/content_text.h
index 2d8910577..0c0df1ee6 100644
--- a/src/lib/content_text.h
+++ b/src/lib/content_text.h
@@ -33,22 +33,22 @@ class Image;
class ContentText
{
public:
- explicit ContentText (ContentTime f)
+ explicit ContentText (dcpomatic::ContentTime f)
: _from (f)
{}
- ContentTime from () const {
+ dcpomatic::ContentTime from () const {
return _from;
}
private:
- ContentTime _from;
+ dcpomatic::ContentTime _from;
};
class ContentBitmapText : public ContentText
{
public:
- ContentBitmapText (ContentTime f, boost::shared_ptr<Image> im, dcpomatic::Rect<double> r)
+ ContentBitmapText (dcpomatic::ContentTime f, boost::shared_ptr<Image> im, dcpomatic::Rect<double> r)
: ContentText (f)
, sub (im, r)
{}
@@ -64,7 +64,7 @@ public:
class ContentStringText : public ContentText
{
public:
- ContentStringText (ContentTime f, std::list<dcp::SubtitleString> s)
+ ContentStringText (dcpomatic::ContentTime f, std::list<dcp::SubtitleString> s)
: ContentText (f)
, subs (s)
{}
diff --git a/src/lib/dcp_content.cc b/src/lib/dcp_content.cc
index ef877a17f..dc1a463c5 100644
--- a/src/lib/dcp_content.cc
+++ b/src/lib/dcp_content.cc
@@ -55,6 +55,7 @@ using boost::optional;
using boost::function;
using boost::dynamic_pointer_cast;
using dcp::raw_convert;
+using namespace dcpomatic;
int const DCPContentProperty::NEEDS_ASSETS = 600;
int const DCPContentProperty::NEEDS_KDM = 601;
diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h
index 763b3e903..65bed29bc 100644
--- a/src/lib/dcp_content.h
+++ b/src/lib/dcp_content.h
@@ -61,8 +61,8 @@ public:
return boost::dynamic_pointer_cast<const DCPContent> (Content::shared_from_this ());
}
- DCPTime full_length (boost::shared_ptr<const Film> film) const;
- DCPTime approximate_length () const;
+ dcpomatic::DCPTime full_length (boost::shared_ptr<const Film> film) const;
+ dcpomatic::DCPTime approximate_length () const;
void examine (boost::shared_ptr<const Film> film, boost::shared_ptr<Job>);
std::string summary () const;
@@ -72,7 +72,7 @@ public:
void take_settings_from (boost::shared_ptr<const Content> c);
void set_default_colour_conversion ();
- std::list<DCPTime> reel_split_points (boost::shared_ptr<const Film> film) const;
+ std::list<dcpomatic::DCPTime> reel_split_points (boost::shared_ptr<const Film> film) const;
std::vector<boost::filesystem::path> directories () const;
@@ -153,7 +153,7 @@ private:
void read_directory (boost::filesystem::path);
void read_sub_directory (boost::filesystem::path);
- std::list<DCPTimePeriod> reels (boost::shared_ptr<const Film> film) const;
+ std::list<dcpomatic::DCPTimePeriod> reels (boost::shared_ptr<const Film> film) const;
bool can_reference (
boost::shared_ptr<const Film> film,
boost::function <bool (boost::shared_ptr<const Content>)>,
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc
index 98238f653..5a72fb228 100644
--- a/src/lib/dcp_decoder.cc
+++ b/src/lib/dcp_decoder.cc
@@ -54,6 +54,7 @@ using std::cout;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
+using namespace dcpomatic;
DCPDecoder::DCPDecoder (shared_ptr<const Film> film, shared_ptr<const DCPContent> c, bool fast)
: DCP (c)
diff --git a/src/lib/dcp_decoder.h b/src/lib/dcp_decoder.h
index 4068696ea..0fc598bd7 100644
--- a/src/lib/dcp_decoder.h
+++ b/src/lib/dcp_decoder.h
@@ -50,16 +50,16 @@ public:
void set_forced_reduction (boost::optional<int> reduction);
bool pass ();
- void seek (ContentTime t, bool accurate);
+ void seek (dcpomatic::ContentTime t, bool accurate);
private:
friend struct dcp_subtitle_within_dcp_test;
void next_reel ();
void get_readers ();
- void pass_texts (ContentTime next, dcp::Size size);
+ void pass_texts (dcpomatic::ContentTime next, dcp::Size size);
void pass_texts (
- ContentTime next,
+ dcpomatic::ContentTime next,
boost::shared_ptr<dcp::SubtitleAsset> asset,
bool reference,
int64_t entry_point,
@@ -68,7 +68,7 @@ private:
);
/** Time of next thing to return from pass relative to the start of _reel */
- ContentTime _next;
+ dcpomatic::ContentTime _next;
std::list<boost::shared_ptr<dcp::Reel> > _reels;
std::list<boost::shared_ptr<dcp::Reel> >::iterator _reel;
diff --git a/src/lib/dcp_encoder.cc b/src/lib/dcp_encoder.cc
index 50a8fd927..99edb0050 100644
--- a/src/lib/dcp_encoder.cc
+++ b/src/lib/dcp_encoder.cc
@@ -50,6 +50,7 @@ using boost::shared_ptr;
using boost::weak_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
+using namespace dcpomatic;
/** Construct a DCP encoder.
* @param film Film that we are encoding.
diff --git a/src/lib/dcp_encoder.h b/src/lib/dcp_encoder.h
index 3ccd5695e..61cdcee68 100644
--- a/src/lib/dcp_encoder.h
+++ b/src/lib/dcp_encoder.h
@@ -51,9 +51,9 @@ public:
private:
- void video (boost::shared_ptr<PlayerVideo>, DCPTime);
- void audio (boost::shared_ptr<AudioBuffers>, DCPTime);
- void text (PlayerText, TextType, boost::optional<DCPTextTrack>, DCPTimePeriod);
+ void video (boost::shared_ptr<PlayerVideo>, dcpomatic::DCPTime);
+ void audio (boost::shared_ptr<AudioBuffers>, dcpomatic::DCPTime);
+ void text (PlayerText, TextType, boost::optional<DCPTextTrack>, dcpomatic::DCPTimePeriod);
boost::shared_ptr<Writer> _writer;
boost::shared_ptr<J2KEncoder> _j2k_encoder;
diff --git a/src/lib/dcp_subtitle_content.cc b/src/lib/dcp_subtitle_content.cc
index 54bd631cb..81e26cf7c 100644
--- a/src/lib/dcp_subtitle_content.cc
+++ b/src/lib/dcp_subtitle_content.cc
@@ -36,6 +36,7 @@ using std::list;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using dcp::raw_convert;
+using namespace dcpomatic;
DCPSubtitleContent::DCPSubtitleContent (boost::filesystem::path path)
: Content (path)
diff --git a/src/lib/dcp_subtitle_content.h b/src/lib/dcp_subtitle_content.h
index f5f375eee..5ff409546 100644
--- a/src/lib/dcp_subtitle_content.h
+++ b/src/lib/dcp_subtitle_content.h
@@ -31,9 +31,9 @@ public:
std::string summary () const;
std::string technical_summary () const;
void as_xml (xmlpp::Node *, bool with_paths) const;
- DCPTime full_length (boost::shared_ptr<const Film> film) const;
- DCPTime approximate_length () const;
+ dcpomatic::DCPTime full_length (boost::shared_ptr<const Film> film) const;
+ dcpomatic::DCPTime approximate_length () const;
private:
- ContentTime _length;
+ dcpomatic::ContentTime _length;
};
diff --git a/src/lib/dcp_subtitle_decoder.cc b/src/lib/dcp_subtitle_decoder.cc
index 3a182c0c7..096580a6c 100644
--- a/src/lib/dcp_subtitle_decoder.cc
+++ b/src/lib/dcp_subtitle_decoder.cc
@@ -28,6 +28,7 @@ using std::cout;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::bind;
+using namespace dcpomatic;
DCPSubtitleDecoder::DCPSubtitleDecoder (shared_ptr<const Film> film, shared_ptr<const DCPSubtitleContent> content)
: Decoder (film)
diff --git a/src/lib/dcp_subtitle_decoder.h b/src/lib/dcp_subtitle_decoder.h
index e5533927b..5bf6363ad 100644
--- a/src/lib/dcp_subtitle_decoder.h
+++ b/src/lib/dcp_subtitle_decoder.h
@@ -29,10 +29,10 @@ public:
DCPSubtitleDecoder (boost::shared_ptr<const Film> film, boost::shared_ptr<const DCPSubtitleContent>);
bool pass ();
- void seek (ContentTime time, bool accurate);
+ void seek (dcpomatic::ContentTime time, bool accurate);
private:
- ContentTimePeriod content_time_period (boost::shared_ptr<dcp::Subtitle> s) const;
+ dcpomatic::ContentTimePeriod content_time_period (boost::shared_ptr<dcp::Subtitle> s) const;
std::list<boost::shared_ptr<dcp::Subtitle> > _subtitles;
std::list<boost::shared_ptr<dcp::Subtitle> >::const_iterator _next;
diff --git a/src/lib/dcpomatic_time.cc b/src/lib/dcpomatic_time.cc
index 4f6c9b664..8abd77555 100644
--- a/src/lib/dcpomatic_time.cc
+++ b/src/lib/dcpomatic_time.cc
@@ -22,6 +22,7 @@
#include <inttypes.h>
using std::string;
+using namespace dcpomatic;
template <>
Time<ContentTimeDifferentiator, DCPTimeDifferentiator>::Time (DCPTime d, FrameRateChange f)
@@ -38,7 +39,7 @@ Time<DCPTimeDifferentiator, ContentTimeDifferentiator>::Time (ContentTime d, Fra
}
DCPTime
-min (DCPTime a, DCPTime b)
+dcpomatic::min (DCPTime a, DCPTime b)
{
if (a < b) {
return a;
@@ -48,7 +49,7 @@ min (DCPTime a, DCPTime b)
}
DCPTime
-max (DCPTime a, DCPTime b)
+dcpomatic::max (DCPTime a, DCPTime b)
{
if (a > b) {
return a;
@@ -58,7 +59,7 @@ max (DCPTime a, DCPTime b)
}
ContentTime
-min (ContentTime a, ContentTime b)
+dcpomatic::min (ContentTime a, ContentTime b)
{
if (a < b) {
return a;
@@ -68,7 +69,7 @@ min (ContentTime a, ContentTime b)
}
ContentTime
-max (ContentTime a, ContentTime b)
+dcpomatic::max (ContentTime a, ContentTime b)
{
if (a > b) {
return a;
@@ -78,7 +79,7 @@ max (ContentTime a, ContentTime b)
}
string
-to_string (ContentTime t)
+dcpomatic::to_string (ContentTime t)
{
char buffer[64];
#ifdef DCPOMATIC_WINDOWS
@@ -90,7 +91,7 @@ to_string (ContentTime t)
}
string
-to_string (DCPTime t)
+dcpomatic::to_string (DCPTime t)
{
char buffer[64];
#ifdef DCPOMATIC_WINDOWS
@@ -102,7 +103,7 @@ to_string (DCPTime t)
}
string
-to_string (DCPTimePeriod p)
+dcpomatic::to_string (DCPTimePeriod p)
{
char buffer[64];
#ifdef DCPOMATIC_WINDOWS
diff --git a/src/lib/dcpomatic_time.h b/src/lib/dcpomatic_time.h
index a09dd93e9..897b725bd 100644
--- a/src/lib/dcpomatic_time.h
+++ b/src/lib/dcpomatic_time.h
@@ -35,8 +35,13 @@
#include <iomanip>
#include <cstdio>
+struct dcpomatic_time_ceil_test;
+struct dcpomatic_time_floor_test;
+
+namespace dcpomatic {
+
/** A time in seconds, expressed as a number scaled up by Time::HZ. We want two different
- * versions of this class, ContentTime and DCPTime, and we want it to be impossible to
+ * versions of this class, dcpomatic::ContentTime and dcpomatic::DCPTime, and we want it to be impossible to
* convert implicitly between the two. Hence there's this template hack. I'm not
* sure if it's the best way to do it.
*
@@ -228,8 +233,8 @@ public:
static const int HZ = 96000;
private:
- friend struct dcpomatic_time_ceil_test;
- friend struct dcpomatic_time_floor_test;
+ friend struct ::dcpomatic_time_ceil_test;
+ friend struct ::dcpomatic_time_floor_test;
Type _t;
};
@@ -357,4 +362,6 @@ std::string to_string (ContentTime t);
std::string to_string (DCPTime t);
std::string to_string (DCPTimePeriod p);
+}
+
#endif
diff --git a/src/lib/dcpomatic_time_coalesce.h b/src/lib/dcpomatic_time_coalesce.h
index e103e80e6..e6e16641e 100644
--- a/src/lib/dcpomatic_time_coalesce.h
+++ b/src/lib/dcpomatic_time_coalesce.h
@@ -21,6 +21,8 @@
#include "dcpomatic_time.h"
#include <iostream>
+namespace dcpomatic {
+
/** @param periods Set of periods in ascending order of from time */
template <class T>
std::list<TimePeriod<T> > coalesce (std::list<TimePeriod<T> > periods)
@@ -46,3 +48,5 @@ std::list<TimePeriod<T> > coalesce (std::list<TimePeriod<T> > periods)
return periods;
}
+
+}
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc
index 52e8c04e6..f912c473c 100644
--- a/src/lib/decoder.cc
+++ b/src/lib/decoder.cc
@@ -29,6 +29,7 @@ using std::cout;
using boost::optional;
using boost::shared_ptr;
using boost::weak_ptr;
+using namespace dcpomatic;
Decoder::Decoder (weak_ptr<const Film> film)
: _film (film)
diff --git a/src/lib/decoder.h b/src/lib/decoder.h
index d610f8727..92082ca18 100644
--- a/src/lib/decoder.h
+++ b/src/lib/decoder.h
@@ -55,9 +55,9 @@ public:
* @return true if this decoder will emit no more data unless a seek() happens.
*/
virtual bool pass () = 0;
- virtual void seek (ContentTime time, bool accurate);
+ virtual void seek (dcpomatic::ContentTime time, bool accurate);
- ContentTime position () const;
+ dcpomatic::ContentTime position () const;
protected:
boost::shared_ptr<const Film> film () const;
diff --git a/src/lib/decoder_part.h b/src/lib/decoder_part.h
index 7ba2cb2eb..53d1a1b08 100644
--- a/src/lib/decoder_part.h
+++ b/src/lib/decoder_part.h
@@ -34,7 +34,7 @@ public:
DecoderPart (Decoder* parent);
virtual ~DecoderPart () {}
- virtual ContentTime position (boost::shared_ptr<const Film> film) const = 0;
+ virtual dcpomatic::ContentTime position (boost::shared_ptr<const Film> film) const = 0;
virtual void seek () = 0;
void set_ignore (bool i) {
diff --git a/src/lib/empty.cc b/src/lib/empty.cc
index 1df318b25..206acfdb0 100644
--- a/src/lib/empty.cc
+++ b/src/lib/empty.cc
@@ -34,6 +34,7 @@ using std::list;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::function;
+using namespace dcpomatic;
Empty::Empty (shared_ptr<const Film> film, list<shared_ptr<Piece> > pieces, function<bool (shared_ptr<Piece>)> part)
{
diff --git a/src/lib/empty.h b/src/lib/empty.h
index 50f21fc4d..bd295206e 100644
--- a/src/lib/empty.h
+++ b/src/lib/empty.h
@@ -37,23 +37,23 @@ public:
Empty () {}
Empty (boost::shared_ptr<const Film> film, std::list<boost::shared_ptr<Piece> > pieces, boost::function<bool (boost::shared_ptr<Piece>)> part);
- DCPTime position () const {
+ dcpomatic::DCPTime position () const {
return _position;
}
- DCPTimePeriod period_at_position () const;
+ dcpomatic::DCPTimePeriod period_at_position () const;
bool done () const;
- void set_position (DCPTime amount);
+ void set_position (dcpomatic::DCPTime amount);
private:
friend struct ::empty_test1;
friend struct ::empty_test2;
friend struct ::player_subframe_test;
- std::list<DCPTimePeriod> _periods;
- DCPTime _position;
+ std::list<dcpomatic::DCPTimePeriod> _periods;
+ dcpomatic::DCPTime _position;
};
#endif
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc
index 8a0dcb593..ab5148cfa 100644
--- a/src/lib/ffmpeg.cc
+++ b/src/lib/ffmpeg.cc
@@ -48,6 +48,7 @@ using std::vector;
using boost::shared_ptr;
using boost::optional;
using dcp::raw_convert;
+using namespace dcpomatic;
boost::mutex FFmpeg::_mutex;
diff --git a/src/lib/ffmpeg.h b/src/lib/ffmpeg.h
index d2f797658..10517055c 100644
--- a/src/lib/ffmpeg.h
+++ b/src/lib/ffmpeg.h
@@ -53,8 +53,8 @@ public:
protected:
AVCodecContext* video_codec_context () const;
AVCodecContext* subtitle_codec_context () const;
- ContentTime pts_offset (
- std::vector<boost::shared_ptr<FFmpegAudioStream> > audio_streams, boost::optional<ContentTime> first_video, double video_frame_rate
+ dcpomatic::ContentTime pts_offset (
+ std::vector<boost::shared_ptr<FFmpegAudioStream> > audio_streams, boost::optional<dcpomatic::ContentTime> first_video, double video_frame_rate
) const;
static FFmpegSubtitlePeriod subtitle_period (AVSubtitle const & sub);
diff --git a/src/lib/ffmpeg_audio_stream.cc b/src/lib/ffmpeg_audio_stream.cc
index 1b0d39db2..1fc008d51 100644
--- a/src/lib/ffmpeg_audio_stream.cc
+++ b/src/lib/ffmpeg_audio_stream.cc
@@ -26,6 +26,7 @@
using std::string;
using boost::optional;
using dcp::raw_convert;
+using namespace dcpomatic;
FFmpegAudioStream::FFmpegAudioStream (cxml::ConstNodePtr node, int version)
: FFmpegStream (node)
diff --git a/src/lib/ffmpeg_audio_stream.h b/src/lib/ffmpeg_audio_stream.h
index a754ec574..65c4aba5e 100644
--- a/src/lib/ffmpeg_audio_stream.h
+++ b/src/lib/ffmpeg_audio_stream.h
@@ -49,7 +49,7 @@ public:
/* XXX: should probably be locked */
- boost::optional<ContentTime> first_audio;
+ boost::optional<dcpomatic::ContentTime> first_audio;
boost::optional<std::string> codec_name;
private:
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index a3a1cfb0f..69d743215 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -56,6 +56,7 @@ using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
using dcp::raw_convert;
+using namespace dcpomatic;
int const FFmpegContentProperty::SUBTITLE_STREAMS = 100;
int const FFmpegContentProperty::SUBTITLE_STREAM = 101;
diff --git a/src/lib/ffmpeg_content.h b/src/lib/ffmpeg_content.h
index 4c612cd3e..8871301b1 100644
--- a/src/lib/ffmpeg_content.h
+++ b/src/lib/ffmpeg_content.h
@@ -63,8 +63,8 @@ public:
std::string summary () const;
std::string technical_summary () const;
void as_xml (xmlpp::Node *, bool with_paths) const;
- DCPTime full_length (boost::shared_ptr<const Film> film) const;
- DCPTime approximate_length () const;
+ dcpomatic::DCPTime full_length (boost::shared_ptr<const Film> film) const;
+ dcpomatic::DCPTime approximate_length () const;
std::string identifier () const;
@@ -91,7 +91,7 @@ public:
void set_subtitle_stream (boost::shared_ptr<FFmpegSubtitleStream>);
- boost::optional<ContentTime> first_video () const {
+ boost::optional<dcpomatic::ContentTime> first_video () const {
boost::mutex::scoped_lock lm (_mutex);
return _first_video;
}
@@ -116,7 +116,7 @@ private:
std::vector<boost::shared_ptr<FFmpegSubtitleStream> > _subtitle_streams;
boost::shared_ptr<FFmpegSubtitleStream> _subtitle_stream;
- boost::optional<ContentTime> _first_video;
+ boost::optional<dcpomatic::ContentTime> _first_video;
/** Video filters that should be used when generating DCPs */
std::vector<Filter const *> _filters;
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index edc0b08d1..0e65a6d6b 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -74,6 +74,7 @@ using boost::split;
using boost::optional;
using boost::dynamic_pointer_cast;
using dcp::Size;
+using namespace dcpomatic;
FFmpegDecoder::FFmpegDecoder (shared_ptr<const Film> film, shared_ptr<const FFmpegContent> c, bool fast)
: FFmpeg (c)
diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h
index 640229f23..65f36a004 100644
--- a/src/lib/ffmpeg_decoder.h
+++ b/src/lib/ffmpeg_decoder.h
@@ -48,7 +48,7 @@ public:
FFmpegDecoder (boost::shared_ptr<const Film> film, boost::shared_ptr<const FFmpegContent>, bool fast);
bool pass ();
- void seek (ContentTime time, bool);
+ void seek (dcpomatic::ContentTime time, bool);
private:
friend struct ::ffmpeg_pts_offset_test;
@@ -62,8 +62,8 @@ private:
void decode_audio_packet ();
void decode_subtitle_packet ();
- void decode_bitmap_subtitle (AVSubtitleRect const * rect, ContentTime from);
- void decode_ass_subtitle (std::string ass, ContentTime from);
+ void decode_bitmap_subtitle (AVSubtitleRect const * rect, dcpomatic::ContentTime from);
+ void decode_ass_subtitle (std::string ass, dcpomatic::ContentTime from);
void maybe_add_subtitle ();
boost::shared_ptr<AudioBuffers> deinterleave_audio (boost::shared_ptr<FFmpegAudioStream> stream) const;
@@ -71,12 +71,12 @@ private:
std::list<boost::shared_ptr<VideoFilterGraph> > _filter_graphs;
boost::mutex _filter_graphs_mutex;
- ContentTime _pts_offset;
- boost::optional<ContentTime> _current_subtitle_to;
+ dcpomatic::ContentTime _pts_offset;
+ boost::optional<dcpomatic::ContentTime> _current_subtitle_to;
/** true if we have a subtitle which has not had emit_stop called for it yet */
bool _have_current_subtitle;
boost::shared_ptr<Image> _black_image;
- std::vector<boost::optional<ContentTime> > _next_time;
+ std::vector<boost::optional<dcpomatic::ContentTime> > _next_time;
};
diff --git a/src/lib/ffmpeg_encoder.cc b/src/lib/ffmpeg_encoder.cc
index 07b691956..1d112bdb4 100644
--- a/src/lib/ffmpeg_encoder.cc
+++ b/src/lib/ffmpeg_encoder.cc
@@ -41,6 +41,7 @@ using std::map;
using boost::shared_ptr;
using boost::bind;
using boost::weak_ptr;
+using namespace dcpomatic;
FFmpegEncoder::FFmpegEncoder (
shared_ptr<const Film> film,
diff --git a/src/lib/ffmpeg_encoder.h b/src/lib/ffmpeg_encoder.h
index 79539acce..687d2981e 100644
--- a/src/lib/ffmpeg_encoder.h
+++ b/src/lib/ffmpeg_encoder.h
@@ -78,7 +78,7 @@ private:
int _output_audio_channels;
mutable boost::mutex _mutex;
- DCPTime _last_time;
+ dcpomatic::DCPTime _last_time;
EventHistory _history;
diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc
index b31280cd5..382b71b83 100644
--- a/src/lib/ffmpeg_examiner.cc
+++ b/src/lib/ffmpeg_examiner.cc
@@ -42,6 +42,7 @@ using std::cout;
using std::max;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
/** @param job job that the examiner is operating in, or 0 */
FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c, shared_ptr<Job> job)
diff --git a/src/lib/ffmpeg_examiner.h b/src/lib/ffmpeg_examiner.h
index 67fdcfae0..d2e6e1a0a 100644
--- a/src/lib/ffmpeg_examiner.h
+++ b/src/lib/ffmpeg_examiner.h
@@ -49,7 +49,7 @@ public:
return _audio_streams;
}
- boost::optional<ContentTime> first_video () const {
+ boost::optional<dcpomatic::ContentTime> first_video () const {
return _first_video;
}
@@ -81,11 +81,11 @@ private:
std::string stream_name (AVStream* s) const;
std::string subtitle_stream_name (AVStream* s) const;
- boost::optional<ContentTime> frame_time (AVStream* s) const;
+ boost::optional<dcpomatic::ContentTime> frame_time (AVStream* s) const;
std::vector<boost::shared_ptr<FFmpegSubtitleStream> > _subtitle_streams;
std::vector<boost::shared_ptr<FFmpegAudioStream> > _audio_streams;
- boost::optional<ContentTime> _first_video;
+ boost::optional<dcpomatic::ContentTime> _first_video;
/** Video length, either obtained from the header or derived by running
* through the whole file.
*/
@@ -96,7 +96,7 @@ private:
struct SubtitleStart
{
- SubtitleStart (std::string id_, bool image_, ContentTime time_)
+ SubtitleStart (std::string id_, bool image_, dcpomatic::ContentTime time_)
: id (id_)
, image (image_)
, time (time_)
@@ -105,7 +105,7 @@ private:
std::string id;
/** true if it's an image subtitle, false for text */
bool image;
- ContentTime time;
+ dcpomatic::ContentTime time;
};
typedef std::map<boost::shared_ptr<FFmpegSubtitleStream>, boost::optional<SubtitleStart> > LastSubtitleMap;
diff --git a/src/lib/ffmpeg_file_encoder.cc b/src/lib/ffmpeg_file_encoder.cc
index 5eccb8f17..eb7036429 100644
--- a/src/lib/ffmpeg_file_encoder.cc
+++ b/src/lib/ffmpeg_file_encoder.cc
@@ -38,6 +38,7 @@ using std::pair;
using boost::shared_ptr;
using boost::bind;
using boost::weak_ptr;
+using namespace dcpomatic;
int FFmpegFileEncoder::_video_stream_index = 0;
int FFmpegFileEncoder::_audio_stream_index = 1;
diff --git a/src/lib/ffmpeg_file_encoder.h b/src/lib/ffmpeg_file_encoder.h
index 8b9d0b67c..5308947e6 100644
--- a/src/lib/ffmpeg_file_encoder.h
+++ b/src/lib/ffmpeg_file_encoder.h
@@ -43,9 +43,9 @@ public:
boost::filesystem::path output
);
- void video (boost::shared_ptr<PlayerVideo>, DCPTime);
+ void video (boost::shared_ptr<PlayerVideo>, dcpomatic::DCPTime);
void audio (boost::shared_ptr<AudioBuffers>);
- void subtitle (PlayerText, DCPTimePeriod);
+ void subtitle (PlayerText, dcpomatic::DCPTimePeriod);
void flush ();
diff --git a/src/lib/ffmpeg_subtitle_period.h b/src/lib/ffmpeg_subtitle_period.h
index 42c7bf763..0841207ad 100644
--- a/src/lib/ffmpeg_subtitle_period.h
+++ b/src/lib/ffmpeg_subtitle_period.h
@@ -24,15 +24,15 @@
class FFmpegSubtitlePeriod
{
public:
- explicit FFmpegSubtitlePeriod (ContentTime f)
+ explicit FFmpegSubtitlePeriod (dcpomatic::ContentTime f)
: from (f)
{}
- FFmpegSubtitlePeriod (ContentTime f, ContentTime t)
+ FFmpegSubtitlePeriod (dcpomatic::ContentTime f, dcpomatic::ContentTime t)
: from (f)
, to (t)
{}
- ContentTime from;
- boost::optional<ContentTime> to;
+ dcpomatic::ContentTime from;
+ boost::optional<dcpomatic::ContentTime> to;
};
diff --git a/src/lib/film.cc b/src/lib/film.cc
index dee3196c5..efc89e0eb 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -99,6 +99,7 @@ using boost::dynamic_pointer_cast;
using boost::optional;
using boost::is_any_of;
using dcp::raw_convert;
+using namespace dcpomatic;
string const Film::metadata_file = "metadata.xml";
diff --git a/src/lib/film.h b/src/lib/film.h
index e5d29145c..7d762f599 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -71,10 +71,10 @@ public:
explicit Film (boost::optional<boost::filesystem::path> dir);
~Film ();
- boost::filesystem::path info_file (DCPTimePeriod p) const;
+ boost::filesystem::path info_file (dcpomatic::DCPTimePeriod p) const;
boost::filesystem::path j2c_path (int, Frame, Eyes, bool) const;
boost::filesystem::path internal_video_asset_dir () const;
- boost::filesystem::path internal_video_asset_filename (DCPTimePeriod p) const;
+ boost::filesystem::path internal_video_asset_filename (dcpomatic::DCPTimePeriod p) const;
boost::filesystem::path audio_analysis_path (boost::shared_ptr<const Playlist>) const;
@@ -123,9 +123,9 @@ public:
/* Proxies for some Playlist methods */
ContentList content () const;
- DCPTime length () const;
+ dcpomatic::DCPTime length () const;
int best_video_frame_rate () const;
- FrameRateChange active_frame_rate_change (DCPTime) const;
+ FrameRateChange active_frame_rate_change (dcpomatic::DCPTime) const;
std::pair<double, double> speed_up_range (int dcp_frame_rate) const;
dcp::EncryptedKDM make_kdm (
@@ -163,10 +163,10 @@ public:
return _playlist;
}
- std::list<DCPTimePeriod> reels () const;
+ std::list<dcpomatic::DCPTimePeriod> reels () const;
std::list<int> mapped_audio_channels () const;
- std::string content_summary (DCPTimePeriod period) const;
+ std::string content_summary (dcpomatic::DCPTimePeriod period) const;
bool references_dcp_video () const;
bool references_dcp_audio () const;
@@ -298,8 +298,8 @@ public:
return _reencode_j2k;
}
- boost::optional<DCPTime> marker (dcp::Marker type) const;
- std::map<dcp::Marker, DCPTime> markers () const {
+ boost::optional<dcpomatic::DCPTime> marker (dcp::Marker type) const;
+ std::map<dcp::Marker, dcpomatic::DCPTime> markers () const {
return _markers;
}
@@ -337,7 +337,7 @@ public:
void set_reel_length (int64_t);
void set_upload_after_make_dcp (bool);
void set_reencode_j2k (bool);
- void set_marker (dcp::Marker type, DCPTime time);
+ void set_marker (dcp::Marker type, dcpomatic::DCPTime time);
void unset_marker (dcp::Marker type);
void set_ratings (std::vector<dcp::Rating> r);
@@ -419,7 +419,7 @@ private:
bool _reencode_j2k;
/** true if the user has ever explicitly set the video frame rate of this film */
bool _user_explicit_video_frame_rate;
- std::map<dcp::Marker, DCPTime> _markers;
+ std::map<dcp::Marker, dcpomatic::DCPTime> _markers;
std::vector<dcp::Rating> _ratings;
int _state_version;
diff --git a/src/lib/hints.cc b/src/lib/hints.cc
index df29a3336..cf14f0699 100644
--- a/src/lib/hints.cc
+++ b/src/lib/hints.cc
@@ -49,6 +49,7 @@ using boost::shared_ptr;
using boost::weak_ptr;
using boost::optional;
using boost::bind;
+using namespace dcpomatic;
Hints::Hints (weak_ptr<const Film> film)
: _film (film)
diff --git a/src/lib/hints.h b/src/lib/hints.h
index 6f0e533d4..00c2486e7 100644
--- a/src/lib/hints.h
+++ b/src/lib/hints.h
@@ -46,7 +46,7 @@ public:
private:
void thread ();
void hint (std::string h);
- void text (PlayerText text, TextType type, DCPTimePeriod period);
+ void text (PlayerText text, TextType type, dcpomatic::DCPTimePeriod period);
boost::weak_ptr<const Film> _film;
boost::thread* _thread;
@@ -54,7 +54,7 @@ private:
bool _long_ccap;
bool _overlap_ccap;
bool _too_many_ccap_lines;
- boost::optional<DCPTimePeriod> _last;
+ boost::optional<dcpomatic::DCPTimePeriod> _last;
boost::mutex _mutex;
bool _stop;
diff --git a/src/lib/image_content.cc b/src/lib/image_content.cc
index 1515c8b76..8cf44bda1 100644
--- a/src/lib/image_content.cc
+++ b/src/lib/image_content.cc
@@ -39,6 +39,7 @@ using std::cout;
using std::list;
using std::vector;
using boost::shared_ptr;
+using namespace dcpomatic;
ImageContent::ImageContent (boost::filesystem::path p)
{
diff --git a/src/lib/image_content.h b/src/lib/image_content.h
index 959923a51..970a68d66 100644
--- a/src/lib/image_content.h
+++ b/src/lib/image_content.h
@@ -41,8 +41,8 @@ public:
std::string summary () const;
std::string technical_summary () const;
void as_xml (xmlpp::Node *, bool with_paths) const;
- DCPTime full_length (boost::shared_ptr<const Film> film) const;
- DCPTime approximate_length () const;
+ dcpomatic::DCPTime full_length (boost::shared_ptr<const Film> film) const;
+ dcpomatic::DCPTime approximate_length () const;
std::string identifier () const;
diff --git a/src/lib/image_decoder.cc b/src/lib/image_decoder.cc
index ce45abdd9..8aa3f6a99 100644
--- a/src/lib/image_decoder.cc
+++ b/src/lib/image_decoder.cc
@@ -35,6 +35,7 @@
using std::cout;
using boost::shared_ptr;
using dcp::Size;
+using namespace dcpomatic;
ImageDecoder::ImageDecoder (shared_ptr<const Film> film, shared_ptr<const ImageContent> c)
: Decoder (film)
diff --git a/src/lib/image_decoder.h b/src/lib/image_decoder.h
index 9f1484e47..eeec779ba 100644
--- a/src/lib/image_decoder.h
+++ b/src/lib/image_decoder.h
@@ -34,7 +34,7 @@ public:
}
bool pass ();
- void seek (ContentTime, bool);
+ void seek (dcpomatic::ContentTime, bool);
private:
diff --git a/src/lib/j2k_encoder.cc b/src/lib/j2k_encoder.cc
index 94728d6a9..431a47e65 100644
--- a/src/lib/j2k_encoder.cc
+++ b/src/lib/j2k_encoder.cc
@@ -48,6 +48,7 @@ using boost::shared_ptr;
using boost::weak_ptr;
using boost::optional;
using dcp::Data;
+using namespace dcpomatic;
/** @param film Film that we are encoding.
* @param writer Writer that we are using.
diff --git a/src/lib/j2k_encoder.h b/src/lib/j2k_encoder.h
index 2180f3f6a..01cf0605e 100644
--- a/src/lib/j2k_encoder.h
+++ b/src/lib/j2k_encoder.h
@@ -63,7 +63,7 @@ public:
void begin ();
/** Called to pass a bit of video to be encoded as the next DCP frame */
- void encode (boost::shared_ptr<PlayerVideo> pv, DCPTime time);
+ void encode (boost::shared_ptr<PlayerVideo> pv, dcpomatic::DCPTime time);
/** Called when a processing run has finished */
void end ();
@@ -101,7 +101,7 @@ private:
Waker _waker;
boost::shared_ptr<PlayerVideo> _last_player_video[EYES_COUNT];
- boost::optional<DCPTime> _last_player_video_time;
+ boost::optional<dcpomatic::DCPTime> _last_player_video_time;
boost::signals2::scoped_connection _server_found_connection;
};
diff --git a/src/lib/job.cc b/src/lib/job.cc
index 451776524..1416ddfc2 100644
--- a/src/lib/job.cc
+++ b/src/lib/job.cc
@@ -46,6 +46,7 @@ using std::cout;
using boost::shared_ptr;
using boost::optional;
using boost::function;
+using namespace dcpomatic;
/** @param film Associated film, or 0 */
Job::Job (shared_ptr<const Film> film)
diff --git a/src/lib/overlaps.cc b/src/lib/overlaps.cc
index 4c75ac0c3..5ed7a9832 100644
--- a/src/lib/overlaps.cc
+++ b/src/lib/overlaps.cc
@@ -25,6 +25,7 @@
using boost::shared_ptr;
using boost::function;
+using namespace dcpomatic;
ContentList overlaps (shared_ptr<const Film> film, ContentList cl, function<bool (shared_ptr<const Content>)> part, DCPTime from, DCPTime to)
{
diff --git a/src/lib/overlaps.h b/src/lib/overlaps.h
index be3edf9d4..9bd867030 100644
--- a/src/lib/overlaps.h
+++ b/src/lib/overlaps.h
@@ -29,5 +29,5 @@ class Film;
* ContentList
*/
ContentList overlaps (
- boost::shared_ptr<const Film> film, ContentList cl, boost::function<bool (boost::shared_ptr<const Content>)> part, DCPTime from, DCPTime to
+ boost::shared_ptr<const Film> film, ContentList cl, boost::function<bool (boost::shared_ptr<const Content>)> part, dcpomatic::DCPTime from, dcpomatic::DCPTime to
);
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 50bcef0ec..e44edd8dc 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -75,6 +75,7 @@ using boost::weak_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
using boost::scoped_ptr;
+using namespace dcpomatic;
int const PlayerProperty::VIDEO_CONTAINER_SIZE = 700;
int const PlayerProperty::PLAYLIST = 701;
diff --git a/src/lib/player.h b/src/lib/player.h
index 8a81146c9..381aa80b7 100644
--- a/src/lib/player.h
+++ b/src/lib/player.h
@@ -68,7 +68,7 @@ public:
~Player ();
bool pass ();
- void seek (DCPTime time, bool accurate);
+ void seek (dcpomatic::DCPTime time, bool accurate);
std::list<boost::shared_ptr<Font> > get_subtitle_fonts ();
std::list<ReferencedReelAsset> get_reel_assets ();
@@ -86,17 +86,17 @@ public:
void set_play_referenced ();
void set_dcp_decode_reduction (boost::optional<int> reduction);
- boost::optional<DCPTime> content_time_to_dcp (boost::shared_ptr<Content> content, ContentTime t);
+ boost::optional<dcpomatic::DCPTime> content_time_to_dcp (boost::shared_ptr<Content> content, dcpomatic::ContentTime t);
boost::signals2::signal<void (ChangeType, int, bool)> Change;
/** Emitted when a video frame is ready. These emissions happen in the correct order. */
- boost::signals2::signal<void (boost::shared_ptr<PlayerVideo>, DCPTime)> Video;
- boost::signals2::signal<void (boost::shared_ptr<AudioBuffers>, DCPTime, int)> Audio;
+ boost::signals2::signal<void (boost::shared_ptr<PlayerVideo>, dcpomatic::DCPTime)> Video;
+ boost::signals2::signal<void (boost::shared_ptr<AudioBuffers>, dcpomatic::DCPTime, int)> Audio;
/** Emitted when a text is ready. This signal may be emitted considerably
* after the corresponding Video.
*/
- boost::signals2::signal<void (PlayerText, TextType, boost::optional<DCPTextTrack>, DCPTimePeriod)> Text;
+ boost::signals2::signal<void (PlayerText, TextType, boost::optional<DCPTextTrack>, dcpomatic::DCPTimePeriod)> Text;
private:
friend class PlayerWrapper;
@@ -114,27 +114,27 @@ private:
void film_change (ChangeType, Film::Property);
void playlist_change (ChangeType);
void playlist_content_change (ChangeType, int, bool);
- Frame dcp_to_content_video (boost::shared_ptr<const Piece> piece, DCPTime t) const;
- DCPTime content_video_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
- Frame dcp_to_resampled_audio (boost::shared_ptr<const Piece> piece, DCPTime t) const;
- DCPTime resampled_audio_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
- ContentTime dcp_to_content_time (boost::shared_ptr<const Piece> piece, DCPTime t) const;
- DCPTime content_time_to_dcp (boost::shared_ptr<const Piece> piece, ContentTime t) const;
+ Frame dcp_to_content_video (boost::shared_ptr<const Piece> piece, dcpomatic::DCPTime t) const;
+ dcpomatic::DCPTime content_video_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
+ Frame dcp_to_resampled_audio (boost::shared_ptr<const Piece> piece, dcpomatic::DCPTime t) const;
+ dcpomatic::DCPTime resampled_audio_to_dcp (boost::shared_ptr<const Piece> piece, Frame f) const;
+ dcpomatic::ContentTime dcp_to_content_time (boost::shared_ptr<const Piece> piece, dcpomatic::DCPTime t) const;
+ dcpomatic::DCPTime content_time_to_dcp (boost::shared_ptr<const Piece> piece, dcpomatic::ContentTime t) const;
boost::shared_ptr<PlayerVideo> black_player_video_frame (Eyes eyes) const;
void video (boost::weak_ptr<Piece>, ContentVideo);
void audio (boost::weak_ptr<Piece>, AudioStreamPtr, ContentAudio);
void bitmap_text_start (boost::weak_ptr<Piece>, boost::weak_ptr<const TextContent>, ContentBitmapText);
void plain_text_start (boost::weak_ptr<Piece>, boost::weak_ptr<const TextContent>, ContentStringText);
- void subtitle_stop (boost::weak_ptr<Piece>, boost::weak_ptr<const TextContent>, ContentTime);
- DCPTime one_video_frame () const;
- void fill_audio (DCPTimePeriod period);
- std::pair<boost::shared_ptr<AudioBuffers>, DCPTime> discard_audio (
- boost::shared_ptr<const AudioBuffers> audio, DCPTime time, DCPTime discard_to
+ void subtitle_stop (boost::weak_ptr<Piece>, boost::weak_ptr<const TextContent>, dcpomatic::ContentTime);
+ dcpomatic::DCPTime one_video_frame () const;
+ void fill_audio (dcpomatic::DCPTimePeriod period);
+ std::pair<boost::shared_ptr<AudioBuffers>, dcpomatic::DCPTime> discard_audio (
+ boost::shared_ptr<const AudioBuffers> audio, dcpomatic::DCPTime time, dcpomatic::DCPTime discard_to
) const;
- boost::optional<PositionImage> open_subtitles_for_frame (DCPTime time) const;
- void emit_video (boost::shared_ptr<PlayerVideo> pv, DCPTime time);
- void do_emit_video (boost::shared_ptr<PlayerVideo> pv, DCPTime time);
- void emit_audio (boost::shared_ptr<AudioBuffers> data, DCPTime time);
+ boost::optional<PositionImage> open_subtitles_for_frame (dcpomatic::DCPTime time) const;
+ void emit_video (boost::shared_ptr<PlayerVideo> pv, dcpomatic::DCPTime time);
+ void do_emit_video (boost::shared_ptr<PlayerVideo> pv, dcpomatic::DCPTime time);
+ void emit_audio (boost::shared_ptr<AudioBuffers> data, dcpomatic::DCPTime time);
/** Mutex to protect the whole Player state. When it's used for the preview we have
seek() and pass() called from the Butler thread and lots of other stuff called
@@ -165,10 +165,10 @@ private:
bool _play_referenced;
/** Time just after the last video frame we emitted, or the time of the last accurate seek */
- boost::optional<DCPTime> _last_video_time;
+ boost::optional<dcpomatic::DCPTime> _last_video_time;
boost::optional<Eyes> _last_video_eyes;
/** Time just after the last audio frame we emitted, or the time of the last accurate seek */
- boost::optional<DCPTime> _last_audio_time;
+ boost::optional<dcpomatic::DCPTime> _last_audio_time;
boost::optional<int> _dcp_decode_reduction;
@@ -177,20 +177,20 @@ private:
AudioMerger _audio_merger;
Shuffler* _shuffler;
- std::list<std::pair<boost::shared_ptr<PlayerVideo>, DCPTime> > _delay;
+ std::list<std::pair<boost::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> > _delay;
class StreamState
{
public:
StreamState () {}
- StreamState (boost::shared_ptr<Piece> p, DCPTime l)
+ StreamState (boost::shared_ptr<Piece> p, dcpomatic::DCPTime l)
: piece(p)
, last_push_end(l)
{}
boost::shared_ptr<Piece> piece;
- DCPTime last_push_end;
+ dcpomatic::DCPTime last_push_end;
};
std::map<AudioStreamPtr, StreamState> _stream_states;
diff --git a/src/lib/playlist.cc b/src/lib/playlist.cc
index 6d125afa6..9e96c693a 100644
--- a/src/lib/playlist.cc
+++ b/src/lib/playlist.cc
@@ -51,6 +51,7 @@ using boost::optional;
using boost::shared_ptr;
using boost::weak_ptr;
using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
Playlist::Playlist ()
: _sequence (true)
diff --git a/src/lib/playlist.h b/src/lib/playlist.h
index a5dce1498..d7db75d0f 100644
--- a/src/lib/playlist.h
+++ b/src/lib/playlist.h
@@ -59,15 +59,15 @@ public:
std::string video_identifier () const;
- DCPTime length (boost::shared_ptr<const Film> film) const;
- boost::optional<DCPTime> start () const;
+ dcpomatic::DCPTime length (boost::shared_ptr<const Film> film) const;
+ boost::optional<dcpomatic::DCPTime> start () const;
int64_t required_disk_space (boost::shared_ptr<const Film> film, int j2k_bandwidth, int audio_channels, int audio_frame_rate) const;
int best_video_frame_rate () const;
- DCPTime video_end (boost::shared_ptr<const Film> film) const;
- DCPTime text_end (boost::shared_ptr<const Film> film) const;
- FrameRateChange active_frame_rate_change (DCPTime, int dcp_frame_rate) const;
- std::string content_summary (boost::shared_ptr<const Film> film, DCPTimePeriod period) const;
+ dcpomatic::DCPTime video_end (boost::shared_ptr<const Film> film) const;
+ dcpomatic::DCPTime text_end (boost::shared_ptr<const Film> film) const;
+ FrameRateChange active_frame_rate_change (dcpomatic::DCPTime, int dcp_frame_rate) const;
+ std::string content_summary (boost::shared_ptr<const Film> film, dcpomatic::DCPTimePeriod period) const;
std::pair<double, double> speed_up_range (int dcp_video_frame_rate) const;
void set_sequence (bool);
diff --git a/src/lib/reel_writer.cc b/src/lib/reel_writer.cc
index f5fe87248..81057185a 100644
--- a/src/lib/reel_writer.cc
+++ b/src/lib/reel_writer.cc
@@ -60,6 +60,7 @@ using boost::optional;
using boost::dynamic_pointer_cast;
using dcp::Data;
using dcp::raw_convert;
+using namespace dcpomatic;
int const ReelWriter::_info_size = 48;
diff --git a/src/lib/reel_writer.h b/src/lib/reel_writer.h
index ae64c3ac7..9ea576d7a 100644
--- a/src/lib/reel_writer.h
+++ b/src/lib/reel_writer.h
@@ -50,7 +50,7 @@ class ReelWriter
public:
ReelWriter (
boost::shared_ptr<const Film> film,
- DCPTimePeriod period,
+ dcpomatic::DCPTimePeriod period,
boost::shared_ptr<Job> job,
int reel_index,
int reel_count,
@@ -61,7 +61,7 @@ public:
void fake_write (Frame frame, Eyes eyes, int size);
void repeat_write (Frame frame, Eyes eyes);
void write (boost::shared_ptr<const AudioBuffers> audio);
- void write (PlayerText text, TextType type, boost::optional<DCPTextTrack> track, DCPTimePeriod period);
+ 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);
@@ -69,7 +69,7 @@ public:
Frame start () const;
- DCPTimePeriod period () const {
+ dcpomatic::DCPTimePeriod period () const {
return _period;
}
@@ -96,7 +96,7 @@ private:
boost::shared_ptr<const Film> _film;
- DCPTimePeriod _period;
+ dcpomatic::DCPTimePeriod _period;
/** the first picture frame index that does not already exist in our MXF */
int _first_nonexistant_frame;
/** the data of the last written frame, if there is one */
diff --git a/src/lib/referenced_reel_asset.h b/src/lib/referenced_reel_asset.h
index 739a8f490..0d66155b5 100644
--- a/src/lib/referenced_reel_asset.h
+++ b/src/lib/referenced_reel_asset.h
@@ -26,7 +26,7 @@
class ReferencedReelAsset
{
public:
- ReferencedReelAsset (boost::shared_ptr<dcp::ReelAsset> asset_, DCPTimePeriod period_)
+ ReferencedReelAsset (boost::shared_ptr<dcp::ReelAsset> asset_, dcpomatic::DCPTimePeriod period_)
: asset (asset_)
, period (period_)
{}
@@ -34,7 +34,7 @@ public:
/** The asset */
boost::shared_ptr<dcp::ReelAsset> asset;
/** Period that this asset covers in the DCP */
- DCPTimePeriod period;
+ dcpomatic::DCPTimePeriod period;
};
#endif
diff --git a/src/lib/render_text.cc b/src/lib/render_text.cc
index 8d5f8e6a9..8b9d93423 100644
--- a/src/lib/render_text.cc
+++ b/src/lib/render_text.cc
@@ -46,6 +46,7 @@ using std::make_pair;
using boost::shared_ptr;
using boost::optional;
using boost::algorithm::replace_all;
+using namespace dcpomatic;
static FcConfig* fc_config = 0;
static list<pair<boost::filesystem::path, string> > fc_config_fonts;
diff --git a/src/lib/render_text.h b/src/lib/render_text.h
index 99b4391db..f235fb459 100644
--- a/src/lib/render_text.h
+++ b/src/lib/render_text.h
@@ -27,5 +27,5 @@ 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, DCPTime, int
+ std::list<StringText>, std::list<boost::shared_ptr<Font> > fonts, dcp::Size, dcpomatic::DCPTime, int
);
diff --git a/src/lib/string_text_file.cc b/src/lib/string_text_file.cc
index c7eadbbb1..bf19e482c 100644
--- a/src/lib/string_text_file.cc
+++ b/src/lib/string_text_file.cc
@@ -38,6 +38,7 @@ using boost::shared_ptr;
using boost::scoped_array;
using boost::optional;
using dcp::Data;
+using namespace dcpomatic;
StringTextFile::StringTextFile (shared_ptr<const StringTextFileContent> content)
{
diff --git a/src/lib/string_text_file.h b/src/lib/string_text_file.h
index 0091973a4..5ade4a9ec 100644
--- a/src/lib/string_text_file.h
+++ b/src/lib/string_text_file.h
@@ -43,8 +43,8 @@ class StringTextFile
public:
explicit StringTextFile (boost::shared_ptr<const StringTextFileContent>);
- boost::optional<ContentTime> first () const;
- ContentTime length () const;
+ boost::optional<dcpomatic::ContentTime> first () const;
+ dcpomatic::ContentTime length () const;
protected:
std::vector<sub::Subtitle> _subtitles;
diff --git a/src/lib/string_text_file_content.cc b/src/lib/string_text_file_content.cc
index b3f7f431e..9a25ef06f 100644
--- a/src/lib/string_text_file_content.cc
+++ b/src/lib/string_text_file_content.cc
@@ -35,6 +35,7 @@ using std::cout;
using boost::shared_ptr;
using boost::optional;
using dcp::raw_convert;
+using namespace dcpomatic;
StringTextFileContent::StringTextFileContent (boost::filesystem::path path)
: Content (path)
diff --git a/src/lib/string_text_file_content.h b/src/lib/string_text_file_content.h
index 83323172d..959190d32 100644
--- a/src/lib/string_text_file_content.h
+++ b/src/lib/string_text_file_content.h
@@ -43,10 +43,10 @@ public:
std::string summary () const;
std::string technical_summary () const;
void as_xml (xmlpp::Node *, bool with_paths) const;
- DCPTime full_length (boost::shared_ptr<const Film> film) const;
- DCPTime approximate_length () const;
+ dcpomatic::DCPTime full_length (boost::shared_ptr<const Film> film) const;
+ dcpomatic::DCPTime approximate_length () const;
std::string identifier () const;
private:
- ContentTime _length;
+ dcpomatic::ContentTime _length;
};
diff --git a/src/lib/string_text_file_decoder.cc b/src/lib/string_text_file_decoder.cc
index 8c9880b0c..4cf34a3a9 100644
--- a/src/lib/string_text_file_decoder.cc
+++ b/src/lib/string_text_file_decoder.cc
@@ -34,6 +34,7 @@ using std::max;
using boost::shared_ptr;
using boost::optional;
using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
StringTextFileDecoder::StringTextFileDecoder (shared_ptr<const Film> film, shared_ptr<const StringTextFileContent> content)
: Decoder (film)
diff --git a/src/lib/string_text_file_decoder.h b/src/lib/string_text_file_decoder.h
index f30e1b762..0c1d31deb 100644
--- a/src/lib/string_text_file_decoder.h
+++ b/src/lib/string_text_file_decoder.h
@@ -31,11 +31,11 @@ class StringTextFileDecoder : public Decoder, public StringTextFile
public:
StringTextFileDecoder (boost::shared_ptr<const Film> film, boost::shared_ptr<const StringTextFileContent>);
- void seek (ContentTime time, bool accurate);
+ void seek (dcpomatic::ContentTime time, bool accurate);
bool pass ();
private:
- ContentTimePeriod content_time_period (sub::Subtitle s) const;
+ dcpomatic::ContentTimePeriod content_time_period (sub::Subtitle s) const;
size_t _next;
};
diff --git a/src/lib/text_content.cc b/src/lib/text_content.cc
index 772ed31f5..901d38647 100644
--- a/src/lib/text_content.cc
+++ b/src/lib/text_content.cc
@@ -39,6 +39,7 @@ using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
using dcp::raw_convert;
+using namespace dcpomatic;
int const TextContentProperty::X_OFFSET = 500;
int const TextContentProperty::Y_OFFSET = 501;
diff --git a/src/lib/text_content.h b/src/lib/text_content.h
index 83860dff5..c7d1b590d 100644
--- a/src/lib/text_content.h
+++ b/src/lib/text_content.h
@@ -83,9 +83,9 @@ public:
void set_effect_colour (dcp::Colour);
void unset_effect_colour ();
void set_line_spacing (double s);
- void set_fade_in (ContentTime);
+ void set_fade_in (dcpomatic::ContentTime);
void unset_fade_in ();
- void set_fade_out (ContentTime);
+ void set_fade_out (dcpomatic::ContentTime);
void set_outline_width (int);
void unset_fade_out ();
void set_type (TextType type);
@@ -152,12 +152,12 @@ public:
return _line_spacing;
}
- boost::optional<ContentTime> fade_in () const {
+ boost::optional<dcpomatic::ContentTime> fade_in () const {
boost::mutex::scoped_lock lm (_mutex);
return _fade_in;
}
- boost::optional<ContentTime> fade_out () const {
+ boost::optional<dcpomatic::ContentTime> fade_out () const {
boost::mutex::scoped_lock lm (_mutex);
return _fade_out;
}
@@ -217,8 +217,8 @@ private:
boost::optional<dcp::Colour> _effect_colour;
/** scaling factor for line spacing; 1 is "standard", < 1 is closer together, > 1 is further apart */
double _line_spacing;
- boost::optional<ContentTime> _fade_in;
- boost::optional<ContentTime> _fade_out;
+ boost::optional<dcpomatic::ContentTime> _fade_in;
+ boost::optional<dcpomatic::ContentTime> _fade_out;
int _outline_width;
/** what these captions will be used for in the output DCP (not necessarily what
* they were originally).
diff --git a/src/lib/text_decoder.cc b/src/lib/text_decoder.cc
index 74fea6ec3..4eaaf37af 100644
--- a/src/lib/text_decoder.cc
+++ b/src/lib/text_decoder.cc
@@ -36,6 +36,7 @@ using std::min;
using boost::shared_ptr;
using boost::optional;
using boost::function;
+using namespace dcpomatic;
TextDecoder::TextDecoder (
Decoder* parent,
diff --git a/src/lib/text_decoder.h b/src/lib/text_decoder.h
index a82f43f51..02afeeb94 100644
--- a/src/lib/text_decoder.h
+++ b/src/lib/text_decoder.h
@@ -41,20 +41,20 @@ public:
TextDecoder (
Decoder* parent,
boost::shared_ptr<const TextContent>,
- ContentTime first
+ dcpomatic::ContentTime first
);
- ContentTime position (boost::shared_ptr<const Film>) const {
+ dcpomatic::ContentTime position (boost::shared_ptr<const Film>) const {
return _position;
}
- void emit_bitmap_start (ContentTime from, boost::shared_ptr<Image> image, dcpomatic::Rect<double> rect);
- void emit_bitmap (ContentTimePeriod period, boost::shared_ptr<Image> image, dcpomatic::Rect<double> rect);
- void emit_plain_start (ContentTime from, std::list<dcp::SubtitleString> s);
- void emit_plain_start (ContentTime from, sub::Subtitle const & subtitle);
- void emit_plain (ContentTimePeriod period, std::list<dcp::SubtitleString> s);
- void emit_plain (ContentTimePeriod period, sub::Subtitle const & subtitle);
- void emit_stop (ContentTime to);
+ void emit_bitmap_start (dcpomatic::ContentTime from, boost::shared_ptr<Image> image, dcpomatic::Rect<double> rect);
+ void emit_bitmap (dcpomatic::ContentTimePeriod period, boost::shared_ptr<Image> image, dcpomatic::Rect<double> rect);
+ void emit_plain_start (dcpomatic::ContentTime from, std::list<dcp::SubtitleString> s);
+ void emit_plain_start (dcpomatic::ContentTime from, sub::Subtitle const & subtitle);
+ void emit_plain (dcpomatic::ContentTimePeriod period, std::list<dcp::SubtitleString> s);
+ void emit_plain (dcpomatic::ContentTimePeriod period, sub::Subtitle const & subtitle);
+ void emit_stop (dcpomatic::ContentTime to);
void seek ();
@@ -64,11 +64,11 @@ public:
boost::signals2::signal<void (ContentBitmapText)> BitmapStart;
boost::signals2::signal<void (ContentStringText)> PlainStart;
- boost::signals2::signal<void (ContentTime)> Stop;
+ boost::signals2::signal<void (dcpomatic::ContentTime)> Stop;
private:
boost::shared_ptr<const TextContent> _content;
- ContentTime _position;
+ dcpomatic::ContentTime _position;
};
#endif
diff --git a/src/lib/text_ring_buffers.cc b/src/lib/text_ring_buffers.cc
index cc5357804..ba727cc41 100644
--- a/src/lib/text_ring_buffers.cc
+++ b/src/lib/text_ring_buffers.cc
@@ -22,6 +22,7 @@
using std::pair;
using boost::optional;
+using namespace dcpomatic;
void
TextRingBuffers::put (PlayerText text, DCPTextTrack track, DCPTimePeriod period)
diff --git a/src/lib/text_ring_buffers.h b/src/lib/text_ring_buffers.h
index 289a38149..7d685d824 100644
--- a/src/lib/text_ring_buffers.h
+++ b/src/lib/text_ring_buffers.h
@@ -29,10 +29,10 @@
class TextRingBuffers
{
public:
- void put (PlayerText text, DCPTextTrack track, DCPTimePeriod period);
+ void put (PlayerText text, DCPTextTrack track, dcpomatic::DCPTimePeriod period);
struct Data {
- Data (PlayerText text_, DCPTextTrack track_, DCPTimePeriod period_)
+ Data (PlayerText text_, DCPTextTrack track_, dcpomatic::DCPTimePeriod period_)
: text (text_)
, track (track_)
, period (period_)
@@ -40,7 +40,7 @@ public:
PlayerText text;
DCPTextTrack track;
- DCPTimePeriod period;
+ dcpomatic::DCPTimePeriod period;
};
boost::optional<Data> get ();
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 340af1ea8..1f6fba963 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -106,6 +106,7 @@ using boost::scoped_array;
using dcp::Size;
using dcp::raw_convert;
using dcp::locale_convert;
+using namespace dcpomatic;
/** Path to our executable, required by the stacktrace stuff and filled
* in during App::onInit().
diff --git a/src/lib/util.h b/src/lib/util.h
index 6cb818b39..b760f7f4b 100644
--- a/src/lib/util.h
+++ b/src/lib/util.h
@@ -72,7 +72,7 @@ class AudioBuffers;
class TextDecoder;
extern std::string seconds_to_hms (int);
-extern std::string time_to_hmsf (DCPTime time, Frame rate);
+extern std::string time_to_hmsf (dcpomatic::DCPTime time, Frame rate);
extern std::string seconds_to_approximate_hms (int);
extern double seconds (struct timeval);
extern void dcpomatic_setup ();
@@ -105,7 +105,7 @@ extern void checked_fread (void* ptr, size_t size, FILE* stream, boost::filesyst
extern void checked_fwrite (void const * ptr, size_t size, FILE* stream, boost::filesystem::path path);
extern size_t utf8_strlen (std::string s);
extern std::string day_of_week_to_string (boost::gregorian::greg_weekday d);
-extern void emit_subtitle_image (ContentTimePeriod period, dcp::SubtitleImage sub, dcp::Size size, boost::shared_ptr<TextDecoder> decoder);
+extern void emit_subtitle_image (dcpomatic::ContentTimePeriod period, dcp::SubtitleImage sub, dcp::Size size, boost::shared_ptr<TextDecoder> decoder);
#ifdef DCPOMATIC_VARIANT_SWAROOP
extern boost::shared_ptr<dcp::CertificateChain> read_swaroop_chain (boost::filesystem::path path);
extern void write_swaroop_chain (boost::shared_ptr<const dcp::CertificateChain> chain, boost::filesystem::path output);
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc
index fe35b0df3..d8d8adbf8 100644
--- a/src/lib/video_content.cc
+++ b/src/lib/video_content.cc
@@ -61,6 +61,7 @@ using boost::shared_ptr;
using boost::optional;
using boost::dynamic_pointer_cast;
using dcp::raw_convert;
+using namespace dcpomatic;
VideoContent::VideoContent (Content* parent)
: ContentPart (parent)
diff --git a/src/lib/video_content.h b/src/lib/video_content.h
index 7ecc2813a..3d07a0947 100644
--- a/src/lib/video_content.h
+++ b/src/lib/video_content.h
@@ -168,8 +168,8 @@ public:
void take_from_examiner (boost::shared_ptr<VideoExaminer>);
void add_properties (std::list<UserProperty> &) const;
- void modify_position (boost::shared_ptr<const Film> film, DCPTime& pos) const;
- void modify_trim_start (ContentTime& pos) const;
+ void modify_position (boost::shared_ptr<const Film> film, dcpomatic::DCPTime& pos) const;
+ void modify_trim_start (dcpomatic::ContentTime& pos) const;
static boost::shared_ptr<VideoContent> from_xml (Content* parent, cxml::ConstNodePtr, int);
diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc
index 813320eb8..9f29a03bf 100644
--- a/src/lib/video_decoder.cc
+++ b/src/lib/video_decoder.cc
@@ -35,6 +35,7 @@ using std::max;
using std::back_inserter;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
VideoDecoder::VideoDecoder (Decoder* parent, shared_ptr<const Content> c)
: DecoderPart (parent)
diff --git a/src/lib/video_decoder.h b/src/lib/video_decoder.h
index 0fc7ca5a4..c2ba8386e 100644
--- a/src/lib/video_decoder.h
+++ b/src/lib/video_decoder.h
@@ -51,7 +51,7 @@ public:
friend struct ffmpeg_pts_offset_test;
friend void ffmpeg_decoder_sequential_test_one (boost::filesystem::path file, float fps, int gaps, int video_length);
- ContentTime position (boost::shared_ptr<const Film>) const {
+ dcpomatic::ContentTime position (boost::shared_ptr<const Film>) const {
return _position;
}
@@ -65,7 +65,7 @@ private:
/** Time of last thing to be emitted */
boost::shared_ptr<const Content> _content;
boost::optional<Frame> _last_emitted;
- ContentTime _position;
+ dcpomatic::ContentTime _position;
};
#endif
diff --git a/src/lib/video_mxf_content.cc b/src/lib/video_mxf_content.cc
index 436046890..bf8bb9f46 100644
--- a/src/lib/video_mxf_content.cc
+++ b/src/lib/video_mxf_content.cc
@@ -35,6 +35,7 @@
using std::list;
using std::string;
using boost::shared_ptr;
+using namespace dcpomatic;
VideoMXFContent::VideoMXFContent (boost::filesystem::path path)
: Content (path)
diff --git a/src/lib/video_mxf_content.h b/src/lib/video_mxf_content.h
index 27dce1fb7..dd470335c 100644
--- a/src/lib/video_mxf_content.h
+++ b/src/lib/video_mxf_content.h
@@ -39,8 +39,8 @@ public:
std::string technical_summary () const;
std::string identifier () const;
void as_xml (xmlpp::Node* node, bool with_paths) const;
- DCPTime full_length (boost::shared_ptr<const Film> film) const;
- DCPTime approximate_length () const;
+ dcpomatic::DCPTime full_length (boost::shared_ptr<const Film> film) const;
+ dcpomatic::DCPTime approximate_length () const;
void add_properties (boost::shared_ptr<const Film> film, std::list<UserProperty>& p) const;
static bool valid_mxf (boost::filesystem::path path);
diff --git a/src/lib/video_mxf_decoder.cc b/src/lib/video_mxf_decoder.cc
index 3c4002ca2..1bf2b1bef 100644
--- a/src/lib/video_mxf_decoder.cc
+++ b/src/lib/video_mxf_decoder.cc
@@ -30,6 +30,7 @@
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
VideoMXFDecoder::VideoMXFDecoder (shared_ptr<const Film> film, shared_ptr<const VideoMXFContent> content)
: Decoder (film)
diff --git a/src/lib/video_mxf_decoder.h b/src/lib/video_mxf_decoder.h
index 3e3760d97..78313df0f 100644
--- a/src/lib/video_mxf_decoder.h
+++ b/src/lib/video_mxf_decoder.h
@@ -31,13 +31,13 @@ public:
VideoMXFDecoder (boost::shared_ptr<const Film> film, boost::shared_ptr<const VideoMXFContent>);
bool pass ();
- void seek (ContentTime t, bool accurate);
+ void seek (dcpomatic::ContentTime t, bool accurate);
private:
boost::shared_ptr<const VideoMXFContent> _content;
/** Time of next thing to return from pass */
- ContentTime _next;
+ dcpomatic::ContentTime _next;
boost::shared_ptr<dcp::MonoPictureAssetReader> _mono_reader;
boost::shared_ptr<dcp::StereoPictureAssetReader> _stereo_reader;
diff --git a/src/lib/video_ring_buffers.cc b/src/lib/video_ring_buffers.cc
index 0167f4aec..bfec507ea 100644
--- a/src/lib/video_ring_buffers.cc
+++ b/src/lib/video_ring_buffers.cc
@@ -32,6 +32,7 @@ using std::pair;
using std::string;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
void
VideoRingBuffers::put (shared_ptr<PlayerVideo> frame, DCPTime time)
diff --git a/src/lib/video_ring_buffers.h b/src/lib/video_ring_buffers.h
index f3e521553..ba1b2162f 100644
--- a/src/lib/video_ring_buffers.h
+++ b/src/lib/video_ring_buffers.h
@@ -31,8 +31,8 @@ class PlayerVideo;
class VideoRingBuffers : public boost::noncopyable
{
public:
- void put (boost::shared_ptr<PlayerVideo> frame, DCPTime time);
- std::pair<boost::shared_ptr<PlayerVideo>, DCPTime> get ();
+ void put (boost::shared_ptr<PlayerVideo> frame, dcpomatic::DCPTime time);
+ std::pair<boost::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> get ();
void clear ();
Frame size () const;
@@ -42,5 +42,5 @@ public:
private:
mutable boost::mutex _mutex;
- std::list<std::pair<boost::shared_ptr<PlayerVideo>, DCPTime> > _data;
+ std::list<std::pair<boost::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> > _data;
};
diff --git a/src/lib/writer.cc b/src/lib/writer.cc
index 79e5c8c36..3fc01571e 100644
--- a/src/lib/writer.cc
+++ b/src/lib/writer.cc
@@ -63,6 +63,7 @@ using boost::weak_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
using dcp::Data;
+using namespace dcpomatic;
Writer::Writer (shared_ptr<const Film> film, weak_ptr<Job> j)
: _film (film)
diff --git a/src/lib/writer.h b/src/lib/writer.h
index e08e9f28d..ce1d04ced 100644
--- a/src/lib/writer.h
+++ b/src/lib/writer.h
@@ -104,8 +104,8 @@ public:
void fake_write (Frame, Eyes);
bool can_repeat (Frame) const;
void repeat (Frame, Eyes);
- void write (boost::shared_ptr<const AudioBuffers>, DCPTime time);
- void write (PlayerText text, TextType type, boost::optional<DCPTextTrack>, DCPTimePeriod period);
+ 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 (ReferencedReelAsset asset);
void finish ();
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc
index 8422df28e..3ba63379b 100644
--- a/src/tools/dcpomatic_player.cc
+++ b/src/tools/dcpomatic_player.cc
@@ -89,6 +89,7 @@ using boost::optional;
using boost::dynamic_pointer_cast;
using boost::thread;
using boost::bind;
+using namespace dcpomatic;
enum {
ID_file_open = 1,
diff --git a/src/wx/audio_dialog.cc b/src/wx/audio_dialog.cc
index f4de9cd1a..9b3a93769 100644
--- a/src/wx/audio_dialog.cc
+++ b/src/wx/audio_dialog.cc
@@ -42,6 +42,7 @@ using boost::bind;
using boost::optional;
using boost::const_pointer_cast;
using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
/** @param parent Parent window.
* @param film Film we are using.
diff --git a/src/wx/audio_dialog.h b/src/wx/audio_dialog.h
index 38f474afd..e866aca3f 100644
--- a/src/wx/audio_dialog.h
+++ b/src/wx/audio_dialog.h
@@ -35,7 +35,7 @@ public:
bool Show (bool show = true);
- void set_cursor (boost::optional<DCPTime> time, boost::optional<float> db);
+ void set_cursor (boost::optional<dcpomatic::DCPTime> time, boost::optional<float> db);
private:
void film_change (ChangeType, int);
diff --git a/src/wx/audio_plot.cc b/src/wx/audio_plot.cc
index 079f69cdc..3da7a50ff 100644
--- a/src/wx/audio_plot.cc
+++ b/src/wx/audio_plot.cc
@@ -37,6 +37,7 @@ using std::map;
using boost::bind;
using boost::optional;
using boost::shared_ptr;
+using namespace dcpomatic;
int const AudioPlot::_minimum = -70;
int const AudioPlot::_cursor_size = 8;
diff --git a/src/wx/audio_plot.h b/src/wx/audio_plot.h
index 85306a58d..edb444a2a 100644
--- a/src/wx/audio_plot.h
+++ b/src/wx/audio_plot.h
@@ -41,7 +41,7 @@ public:
wxColour colour (int n) const;
- boost::signals2::signal<void (boost::optional<DCPTime>, boost::optional<float>)> Cursor;
+ boost::signals2::signal<void (boost::optional<dcpomatic::DCPTime>, boost::optional<float>)> Cursor;
static const int max_smoothing;
@@ -52,14 +52,14 @@ private:
: db(0)
{}
- Point (wxPoint draw_, DCPTime time_, float db_)
+ Point (wxPoint draw_, dcpomatic::DCPTime time_, float db_)
: draw(draw_)
, time(time_)
, db(db_)
{}
wxPoint draw;
- DCPTime time;
+ dcpomatic::DCPTime time;
float db;
};
diff --git a/src/wx/closed_captions_dialog.cc b/src/wx/closed_captions_dialog.cc
index 44e6b8da1..061262cdd 100644
--- a/src/wx/closed_captions_dialog.cc
+++ b/src/wx/closed_captions_dialog.cc
@@ -35,6 +35,7 @@ using std::make_pair;
using boost::shared_ptr;
using boost::weak_ptr;
using boost::optional;
+using namespace dcpomatic;
ClosedCaptionsDialog::ClosedCaptionsDialog (wxWindow* parent, FilmViewer* viewer)
: wxDialog (parent, wxID_ANY, _("Closed captions"), wxDefaultPosition, wxDefaultSize,
diff --git a/src/wx/closed_captions_dialog.h b/src/wx/closed_captions_dialog.h
index 4b407fa5a..fb4e9d59b 100644
--- a/src/wx/closed_captions_dialog.h
+++ b/src/wx/closed_captions_dialog.h
@@ -31,7 +31,7 @@ class ClosedCaptionsDialog : public wxDialog
public:
explicit ClosedCaptionsDialog (wxWindow* parent, FilmViewer* viewer);
- void update (DCPTime);
+ void update (dcpomatic::DCPTime);
void clear ();
void set_film_and_butler (boost::shared_ptr<Film>, boost::weak_ptr<Butler>);
@@ -47,5 +47,5 @@ private:
std::vector<wxString> _lines;
std::vector<DCPTextTrack> _tracks;
boost::weak_ptr<Butler> _butler;
- DCPTime _last_update;
+ dcpomatic::DCPTime _last_update;
};
diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc
index 82caaf1ff..72ef0e9eb 100644
--- a/src/wx/content_panel.cc
+++ b/src/wx/content_panel.cc
@@ -61,6 +61,7 @@ using boost::shared_ptr;
using boost::weak_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
+using namespace dcpomatic;
class LimitedSplitter : public wxSplitterWindow
{
diff --git a/src/wx/content_view.cc b/src/wx/content_view.cc
index 4db00fb54..d4ef39cb9 100644
--- a/src/wx/content_view.cc
+++ b/src/wx/content_view.cc
@@ -39,6 +39,7 @@ using boost::shared_ptr;
using boost::weak_ptr;
using boost::optional;
using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
ContentView::ContentView (wxWindow* parent)
: wxListCtrl (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_NO_HEADER)
diff --git a/src/wx/controls.cc b/src/wx/controls.cc
index 473ad8cb3..7cd31634d 100644
--- a/src/wx/controls.cc
+++ b/src/wx/controls.cc
@@ -52,6 +52,7 @@ using boost::optional;
using boost::shared_ptr;
using boost::weak_ptr;
using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
Controls::Controls (wxWindow* parent, shared_ptr<FilmViewer> viewer, bool editor_controls)
: wxPanel (parent)
diff --git a/src/wx/controls.h b/src/wx/controls.h
index 7ffe0c4ea..88d21defb 100644
--- a/src/wx/controls.h
+++ b/src/wx/controls.h
@@ -83,7 +83,7 @@ private:
void jump_to_selected_clicked ();
void timecode_clicked ();
void active_jobs_changed (boost::optional<std::string>);
- DCPTime nudge_amount (wxKeyboardState& ev);
+ dcpomatic::DCPTime nudge_amount (wxKeyboardState& ev);
void image_changed (boost::weak_ptr<PlayerVideo>);
void outline_content_changed ();
void eye_changed ();
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index a803eeda1..48fbf9fdc 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -67,6 +67,7 @@ using boost::dynamic_pointer_cast;
using boost::weak_ptr;
using boost::optional;
using dcp::Size;
+using namespace dcpomatic;
static
int
diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h
index 97da5f591..0222d31c9 100644
--- a/src/wx/film_viewer.h
+++ b/src/wx/film_viewer.h
@@ -59,14 +59,14 @@ public:
return _film;
}
- void seek (DCPTime t, bool accurate);
- void seek (boost::shared_ptr<Content> content, ContentTime p, bool accurate);
- void seek_by (DCPTime by, bool accurate);
+ void seek (dcpomatic::DCPTime t, bool accurate);
+ void seek (boost::shared_ptr<Content> content, dcpomatic::ContentTime p, bool accurate);
+ void seek_by (dcpomatic::DCPTime by, bool accurate);
/** @return our `playhead' position; this may not lie exactly on a frame boundary */
- DCPTime position () const {
+ dcpomatic::DCPTime position () const {
return _video_position;
}
- DCPTime one_video_frame () const;
+ dcpomatic::DCPTime one_video_frame () const;
void start ();
bool stop ();
@@ -106,8 +106,8 @@ public:
boost::signals2::signal<void (boost::weak_ptr<PlayerVideo>)> ImageChanged;
boost::signals2::signal<void ()> PositionChanged;
- boost::signals2::signal<void (DCPTime)> Started;
- boost::signals2::signal<void (DCPTime)> Stopped;
+ boost::signals2::signal<void (dcpomatic::DCPTime)> Started;
+ boost::signals2::signal<void (dcpomatic::DCPTime)> Stopped;
/** While playing back we reached the end of the film (emitted from GUI thread) */
boost::signals2::signal<void ()> Finished;
@@ -126,8 +126,8 @@ private:
void config_changed (Config::Property);
bool maybe_draw_background_image (wxPaintDC& dc);
- DCPTime time () const;
- DCPTime uncorrected_time () const;
+ dcpomatic::DCPTime time () const;
+ dcpomatic::DCPTime uncorrected_time () const;
Frame average_latency () const;
void refresh_panel ();
@@ -142,9 +142,9 @@ private:
bool _coalesce_player_changes;
std::list<int> _pending_player_changes;
- std::pair<boost::shared_ptr<PlayerVideo>, DCPTime> _player_video;
+ std::pair<boost::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> _player_video;
boost::shared_ptr<const Image> _frame;
- DCPTime _video_position;
+ dcpomatic::DCPTime _video_position;
Position<int> _inter_position;
dcp::Size _inter_size;
diff --git a/src/wx/markers_dialog.cc b/src/wx/markers_dialog.cc
index 46e8e6d09..dba4c0c0e 100644
--- a/src/wx/markers_dialog.cc
+++ b/src/wx/markers_dialog.cc
@@ -36,6 +36,7 @@ using boost::bind;
using boost::shared_ptr;
using boost::weak_ptr;
using boost::optional;
+using dcpomatic::DCPTime;
class Marker
{
@@ -100,7 +101,7 @@ private:
weak_ptr<FilmViewer> viewer;
dcp::Marker type;
CheckBox* checkbox;
- Timecode<DCPTime>* timecode;
+ Timecode<dcpomatic::DCPTime>* timecode;
Button* set_button;
};
diff --git a/src/wx/move_to_dialog.cc b/src/wx/move_to_dialog.cc
index cb3db90cc..266f44264 100644
--- a/src/wx/move_to_dialog.cc
+++ b/src/wx/move_to_dialog.cc
@@ -26,6 +26,7 @@
using std::list;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
MoveToDialog::MoveToDialog (wxWindow* parent, optional<DCPTime> position, shared_ptr<const Film> film)
: TableDialog (parent, _("Move content"), 2, 0, true)
diff --git a/src/wx/move_to_dialog.h b/src/wx/move_to_dialog.h
index 4d8d991f5..3c6f3d064 100644
--- a/src/wx/move_to_dialog.h
+++ b/src/wx/move_to_dialog.h
@@ -29,9 +29,9 @@ class wxSpinCtrl;
class MoveToDialog : public TableDialog
{
public:
- MoveToDialog (wxWindow* parent, boost::optional<DCPTime> position, boost::shared_ptr<const Film> film);
+ MoveToDialog (wxWindow* parent, boost::optional<dcpomatic::DCPTime> position, boost::shared_ptr<const Film> film);
- DCPTime position () const;
+ dcpomatic::DCPTime position () const;
private:
boost::weak_ptr<const Film> _film;
diff --git a/src/wx/playhead_to_frame_dialog.cc b/src/wx/playhead_to_frame_dialog.cc
index 1ae049d26..4c8bc1cc6 100644
--- a/src/wx/playhead_to_frame_dialog.cc
+++ b/src/wx/playhead_to_frame_dialog.cc
@@ -22,6 +22,7 @@
#include <dcp/locale_convert.h>
using dcp::locale_convert;
+using namespace dcpomatic;
PlayheadToFrameDialog::PlayheadToFrameDialog (wxWindow* parent, int fps)
: TableDialog (parent, _("Go to frame"), 2, 1, true)
diff --git a/src/wx/playhead_to_frame_dialog.h b/src/wx/playhead_to_frame_dialog.h
index b6a902a55..ab3898dea 100644
--- a/src/wx/playhead_to_frame_dialog.h
+++ b/src/wx/playhead_to_frame_dialog.h
@@ -26,7 +26,7 @@ class PlayheadToFrameDialog : public TableDialog
public:
PlayheadToFrameDialog (wxWindow* parent, int fps);
- DCPTime get () const;
+ dcpomatic::DCPTime get () const;
private:
wxTextCtrl* _frame;
diff --git a/src/wx/playhead_to_timecode_dialog.cc b/src/wx/playhead_to_timecode_dialog.cc
index a691aa64e..c622111db 100644
--- a/src/wx/playhead_to_timecode_dialog.cc
+++ b/src/wx/playhead_to_timecode_dialog.cc
@@ -20,6 +20,8 @@
#include "playhead_to_timecode_dialog.h"
+using namespace dcpomatic;
+
PlayheadToTimecodeDialog::PlayheadToTimecodeDialog (wxWindow* parent, int fps)
: TableDialog (parent, _("Go to timecode"), 2, 1, true)
, _fps (fps)
diff --git a/src/wx/playhead_to_timecode_dialog.h b/src/wx/playhead_to_timecode_dialog.h
index adce87434..226978582 100644
--- a/src/wx/playhead_to_timecode_dialog.h
+++ b/src/wx/playhead_to_timecode_dialog.h
@@ -26,9 +26,9 @@ class PlayheadToTimecodeDialog : public TableDialog
public:
PlayheadToTimecodeDialog (wxWindow* parent, int fps);
- DCPTime get () const;
+ dcpomatic::DCPTime get () const;
private:
- Timecode<DCPTime>* _timecode;
+ Timecode<dcpomatic::DCPTime>* _timecode;
int _fps;
};
diff --git a/src/wx/subtitle_appearance_dialog.cc b/src/wx/subtitle_appearance_dialog.cc
index ad4c03850..76e8d8b16 100644
--- a/src/wx/subtitle_appearance_dialog.cc
+++ b/src/wx/subtitle_appearance_dialog.cc
@@ -40,6 +40,7 @@ using boost::shared_ptr;
using boost::bind;
using boost::dynamic_pointer_cast;
using boost::optional;
+using namespace dcpomatic;
int const SubtitleAppearanceDialog::NONE = 0;
int const SubtitleAppearanceDialog::OUTLINE = 1;
diff --git a/src/wx/subtitle_appearance_dialog.h b/src/wx/subtitle_appearance_dialog.h
index 0b3c66132..6c7e46817 100644
--- a/src/wx/subtitle_appearance_dialog.h
+++ b/src/wx/subtitle_appearance_dialog.h
@@ -58,9 +58,9 @@ private:
wxCheckBox* _force_effect_colour;
wxColourPickerCtrl* _effect_colour;
wxCheckBox* _force_fade_in;
- Timecode<ContentTime>* _fade_in;
+ Timecode<dcpomatic::ContentTime>* _fade_in;
wxCheckBox* _force_fade_out;
- Timecode<ContentTime>* _fade_out;
+ Timecode<dcpomatic::ContentTime>* _fade_out;
wxSpinCtrl* _outline_width;
wxGridBagSizer* _table;
std::map<RGBA, RGBAColourPicker*> _pickers;
diff --git a/src/wx/swaroop_controls.cc b/src/wx/swaroop_controls.cc
index 33db37bab..d557d09e9 100644
--- a/src/wx/swaroop_controls.cc
+++ b/src/wx/swaroop_controls.cc
@@ -41,6 +41,7 @@ using std::sort;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
+using namespace dcpomatic;
SwaroopControls::SwaroopControls (wxWindow* parent, shared_ptr<FilmViewer> viewer)
: Controls (parent, viewer, false)
diff --git a/src/wx/text_view.cc b/src/wx/text_view.cc
index 9b591b191..271e02d41 100644
--- a/src/wx/text_view.cc
+++ b/src/wx/text_view.cc
@@ -35,6 +35,7 @@ using boost::shared_ptr;
using boost::weak_ptr;
using boost::bind;
using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
TextView::TextView (
wxWindow* parent, shared_ptr<Film> film, shared_ptr<Content> content, shared_ptr<TextContent> text, shared_ptr<Decoder> decoder, weak_ptr<FilmViewer> viewer
diff --git a/src/wx/text_view.h b/src/wx/text_view.h
index 1fe07a999..6ce22dc79 100644
--- a/src/wx/text_view.h
+++ b/src/wx/text_view.h
@@ -42,14 +42,14 @@ public:
private:
void data_start (ContentStringText cts);
- void data_stop (ContentTime time);
+ void data_stop (dcpomatic::ContentTime time);
void subtitle_selected (wxListEvent &);
wxListCtrl* _list;
int _subs;
boost::optional<FrameRateChange> _frc;
boost::optional<int> _last_count;
- std::vector<ContentTime> _start_times;
+ std::vector<dcpomatic::ContentTime> _start_times;
boost::weak_ptr<Content> _content;
boost::weak_ptr<FilmViewer> _film_viewer;
};
diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc
index de5f05ae7..2c510efb5 100644
--- a/src/wx/timeline.cc
+++ b/src/wx/timeline.cc
@@ -54,6 +54,7 @@ using boost::weak_ptr;
using boost::dynamic_pointer_cast;
using boost::bind;
using boost::optional;
+using namespace dcpomatic;
/* 3 hours in 640 pixels */
double const Timeline::_minimum_pixels_per_second = 640.0 / (60 * 60 * 3);
diff --git a/src/wx/timeline.h b/src/wx/timeline.h
index a7f345863..84cb870f2 100644
--- a/src/wx/timeline.h
+++ b/src/wx/timeline.h
@@ -107,7 +107,7 @@ private:
boost::shared_ptr<TimelineView> event_to_view (wxMouseEvent &);
TimelineContentViewList selected_views () const;
ContentList selected_content () const;
- void maybe_snap (DCPTime a, DCPTime b, boost::optional<DCPTime>& nearest_distance) const;
+ void maybe_snap (dcpomatic::DCPTime a, dcpomatic::DCPTime b, boost::optional<dcpomatic::DCPTime>& nearest_distance) const;
wxScrolledCanvas* _labels_canvas;
wxScrolledCanvas* _main_canvas;
@@ -123,12 +123,12 @@ private:
wxPoint _down_point;
boost::optional<wxPoint> _zoom_point;
boost::shared_ptr<TimelineContentView> _down_view;
- DCPTime _down_view_position;
+ dcpomatic::DCPTime _down_view_position;
bool _first_move;
ContentMenu _menu;
bool _snap;
- std::list<DCPTime> _start_snaps;
- std::list<DCPTime> _end_snaps;
+ std::list<dcpomatic::DCPTime> _start_snaps;
+ std::list<dcpomatic::DCPTime> _end_snaps;
Tool _tool;
int _x_scroll_rate;
int _y_scroll_rate;
diff --git a/src/wx/timeline_content_view.cc b/src/wx/timeline_content_view.cc
index a55526c88..6902a11d6 100644
--- a/src/wx/timeline_content_view.cc
+++ b/src/wx/timeline_content_view.cc
@@ -27,6 +27,7 @@
using std::list;
using boost::shared_ptr;
+using namespace dcpomatic;
TimelineContentView::TimelineContentView (Timeline& tl, shared_ptr<Content> c)
: TimelineView (tl)
diff --git a/src/wx/timeline_reels_view.cc b/src/wx/timeline_reels_view.cc
index f09a52a53..fa89c60a7 100644
--- a/src/wx/timeline_reels_view.cc
+++ b/src/wx/timeline_reels_view.cc
@@ -26,6 +26,7 @@
using std::min;
using std::list;
+using namespace dcpomatic;
TimelineReelsView::TimelineReelsView (Timeline& tl, int y)
: TimelineView (tl)
diff --git a/src/wx/timeline_time_axis_view.cc b/src/wx/timeline_time_axis_view.cc
index a31ed5ced..e9de1b542 100644
--- a/src/wx/timeline_time_axis_view.cc
+++ b/src/wx/timeline_time_axis_view.cc
@@ -26,6 +26,7 @@
using std::list;
using std::cout;
+using namespace dcpomatic;
TimelineTimeAxisView::TimelineTimeAxisView (Timeline& tl, int y)
: TimelineView (tl)
diff --git a/src/wx/timeline_view.cc b/src/wx/timeline_view.cc
index bb6ab6034..fb23fa7b1 100644
--- a/src/wx/timeline_view.cc
+++ b/src/wx/timeline_view.cc
@@ -22,6 +22,7 @@
#include "timeline.h"
using std::list;
+using namespace dcpomatic;
/** @class TimelineView
* @brief Parent class for components of the timeline (e.g. a piece of content or an axis).
diff --git a/src/wx/timeline_view.h b/src/wx/timeline_view.h
index f0ded7bce..d94e10124 100644
--- a/src/wx/timeline_view.h
+++ b/src/wx/timeline_view.h
@@ -45,7 +45,7 @@ public:
protected:
virtual void do_paint (wxGraphicsContext *, std::list<dcpomatic::Rect<int> > overlaps) = 0;
- int time_x (DCPTime t) const;
+ int time_x (dcpomatic::DCPTime t) const;
Timeline& _timeline;
diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc
index f10815ca4..06d655b6b 100644
--- a/src/wx/timing_panel.cc
+++ b/src/wx/timing_panel.cc
@@ -48,6 +48,7 @@ using boost::weak_ptr;
using boost::dynamic_pointer_cast;
using boost::optional;
using dcp::locale_convert;
+using namespace dcpomatic;
TimingPanel::TimingPanel (ContentPanel* p, weak_ptr<FilmViewer> viewer)
/* horrid hack for apparent lack of context support with wxWidgets i18n code */
diff --git a/src/wx/timing_panel.h b/src/wx/timing_panel.h
index 65d8aabc9..962a7fedc 100644
--- a/src/wx/timing_panel.h
+++ b/src/wx/timing_panel.h
@@ -57,18 +57,18 @@ private:
wxStaticText* _colon[3];
wxStaticText* _tip;
wxStaticText* _position_label;
- Timecode<DCPTime>* _position;
+ Timecode<dcpomatic::DCPTime>* _position;
wxButton* _move_to_start_of_reel;
wxStaticText* _full_length_label;
- Timecode<DCPTime>* _full_length;
+ Timecode<dcpomatic::DCPTime>* _full_length;
wxStaticText* _trim_start_label;
- Timecode<ContentTime>* _trim_start;
+ Timecode<dcpomatic::ContentTime>* _trim_start;
wxButton* _trim_start_to_playhead;
wxButton* _trim_end_to_playhead;
wxStaticText* _trim_end_label;
- Timecode<ContentTime>* _trim_end;
+ Timecode<dcpomatic::ContentTime>* _trim_end;
wxStaticText* _play_length_label;
- Timecode<DCPTime>* _play_length;
+ Timecode<dcpomatic::DCPTime>* _play_length;
wxStaticText* _video_frame_rate_label;
wxTextCtrl* _video_frame_rate;
wxButton* _set_video_frame_rate;
diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc
index 6615215d5..9c044e188 100644
--- a/src/wx/video_panel.cc
+++ b/src/wx/video_panel.cc
@@ -51,6 +51,7 @@ using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::bind;
using boost::optional;
+using namespace dcpomatic;
static VideoContentScale
index_to_scale (int n)
diff --git a/src/wx/video_panel.h b/src/wx/video_panel.h
index 795a52a78..8e9a77cab 100644
--- a/src/wx/video_panel.h
+++ b/src/wx/video_panel.h
@@ -70,9 +70,9 @@ private:
wxStaticText* _bottom_crop_label;
ContentSpinCtrl<VideoContent>* _bottom_crop;
wxStaticText* _fade_in_label;
- Timecode<ContentTime>* _fade_in;
+ Timecode<dcpomatic::ContentTime>* _fade_in;
wxStaticText* _fade_out_label;
- Timecode<ContentTime>* _fade_out;
+ Timecode<dcpomatic::ContentTime>* _fade_out;
wxStaticText* _scale_to_label;
ContentChoice<VideoContent, VideoContentScale>* _scale;
wxStaticText* _description;
diff --git a/src/wx/wx_util.cc b/src/wx/wx_util.cc
index 1a537c087..d2f463b73 100644
--- a/src/wx/wx_util.cc
+++ b/src/wx/wx_util.cc
@@ -44,6 +44,7 @@ using std::pair;
using boost::shared_ptr;
using boost::optional;
using dcp::locale_convert;
+using namespace dcpomatic;
wxStaticText *
#ifdef __WXOSX__
diff --git a/src/wx/wx_util.h b/src/wx/wx_util.h
index 1b3c4a2ae..400493f18 100644
--- a/src/wx/wx_util.h
+++ b/src/wx/wx_util.h
@@ -84,7 +84,7 @@ extern wxString std_to_wx (std::string);
extern void dcpomatic_setup_i18n ();
extern wxString context_translation (wxString);
extern std::string string_client_data (wxClientData* o);
-extern wxString time_to_timecode (DCPTime t, double fps);
+extern wxString time_to_timecode (dcpomatic::DCPTime t, double fps);
extern void setup_audio_channels_choice (wxChoice* choice, int minimum);
extern wxSplashScreen* maybe_show_splash ();
extern double calculate_mark_interval (double start);
diff --git a/test/audio_analysis_test.cc b/test/audio_analysis_test.cc
index a2da8d690..5d65ab693 100644
--- a/test/audio_analysis_test.cc
+++ b/test/audio_analysis_test.cc
@@ -42,6 +42,7 @@
using std::vector;
using boost::shared_ptr;
+using namespace dcpomatic;
static float
random_float ()
diff --git a/test/audio_merger_test.cc b/test/audio_merger_test.cc
index 1484213e7..4a1f689dd 100644
--- a/test/audio_merger_test.cc
+++ b/test/audio_merger_test.cc
@@ -36,6 +36,7 @@ using std::list;
using std::cout;
using boost::shared_ptr;
using boost::bind;
+using namespace dcpomatic;
static shared_ptr<const AudioBuffers> last_audio;
diff --git a/test/audio_ring_buffers_test.cc b/test/audio_ring_buffers_test.cc
index 9ebd64ded..782451a7d 100644
--- a/test/audio_ring_buffers_test.cc
+++ b/test/audio_ring_buffers_test.cc
@@ -24,6 +24,7 @@
using std::cout;
using boost::shared_ptr;
+using namespace dcpomatic;
#define CANARY 9999
diff --git a/test/burnt_subtitle_test.cc b/test/burnt_subtitle_test.cc
index 91edcad9f..8bd2c46b8 100644
--- a/test/burnt_subtitle_test.cc
+++ b/test/burnt_subtitle_test.cc
@@ -51,6 +51,7 @@ using std::cout;
using std::map;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
/** Build a small DCP with no picture and a single subtitle overlaid onto it from a SubRip file */
BOOST_AUTO_TEST_CASE (burnt_subtitle_test_subrip)
diff --git a/test/butler_test.cc b/test/butler_test.cc
index 93e141c42..cc2841268 100644
--- a/test/butler_test.cc
+++ b/test/butler_test.cc
@@ -29,6 +29,7 @@
#include <boost/test/unit_test.hpp>
using boost::shared_ptr;
+using namespace dcpomatic;
BOOST_AUTO_TEST_CASE (butler_test1)
{
diff --git a/test/content_test.cc b/test/content_test.cc
index 55e34ac5f..2f8963f5b 100644
--- a/test/content_test.cc
+++ b/test/content_test.cc
@@ -32,6 +32,7 @@
#include <boost/test/unit_test.hpp>
using boost::shared_ptr;
+using namespace dcpomatic;
/** There has been garbled audio with this piece of content */
BOOST_AUTO_TEST_CASE (content_test1)
diff --git a/test/dcp_playback_test.cc b/test/dcp_playback_test.cc
index 04a0eabe3..9fef1801b 100644
--- a/test/dcp_playback_test.cc
+++ b/test/dcp_playback_test.cc
@@ -28,6 +28,7 @@
using std::pair;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
/** Simulate the work that the player does, for profiling */
BOOST_AUTO_TEST_CASE (dcp_playback_test)
diff --git a/test/dcp_subtitle_test.cc b/test/dcp_subtitle_test.cc
index 89eb11a60..150cd8539 100644
--- a/test/dcp_subtitle_test.cc
+++ b/test/dcp_subtitle_test.cc
@@ -42,6 +42,7 @@ using std::cout;
using std::list;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
optional<ContentStringText> stored;
diff --git a/test/dcpomatic_time_test.cc b/test/dcpomatic_time_test.cc
index 1637738ad..5b58c369b 100644
--- a/test/dcpomatic_time_test.cc
+++ b/test/dcpomatic_time_test.cc
@@ -31,6 +31,7 @@
using std::list;
using std::cout;
+using namespace dcpomatic;
BOOST_AUTO_TEST_CASE (dcpomatic_time_test)
{
diff --git a/test/empty_test.cc b/test/empty_test.cc
index 86ce2075c..428d0f9bb 100644
--- a/test/empty_test.cc
+++ b/test/empty_test.cc
@@ -30,6 +30,7 @@
#include <boost/test/unit_test.hpp>
using boost::shared_ptr;
+using namespace dcpomatic;
bool
has_video (shared_ptr<Piece> piece)
diff --git a/test/ffmpeg_decoder_seek_test.cc b/test/ffmpeg_decoder_seek_test.cc
index c69c74c68..3e825e443 100644
--- a/test/ffmpeg_decoder_seek_test.cc
+++ b/test/ffmpeg_decoder_seek_test.cc
@@ -44,6 +44,7 @@ using std::list;
using std::cout;
using boost::shared_ptr;
using boost::optional;
+using namespace dcpomatic;
static optional<ContentVideo> stored;
static bool
diff --git a/test/ffmpeg_decoder_sequential_test.cc b/test/ffmpeg_decoder_sequential_test.cc
index 892bc9e4c..f99229c65 100644
--- a/test/ffmpeg_decoder_sequential_test.cc
+++ b/test/ffmpeg_decoder_sequential_test.cc
@@ -43,6 +43,7 @@ using std::list;
using boost::shared_ptr;
using boost::optional;
using boost::bind;
+using namespace dcpomatic;
static DCPTime next;
static DCPTime frame;
diff --git a/test/ffmpeg_encoder_test.cc b/test/ffmpeg_encoder_test.cc
index 1e001f0c8..dd10bd4a1 100644
--- a/test/ffmpeg_encoder_test.cc
+++ b/test/ffmpeg_encoder_test.cc
@@ -36,6 +36,7 @@
using std::string;
using boost::shared_ptr;
+using namespace dcpomatic;
static void
ffmpeg_content_test (int number, boost::filesystem::path content, ExportFormat format)
diff --git a/test/ffmpeg_examiner_test.cc b/test/ffmpeg_examiner_test.cc
index d4614e226..b6b2bbf06 100644
--- a/test/ffmpeg_examiner_test.cc
+++ b/test/ffmpeg_examiner_test.cc
@@ -31,6 +31,7 @@
#include "test.h"
using boost::shared_ptr;
+using namespace dcpomatic;
BOOST_AUTO_TEST_CASE (ffmpeg_examiner_test)
{
diff --git a/test/ffmpeg_pts_offset_test.cc b/test/ffmpeg_pts_offset_test.cc
index 18f89713e..f4bf6df35 100644
--- a/test/ffmpeg_pts_offset_test.cc
+++ b/test/ffmpeg_pts_offset_test.cc
@@ -32,6 +32,7 @@
#include "test.h"
using boost::shared_ptr;
+using namespace dcpomatic;
BOOST_AUTO_TEST_CASE (ffmpeg_pts_offset_test)
{
diff --git a/test/player_test.cc b/test/player_test.cc
index 1736bfc7e..7b65783c6 100644
--- a/test/player_test.cc
+++ b/test/player_test.cc
@@ -48,6 +48,7 @@ using std::pair;
using boost::shared_ptr;
using boost::bind;
using boost::optional;
+using namespace dcpomatic;
static shared_ptr<AudioBuffers> accumulated;
diff --git a/test/reels_test.cc b/test/reels_test.cc
index eea9ebfbe..15e386d59 100644
--- a/test/reels_test.cc
+++ b/test/reels_test.cc
@@ -39,6 +39,7 @@
using std::list;
using std::cout;
using boost::shared_ptr;
+using namespace dcpomatic;
/** Test Film::reels() */
BOOST_AUTO_TEST_CASE (reels_test1)
diff --git a/test/silence_padding_test.cc b/test/silence_padding_test.cc
index 070cb235d..b15f4691b 100644
--- a/test/silence_padding_test.cc
+++ b/test/silence_padding_test.cc
@@ -141,7 +141,7 @@ BOOST_AUTO_TEST_CASE (silence_padding_test2)
BOOST_REQUIRE (!wait_for_jobs());
film->set_video_frame_rate (24);
- content->set_trim_start (ContentTime(4003));
+ content->set_trim_start (dcpomatic::ContentTime(4003));
film->make_dcp ();
BOOST_REQUIRE (!wait_for_jobs());
diff --git a/test/srt_subtitle_test.cc b/test/srt_subtitle_test.cc
index 0c1f07161..eefdb4122 100644
--- a/test/srt_subtitle_test.cc
+++ b/test/srt_subtitle_test.cc
@@ -37,6 +37,7 @@
using std::string;
using std::list;
using boost::shared_ptr;
+using namespace dcpomatic;
/** Make a very short DCP with a single subtitle from .srt with no specified fonts */
BOOST_AUTO_TEST_CASE (srt_subtitle_test)
diff --git a/test/subtitle_trim_test.cc b/test/subtitle_trim_test.cc
index 2380449d8..966fc66b6 100644
--- a/test/subtitle_trim_test.cc
+++ b/test/subtitle_trim_test.cc
@@ -24,6 +24,7 @@
#include <boost/test/unit_test.hpp>
using boost::shared_ptr;
+using namespace dcpomatic;
/** Check for no crash when trimming DCP subtitles (#1275) */
BOOST_AUTO_TEST_CASE (subtitle_trim_test1)
diff --git a/test/time_calculation_test.cc b/test/time_calculation_test.cc
index e995a4ed0..968138f96 100644
--- a/test/time_calculation_test.cc
+++ b/test/time_calculation_test.cc
@@ -34,6 +34,7 @@
using std::string;
using std::list;
using boost::shared_ptr;
+using namespace dcpomatic;
static string const xml = "<Content>"
"<Type>FFmpeg</Type>"
diff --git a/test/torture_test.cc b/test/torture_test.cc
index 5525eb081..10d343268 100644
--- a/test/torture_test.cc
+++ b/test/torture_test.cc
@@ -45,6 +45,7 @@ using std::list;
using std::cout;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
/** Test start/end trim and positioning of some audio content */
BOOST_AUTO_TEST_CASE (torture_test1)
diff --git a/test/upmixer_a_test.cc b/test/upmixer_a_test.cc
index 5643310c6..545f081ba 100644
--- a/test/upmixer_a_test.cc
+++ b/test/upmixer_a_test.cc
@@ -35,6 +35,7 @@
#include "test.h"
using boost::shared_ptr;
+using namespace dcpomatic;
static SNDFILE* L;
static SNDFILE* R;
diff --git a/test/util_test.cc b/test/util_test.cc
index 1e13efa82..709bb0827 100644
--- a/test/util_test.cc
+++ b/test/util_test.cc
@@ -32,6 +32,7 @@
using std::string;
using std::vector;
using boost::shared_ptr;
+using namespace dcpomatic;
BOOST_AUTO_TEST_CASE (digest_head_tail_test)
{
diff --git a/test/vf_test.cc b/test/vf_test.cc
index 6862a1204..307d26ea6 100644
--- a/test/vf_test.cc
+++ b/test/vf_test.cc
@@ -45,6 +45,7 @@ using std::string;
using std::cout;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
+using namespace dcpomatic;
/** Test the logic which decides whether a DCP can be referenced or not */
BOOST_AUTO_TEST_CASE (vf_test1)