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 655c373822ea750aedda3669a52fcccec4db913c..31d1661947b80527d5a51f825b10f5ae6abf2f40 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 99c974d3ea049dbcdd841e38a0407c6cb9d49e75..52977ad5bb6b12fd02cdc27eabd8c745d41267ab 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 c83bebcb54b63a1ec17e842f83c23841c2deb7ec..e38b80be1942085d9160891a29edff428fd3425a 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 0fa8774b85390aa91781191ac9fa1695c59bfde5..5f9b3b1313935d6fcfbd754f2f4f7a7d80eedb05 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 be053eed51392810abf1462e8b96f1203d2a6a77..b6fe877321ecc06d460faf283522997d4a22c8dc 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 698943922a204920930ac8d8d04ec3fa5fa495e3..9893d65a63f2538e78b7f34c6a5f2d82ae50f6e1 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 8e9a0fa99bff546a622bca8bee6fcc03dd4d6b13..510c0ff2599a2143abbcdf8595d2f31e4f66660b 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 ec8dd16d49f4a5b27ad6e3344853e0b716422f52..376ace12818b971a1260262ee9c58243e3fc07ca 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 55a3566f0ae8e4e3e9449858a2f94c300581b380..6599eeaa0b4489e110562337934de8ebc8180355 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 084f515ed5f6a9dd2b77da56b0b0bd102561098d..21201faa69264826db4129b7db3eaccb931e10c1 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 5711b54f2f9f362a0ec9a178994d3010af0269e5..dcd107a9ebc4f9255c226228681d25a41bcc029c 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 f8707f9b2b5c6426de57a3c5d00a32ceb74ace3c..0a72b5a1da568d43a06c0a27dc25d2d92e8d60d4 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 4307fb413541fe424ea4ec19640da5065088e533..609971657844261b57831b68fec036257039f520 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 60b5debffa3d9e70f151271b2a929a4e365a1e48..9351d3dd3684b29194cea3dcef0812bdc61a564e 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);
        }
 }