diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-01-12 23:29:27 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-01-12 23:29:27 +0100 |
| commit | bbee721034df747169f7d75ef142e57a8a8ed646 (patch) | |
| tree | f98806d5af105a91ba70ed325e41b9f45264ff54 | |
| parent | f72643323ba9008ca8795f8dd5ca68d472ddbf8e (diff) | |
Tidy up some unused stuff.
| -rw-r--r-- | src/lib/player.cc | 2 | ||||
| -rw-r--r-- | src/lib/player_video.cc | 18 | ||||
| -rw-r--r-- | src/lib/player_video.h | 11 | ||||
| -rw-r--r-- | src/wx/video_view.cc | 5 | ||||
| -rw-r--r-- | 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<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() ) 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<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; } 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<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; 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<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 ) |
