Remove unused VideoContentProperty::SCALE and listen to CUSTOM_{RATIO,SIZE} instead.
authorCarl Hetherington <cth@carlh.net>
Sun, 19 Sep 2021 20:19:38 +0000 (22:19 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 19 Sep 2021 21:00:22 +0000 (23:00 +0200)
::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
src/lib/video_content.h
src/wx/dcp_panel.cc
src/wx/film_viewer.cc
src/wx/video_panel.cc

index 5686a0a6ff7f2a14f31a1a109fb32345131264ed..655b8baf6aa861af5c947eaed8b2e2ce6580c2ed 100644 (file)
@@ -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<VideoExaminer> 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);
index c1e1dbeec5b05345f96730b56bd6871da6c4dead..0c46499547c3245b0ad410dd4a1ea2b0b16708c7 100644 (file)
@@ -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;
index 78f5fc526682a94141abc0d5529784e91cfefd2a..61dfd7507d4c2ddcd47d63413ab7a495a36efbba 100644 (file)
@@ -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 ||
index 17649d450e16e8b650f5bef2b1de5d21554a06ee..c7e154fa53597bf340bb4337cc32af6174bb8159 100644 (file)
@@ -418,7 +418,8 @@ FilmViewer::player_change (vector<int> 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 ||
index 07a929e1096c6429fd86a06cd67fe6d77bbbccb7..c7330ef5942565c611ae14fb6457295a7f5739f9 100644 (file)
@@ -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<optional<ColourConversion>> check;