Remove some unused parameters.
authorCarl Hetherington <cth@carlh.net>
Tue, 6 Nov 2018 22:25:48 +0000 (22:25 +0000)
committerCarl Hetherington <cth@carlh.net>
Tue, 6 Nov 2018 22:25:48 +0000 (22:25 +0000)
14 files changed:
src/lib/dcp_video.cc
src/lib/ffmpeg_file_encoder.cc
src/lib/ffmpeg_image_proxy.cc
src/lib/ffmpeg_image_proxy.h
src/lib/image_proxy.h
src/lib/j2k_image_proxy.cc
src/lib/j2k_image_proxy.h
src/lib/player_video.cc
src/lib/player_video.h
src/lib/raw_image_proxy.cc
src/lib/raw_image_proxy.h
src/wx/film_viewer.cc
test/dcp_playback_test.cc
test/player_test.cc

index 655c373..31d1661 100644 (file)
@@ -99,7 +99,7 @@ DCPVideo::convert_to_xyz (shared_ptr<const PlayerVideo> frame, dcp::NoteHandler
 {
        shared_ptr<dcp::OpenJPEGImage> xyz;
 
-       shared_ptr<Image> image = frame->image (note, bind (&PlayerVideo::keep_xyz_or_rgb, _1), true, false);
+       shared_ptr<Image> image = frame->image (bind (&PlayerVideo::keep_xyz_or_rgb, _1), true, false);
        if (frame->colour_conversion()) {
                xyz = dcp::rgb_to_xyz (
                        image->data()[0],
index 99c974d..52977ad 100644 (file)
@@ -230,7 +230,6 @@ void
 FFmpegFileEncoder::video (shared_ptr<PlayerVideo> video, DCPTime time)
 {
        shared_ptr<Image> image = video->image (
-               boost::optional<dcp::NoteHandler>(bind(&Log::dcp_log, _log.get(), _1, _2)),
                bind (&force_pixel_format, _1, _pixel_format),
                true,
                false
index c83bebc..e38b80b 100644 (file)
@@ -110,7 +110,7 @@ FFmpegImageProxy::avio_seek (int64_t const pos, int whence)
 }
 
 pair<shared_ptr<Image>, int>
-FFmpegImageProxy::image (optional<dcp::NoteHandler>, optional<dcp::Size>) const
+FFmpegImageProxy::image (optional<dcp::Size>) const
 {
        boost::mutex::scoped_lock lm (_mutex);
 
index 0fa8774..5f9b3b1 100644 (file)
@@ -31,7 +31,6 @@ public:
        FFmpegImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket);
 
        std::pair<boost::shared_ptr<Image>, int> image (
-               boost::optional<dcp::NoteHandler> note = boost::optional<dcp::NoteHandler> (),
                boost::optional<dcp::Size> size = boost::optional<dcp::Size> ()
                ) const;
 
index be053ee..b6fe877 100644 (file)
@@ -60,7 +60,7 @@ class ImageProxy : public boost::noncopyable
 public:
        virtual ~ImageProxy () {}
 
-       /** @param note Handler for any notes that occur.
+       /** @param log Log to write to, or 0.
         *  @param size Size that the returned image will be scaled to, in case this
         *  can be used as an optimisation.
         *  @return Image (which must be aligned) and log2 of any scaling down that has
@@ -68,7 +68,6 @@ public:
         *  of the original, the second part of the return value will be 1.
         */
        virtual std::pair<boost::shared_ptr<Image>, int> image (
-               boost::optional<dcp::NoteHandler> note = boost::optional<dcp::NoteHandler> (),
                boost::optional<dcp::Size> size = boost::optional<dcp::Size> ()
                ) const = 0;
 
index 6989439..9893d65 100644 (file)
@@ -169,7 +169,7 @@ J2KImageProxy::prepare (optional<dcp::Size> target_size) const
 }
 
 pair<shared_ptr<Image>, int>
-J2KImageProxy::image (optional<dcp::NoteHandler>, optional<dcp::Size> target_size) const
+J2KImageProxy::image (optional<dcp::Size> target_size) const
 {
        int const r = prepare (target_size);
        /* I think this is safe without a lock on mutex.  _image is guaranteed to be
index 8e9a0fa..510c0ff 100644 (file)
@@ -51,7 +51,6 @@ public:
        J2KImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket);
 
        std::pair<boost::shared_ptr<Image>, int> image (
-               boost::optional<dcp::NoteHandler> note = boost::optional<dcp::NoteHandler> (),
                boost::optional<dcp::Size> size = boost::optional<dcp::Size> ()
                ) const;
 
index ec8dd16..376ace1 100644 (file)
@@ -103,7 +103,6 @@ PlayerVideo::set_text (PositionImage image)
 }
 
 /** Create an image for this frame.
- *  @param note Handler for any notes that are made during the process.
  *  @param pixel_format Function which is called to decide what pixel format the output image should be;
  *  it is passed the pixel format of the input image from the ImageProxy, and should return the desired
  *  output pixel format.  Two functions always_rgb and keep_xyz_or_rgb are provided for use here.
@@ -111,9 +110,9 @@ PlayerVideo::set_text (PositionImage image)
  *  @param fast true to be fast at the expense of quality.
  */
 shared_ptr<Image>
-PlayerVideo::image (optional<dcp::NoteHandler> note, function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const
+PlayerVideo::image (function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const
 {
-       pair<shared_ptr<Image>, int> prox = _in->image (optional<dcp::NoteHandler> (note), _inter_size);
+       pair<shared_ptr<Image>, int> prox = _in->image (_inter_size);
        shared_ptr<Image> im = prox.first;
        int const reduce = prox.second;
 
index 55a3566..6599eea 100644 (file)
@@ -63,7 +63,7 @@ public:
        void set_text (PositionImage);
 
        void prepare ();
-       boost::shared_ptr<Image> image (boost::optional<dcp::NoteHandler> note, boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
+       boost::shared_ptr<Image> image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
 
        static AVPixelFormat always_rgb (AVPixelFormat);
        static AVPixelFormat keep_xyz_or_rgb (AVPixelFormat);
index 084f515..21201fa 100644 (file)
@@ -55,7 +55,7 @@ RawImageProxy::RawImageProxy (shared_ptr<cxml::Node> xml, shared_ptr<Socket> soc
 }
 
 pair<shared_ptr<Image>, int>
-RawImageProxy::image (optional<dcp::NoteHandler>, optional<dcp::Size>) const
+RawImageProxy::image (optional<dcp::Size>) const
 {
        return make_pair (_image, 0);
 }
index 5711b54..dcd107a 100644 (file)
@@ -30,7 +30,6 @@ public:
        RawImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket);
 
        std::pair<boost::shared_ptr<Image>, int> image (
-               boost::optional<dcp::NoteHandler> note = boost::optional<dcp::NoteHandler> (),
                boost::optional<dcp::Size> size = boost::optional<dcp::Size> ()
                ) const;
 
index f8707f9..0a72b5a 100644 (file)
@@ -272,7 +272,6 @@ FilmViewer::display_player_video ()
         */
 
        _frame = _player_video.first->image (
-               optional<dcp::NoteHandler>(bind(&Log::dcp_log, _film->log().get(), _1, _2)),
                bind (&PlayerVideo::always_rgb, _1),
                false, true
                );
index 4307fb4..6099716 100644 (file)
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE (dcp_playback_test)
                }
                /* assuming DCP is 24fps/48kHz */
                butler->get_audio (audio_buffer, 2000);
-               p.first->image(optional<dcp::NoteHandler>(), bind(&PlayerVideo::always_rgb, _1), false, true);
+               p.first->image(bind(&PlayerVideo::always_rgb, _1), false, true);
        }
        delete[] audio_buffer;
 }
index 60b5deb..9351d3d 100644 (file)
@@ -194,12 +194,6 @@ BOOST_AUTO_TEST_CASE (player_interleave_test)
        }
 }
 
-static void
-note_handler (dcp::NoteType, std::string)
-{
-
-}
-
 /** Test some seeks towards the start of a DCP with awkward subtitles; see mantis #1085
  *  and a number of others.  I thought this was a player seek bug but in fact it was
  *  caused by the subtitle starting just after the start of the video frame and hence
@@ -226,7 +220,7 @@ BOOST_AUTO_TEST_CASE (player_seek_test)
                butler->seek (t, true);
                pair<shared_ptr<PlayerVideo>, DCPTime> video = butler->get_video();
                BOOST_CHECK_EQUAL(video.second.get(), t.get());
-               write_image(video.first->image(optional<dcp::NoteHandler>(note_handler), PlayerVideo::always_rgb, false, true), String::compose("build/test/player_seek_test_%1.png", i), "RGB");
+               write_image(video.first->image(PlayerVideo::always_rgb, false, true), String::compose("build/test/player_seek_test_%1.png", i), "RGB");
                /* This 0.011 is empirically chosen (hopefully) to accept changes in rendering between the reference and a test machine
                   (17.10 and 16.04 seem to anti-alias a little differently) but to reject gross errors e.g. missing fonts or missing
                   text altogether.
@@ -259,7 +253,7 @@ BOOST_AUTO_TEST_CASE (player_seek_test2)
                butler->seek (t, true);
                pair<shared_ptr<PlayerVideo>, DCPTime> video = butler->get_video();
                BOOST_CHECK_EQUAL(video.second.get(), t.get());
-               write_image(video.first->image(optional<dcp::NoteHandler>(note_handler), PlayerVideo::always_rgb, false, true), String::compose("build/test/player_seek_test2_%1.png", i), "RGB");
+               write_image(video.first->image(PlayerVideo::always_rgb, false, true), String::compose("build/test/player_seek_test2_%1.png", i), "RGB");
                check_image(String::compose("test/data/player_seek_test2_%1.png", i), String::compose("build/test/player_seek_test2_%1.png", i), 0.011);
        }
 }