From bbee721034df747169f7d75ef142e57a8a8ed646 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 12 Jan 2020 23:29:27 +0100 Subject: Tidy up some unused stuff. --- src/lib/player.cc | 2 -- src/lib/player_video.cc | 18 ++---------------- src/lib/player_video.h | 11 +---------- src/wx/video_view.cc | 5 +---- test/client_server_test.cc | 4 ---- 5 files changed, 4 insertions(+), 36 deletions(-) diff --git a/src/lib/player.cc b/src/lib/player.cc index 98481b77a..3de871e92 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -344,7 +344,6 @@ Player::black_player_video_frame (Eyes eyes) const PART_WHOLE, PresetColourConversion::all().front().conversion, VIDEO_RANGE_FULL, - boost::weak_ptr(), optional(), _film->video_frame_rate() ) @@ -802,7 +801,6 @@ Player::video (weak_ptr wp, ContentVideo video) video.part, piece->content->video->colour_conversion(), piece->content->video->range(), - piece->content, time, _film->video_frame_rate() ) diff --git a/src/lib/player_video.cc b/src/lib/player_video.cc index ca0845d2b..31038db03 100644 --- a/src/lib/player_video.cc +++ b/src/lib/player_video.cc @@ -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 colour_conversion, VideoRange video_range, - weak_ptr content, optional 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.lock(); - if (!content) { - return false; - } - boost::mutex::scoped_lock lm (_mutex); _out_size = video_container_size; _image_dirty = true; - - return true; } diff --git a/src/lib/player_video.h b/src/lib/player_video.h index 6cb8a3140..19cf2fb39 100644 --- a/src/lib/player_video.h +++ b/src/lib/player_video.h @@ -56,7 +56,6 @@ public: Part, boost::optional, VideoRange video_range, - boost::weak_ptr, boost::optional, int video_frame_rate ); @@ -76,7 +75,7 @@ public: void add_metadata (xmlpp::Node* node) const; void send_binary (boost::shared_ptr 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 () const { - return _content; - } - private: void make_image (boost::function pixel_format, bool aligned, bool fast) const; @@ -122,10 +117,6 @@ private: boost::optional _colour_conversion; VideoRange _video_range; std::list _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; boost::optional _time; int _video_frame_rate; diff --git a/src/wx/video_view.cc b/src/wx/video_view.cc index 657b68cf6..e9a02004b 100644 --- a/src/wx/video_view.cc +++ b/src/wx/video_view.cc @@ -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; } diff --git a/test/client_server_test.cc b/test/client_server_test.cc index 41f7997ee..afa67b81f 100644 --- a/test/client_server_test.cc +++ b/test/client_server_test.cc @@ -98,7 +98,6 @@ BOOST_AUTO_TEST_CASE (client_server_test_rgb) PART_WHOLE, ColourConversion(), VIDEO_RANGE_FULL, - weak_ptr(), optional(), 24 ) @@ -188,7 +187,6 @@ BOOST_AUTO_TEST_CASE (client_server_test_yuv) PART_WHOLE, ColourConversion(), VIDEO_RANGE_FULL, - weak_ptr(), boost::optional(), 24 ) @@ -265,7 +263,6 @@ BOOST_AUTO_TEST_CASE (client_server_test_j2k) PART_WHOLE, ColourConversion(), VIDEO_RANGE_FULL, - weak_ptr(), boost::optional(), 24 ) @@ -294,7 +291,6 @@ BOOST_AUTO_TEST_CASE (client_server_test_j2k) PART_WHOLE, PresetColourConversion::all().front().conversion, VIDEO_RANGE_FULL, - weak_ptr(), boost::optional(), 24 ) -- cgit v1.2.3