summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-11-07 03:03:29 +0100
committerCarl Hetherington <cth@carlh.net>2021-11-22 23:59:43 +0100
commit0254f2d12acb2ff8d770b4e47dc15599d145fe17 (patch)
treef7240c24914ce89920f5f36636f2d771a417798c
parent0060e0f1969823e4329b15a92e130c8790a2e9d5 (diff)
Put Image into the dcpomatic namespace.
-rw-r--r--src/lib/bitmap_text.h9
-rw-r--r--src/lib/butler.h4
-rw-r--r--src/lib/content_text.h6
-rw-r--r--src/lib/encoder.cc2
-rw-r--r--src/lib/ffmpeg_decoder.h6
-rw-r--r--src/lib/ffmpeg_file_encoder.h2
-rw-r--r--src/lib/ffmpeg_image_proxy.cc5
-rw-r--r--src/lib/ffmpeg_image_proxy.h4
-rw-r--r--src/lib/filter_graph.h1
-rw-r--r--src/lib/image.cc13
-rw-r--r--src/lib/image.h12
-rw-r--r--src/lib/image_examiner.cc2
-rw-r--r--src/lib/image_proxy.h14
-rw-r--r--src/lib/j2k_image_proxy.cc1
-rw-r--r--src/lib/j2k_image_proxy.h6
-rw-r--r--src/lib/player.h6
-rw-r--r--src/lib/player_video.cc8
-rw-r--r--src/lib/player_video.h12
-rw-r--r--src/lib/position_image.h8
-rw-r--r--src/lib/raw_image_proxy.cc3
-rw-r--r--src/lib/raw_image_proxy.h6
-rw-r--r--src/lib/text_decoder.h8
-rw-r--r--src/lib/video_decoder.h1
-rw-r--r--src/lib/video_filter_graph.cc1
-rw-r--r--src/lib/video_filter_graph.h2
-rw-r--r--src/tools/server_test.cc2
-rw-r--r--src/wx/film_viewer.h1
-rw-r--r--src/wx/gl_video_view.cc1
-rw-r--r--src/wx/gl_video_view.h2
-rw-r--r--src/wx/simple_video_view.h2
-rw-r--r--src/wx/video_view.h4
-rw-r--r--src/wx/video_waveform_plot.cc1
-rw-r--r--src/wx/video_waveform_plot.h6
-rw-r--r--test/client_server_test.cc1
-rw-r--r--test/dcp_decoder_test.cc3
-rw-r--r--test/ffmpeg_audio_only_test.cc1
-rw-r--r--test/ffmpeg_audio_test.cc1
-rw-r--r--test/image_test.cc1
-rw-r--r--test/low_bitrate_test.cc1
-rw-r--r--test/overlap_video_test.cc1
-rw-r--r--test/pixel_formats_test.cc1
-rw-r--r--test/test.cc1
-rw-r--r--test/test.h6
-rw-r--r--test/video_level_test.cc9
44 files changed, 115 insertions, 72 deletions
diff --git a/src/lib/bitmap_text.h b/src/lib/bitmap_text.h
index 46b6fd142..cadf97ec1 100644
--- a/src/lib/bitmap_text.h
+++ b/src/lib/bitmap_text.h
@@ -26,17 +26,20 @@
#include <memory>
-class Image;
+namespace dcpomatic {
+ class Image;
+}
+
class BitmapText
{
public:
- BitmapText (std::shared_ptr<const Image> i, dcpomatic::Rect<double> r)
+ BitmapText (std::shared_ptr<const dcpomatic::Image> i, dcpomatic::Rect<double> r)
: image (i)
, rectangle (r)
{}
- std::shared_ptr<const Image> image;
+ std::shared_ptr<const dcpomatic::Image> image;
/** Area that the subtitle covers on its corresponding video, expressed in
* proportions of the image size; e.g. rectangle.x = 0.5 would mean that
* the rectangle starts half-way across the video.
diff --git a/src/lib/butler.h b/src/lib/butler.h
index c7e71658d..80f5755dd 100644
--- a/src/lib/butler.h
+++ b/src/lib/butler.h
@@ -45,7 +45,7 @@ public:
int audio_channels,
std::function<AVPixelFormat (AVPixelFormat)> pixel_format,
VideoRange video_range,
- Image::Alignment alignment,
+ dcpomatic::Image::Alignment alignment,
bool fast,
bool prepare_only_proxy
);
@@ -126,7 +126,7 @@ private:
std::function<AVPixelFormat (AVPixelFormat)> _pixel_format;
VideoRange _video_range;
- Image::Alignment _alignment;
+ dcpomatic::Image::Alignment _alignment;
bool _fast;
/** true to ask PlayerVideo::prepare to only prepare the ImageProxy and not also
diff --git a/src/lib/content_text.h b/src/lib/content_text.h
index 5edb9af20..f0a3530e8 100644
--- a/src/lib/content_text.h
+++ b/src/lib/content_text.h
@@ -28,7 +28,9 @@
#include <dcp/subtitle_string.h>
#include <list>
-class Image;
+namespace dcpomatic {
+ class Image;
+}
class ContentText
{
@@ -48,7 +50,7 @@ private:
class ContentBitmapText : public ContentText
{
public:
- ContentBitmapText (dcpomatic::ContentTime f, std::shared_ptr<const Image> im, dcpomatic::Rect<double> r)
+ ContentBitmapText (dcpomatic::ContentTime f, std::shared_ptr<const dcpomatic::Image> im, dcpomatic::Rect<double> r)
: ContentText (f)
, sub (im, r)
{}
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc
index 1d688c318..0053f80a6 100644
--- a/src/lib/encoder.cc
+++ b/src/lib/encoder.cc
@@ -41,7 +41,7 @@
Encoder::Encoder (std::shared_ptr<const Film> film, std::weak_ptr<Job> job)
: _film (film)
, _job (job)
- , _player (new Player(film, Image::Alignment::PADDED))
+ , _player (new Player(film, dcpomatic::Image::Alignment::PADDED))
{
}
diff --git a/src/lib/ffmpeg_decoder.h b/src/lib/ffmpeg_decoder.h
index 264733c70..4d5743225 100644
--- a/src/lib/ffmpeg_decoder.h
+++ b/src/lib/ffmpeg_decoder.h
@@ -35,7 +35,9 @@ class Log;
class VideoFilterGraph;
class FFmpegAudioStream;
class AudioBuffers;
-class Image;
+namespace dcpomatic {
+ class Image;
+}
struct ffmpeg_pts_offset_test;
/** @class FFmpegDecoder
@@ -79,7 +81,7 @@ private:
/** true if we have a subtitle which has not had emit_stop called for it yet */
bool _have_current_subtitle = false;
- std::shared_ptr<Image> _black_image;
+ std::shared_ptr<dcpomatic::Image> _black_image;
std::map<std::shared_ptr<FFmpegAudioStream>, boost::optional<dcpomatic::ContentTime>> _next_time;
};
diff --git a/src/lib/ffmpeg_file_encoder.h b/src/lib/ffmpeg_file_encoder.h
index 9f3d88551..e609b2607 100644
--- a/src/lib/ffmpeg_file_encoder.h
+++ b/src/lib/ffmpeg_file_encoder.h
@@ -98,7 +98,7 @@ private:
/** Store of shared_ptr<Image> to keep them alive whilst raw pointers into
their data have been passed to FFmpeg.
*/
- std::map<uint8_t*, std::shared_ptr<const Image>> _pending_images;
+ std::map<uint8_t*, std::shared_ptr<const dcpomatic::Image>> _pending_images;
boost::mutex _pending_images_mutex;
static int _video_stream_index;
diff --git a/src/lib/ffmpeg_image_proxy.cc b/src/lib/ffmpeg_image_proxy.cc
index 4b3c3084c..97e7933b7 100644
--- a/src/lib/ffmpeg_image_proxy.cc
+++ b/src/lib/ffmpeg_image_proxy.cc
@@ -42,15 +42,14 @@ DCPOMATIC_ENABLE_WARNINGS
using std::cout;
-using std::make_pair;
using std::make_shared;
using std::min;
-using std::pair;
using std::shared_ptr;
using std::string;
-using boost::optional;
using std::dynamic_pointer_cast;
+using boost::optional;
using dcp::raw_convert;
+using namespace dcpomatic;
FFmpegImageProxy::FFmpegImageProxy (boost::filesystem::path path)
diff --git a/src/lib/ffmpeg_image_proxy.h b/src/lib/ffmpeg_image_proxy.h
index 48317ed75..08f759664 100644
--- a/src/lib/ffmpeg_image_proxy.h
+++ b/src/lib/ffmpeg_image_proxy.h
@@ -32,7 +32,7 @@ public:
FFmpegImageProxy (std::shared_ptr<Socket> socket);
Result image (
- Image::Alignment alignment,
+ dcpomatic::Image::Alignment alignment,
boost::optional<dcp::Size> size = boost::optional<dcp::Size> ()
) const;
@@ -51,6 +51,6 @@ private:
failed-decode errors can give more detail.
*/
boost::optional<boost::filesystem::path> _path;
- mutable std::shared_ptr<Image> _image;
+ mutable std::shared_ptr<dcpomatic::Image> _image;
mutable boost::mutex _mutex;
};
diff --git a/src/lib/filter_graph.h b/src/lib/filter_graph.h
index 9ee628d4c..9dfa8fe56 100644
--- a/src/lib/filter_graph.h
+++ b/src/lib/filter_graph.h
@@ -39,7 +39,6 @@ DCPOMATIC_ENABLE_WARNINGS
struct AVFilterContext;
struct AVFrame;
-class Image;
class Filter;
diff --git a/src/lib/image.cc b/src/lib/image.cc
index a4e04bb62..ce6fe6f1a 100644
--- a/src/lib/image.cc
+++ b/src/lib/image.cc
@@ -62,6 +62,7 @@ using std::runtime_error;
using std::shared_ptr;
using std::string;
using dcp::Size;
+using namespace dcpomatic;
/** The memory alignment, in bytes, used for each row of an image if Alignment::PADDED is requested */
@@ -719,9 +720,9 @@ Image::alpha_blend (shared_ptr<const Image> other, Position<int> position)
double const b = lut_in[op[blue]];
/* RGB to XYZ, including Bradford transform and DCI companding */
- double const x = max (0.0, min (65535.0, r * fast_matrix[0] + g * fast_matrix[1] + b * fast_matrix[2]));
- double const y = max (0.0, min (65535.0, r * fast_matrix[3] + g * fast_matrix[4] + b * fast_matrix[5]));
- double const z = max (0.0, min (65535.0, r * fast_matrix[6] + g * fast_matrix[7] + b * fast_matrix[8]));
+ double const x = std::max (0.0, std::min(65535.0, r * fast_matrix[0] + g * fast_matrix[1] + b * fast_matrix[2]));
+ double const y = std::max (0.0, std::min(65535.0, r * fast_matrix[3] + g * fast_matrix[4] + b * fast_matrix[5]));
+ double const z = std::max (0.0, std::min(65535.0, r * fast_matrix[6] + g * fast_matrix[7] + b * fast_matrix[8]));
/* Out gamma LUT and blend */
tp[0] = lrint(lut_out[lrint(x)] * 65535) * alpha + tp[0] * (1 - alpha);
@@ -849,7 +850,7 @@ Image::copy (shared_ptr<const Image> other, Position<int> position)
DCPOMATIC_ASSERT (_pixel_format == AV_PIX_FMT_RGB24 && other->pixel_format() == AV_PIX_FMT_RGB24);
DCPOMATIC_ASSERT (position.x >= 0 && position.y >= 0);
- int const N = min (position.x + other->size().width, size().width) - position.x;
+ int const N = std::min (position.x + other->size().width, size().width) - position.x;
for (int ty = position.y, oy = 0; ty < size().height && oy < other->size().height; ++ty, ++oy) {
uint8_t * const tp = data()[0] + ty * stride()[0] + position.x * 3;
uint8_t * const op = other->data()[0] + oy * other->stride()[0];
@@ -1140,7 +1141,7 @@ Image::alignment () const
PositionImage
-merge (list<PositionImage> images, Image::Alignment alignment)
+dcpomatic::merge (list<PositionImage> images, Image::Alignment alignment)
{
if (images.empty ()) {
return {};
@@ -1167,7 +1168,7 @@ merge (list<PositionImage> images, Image::Alignment alignment)
bool
-operator== (Image const & a, Image const & b)
+dcpomatic::operator== (Image const & a, Image const & b)
{
if (a.planes() != b.planes() || a.pixel_format() != b.pixel_format() || a.alignment() != b.alignment()) {
return false;
diff --git a/src/lib/image.h b/src/lib/image.h
index 128b546b5..c5d069caa 100644
--- a/src/lib/image.h
+++ b/src/lib/image.h
@@ -36,6 +36,11 @@ extern "C" {
struct AVFrame;
class Socket;
+struct make_part_black_test;
+
+
+namespace dcpomatic {
+
class Image : public std::enable_shared_from_this<Image>
{
@@ -103,7 +108,7 @@ public:
private:
friend struct pixel_formats_test;
- friend struct make_part_black_test;
+ friend struct ::make_part_black_test;
void allocate ();
void swap (Image &);
@@ -120,7 +125,12 @@ private:
Alignment _alignment;
};
+
extern PositionImage merge (std::list<PositionImage> images, Image::Alignment alignment);
extern bool operator== (Image const & a, Image const & b);
+
+}
+
+
#endif
diff --git a/src/lib/image_examiner.cc b/src/lib/image_examiner.cc
index 562a7c557..bf6628cd5 100644
--- a/src/lib/image_examiner.cc
+++ b/src/lib/image_examiner.cc
@@ -65,7 +65,7 @@ ImageExaminer::ImageExaminer (shared_ptr<const Film> film, shared_ptr<const Imag
}
} else {
FFmpegImageProxy proxy(content->path(0));
- _video_size = proxy.image(Image::Alignment::COMPACT).image->size();
+ _video_size = proxy.image(dcpomatic::Image::Alignment::COMPACT).image->size();
}
if (content->still ()) {
diff --git a/src/lib/image_proxy.h b/src/lib/image_proxy.h
index a37be580f..17121c91f 100644
--- a/src/lib/image_proxy.h
+++ b/src/lib/image_proxy.h
@@ -37,7 +37,9 @@ extern "C" {
#include <boost/utility.hpp>
-class Image;
+namespace dcpomatic {
+ class Image;
+}
class Socket;
namespace xmlpp {
@@ -70,19 +72,19 @@ public:
ImageProxy& operator= (ImageProxy const&) = delete;
struct Result {
- Result (std::shared_ptr<const Image> image_, int log2_scaling_)
+ Result (std::shared_ptr<const dcpomatic::Image> image_, int log2_scaling_)
: image (image_)
, log2_scaling (log2_scaling_)
, error (false)
{}
- Result (std::shared_ptr<Image> image_, int log2_scaling_, bool error_)
+ Result (std::shared_ptr<dcpomatic::Image> image_, int log2_scaling_, bool error_)
: image (image_)
, log2_scaling (log2_scaling_)
, error (error_)
{}
- std::shared_ptr<const Image> image;
+ std::shared_ptr<const dcpomatic::Image> image;
/** log2 of any scaling down that has already been applied to the image;
* e.g. if the image is already half the size of the original, this value
* will be 1.
@@ -97,7 +99,7 @@ public:
* can be used as an optimisation.
*/
virtual Result image (
- Image::Alignment alignment,
+ dcpomatic::Image::Alignment alignment,
boost::optional<dcp::Size> size = boost::optional<dcp::Size> ()
) const = 0;
@@ -109,7 +111,7 @@ public:
* This method may be called in a different thread to image().
* @return log2 of any scaling down that will be applied to the image.
*/
- virtual int prepare (Image::Alignment, boost::optional<dcp::Size> = boost::optional<dcp::Size>()) const { return 0; }
+ virtual int prepare (dcpomatic::Image::Alignment, boost::optional<dcp::Size> = boost::optional<dcp::Size>()) const { return 0; }
virtual size_t memory_used () const = 0;
};
diff --git a/src/lib/j2k_image_proxy.cc b/src/lib/j2k_image_proxy.cc
index 4eceafae3..8fe9c99a1 100644
--- a/src/lib/j2k_image_proxy.cc
+++ b/src/lib/j2k_image_proxy.cc
@@ -49,6 +49,7 @@ using std::string;
using boost::optional;
using dcp::ArrayData;
using dcp::raw_convert;
+using namespace dcpomatic;
/** Construct a J2KImageProxy from a JPEG2000 file */
diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h
index d925bef86..4dd7cf75b 100644
--- a/src/lib/j2k_image_proxy.h
+++ b/src/lib/j2k_image_proxy.h
@@ -57,7 +57,7 @@ public:
J2KImageProxy (dcp::ArrayData data, dcp::Size size, AVPixelFormat pixel_format);
Result image (
- Image::Alignment alignment,
+ dcpomatic::Image::Alignment alignment,
boost::optional<dcp::Size> size = boost::optional<dcp::Size> ()
) const;
@@ -65,7 +65,7 @@ public:
void write_to_socket (std::shared_ptr<Socket>) const;
/** @return true if our image is definitely the same as another, false if it is probably not */
bool same (std::shared_ptr<const ImageProxy>) const;
- int prepare (Image::Alignment alignment, boost::optional<dcp::Size> = boost::optional<dcp::Size>()) const;
+ int prepare (dcpomatic::Image::Alignment alignment, boost::optional<dcp::Size> = boost::optional<dcp::Size>()) const;
std::shared_ptr<const dcp::Data> j2k () const {
return _data;
@@ -85,7 +85,7 @@ private:
std::shared_ptr<const dcp::Data> _data;
dcp::Size _size;
boost::optional<dcp::Eye> _eye;
- mutable std::shared_ptr<Image> _image;
+ mutable std::shared_ptr<dcpomatic::Image> _image;
mutable boost::optional<dcp::Size> _target_size;
mutable boost::optional<int> _reduce;
AVPixelFormat _pixel_format;
diff --git a/src/lib/player.h b/src/lib/player.h
index 14fb8d0ee..20a97c896 100644
--- a/src/lib/player.h
+++ b/src/lib/player.h
@@ -77,7 +77,7 @@ public:
class Player : public std::enable_shared_from_this<Player>
{
public:
- Player (std::shared_ptr<const Film>, Image::Alignment subtitle_alignment);
+ Player (std::shared_ptr<const Film>, dcpomatic::Image::Alignment subtitle_alignment);
Player (std::shared_ptr<const Film>, std::shared_ptr<const Playlist> playlist);
Player (Player const& Player) = delete;
@@ -180,7 +180,7 @@ private:
* the size of preview in a window.
*/
dcp::Size _video_container_size;
- std::shared_ptr<Image> _black_image;
+ std::shared_ptr<dcpomatic::Image> _black_image;
/** true if the player should ignore all video; i.e. never produce any */
bool _ignore_video = false;
@@ -234,7 +234,7 @@ private:
dcpomatic::DCPTime _playback_length;
/** Alignment for subtitle images that we create */
- Image::Alignment _subtitle_alignment = Image::Alignment::PADDED;
+ dcpomatic::Image::Alignment _subtitle_alignment = dcpomatic::Image::Alignment::PADDED;
boost::signals2::scoped_connection _film_changed_connection;
boost::signals2::scoped_connection _playlist_change_connection;
diff --git a/src/lib/player_video.cc b/src/lib/player_video.cc
index 4cc536bb7..f4def7cfb 100644
--- a/src/lib/player_video.cc
+++ b/src/lib/player_video.cc
@@ -18,6 +18,7 @@
*/
+
#include "content.h"
#include "film.h"
#include "image.h"
@@ -33,16 +34,19 @@ extern "C" {
#include <libxml++/libxml++.h>
#include <iostream>
+
using std::cout;
using std::dynamic_pointer_cast;
+using std::function;
using std::make_shared;
using std::shared_ptr;
using std::string;
using std::weak_ptr;
using boost::optional;
-using std::function;
using dcp::Data;
using dcp::raw_convert;
+using namespace dcpomatic;
+
PlayerVideo::PlayerVideo (
shared_ptr<const ImageProxy> in,
@@ -297,7 +301,7 @@ PlayerVideo::keep_xyz_or_rgb (AVPixelFormat p)
}
void
-PlayerVideo::prepare (function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, Image::Alignment alignment, bool fast, bool proxy_only)
+PlayerVideo::prepare (function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, dcpomatic::Image::Alignment alignment, bool fast, bool proxy_only)
{
_in->prepare (alignment, _inter_size);
boost::mutex::scoped_lock lm (_mutex);
diff --git a/src/lib/player_video.h b/src/lib/player_video.h
index 237d2e3fe..0d5a1a820 100644
--- a/src/lib/player_video.h
+++ b/src/lib/player_video.h
@@ -35,7 +35,9 @@ extern "C" {
#include <boost/thread/mutex.hpp>
-class Image;
+namespace dcpomatic {
+ class Image;
+}
class ImageProxy;
class Film;
class Socket;
@@ -75,9 +77,9 @@ public:
return _text;
}
- void prepare (std::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, Image::Alignment alignment, bool fast, bool proxy_only);
- std::shared_ptr<Image> image (std::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool fast) const;
- std::shared_ptr<const Image> raw_image () const;
+ void prepare (std::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, dcpomatic::Image::Alignment alignment, bool fast, bool proxy_only);
+ std::shared_ptr<dcpomatic::Image> image (std::function<AVPixelFormat (AVPixelFormat)> pixel_format, VideoRange video_range, bool fast) const;
+ std::shared_ptr<const dcpomatic::Image> raw_image () const;
static AVPixelFormat force (AVPixelFormat, AVPixelFormat);
static AVPixelFormat keep_xyz_or_rgb (AVPixelFormat);
@@ -145,7 +147,7 @@ private:
boost::optional<Frame> _video_frame;
mutable boost::mutex _mutex;
- mutable std::shared_ptr<Image> _image;
+ mutable std::shared_ptr<dcpomatic::Image> _image;
/** _crop that was used to make _image */
mutable Crop _image_crop;
/** _inter_size that was used to make _image */
diff --git a/src/lib/position_image.h b/src/lib/position_image.h
index ee352647c..81b54fd63 100644
--- a/src/lib/position_image.h
+++ b/src/lib/position_image.h
@@ -27,7 +27,9 @@
#include <memory>
-class Image;
+namespace dcpomatic {
+ class Image;
+}
class PositionImage
@@ -35,12 +37,12 @@ class PositionImage
public:
PositionImage () {}
- PositionImage (std::shared_ptr<const Image> i, Position<int> p)
+ PositionImage (std::shared_ptr<const dcpomatic::Image> i, Position<int> p)
: image (i)
, position (p)
{}
- std::shared_ptr<const Image> image;
+ std::shared_ptr<const dcpomatic::Image> image;
Position<int> position;
bool same (PositionImage const & other) const;
diff --git a/src/lib/raw_image_proxy.cc b/src/lib/raw_image_proxy.cc
index fb0d16df8..68ea1d88b 100644
--- a/src/lib/raw_image_proxy.cc
+++ b/src/lib/raw_image_proxy.cc
@@ -36,13 +36,12 @@ DCPOMATIC_ENABLE_WARNINGS
using std::dynamic_pointer_cast;
-using std::make_pair;
using std::make_shared;
-using std::pair;
using std::shared_ptr;
using std::string;
using boost::optional;
using dcp::raw_convert;
+using namespace dcpomatic;
RawImageProxy::RawImageProxy (shared_ptr<Image> image)
diff --git a/src/lib/raw_image_proxy.h b/src/lib/raw_image_proxy.h
index c9885654b..63f2d834c 100644
--- a/src/lib/raw_image_proxy.h
+++ b/src/lib/raw_image_proxy.h
@@ -29,11 +29,11 @@
class RawImageProxy : public ImageProxy
{
public:
- explicit RawImageProxy (std::shared_ptr<Image>);
+ explicit RawImageProxy (std::shared_ptr<dcpomatic::Image>);
RawImageProxy (std::shared_ptr<cxml::Node> xml, std::shared_ptr<Socket> socket);
Result image (
- Image::Alignment alignment,
+ dcpomatic::Image::Alignment alignment,
boost::optional<dcp::Size> size = boost::optional<dcp::Size> ()
) const;
@@ -43,7 +43,7 @@ public:
size_t memory_used () const;
private:
- std::shared_ptr<Image> _image;
+ std::shared_ptr<dcpomatic::Image> _image;
};
diff --git a/src/lib/text_decoder.h b/src/lib/text_decoder.h
index d1355afb0..d0cadf675 100644
--- a/src/lib/text_decoder.h
+++ b/src/lib/text_decoder.h
@@ -36,7 +36,9 @@ namespace sub {
class Subtitle;
}
-class Image;
+namespace dcpomatic {
+ class Image;
+}
class TextDecoder : public DecoderPart
@@ -52,8 +54,8 @@ public:
return _position;
}
- void emit_bitmap_start (dcpomatic::ContentTime from, std::shared_ptr<const Image> image, dcpomatic::Rect<double> rect);
- void emit_bitmap (dcpomatic::ContentTimePeriod period, std::shared_ptr<const Image> image, dcpomatic::Rect<double> rect);
+ void emit_bitmap_start (dcpomatic::ContentTime from, std::shared_ptr<const dcpomatic::Image> image, dcpomatic::Rect<double> rect);
+ void emit_bitmap (dcpomatic::ContentTimePeriod period, std::shared_ptr<const dcpomatic::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);
diff --git a/src/lib/video_decoder.h b/src/lib/video_decoder.h
index 9d69f743a..e8c949b9f 100644
--- a/src/lib/video_decoder.h
+++ b/src/lib/video_decoder.h
@@ -38,7 +38,6 @@
class VideoContent;
class ImageProxy;
-class Image;
class Log;
class FrameIntervalChecker;
diff --git a/src/lib/video_filter_graph.cc b/src/lib/video_filter_graph.cc
index 0c7e23b05..fb6b692d1 100644
--- a/src/lib/video_filter_graph.cc
+++ b/src/lib/video_filter_graph.cc
@@ -38,6 +38,7 @@ using std::make_shared;
using std::pair;
using std::shared_ptr;
using std::string;
+using namespace dcpomatic;
VideoFilterGraph::VideoFilterGraph (dcp::Size s, AVPixelFormat p, dcp::Fraction r)
diff --git a/src/lib/video_filter_graph.h b/src/lib/video_filter_graph.h
index d887e551b..a8b4546fd 100644
--- a/src/lib/video_filter_graph.h
+++ b/src/lib/video_filter_graph.h
@@ -28,7 +28,7 @@ public:
VideoFilterGraph (dcp::Size s, AVPixelFormat p, dcp::Fraction r);
bool can_process (dcp::Size s, AVPixelFormat p) const;
- std::list<std::pair<std::shared_ptr<Image>, int64_t>> process (AVFrame * frame);
+ std::list<std::pair<std::shared_ptr<dcpomatic::Image>, int64_t>> process (AVFrame * frame);
protected:
std::string src_parameters () const override;
diff --git a/src/tools/server_test.cc b/src/tools/server_test.cc
index ff3295599..aaeb4115a 100644
--- a/src/tools/server_test.cc
+++ b/src/tools/server_test.cc
@@ -41,7 +41,6 @@
using std::cerr;
using std::cout;
using std::make_shared;
-using std::pair;
using std::shared_ptr;
using std::string;
using boost::optional;
@@ -50,6 +49,7 @@ using boost::bind;
using namespace boost::placeholders;
#endif
using dcp::ArrayData;
+using namespace dcpomatic;
static shared_ptr<Film> film;
diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h
index 0291b660f..70a0566bd 100644
--- a/src/wx/film_viewer.h
+++ b/src/wx/film_viewer.h
@@ -40,7 +40,6 @@ DCPOMATIC_ENABLE_WARNINGS
class wxToggleButton;
class FFmpegPlayer;
-class Image;
class RGBPlusAlphaImage;
class PlayerVideo;
class Player;
diff --git a/src/wx/gl_video_view.cc b/src/wx/gl_video_view.cc
index 0a8235537..8642b4cd9 100644
--- a/src/wx/gl_video_view.cc
+++ b/src/wx/gl_video_view.cc
@@ -64,6 +64,7 @@ using boost::optional;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
#endif
+using namespace dcpomatic;
static void
diff --git a/src/wx/gl_video_view.h b/src/wx/gl_video_view.h
index e64cb63db..57e682391 100644
--- a/src/wx/gl_video_view.h
+++ b/src/wx/gl_video_view.h
@@ -56,7 +56,7 @@ public:
Texture& operator= (Texture const&) = delete;
void bind ();
- void set (std::shared_ptr<const Image> image);
+ void set (std::shared_ptr<const dcpomatic::Image> image);
private:
GLuint _name;
diff --git a/src/wx/simple_video_view.h b/src/wx/simple_video_view.h
index cbb162023..ba7fc81f8 100644
--- a/src/wx/simple_video_view.h
+++ b/src/wx/simple_video_view.h
@@ -47,7 +47,7 @@ private:
void timer ();
wxPanel* _panel;
- std::shared_ptr<const Image> _image;
+ std::shared_ptr<const dcpomatic::Image> _image;
wxTimer _timer;
Position<int> _inter_position;
dcp::Size _inter_size;
diff --git a/src/wx/video_view.h b/src/wx/video_view.h
index 5353f213f..8fb26a521 100644
--- a/src/wx/video_view.h
+++ b/src/wx/video_view.h
@@ -33,7 +33,9 @@
#include <boost/thread.hpp>
-class Image;
+namespace dcpomatic {
+ class Image;
+}
class wxWindow;
class FilmViewer;
class Player;
diff --git a/src/wx/video_waveform_plot.cc b/src/wx/video_waveform_plot.cc
index 07b2955b3..37d411cb2 100644
--- a/src/wx/video_waveform_plot.cc
+++ b/src/wx/video_waveform_plot.cc
@@ -45,6 +45,7 @@ using std::weak_ptr;
using namespace boost::placeholders;
#endif
using dcp::locale_convert;
+using namespace dcpomatic;
int const VideoWaveformPlot::_vertical_margin = 8;
diff --git a/src/wx/video_waveform_plot.h b/src/wx/video_waveform_plot.h
index 36ec63d8a..dc35e54b4 100644
--- a/src/wx/video_waveform_plot.h
+++ b/src/wx/video_waveform_plot.h
@@ -31,7 +31,9 @@ namespace dcp {
}
class PlayerVideo;
-class Image;
+namespace dcpomatic {
+ class Image;
+}
class Film;
class FilmViewer;
@@ -61,7 +63,7 @@ private:
std::weak_ptr<const Film> _film;
std::shared_ptr<dcp::OpenJPEGImage> _image;
- std::shared_ptr<const Image> _waveform;
+ std::shared_ptr<const dcpomatic::Image> _waveform;
bool _dirty = true;
bool _enabled = false;
int _component = 0;
diff --git a/test/client_server_test.cc b/test/client_server_test.cc
index 7a99f7227..d6fe4b948 100644
--- a/test/client_server_test.cc
+++ b/test/client_server_test.cc
@@ -51,6 +51,7 @@ using std::weak_ptr;
using boost::thread;
using boost::optional;
using dcp::ArrayData;
+using namespace dcpomatic;
void
diff --git a/test/dcp_decoder_test.cc b/test/dcp_decoder_test.cc
index 66cd402c4..e9f7e8ef0 100644
--- a/test/dcp_decoder_test.cc
+++ b/test/dcp_decoder_test.cc
@@ -40,11 +40,10 @@
#include <iostream>
-using std::list;
using std::string;
using std::vector;
using std::make_shared;
-using std::shared_ptr;
+using namespace dcpomatic;
/* Check that DCPDecoder reuses old data when it should */
diff --git a/test/ffmpeg_audio_only_test.cc b/test/ffmpeg_audio_only_test.cc
index ea9a9c4e5..653c7dca1 100644
--- a/test/ffmpeg_audio_only_test.cc
+++ b/test/ffmpeg_audio_only_test.cc
@@ -45,6 +45,7 @@ using std::make_shared;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
#endif
+using namespace dcpomatic;
static SNDFILE* ref = nullptr;
diff --git a/test/ffmpeg_audio_test.cc b/test/ffmpeg_audio_test.cc
index 6bdadce97..7e6d4f493 100644
--- a/test/ffmpeg_audio_test.cc
+++ b/test/ffmpeg_audio_test.cc
@@ -47,6 +47,7 @@
using std::make_shared;
using std::string;
using std::shared_ptr;
+using namespace dcpomatic;
BOOST_AUTO_TEST_CASE (ffmpeg_audio_test)
diff --git a/test/image_test.cc b/test/image_test.cc
index 7369bd24f..84dc8adf7 100644
--- a/test/image_test.cc
+++ b/test/image_test.cc
@@ -40,6 +40,7 @@ using std::cout;
using std::list;
using std::make_shared;
using std::string;
+using namespace dcpomatic;
BOOST_AUTO_TEST_CASE (aligned_image_test)
diff --git a/test/low_bitrate_test.cc b/test/low_bitrate_test.cc
index 7050dd771..356013b2b 100644
--- a/test/low_bitrate_test.cc
+++ b/test/low_bitrate_test.cc
@@ -31,6 +31,7 @@ extern "C" {
using std::make_shared;
+using namespace dcpomatic;
BOOST_AUTO_TEST_CASE (low_bitrate_test)
diff --git a/test/overlap_video_test.cc b/test/overlap_video_test.cc
index 3c969921d..c9780ee1c 100644
--- a/test/overlap_video_test.cc
+++ b/test/overlap_video_test.cc
@@ -40,6 +40,7 @@
using std::dynamic_pointer_cast;
using std::make_shared;
+using namespace dcpomatic;
BOOST_AUTO_TEST_CASE (overlap_video_test1)
diff --git a/test/pixel_formats_test.cc b/test/pixel_formats_test.cc
index 12a95bd69..87faf0e36 100644
--- a/test/pixel_formats_test.cc
+++ b/test/pixel_formats_test.cc
@@ -39,6 +39,7 @@ extern "C" {
using std::list;
using std::cout;
+using namespace dcpomatic;
/** @struct Case
diff --git a/test/test.cc b/test/test.cc
index d1677a107..3b6f579c4 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -79,6 +79,7 @@ using std::dynamic_pointer_cast;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
#endif
+using namespace dcpomatic;
boost::filesystem::path
diff --git a/test/test.h b/test/test.h
index 2b01db294..c4baefe93 100644
--- a/test/test.h
+++ b/test/test.h
@@ -27,7 +27,9 @@
class Film;
-class Image;
+namespace dcpomatic {
+ class Image;
+}
class Log;
@@ -69,7 +71,7 @@ extern void check_xml (boost::filesystem::path, boost::filesystem::path, std::li
extern void check_ffmpeg (boost::filesystem::path, boost::filesystem::path, int audio_tolerance);
extern void check_image (boost::filesystem::path, boost::filesystem::path, double threshold = 4);
extern boost::filesystem::path test_film_dir (std::string);
-extern void write_image (std::shared_ptr<const Image> image, boost::filesystem::path file);
+extern void write_image (std::shared_ptr<const dcpomatic::Image> image, boost::filesystem::path file);
boost::filesystem::path dcp_file (std::shared_ptr<const Film> film, std::string prefix);
void check_one_frame (boost::filesystem::path dcp, int64_t index, boost::filesystem::path ref);
extern boost::filesystem::path subtitle_file (std::shared_ptr<Film> film);
diff --git a/test/video_level_test.cc b/test/video_level_test.cc
index ada9b602a..10d758784 100644
--- a/test/video_level_test.cc
+++ b/test/video_level_test.cc
@@ -53,17 +53,18 @@
#include <boost/test/unit_test.hpp>
-using std::min;
+using std::dynamic_pointer_cast;
+using std::make_shared;
using std::max;
+using std::min;
using std::pair;
+using std::shared_ptr;
using std::string;
-using std::dynamic_pointer_cast;
-using std::make_shared;
using boost::optional;
#if BOOST_VERSION >= 106100
using namespace boost::placeholders;
#endif
-using std::shared_ptr;
+using namespace dcpomatic;
static