Tidy up some unused stuff.
authorCarl Hetherington <cth@carlh.net>
Sun, 12 Jan 2020 22:29:27 +0000 (23:29 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 12 Jan 2020 22:29:27 +0000 (23:29 +0100)
src/lib/player.cc
src/lib/player_video.cc
src/lib/player_video.h
src/wx/video_view.cc
test/client_server_test.cc

index 98481b77a0df4f15c0474d9c1939445cdd262d25..3de871e9222a36c399db287a1417fa78ca897861 100644 (file)
@@ -344,7 +344,6 @@ Player::black_player_video_frame (Eyes eyes) const
                        PART_WHOLE,
                        PresetColourConversion::all().front().conversion,
                        VIDEO_RANGE_FULL,
-                       boost::weak_ptr<Content>(),
                        optional<dcpomatic::DCPTime>(),
                        _film->video_frame_rate()
                )
@@ -802,7 +801,6 @@ Player::video (weak_ptr<Piece> wp, ContentVideo video)
                        video.part,
                        piece->content->video->colour_conversion(),
                        piece->content->video->range(),
-                       piece->content,
                        time,
                        _film->video_frame_rate()
                        )
index ca0845d2b4b7ee613b5d0ed3f44eba8c82b9fdc6..31038db03c5e445e854a8dda724739ab42dfbf91 100644 (file)
@@ -19,8 +19,6 @@
 */
 
 #include "player_video.h"
-#include "content.h"
-#include "video_content.h"
 #include "image.h"
 #include "image_proxy.h"
 #include "j2k_image_proxy.h"
@@ -55,7 +53,6 @@ PlayerVideo::PlayerVideo (
        Part part,
        optional<ColourConversion> colour_conversion,
        VideoRange video_range,
-       weak_ptr<Content> content,
        optional<dcpomatic::DCPTime> time,
        int video_frame_rate
        )
@@ -68,7 +65,6 @@ PlayerVideo::PlayerVideo (
        , _part (part)
        , _colour_conversion (colour_conversion)
        , _video_range (video_range)
-       , _content (content)
        , _time (time)
        , _video_frame_rate (video_frame_rate)
 {
@@ -351,27 +347,17 @@ PlayerVideo::shallow_copy () const
                        _part,
                        _colour_conversion,
                        _video_range,
-                       _content,
                        _time,
                        _video_frame_rate
                        )
                );
 }
 
-/** Re-read crop, fade, inter/out size, colour conversion and video range from our content.
- *  @return true if this was possible, false if not.
- */
-bool
+/** Mark our image as dirty to say it needs to be re-made */
+void
 PlayerVideo::reset_metadata (dcp::Size video_container_size)
 {
-       shared_ptr<Content> content = _content.lock();
-       if (!content) {
-               return false;
-       }
-
        boost::mutex::scoped_lock lm (_mutex);
        _out_size = video_container_size;
        _image_dirty = true;
-
-       return true;
 }
index 6cb8a31408ef9abe10f6d7563032edcf9e7e2a19..19cf2fb39f9d62f52ceaf4d1cd6fbdcdcd11b879 100644 (file)
@@ -56,7 +56,6 @@ public:
                Part,
                boost::optional<ColourConversion>,
                VideoRange video_range,
-               boost::weak_ptr<Content>,
                boost::optional<dcpomatic::DCPTime>,
                int video_frame_rate
                );
@@ -76,7 +75,7 @@ public:
        void add_metadata (xmlpp::Node* node) const;
        void send_binary (boost::shared_ptr<Socket> socket) const;
 
-       bool reset_metadata (dcp::Size video_container_size);
+       void reset_metadata (dcp::Size video_container_size);
 
        bool has_j2k () const;
        dcp::Data j2k () const;
@@ -105,10 +104,6 @@ public:
 
        size_t memory_used () const;
 
-       boost::weak_ptr<Content> content () const {
-               return _content;
-       }
-
 private:
        void make_image (boost::function<AVPixelFormat (AVPixelFormat)> pixel_format, bool aligned, bool fast) const;
 
@@ -122,10 +117,6 @@ private:
        boost::optional<ColourConversion> _colour_conversion;
        VideoRange _video_range;
        std::list<PlayerText> _text;
-       /** Content that we came from.  This is so that reset_metadata() can work, and also
-        *  for variant:swaroop's non-skippable ads.
-        */
-       boost::weak_ptr<Content> _content;
        boost::optional<dcpomatic::DCPTime> _time;
        int _video_frame_rate;
 
index 657b68cf642e05e64144d937f22c03515d0d6518..e9a02004be6243aee88808e25b25b92c240ba6a6 100644 (file)
@@ -124,10 +124,7 @@ VideoView::refresh_metadata (dcp::Size video_container_size)
                return false;
        }
 
-       if (!pv.first->reset_metadata (video_container_size)) {
-               return false;
-       }
-
+       pv.first->reset_metadata (video_container_size);
        update ();
        return true;
 }
index 41f7997eeba5aff9ef82fac631e3b9779375456d..afa67b81f58ab653da8e674bd5f641cec5c1c4f1 100644 (file)
@@ -98,7 +98,6 @@ BOOST_AUTO_TEST_CASE (client_server_test_rgb)
                        PART_WHOLE,
                        ColourConversion(),
                        VIDEO_RANGE_FULL,
-                       weak_ptr<Content>(),
                        optional<dcpomatic::DCPTime>(),
                        24
                        )
@@ -188,7 +187,6 @@ BOOST_AUTO_TEST_CASE (client_server_test_yuv)
                        PART_WHOLE,
                        ColourConversion(),
                        VIDEO_RANGE_FULL,
-                       weak_ptr<Content>(),
                        boost::optional<dcpomatic::DCPTime>(),
                        24
                        )
@@ -265,7 +263,6 @@ BOOST_AUTO_TEST_CASE (client_server_test_j2k)
                        PART_WHOLE,
                        ColourConversion(),
                        VIDEO_RANGE_FULL,
-                       weak_ptr<Content>(),
                        boost::optional<dcpomatic::DCPTime>(),
                        24
                        )
@@ -294,7 +291,6 @@ BOOST_AUTO_TEST_CASE (client_server_test_j2k)
                        PART_WHOLE,
                        PresetColourConversion::all().front().conversion,
                        VIDEO_RANGE_FULL,
-                       weak_ptr<Content>(),
                        boost::optional<dcpomatic::DCPTime>(),
                        24
                        )