Put Image into the dcpomatic namespace.
authorCarl Hetherington <cth@carlh.net>
Sun, 7 Nov 2021 02:03:29 +0000 (03:03 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 22 Nov 2021 22:59:43 +0000 (23:59 +0100)
44 files changed:
src/lib/bitmap_text.h
src/lib/butler.h
src/lib/content_text.h
src/lib/encoder.cc
src/lib/ffmpeg_decoder.h
src/lib/ffmpeg_file_encoder.h
src/lib/ffmpeg_image_proxy.cc
src/lib/ffmpeg_image_proxy.h
src/lib/filter_graph.h
src/lib/image.cc
src/lib/image.h
src/lib/image_examiner.cc
src/lib/image_proxy.h
src/lib/j2k_image_proxy.cc
src/lib/j2k_image_proxy.h
src/lib/player.h
src/lib/player_video.cc
src/lib/player_video.h
src/lib/position_image.h
src/lib/raw_image_proxy.cc
src/lib/raw_image_proxy.h
src/lib/text_decoder.h
src/lib/video_decoder.h
src/lib/video_filter_graph.cc
src/lib/video_filter_graph.h
src/tools/server_test.cc
src/wx/film_viewer.h
src/wx/gl_video_view.cc
src/wx/gl_video_view.h
src/wx/simple_video_view.h
src/wx/video_view.h
src/wx/video_waveform_plot.cc
src/wx/video_waveform_plot.h
test/client_server_test.cc
test/dcp_decoder_test.cc
test/ffmpeg_audio_only_test.cc
test/ffmpeg_audio_test.cc
test/image_test.cc
test/low_bitrate_test.cc
test/overlap_video_test.cc
test/pixel_formats_test.cc
test/test.cc
test/test.h
test/video_level_test.cc

index 46b6fd142ff541908d3e299a47632576cbb01e66..cadf97ec15b364b744ce996b258d0cd353c40587 100644 (file)
 #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.
index c7e71658da25889107d033147e62b16897f92f4d..80f5755dd77d48c3525130d860044a25950cdc4b 100644 (file)
@@ -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
index 5edb9af2083be0993339caefa876dc09e3627e7d..f0a3530e87afa7ded411e1d9978d2c6d2d8f0b40 100644 (file)
@@ -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)
        {}
index 1d688c31868d49450140e7381994f3431fe6bb5d..0053f80a6f212ac12c80235725301691b49fea6e 100644 (file)
@@ -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))
 {
 
 }
index 264733c70130dc57cef0a0d06a84be08ddba0d4b..4d5743225a2bb33308d2670716bb62c3cbdb9041 100644 (file)
@@ -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;
 };
index 9f3d88551266b26a184f03fa37f2d4f34e690e36..e609b26077abb3377652019a6b324436134c50c0 100644 (file)
@@ -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;
index 4b3c3084c7f2db4a71c529f88b23f8b7c1e1e7f6..97e7933b7223144aba957189506f32ae0bfee24e 100644 (file)
@@ -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)
index 48317ed75c7ae16d3d3d61c30e729a9ec9c4976c..08f75966498ca41691c4ca34bd648834165998e7 100644 (file)
@@ -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;
 };
index 9ee628d4cd097fa9b2bae97e08ac793986be4261..9dfa8fe56eb039fc6ded37f418a1012199aebbb2 100644 (file)
@@ -39,7 +39,6 @@ DCPOMATIC_ENABLE_WARNINGS
 
 struct AVFilterContext;
 struct AVFrame;
-class Image;
 class Filter;
 
 
index a4e04bb626d5a146e0cd0405aa94eec850feb5c7..ce6fe6f1a9f82f47391f4cac574111c0eea56f0e 100644 (file)
@@ -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;
index 128b546b5cc7ac2a511e592fe98ae388d36556dd..c5d069caab7b3226149d038fda226f001a54afd7 100644 (file)
@@ -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
index 562a7c557a60028f16c305d32305f8c6b9a9b611..bf6628cd544251e3aba0af2c6eab216a03d2ffb8 100644 (file)
@@ -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 ()) {
index a37be580fcf062fbb247e1d02285e532d49279da..17121c91fc7c2009500fadeab17442a3bf2f486a 100644 (file)
@@ -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;
 };
 
index 4eceafae33bb78d46ae68b43effa8a10daaebb04..8fe9c99a10542717481d0774a184da0e6df316a2 100644 (file)
@@ -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 */
index d925bef864fe9129fc59dd8246b4b305325ea55e..4dd7cf75b85fd5b03afbccf45d3d03ccec975fb3 100644 (file)
@@ -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;
index 14fb8d0ee06b50d495268411b827b283ca8fabfa..20a97c8965e13b5bbee217eb000043df89c74151 100644 (file)
@@ -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;
index 4cc536bb7530583639e14e3ff7c6270549daf947..f4def7cfbd95ecece069321d1f22e3eff617d3ec 100644 (file)
@@ -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);
index 237d2e3fe2858083d6a6d165dd0ac63999fee693..0d5a1a820f467b0a1c30af2acf6a27e8c701ac94 100644 (file)
@@ -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 */
index ee352647ca83826e0e359d857ad2928a9d96ea4b..81b54fd6302eaaf7cbd84420faa196709a1ab774 100644 (file)
@@ -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;
index fb0d16df8a5b6cc29cef87a5054d85ccdc8dec5e..68ea1d88b23f4c7fa8dcab8599f91d03eb798afd 100644 (file)
@@ -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)
index c9885654bd3ae3e830c7a6f635d25d205999f8d8..63f2d834c66a496ec24bd86f074182cac5ab633e 100644 (file)
 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;
 };
 
 
index d1355afb02c4b7eaf135917e5dccc487641d7947..d0cadf6759b784b143a3a44e51d403d46fd80e83 100644 (file)
@@ -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);
index 9d69f743a33d6c08d3efae5af36329a4278cb709..e8c949b9f884cfbb1fd19a6b65e570b41b9b6299 100644 (file)
@@ -38,7 +38,6 @@
 
 class VideoContent;
 class ImageProxy;
-class Image;
 class Log;
 class FrameIntervalChecker;
 
index 0c7e23b050b2e2b0fe6b98940616df0c83a62529..fb6b692d1ed9e4a3b97fe198195c5673c312a48f 100644 (file)
@@ -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)
index d887e551bda8e586b5bcedd67137048b0ca6a019..a8b4546fdad055e4a9884ae19c6d2a01cfe9a9d4 100644 (file)
@@ -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;
index ff3295599da1ca4e905cd922cbfd4b18d49d1dcc..aaeb4115a7e35f78e3819ddde4e379214705687d 100644 (file)
@@ -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;
index 0291b660fa403ea0e57359dc286216d5143be7f0..70a0566bda60d5b4d053bff7c8c169ed2efe96c0 100644 (file)
@@ -40,7 +40,6 @@ DCPOMATIC_ENABLE_WARNINGS
 
 class wxToggleButton;
 class FFmpegPlayer;
-class Image;
 class RGBPlusAlphaImage;
 class PlayerVideo;
 class Player;
index 0a82355373e60d78a6474170dc03b47ac2207709..8642b4cd9b038de7899f294fdf12f79fbe05f2cd 100644 (file)
@@ -64,6 +64,7 @@ using boost::optional;
 #if BOOST_VERSION >= 106100
 using namespace boost::placeholders;
 #endif
+using namespace dcpomatic;
 
 
 static void
index e64cb63db642e445daae664944ccb0cfeb3427de..57e6823911a79f7e8e77f08df03582bc12716511 100644 (file)
@@ -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;
index cbb162023c29e402bb0561b0570a62cc0b8a38b7..ba7fc81f82e26b28a32b2e41e87bedeb8cfc9fb8 100644 (file)
@@ -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;
index 5353f213f8803e3e2a9865c6a0567610edf51fc9..8fb26a521f3c57c8e9d46e28e75c4a0d691ec839 100644 (file)
@@ -33,7 +33,9 @@
 #include <boost/thread.hpp>
 
 
-class Image;
+namespace dcpomatic {
+       class Image;
+}
 class wxWindow;
 class FilmViewer;
 class Player;
index 07b2955b37d6d4da579ee227b1fa8bd5178b3aa1..37d411cb2c62da1965fd986d9acca4dd8f2eca1e 100644 (file)
@@ -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;
index 36ec63d8a55bbe6b9d10052e7ec3630dd84c267e..dc35e54b4dd8f5b83137fbd55a6798f3d1843d4e 100644 (file)
@@ -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;
index 7a99f72274758a1bace8f1e9f637fe7e1c61d502..d6fe4b94841546b98b140253416a0d12eb001366 100644 (file)
@@ -51,6 +51,7 @@ using std::weak_ptr;
 using boost::thread;
 using boost::optional;
 using dcp::ArrayData;
+using namespace dcpomatic;
 
 
 void
index 66cd402c487e415d1a167532048621b40ab3e8e3..e9f7e8ef06a086859f5f028ae4d600787c2a6649 100644 (file)
 #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 */
index ea9a9c4e54161d18c12616579ad06fcdacd63c52..653c7dca1ed259f098a44781c9366e1a31c1a7c3 100644 (file)
@@ -45,6 +45,7 @@ using std::make_shared;
 #if BOOST_VERSION >= 106100
 using namespace boost::placeholders;
 #endif
+using namespace dcpomatic;
 
 
 static SNDFILE* ref = nullptr;
index 6bdadce97e1027b6211c042fbd0a9571bd2ed7a3..7e6d4f4936d8f0fc597faef9172dfbcc39a54adf 100644 (file)
@@ -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)
index 7369bd24feac9ec03e4a21d2fb86aaa8bef7389d..84dc8adf7e62d4d1d4a1f74c73bbaeeb79baaac6 100644 (file)
@@ -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)
index 7050dd771acc6dd74dd8a57f0e30b8d177010470..356013b2be9ce2ec45478afd4d21b5045f91ee9a 100644 (file)
@@ -31,6 +31,7 @@ extern "C" {
 
 
 using std::make_shared;
+using namespace dcpomatic;
 
 
 BOOST_AUTO_TEST_CASE (low_bitrate_test)
index 3c969921d8045dc956cc2e25369e28d2f89e181b..c9780ee1c5596ae3eabf2ef4a40ea28a9d542f75 100644 (file)
@@ -40,6 +40,7 @@
 
 using std::dynamic_pointer_cast;
 using std::make_shared;
+using namespace dcpomatic;
 
 
 BOOST_AUTO_TEST_CASE (overlap_video_test1)
index 12a95bd6939b11d751edc6dd8c4e565a0f05d3bf..87faf0e36daf98410f3c6db1ba6ef41889fe8ffe 100644 (file)
@@ -39,6 +39,7 @@ extern "C" {
 
 using std::list;
 using std::cout;
+using namespace dcpomatic;
 
 
 /** @struct Case
index d1677a107cf4f25af2f6f33e9a9d05374778dfc1..3b6f579c47e0919aff5b3245a776aa10ef250300 100644 (file)
@@ -79,6 +79,7 @@ using std::dynamic_pointer_cast;
 #if BOOST_VERSION >= 106100
 using namespace boost::placeholders;
 #endif
+using namespace dcpomatic;
 
 
 boost::filesystem::path
index 2b01db294286743dbca0a2631ff72c6f8174be5a..c4baefe93f6722b4a5e03b13cfc9e477fbbc7572 100644 (file)
@@ -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);
index ada9b602a3089ac5bfdc47e5f736ae1e5b374017..10d7587843b7f63826f3c7767fa38866505c59ec 100644 (file)
 #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