From 8a3d5a7729e10a901132ff00efbd5d80e38b2455 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 19 Sep 2021 22:19:38 +0200 Subject: [PATCH] Remove unused VideoContentProperty::SCALE and listen to CUSTOM_{RATIO,SIZE} instead. ::SCALE was sort-of being used, as it was emitted during examination of video content, but it wasn't being emitted anywhere else (and CUSTOM_{RATIO,SIZE} replace its functionality as far as I can see). --- src/lib/video_content.cc | 20 +++++++++----------- src/lib/video_content.h | 1 - src/wx/dcp_panel.cc | 3 ++- src/wx/film_viewer.cc | 3 ++- src/wx/video_panel.cc | 3 ++- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc index 5686a0a6f..655b8baf6 100644 --- a/src/lib/video_content.cc +++ b/src/lib/video_content.cc @@ -43,14 +43,13 @@ int const VideoContentProperty::USE = 0; int const VideoContentProperty::SIZE = 1; int const VideoContentProperty::FRAME_TYPE = 2; int const VideoContentProperty::CROP = 3; -int const VideoContentProperty::SCALE = 4; -int const VideoContentProperty::COLOUR_CONVERSION = 5; -int const VideoContentProperty::FADE_IN = 6; -int const VideoContentProperty::FADE_OUT = 7; -int const VideoContentProperty::RANGE = 8; -int const VideoContentProperty::CUSTOM_RATIO = 9; -int const VideoContentProperty::CUSTOM_SIZE = 10; -int const VideoContentProperty::BURNT_SUBTITLE_LANGUAGE = 11; +int const VideoContentProperty::COLOUR_CONVERSION = 4; +int const VideoContentProperty::FADE_IN = 5; +int const VideoContentProperty::FADE_OUT = 6; +int const VideoContentProperty::RANGE = 7; +int const VideoContentProperty::CUSTOM_RATIO = 8; +int const VideoContentProperty::CUSTOM_SIZE = 9; +int const VideoContentProperty::BURNT_SUBTITLE_LANGUAGE = 10; using std::string; using std::setprecision; @@ -302,9 +301,8 @@ VideoContent::take_from_examiner (shared_ptr d) auto const range = d->range (); ContentChangeSignaller cc1 (_parent, VideoContentProperty::SIZE); - ContentChangeSignaller cc2 (_parent, VideoContentProperty::SCALE); - ContentChangeSignaller cc3 (_parent, ContentProperty::LENGTH); - ContentChangeSignaller cc4 (_parent, VideoContentProperty::RANGE); + ContentChangeSignaller cc2 (_parent, ContentProperty::LENGTH); + ContentChangeSignaller cc3 (_parent, VideoContentProperty::RANGE); { boost::mutex::scoped_lock lm (_mutex); diff --git a/src/lib/video_content.h b/src/lib/video_content.h index c1e1dbeec..0c4649954 100644 --- a/src/lib/video_content.h +++ b/src/lib/video_content.h @@ -45,7 +45,6 @@ public: static int const SIZE; static int const FRAME_TYPE; static int const CROP; - static int const SCALE; static int const COLOUR_CONVERSION; static int const FADE_IN; static int const FADE_OUT; diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc index 78f5fc526..61dfd7507 100644 --- a/src/wx/dcp_panel.cc +++ b/src/wx/dcp_panel.cc @@ -506,7 +506,8 @@ DCPPanel::film_content_changed (int property) property == TextContentProperty::BURN || property == TextContentProperty::LANGUAGE || property == TextContentProperty::LANGUAGE_IS_ADDITIONAL || - property == VideoContentProperty::SCALE || + property == VideoContentProperty::CUSTOM_RATIO || + property == VideoContentProperty::CUSTOM_SIZE || property == VideoContentProperty::BURNT_SUBTITLE_LANGUAGE || property == VideoContentProperty::CROP || property == DCPContentProperty::REFERENCE_VIDEO || diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index 17649d450..c7e154fa5 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -418,7 +418,8 @@ FilmViewer::player_change (vector properties) for (auto i: properties) { if ( i == VideoContentProperty::CROP || - i == VideoContentProperty::SCALE || + i == VideoContentProperty::CUSTOM_RATIO || + i == VideoContentProperty::CUSTOM_SIZE || i == VideoContentProperty::FADE_IN || i == VideoContentProperty::FADE_OUT || i == VideoContentProperty::COLOUR_CONVERSION || diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc index 07a929e10..c7330ef59 100644 --- a/src/wx/video_panel.cc +++ b/src/wx/video_panel.cc @@ -384,7 +384,8 @@ VideoPanel::film_content_changed (int property) if (property == ContentProperty::VIDEO_FRAME_RATE || property == VideoContentProperty::FRAME_TYPE || property == VideoContentProperty::CROP || - property == VideoContentProperty::SCALE) { + property == VideoContentProperty::CUSTOM_RATIO || + property == VideoContentProperty::CUSTOM_SIZE) { setup_description (); } else if (property == VideoContentProperty::COLOUR_CONVERSION) { boost::unordered_set> check; -- 2.30.2