diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-08-08 18:11:11 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-08-09 10:18:46 +0200 |
| commit | a3c1ae7c2e46b65347341896b3d1a505ff92632b (patch) | |
| tree | 2b096eb0676f52c9989952e341f2bd98143ce125 /src/wx | |
| parent | af5b9dfadf8989311cd5f78554349f0283912522 (diff) | |
Extract Film::Property to its own header to (maybe) increase compilation speed.
Diffstat (limited to 'src/wx')
36 files changed, 185 insertions, 167 deletions
diff --git a/src/wx/audio_dialog.cc b/src/wx/audio_dialog.cc index 4cd308ab1..88377b4e4 100644 --- a/src/wx/audio_dialog.cc +++ b/src/wx/audio_dialog.cc @@ -320,13 +320,13 @@ AudioDialog::channel_clicked (wxCommandEvent& ev) } void -AudioDialog::film_change (ChangeType type, Film::Property p) +AudioDialog::film_change(ChangeType type, FilmProperty p) { if (type != ChangeType::DONE) { return; } - if (p == Film::Property::AUDIO_CHANNELS) { + if (p == FilmProperty::AUDIO_CHANNELS) { auto film = _film.lock (); if (film) { _channels = film->audio_channels (); diff --git a/src/wx/audio_dialog.h b/src/wx/audio_dialog.h index f0cf0606b..f144fb485 100644 --- a/src/wx/audio_dialog.h +++ b/src/wx/audio_dialog.h @@ -21,7 +21,7 @@ #include "lib/audio_analysis.h" #include "lib/constants.h" -#include "lib/film.h" +#include "lib/film_property.h" #include "lib/playlist.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS @@ -46,7 +46,7 @@ public: void set_cursor (boost::optional<dcpomatic::DCPTime> time, boost::optional<float> db); private: - void film_change (ChangeType, Film::Property); + void film_change(ChangeType, FilmProperty); void content_change (ChangeType, int); void channel_clicked (wxCommandEvent &); void type_clicked (wxCommandEvent &); diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc index 50831ec40..f0863431a 100644 --- a/src/wx/audio_panel.cc +++ b/src/wx/audio_panel.cc @@ -34,6 +34,7 @@ #include "lib/dcp_content.h" #include "lib/ffmpeg_audio_stream.h" #include "lib/ffmpeg_content.h" +#include "lib/film.h" #include "lib/job_manager.h" #include "lib/maths_util.h" #include <dcp/warnings.h> @@ -128,9 +129,9 @@ AudioPanel::create () _delay->wrapped()->SetRange (-1000, 1000); content_selection_changed (); - film_changed (Film::Property::AUDIO_CHANNELS); - film_changed (Film::Property::VIDEO_FRAME_RATE); - film_changed (Film::Property::REEL_TYPE); + film_changed(FilmProperty::AUDIO_CHANNELS); + film_changed(FilmProperty::VIDEO_FRAME_RATE); + film_changed(FilmProperty::REEL_TYPE); _reference->bind(&AudioPanel::reference_clicked, this); _show->Bind (wxEVT_BUTTON, boost::bind (&AudioPanel::show_clicked, this)); @@ -196,23 +197,23 @@ AudioPanel::add_to_grid () void -AudioPanel::film_changed (Film::Property property) +AudioPanel::film_changed (FilmProperty property) { if (!_parent->film()) { return; } switch (property) { - case Film::Property::AUDIO_CHANNELS: - case Film::Property::AUDIO_PROCESSOR: + case FilmProperty::AUDIO_CHANNELS: + case FilmProperty::AUDIO_PROCESSOR: _mapping->set_output_channels (_parent->film()->audio_output_names ()); setup_peak (); break; - case Film::Property::VIDEO_FRAME_RATE: + case FilmProperty::VIDEO_FRAME_RATE: setup_description (); break; - case Film::Property::REEL_TYPE: - case Film::Property::INTEROP: + case FilmProperty::REEL_TYPE: + case FilmProperty::INTEROP: setup_sensitivity (); break; default: diff --git a/src/wx/audio_panel.h b/src/wx/audio_panel.h index 5f03de424..61dd2783a 100644 --- a/src/wx/audio_panel.h +++ b/src/wx/audio_panel.h @@ -41,7 +41,7 @@ public: explicit AudioPanel (ContentPanel *); void create () override; - void film_changed (Film::Property) override; + void film_changed(FilmProperty) override; void film_content_changed (int) override; void content_selection_changed () override; void set_film (std::shared_ptr<Film>); diff --git a/src/wx/closed_captions_dialog.cc b/src/wx/closed_captions_dialog.cc index 903d47c75..d84ea0135 100644 --- a/src/wx/closed_captions_dialog.cc +++ b/src/wx/closed_captions_dialog.cc @@ -25,6 +25,7 @@ #include "lib/butler.h" #include "lib/compose.hpp" #include "lib/constants.h" +#include "lib/film.h" #include "lib/string_text.h" #include "lib/text_content.h" #include <boost/bind/bind.hpp> diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index 0e2dbafb2..fadcade31 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -42,6 +42,7 @@ #include "lib/dcp_subtitle_decoder.h" #include "lib/dcpomatic_log.h" #include "lib/ffmpeg_content.h" +#include "lib/film.h" #include "lib/image_content.h" #include "lib/log.h" #include "lib/playlist.h" @@ -401,11 +402,11 @@ ContentPanel::selected_ffmpeg () void -ContentPanel::film_changed (Film::Property p) +ContentPanel::film_changed(FilmProperty p) { switch (p) { - case Film::Property::CONTENT: - case Film::Property::CONTENT_ORDER: + case FilmProperty::CONTENT: + case FilmProperty::CONTENT_ORDER: setup (); break; default: @@ -772,8 +773,8 @@ ContentPanel::set_film (shared_ptr<Film> film) _film = film; - film_changed (Film::Property::CONTENT); - film_changed (Film::Property::AUDIO_CHANNELS); + film_changed(FilmProperty::CONTENT); + film_changed(FilmProperty::AUDIO_CHANNELS); if (_film) { check_selection (); diff --git a/src/wx/content_panel.h b/src/wx/content_panel.h index 886860672..6ba9bb1bb 100644 --- a/src/wx/content_panel.h +++ b/src/wx/content_panel.h @@ -21,7 +21,7 @@ #include "content_menu.h" #include "lib/enum_indexed_vector.h" -#include "lib/film.h" +#include "lib/film_property.h" #include "lib/text_type.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS @@ -67,7 +67,7 @@ public: void set_selection (ContentList cl); void select_all (); - void film_changed (Film::Property p); + void film_changed(FilmProperty p); void film_content_changed (int p); void first_shown (); diff --git a/src/wx/content_sub_panel.h b/src/wx/content_sub_panel.h index 2817fab6e..a3916817e 100644 --- a/src/wx/content_sub_panel.h +++ b/src/wx/content_sub_panel.h @@ -23,11 +23,12 @@ #define DCPOMATIC_CONTENT_SUB_PANEL_H -#include "lib/film.h" +#include "lib/film_property.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/wx.h> LIBDCP_ENABLE_WARNINGS +#include <memory> class ContentPanel; class Content; @@ -42,7 +43,7 @@ public: virtual void create () = 0; - virtual void film_changed (Film::Property) {} + virtual void film_changed(FilmProperty) {} /** Called when a given property of one of the selected Contents changes */ virtual void film_content_changed (int) = 0; /** Called when the list of selected Contents changes */ diff --git a/src/wx/controls.cc b/src/wx/controls.cc index 7976a77ce..f8bd7eeb9 100644 --- a/src/wx/controls.cc +++ b/src/wx/controls.cc @@ -33,6 +33,7 @@ #include "lib/cross.h" #include "lib/dcp_content.h" #include "lib/examine_content_job.h" +#include "lib/film.h" #include "lib/job.h" #include "lib/job_manager.h" #include "lib/player_video.h" @@ -430,14 +431,14 @@ Controls::film () const void -Controls::film_change (ChangeType type, Film::Property p) +Controls::film_change(ChangeType type, FilmProperty p) { if (type == ChangeType::DONE) { - if (p == Film::Property::CONTENT) { + if (p == FilmProperty::CONTENT) { setup_sensitivity (); update_position_label (); update_position_slider (); - } else if (p == Film::Property::THREE_D) { + } else if (p == FilmProperty::THREE_D) { setup_sensitivity (); } } diff --git a/src/wx/controls.h b/src/wx/controls.h index f0819c515..75bae9bb3 100644 --- a/src/wx/controls.h +++ b/src/wx/controls.h @@ -23,8 +23,9 @@ #define DCPOMATIC_CONTROLS_H +#include "lib/change_signaller.h" #include "lib/dcpomatic_time.h" -#include "lib/film.h" +#include "lib/film_property.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/wx.h> @@ -102,7 +103,7 @@ private: void outline_content_changed (); void eye_changed (); void update_position (); - void film_change (ChangeType, Film::Property); + void film_change(ChangeType, FilmProperty); typedef std::pair<std::shared_ptr<dcp::CPL>, boost::filesystem::path> CPL; diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc index 7fc6f00df..1ea5108db 100644 --- a/src/wx/dcp_panel.cc +++ b/src/wx/dcp_panel.cc @@ -390,19 +390,19 @@ DCPPanel::metadata_clicked () void -DCPPanel::film_changed (Film::Property p) +DCPPanel::film_changed(FilmProperty p) { switch (p) { - case Film::Property::NONE: + case FilmProperty::NONE: break; - case Film::Property::CONTAINER: + case FilmProperty::CONTAINER: setup_container (); break; - case Film::Property::NAME: + case FilmProperty::NAME: checked_set (_name, _film->name()); setup_dcp_name (); break; - case Film::Property::DCP_CONTENT_TYPE: + case FilmProperty::DCP_CONTENT_TYPE: { auto index = DCPContentType::as_index(_film->dcp_content_type()); DCPOMATIC_ASSERT (index); @@ -410,18 +410,18 @@ DCPPanel::film_changed (Film::Property p) setup_dcp_name (); break; } - case Film::Property::ENCRYPTED: + case FilmProperty::ENCRYPTED: checked_set (_encrypted, _film->encrypted ()); break; - case Film::Property::RESOLUTION: + case FilmProperty::RESOLUTION: checked_set (_resolution, _film->resolution() == Resolution::TWO_K ? 0 : 1); setup_container (); setup_dcp_name (); break; - case Film::Property::J2K_BANDWIDTH: + case FilmProperty::J2K_BANDWIDTH: checked_set (_j2k_bandwidth, _film->j2k_bandwidth() / 1000000); break; - case Film::Property::USE_ISDCF_NAME: + case FilmProperty::USE_ISDCF_NAME: { checked_set (_use_isdcf_name, _film->use_isdcf_name()); if (_film->use_isdcf_name()) { @@ -437,7 +437,7 @@ DCPPanel::film_changed (Film::Property p) setup_dcp_name (); break; } - case Film::Property::VIDEO_FRAME_RATE: + case FilmProperty::VIDEO_FRAME_RATE: { bool done = false; for (unsigned int i = 0; i < _frame_rate_choice->GetCount(); ++i) { @@ -458,7 +458,7 @@ DCPPanel::film_changed (Film::Property p) setup_dcp_name (); break; } - case Film::Property::AUDIO_CHANNELS: + case FilmProperty::AUDIO_CHANNELS: if (_film->audio_channels() < minimum_allowed_audio_channels()) { _film->set_audio_channels (minimum_allowed_audio_channels()); } else { @@ -466,42 +466,42 @@ DCPPanel::film_changed (Film::Property p) setup_dcp_name (); } break; - case Film::Property::THREE_D: + case FilmProperty::THREE_D: checked_set (_three_d, _film->three_d()); setup_dcp_name (); break; - case Film::Property::REENCODE_J2K: + case FilmProperty::REENCODE_J2K: checked_set (_reencode_j2k, _film->reencode_j2k()); break; - case Film::Property::INTEROP: + case FilmProperty::INTEROP: set_standard(); setup_dcp_name (); _markers->Enable (!_film->interop()); break; - case Film::Property::LIMIT_TO_SMPTE_BV20: + case FilmProperty::LIMIT_TO_SMPTE_BV20: set_standard(); break; - case Film::Property::AUDIO_PROCESSOR: + case FilmProperty::AUDIO_PROCESSOR: if (_film->audio_processor()) { checked_set (_audio_processor, _film->audio_processor()->id()); } else { checked_set (_audio_processor, 0); } setup_audio_channels_choice (_audio_channels, minimum_allowed_audio_channels()); - film_changed (Film::Property::AUDIO_CHANNELS); + film_changed (FilmProperty::AUDIO_CHANNELS); break; - case Film::Property::REEL_TYPE: + case FilmProperty::REEL_TYPE: checked_set (_reel_type, static_cast<int>(_film->reel_type())); _reel_length->Enable (_film->reel_type() == ReelType::BY_LENGTH); break; - case Film::Property::REEL_LENGTH: + case FilmProperty::REEL_LENGTH: checked_set (_reel_length, _film->reel_length() / 1000000000LL); break; - case Film::Property::CONTENT: + case FilmProperty::CONTENT: setup_dcp_name (); setup_sensitivity (); break; - case Film::Property::AUDIO_LANGUAGE: + case FilmProperty::AUDIO_LANGUAGE: { auto al = _film->audio_language(); checked_set (_enable_audio_language, static_cast<bool>(al)); @@ -510,23 +510,23 @@ DCPPanel::film_changed (Film::Property p) setup_sensitivity (); break; } - case Film::Property::AUDIO_FRAME_RATE: + case FilmProperty::AUDIO_FRAME_RATE: if (_audio_sample_rate) { checked_set (_audio_sample_rate, _film->audio_frame_rate() == 48000 ? 0 : 1); } break; - case Film::Property::CONTENT_VERSIONS: - case Film::Property::VERSION_NUMBER: - case Film::Property::RELEASE_TERRITORY: - case Film::Property::RATINGS: - case Film::Property::FACILITY: - case Film::Property::STUDIO: - case Film::Property::TEMP_VERSION: - case Film::Property::PRE_RELEASE: - case Film::Property::RED_BAND: - case Film::Property::TWO_D_VERSION_OF_THREE_D: - case Film::Property::CHAIN: - case Film::Property::LUMINANCE: + case FilmProperty::CONTENT_VERSIONS: + case FilmProperty::VERSION_NUMBER: + case FilmProperty::RELEASE_TERRITORY: + case FilmProperty::RATINGS: + case FilmProperty::FACILITY: + case FilmProperty::STUDIO: + case FilmProperty::TEMP_VERSION: + case FilmProperty::PRE_RELEASE: + case FilmProperty::RED_BAND: + case FilmProperty::TWO_D_VERSION_OF_THREE_D: + case FilmProperty::CHAIN: + case FilmProperty::LUMINANCE: setup_dcp_name (); break; default: @@ -631,26 +631,26 @@ DCPPanel::set_film (shared_ptr<Film> film) _standard->Clear(); add_standards(); - film_changed (Film::Property::NAME); - film_changed (Film::Property::USE_ISDCF_NAME); - film_changed (Film::Property::CONTENT); - film_changed (Film::Property::DCP_CONTENT_TYPE); - film_changed (Film::Property::CONTAINER); - film_changed (Film::Property::RESOLUTION); - film_changed (Film::Property::ENCRYPTED); - film_changed (Film::Property::J2K_BANDWIDTH); - film_changed (Film::Property::VIDEO_FRAME_RATE); - film_changed (Film::Property::AUDIO_CHANNELS); - film_changed (Film::Property::SEQUENCE); - film_changed (Film::Property::THREE_D); - film_changed (Film::Property::INTEROP); - film_changed (Film::Property::AUDIO_PROCESSOR); - film_changed (Film::Property::REEL_TYPE); - film_changed (Film::Property::REEL_LENGTH); - film_changed (Film::Property::REENCODE_J2K); - film_changed (Film::Property::AUDIO_LANGUAGE); - film_changed (Film::Property::AUDIO_FRAME_RATE); - film_changed (Film::Property::LIMIT_TO_SMPTE_BV20); + film_changed(FilmProperty::NAME); + film_changed(FilmProperty::USE_ISDCF_NAME); + film_changed(FilmProperty::CONTENT); + film_changed(FilmProperty::DCP_CONTENT_TYPE); + film_changed(FilmProperty::CONTAINER); + film_changed(FilmProperty::RESOLUTION); + film_changed(FilmProperty::ENCRYPTED); + film_changed(FilmProperty::J2K_BANDWIDTH); + film_changed(FilmProperty::VIDEO_FRAME_RATE); + film_changed(FilmProperty::AUDIO_CHANNELS); + film_changed(FilmProperty::SEQUENCE); + film_changed(FilmProperty::THREE_D); + film_changed(FilmProperty::INTEROP); + film_changed(FilmProperty::AUDIO_PROCESSOR); + film_changed(FilmProperty::REEL_TYPE); + film_changed(FilmProperty::REEL_LENGTH); + film_changed(FilmProperty::REENCODE_J2K); + film_changed(FilmProperty::AUDIO_LANGUAGE); + film_changed(FilmProperty::AUDIO_FRAME_RATE); + film_changed(FilmProperty::LIMIT_TO_SMPTE_BV20); set_general_sensitivity(static_cast<bool>(_film)); } @@ -769,14 +769,14 @@ DCPPanel::config_changed (Config::Property p) _audio_processor->Clear (); add_audio_processors (); if (_film) { - film_changed (Film::Property::AUDIO_PROCESSOR); + film_changed(FilmProperty::AUDIO_PROCESSOR); } } else if (p == Config::ALLOW_SMPTE_BV20) { _standard->Clear(); add_standards(); if (_film) { - film_changed(Film::Property::INTEROP); - film_changed(Film::Property::LIMIT_TO_SMPTE_BV20); + film_changed(FilmProperty::INTEROP); + film_changed(FilmProperty::LIMIT_TO_SMPTE_BV20); } } else if (p == Config::ISDCF_NAME_PART_LENGTH) { setup_dcp_name(); diff --git a/src/wx/dcp_panel.h b/src/wx/dcp_panel.h index 6635d4a29..849fe185c 100644 --- a/src/wx/dcp_panel.h +++ b/src/wx/dcp_panel.h @@ -21,7 +21,7 @@ #include "wx_ptr.h" #include "lib/config.h" -#include "lib/film.h" +#include "lib/film_property.h" class Button; @@ -57,7 +57,7 @@ public: void set_film (std::shared_ptr<Film>); void set_general_sensitivity (bool); - void film_changed (Film::Property); + void film_changed(FilmProperty); void film_content_changed (int); wxPanel* panel () const { diff --git a/src/wx/film_editor.cc b/src/wx/film_editor.cc index e602f9333..9f54db58e 100644 --- a/src/wx/film_editor.cc +++ b/src/wx/film_editor.cc @@ -76,7 +76,7 @@ FilmEditor::FilmEditor(wxWindow* parent, FilmViewer& viewer) * @param p Property of the Film that has changed. */ void -FilmEditor::film_change (ChangeType type, Film::Property p) +FilmEditor::film_change(ChangeType type, FilmProperty p) { if (type != ChangeType::DONE) { return; @@ -91,7 +91,7 @@ FilmEditor::film_change (ChangeType type, Film::Property p) _content_panel->film_changed (p); _dcp_panel->film_changed (p); - if (p == Film::Property::CONTENT && !_film->content().empty()) { + if (p == FilmProperty::CONTENT && !_film->content().empty()) { /* Select newly-added content */ _content_panel->set_selection (_film->content().back ()); } diff --git a/src/wx/film_editor.h b/src/wx/film_editor.h index 296058c21..a3df266ad 100644 --- a/src/wx/film_editor.h +++ b/src/wx/film_editor.h @@ -24,7 +24,7 @@ */ -#include "lib/film.h" +#include "lib/film_property.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/wx.h> @@ -65,7 +65,7 @@ public: private: /* Handle changes to the model */ - void film_change (ChangeType, Film::Property); + void film_change(ChangeType, FilmProperty); void film_content_change (ChangeType type, int); void set_general_sensitivity (bool); diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc index e7dcf5642..72193fbad 100644 --- a/src/wx/film_viewer.cc +++ b/src/wx/film_viewer.cc @@ -189,8 +189,8 @@ FilmViewer::set_film (shared_ptr<Film> film) _film->LengthChange.connect (boost::bind(&FilmViewer::film_length_change, this)); _player->Change.connect (boost::bind (&FilmViewer::player_change, this, _1, _2, _3)); - film_change (ChangeType::DONE, Film::Property::VIDEO_FRAME_RATE); - film_change (ChangeType::DONE, Film::Property::THREE_D); + film_change(ChangeType::DONE, FilmProperty::VIDEO_FRAME_RATE); + film_change(ChangeType::DONE, FilmProperty::THREE_D); film_length_change (); /* Keep about 1 second's worth of history samples */ @@ -486,19 +486,19 @@ FilmViewer::player_change (vector<int> properties) void -FilmViewer::film_change (ChangeType type, Film::Property p) +FilmViewer::film_change(ChangeType type, FilmProperty p) { if (type != ChangeType::DONE) { return; } - if (p == Film::Property::AUDIO_CHANNELS) { + if (p == FilmProperty::AUDIO_CHANNELS) { destroy_and_maybe_create_butler(); - } else if (p == Film::Property::VIDEO_FRAME_RATE) { + } else if (p == FilmProperty::VIDEO_FRAME_RATE) { _video_view->set_video_frame_rate (_film->video_frame_rate()); - } else if (p == Film::Property::THREE_D) { + } else if (p == FilmProperty::THREE_D) { _video_view->set_three_d (_film->three_d()); - } else if (p == Film::Property::CONTENT) { + } else if (p == FilmProperty::CONTENT) { _closed_captions_dialog->update_tracks (_film); } } diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h index aea3f8c86..0442dac71 100644 --- a/src/wx/film_viewer.h +++ b/src/wx/film_viewer.h @@ -26,7 +26,7 @@ #include "video_view.h" #include "lib/config.h" -#include "lib/film.h" +#include "lib/film_property.h" #include "lib/player_text.h" #include "lib/signaller.h" #include "lib/timer.h" @@ -162,7 +162,7 @@ private: void player_change (std::vector<int> properties); void idle_handler (); void request_idle_display_next_frame (); - void film_change (ChangeType, Film::Property); + void film_change(ChangeType, FilmProperty); void destroy_butler(); void create_butler(); void destroy_and_maybe_create_butler(); diff --git a/src/wx/gl_video_view.h b/src/wx/gl_video_view.h index 964f6f1ab..69de7b76f 100644 --- a/src/wx/gl_video_view.h +++ b/src/wx/gl_video_view.h @@ -25,6 +25,10 @@ LIBDCP_DISABLE_WARNINGS #include <wx/wx.h> LIBDCP_ENABLE_WARNINGS +#undef None +#undef Success +#undef Status + /* The OpenGL API in wxWidgets 3.0.x is sufficiently different to make it awkward to support, * and I think it may even have things missing that we require (e.g. the attributes parameter @@ -34,6 +38,7 @@ LIBDCP_ENABLE_WARNINGS */ #if wxCHECK_VERSION(3,1,0) + #include "video_view.h" #include "lib/signaller.h" #include "lib/position.h" @@ -41,9 +46,6 @@ LIBDCP_ENABLE_WARNINGS #include <boost/atomic.hpp> #include <boost/thread.hpp> #include <boost/thread/condition.hpp> -#undef None -#undef Success -#undef Status class Texture diff --git a/src/wx/markers_panel.cc b/src/wx/markers_panel.cc index 9942dca89..463f06758 100644 --- a/src/wx/markers_panel.cc +++ b/src/wx/markers_panel.cc @@ -23,6 +23,7 @@ #include "markers.h" #include "markers_panel.h" #include "wx_util.h" +#include "lib/film.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/graphics.h> @@ -82,7 +83,7 @@ MarkersPanel::set_film (weak_ptr<Film> weak_film) void -MarkersPanel::film_changed (ChangeType type, Film::Property property) +MarkersPanel::film_changed(ChangeType type, FilmProperty property) { if (type != ChangeType::DONE) { return; @@ -93,7 +94,7 @@ MarkersPanel::film_changed (ChangeType type, Film::Property property) return; } - if (property == Film::Property::MARKERS || property == Film::Property::CONTENT || property == Film::Property::CONTENT_ORDER || property == Film::Property::VIDEO_FRAME_RATE) { + if (property == FilmProperty::MARKERS || property == FilmProperty::CONTENT || property == FilmProperty::CONTENT_ORDER || property == FilmProperty::VIDEO_FRAME_RATE) { update_from_film (film); } } diff --git a/src/wx/markers_panel.h b/src/wx/markers_panel.h index e34008a41..3f43ee7d2 100644 --- a/src/wx/markers_panel.h +++ b/src/wx/markers_panel.h @@ -20,7 +20,7 @@ #include "lib/dcpomatic_time.h" -#include "lib/film.h" +#include "lib/film_property.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/wx.h> @@ -47,7 +47,7 @@ private: void move_marker_to_current_position (); void remove_marker (); void add_marker (wxCommandEvent& ev); - void film_changed (ChangeType type, Film::Property property); + void film_changed(ChangeType type, FilmProperty property); void update_from_film (std::shared_ptr<Film> film); wxTipWindow* _tip = nullptr; diff --git a/src/wx/metadata_dialog.cc b/src/wx/metadata_dialog.cc index e9a3b1af9..df92cef63 100644 --- a/src/wx/metadata_dialog.cc +++ b/src/wx/metadata_dialog.cc @@ -30,6 +30,7 @@ #include "region_subtag_widget.h" #include "wx_util.h" #include "lib/film.h" +#include "lib/film_property.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/notebook.h> @@ -105,61 +106,61 @@ MetadataDialog::setup () _film_changed_connection = film()->Change.connect(boost::bind(&MetadataDialog::film_changed, this, _1, _2)); - film_changed (ChangeType::DONE, Film::Property::RELEASE_TERRITORY); - film_changed (ChangeType::DONE, Film::Property::SIGN_LANGUAGE_VIDEO_LANGUAGE); - film_changed (ChangeType::DONE, Film::Property::FACILITY); - film_changed (ChangeType::DONE, Film::Property::STUDIO); - film_changed (ChangeType::DONE, Film::Property::TEMP_VERSION); - film_changed (ChangeType::DONE, Film::Property::PRE_RELEASE); - film_changed (ChangeType::DONE, Film::Property::RED_BAND); - film_changed (ChangeType::DONE, Film::Property::TWO_D_VERSION_OF_THREE_D); - film_changed (ChangeType::DONE, Film::Property::CHAIN); - film_changed (ChangeType::DONE, Film::Property::LUMINANCE); + film_changed(ChangeType::DONE, FilmProperty::RELEASE_TERRITORY); + film_changed(ChangeType::DONE, FilmProperty::SIGN_LANGUAGE_VIDEO_LANGUAGE); + film_changed(ChangeType::DONE, FilmProperty::FACILITY); + film_changed(ChangeType::DONE, FilmProperty::STUDIO); + film_changed(ChangeType::DONE, FilmProperty::TEMP_VERSION); + film_changed(ChangeType::DONE, FilmProperty::PRE_RELEASE); + film_changed(ChangeType::DONE, FilmProperty::RED_BAND); + film_changed(ChangeType::DONE, FilmProperty::TWO_D_VERSION_OF_THREE_D); + film_changed(ChangeType::DONE, FilmProperty::CHAIN); + film_changed(ChangeType::DONE, FilmProperty::LUMINANCE); setup_sensitivity (); } void -MetadataDialog::film_changed (ChangeType type, Film::Property property) +MetadataDialog::film_changed(ChangeType type, FilmProperty property) { if (type != ChangeType::DONE) { return; } - if (property == Film::Property::SIGN_LANGUAGE_VIDEO_LANGUAGE) { + if (property == FilmProperty::SIGN_LANGUAGE_VIDEO_LANGUAGE) { _sign_language_video_language->set (film()->sign_language_video_language()); - } else if (property == Film::Property::RELEASE_TERRITORY) { + } else if (property == FilmProperty::RELEASE_TERRITORY) { auto rt = film()->release_territory(); checked_set (_enable_release_territory, static_cast<bool>(rt)); if (rt) { _release_territory_copy = *rt; checked_set(_release_territory, *_release_territory_copy); } - } else if (property == Film::Property::FACILITY) { + } else if (property == FilmProperty::FACILITY) { checked_set (_enable_facility, static_cast<bool>(film()->facility())); if (film()->facility()) { checked_set (_facility, *film()->facility()); } - } else if (property == Film::Property::STUDIO) { + } else if (property == FilmProperty::STUDIO) { checked_set (_enable_studio, static_cast<bool>(film()->studio())); if (film()->studio()) { checked_set (_studio, *film()->studio()); } - } else if (property == Film::Property::CHAIN) { + } else if (property == FilmProperty::CHAIN) { checked_set (_enable_chain, static_cast<bool>(film()->chain())); if (film()->chain()) { checked_set (_chain, *film()->chain()); } - } else if (property == Film::Property::TEMP_VERSION) { + } else if (property == FilmProperty::TEMP_VERSION) { checked_set (_temp_version, film()->temp_version()); - } else if (property == Film::Property::PRE_RELEASE) { + } else if (property == FilmProperty::PRE_RELEASE) { checked_set (_pre_release, film()->pre_release()); - } else if (property == Film::Property::RED_BAND) { + } else if (property == FilmProperty::RED_BAND) { checked_set (_red_band, film()->red_band()); - } else if (property == Film::Property::TWO_D_VERSION_OF_THREE_D) { + } else if (property == FilmProperty::TWO_D_VERSION_OF_THREE_D) { checked_set (_two_d_version_of_three_d, film()->two_d_version_of_three_d()); - } else if (property == Film::Property::LUMINANCE) { + } else if (property == FilmProperty::LUMINANCE) { auto lum = film()->luminance(); checked_set (_enable_luminance, static_cast<bool>(lum)); if (lum) { diff --git a/src/wx/metadata_dialog.h b/src/wx/metadata_dialog.h index b77b14a99..43da2ba71 100644 --- a/src/wx/metadata_dialog.h +++ b/src/wx/metadata_dialog.h @@ -25,8 +25,9 @@ #include "editable_list.h" #include "lib/change_signaller.h" -#include "lib/film.h" +#include "lib/film_property.h" #include "lib/weak_film.h" +#include <dcp/rating.h> #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/wx.h> @@ -53,7 +54,7 @@ public: protected: virtual void setup_standard (wxPanel*, wxSizer*); virtual void setup_advanced (wxPanel*, wxSizer*); - virtual void film_changed (ChangeType type, Film::Property property); + virtual void film_changed(ChangeType type, FilmProperty property); virtual void setup_sensitivity (); EditableList<dcp::Rating, RatingDialog>* _ratings; diff --git a/src/wx/playlist_controls.cc b/src/wx/playlist_controls.cc index 8d67cd998..11136d123 100644 --- a/src/wx/playlist_controls.cc +++ b/src/wx/playlist_controls.cc @@ -30,6 +30,7 @@ #include "lib/cross.h" #include "lib/dcp_content.h" #include "lib/ffmpeg_content.h" +#include "lib/film.h" #include "lib/internet.h" #include "lib/player_video.h" #include "lib/scoped_temporary.h" diff --git a/src/wx/smpte_metadata_dialog.cc b/src/wx/smpte_metadata_dialog.cc index f5d63e329..8471199bd 100644 --- a/src/wx/smpte_metadata_dialog.cc +++ b/src/wx/smpte_metadata_dialog.cc @@ -142,18 +142,18 @@ SMPTEMetadataDialog::setup () _enable_distributor->bind(&SMPTEMetadataDialog::enable_distributor_changed, this); _distributor->Bind (wxEVT_TEXT, boost::bind(&SMPTEMetadataDialog::distributor_changed, this)); - film_changed (ChangeType::DONE, Film::Property::NAME_LANGUAGE); - film_changed (ChangeType::DONE, Film::Property::VERSION_NUMBER); - film_changed (ChangeType::DONE, Film::Property::STATUS); - film_changed (ChangeType::DONE, Film::Property::DISTRIBUTOR); - film_changed (ChangeType::DONE, Film::Property::CONTENT_VERSIONS); + film_changed(ChangeType::DONE, FilmProperty::NAME_LANGUAGE); + film_changed(ChangeType::DONE, FilmProperty::VERSION_NUMBER); + film_changed(ChangeType::DONE, FilmProperty::STATUS); + film_changed(ChangeType::DONE, FilmProperty::DISTRIBUTOR); + film_changed(ChangeType::DONE, FilmProperty::CONTENT_VERSIONS); setup_sensitivity (); } void -SMPTEMetadataDialog::film_changed (ChangeType type, Film::Property property) +SMPTEMetadataDialog::film_changed(ChangeType type, FilmProperty property) { MetadataDialog::film_changed (type, property); @@ -161,11 +161,11 @@ SMPTEMetadataDialog::film_changed (ChangeType type, Film::Property property) return; } - if (property == Film::Property::NAME_LANGUAGE) { + if (property == FilmProperty::NAME_LANGUAGE) { _name_language->set (film()->name_language()); - } else if (property == Film::Property::VERSION_NUMBER) { + } else if (property == FilmProperty::VERSION_NUMBER) { checked_set (_version_number, film()->version_number()); - } else if (property == Film::Property::STATUS) { + } else if (property == FilmProperty::STATUS) { switch (film()->status()) { case dcp::Status::TEMP: checked_set (_status, 0); @@ -177,7 +177,7 @@ SMPTEMetadataDialog::film_changed (ChangeType type, Film::Property property) checked_set (_status, 2); break; } - } else if (property == Film::Property::DISTRIBUTOR) { + } else if (property == FilmProperty::DISTRIBUTOR) { checked_set (_enable_distributor, static_cast<bool>(film()->distributor())); if (film()->distributor()) { checked_set (_distributor, *film()->distributor()); diff --git a/src/wx/smpte_metadata_dialog.h b/src/wx/smpte_metadata_dialog.h index b6301e883..4ac943f7a 100644 --- a/src/wx/smpte_metadata_dialog.h +++ b/src/wx/smpte_metadata_dialog.h @@ -22,8 +22,7 @@ #include "editable_list.h" #include "full_language_tag_dialog.h" #include "metadata_dialog.h" -#include "lib/film.h" -#include "lib/weak_film.h" +#include "lib/film_property.h" #include <dcp/language_tag.h> #include <dcp/types.h> #include <dcp/warnings.h> @@ -49,7 +48,7 @@ public: private: void setup_standard (wxPanel* parent, wxSizer* sizer) override; void setup_advanced (wxPanel* parent, wxSizer* sizer) override; - void film_changed (ChangeType type, Film::Property property) override; + void film_changed(ChangeType type, FilmProperty property) override; void setup_sensitivity () override; std::vector<std::string> content_versions () const; diff --git a/src/wx/standard_controls.cc b/src/wx/standard_controls.cc index de63c2fce..942c49fc4 100644 --- a/src/wx/standard_controls.cc +++ b/src/wx/standard_controls.cc @@ -21,6 +21,7 @@ #include "film_viewer.h" #include "standard_controls.h" +#include "lib/film.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/tglbtn.h> diff --git a/src/wx/text_panel.cc b/src/wx/text_panel.cc index 805af2c23..ff4e26a57 100644 --- a/src/wx/text_panel.cc +++ b/src/wx/text_panel.cc @@ -40,6 +40,7 @@ #include "lib/decoder_factory.h" #include "lib/ffmpeg_content.h" #include "lib/ffmpeg_subtitle_stream.h" +#include "lib/film.h" #include "lib/job_manager.h" #include "lib/scope_guard.h" #include "lib/string_text_file_content.h" @@ -400,9 +401,9 @@ TextPanel::dcp_track_changed () void -TextPanel::film_changed (Film::Property property) +TextPanel::film_changed(FilmProperty property) { - if (property == Film::Property::CONTENT || property == Film::Property::REEL_TYPE || property == Film::Property::INTEROP) { + if (property == FilmProperty::CONTENT || property == FilmProperty::REEL_TYPE || property == FilmProperty::INTEROP) { setup_sensitivity (); } } diff --git a/src/wx/text_panel.h b/src/wx/text_panel.h index eee5e916c..5adad5a3e 100644 --- a/src/wx/text_panel.h +++ b/src/wx/text_panel.h @@ -19,6 +19,7 @@ */ +#include "lib/job.h" #include "content_sub_panel.h" #include "wx_ptr.h" @@ -38,7 +39,7 @@ public: TextPanel (ContentPanel *, TextType t); void create () override; - void film_changed (Film::Property) override; + void film_changed(FilmProperty) override; void film_content_changed (int) override; void content_selection_changed () override; diff --git a/src/wx/timeline.cc b/src/wx/timeline.cc index c6ce1527b..95e48f562 100644 --- a/src/wx/timeline.cc +++ b/src/wx/timeline.cc @@ -117,7 +117,7 @@ Timeline::Timeline(wxWindow* parent, ContentPanel* cp, shared_ptr<Film> film, Fi _main_canvas->Bind (wxEVT_SCROLLWIN_PAGEDOWN, boost::bind (&Timeline::scrolled, this, _1)); _main_canvas->Bind (wxEVT_SCROLLWIN_THUMBTRACK, boost::bind (&Timeline::scrolled, this, _1)); - film_change (ChangeType::DONE, Film::Property::CONTENT); + film_change(ChangeType::DONE, FilmProperty::CONTENT); SetMinSize (wxSize (640, 4 * pixels_per_track() + 96)); @@ -237,16 +237,16 @@ Timeline::paint_main () void -Timeline::film_change (ChangeType type, Film::Property p) +Timeline::film_change(ChangeType type, FilmProperty p) { if (type != ChangeType::DONE) { return; } - if (p == Film::Property::CONTENT || p == Film::Property::REEL_TYPE || p == Film::Property::REEL_LENGTH) { + if (p == FilmProperty::CONTENT || p == FilmProperty::REEL_TYPE || p == FilmProperty::REEL_LENGTH) { ensure_ui_thread (); recreate_views (); - } else if (p == Film::Property::CONTENT_ORDER) { + } else if (p == FilmProperty::CONTENT_ORDER) { Refresh (); } } diff --git a/src/wx/timeline.h b/src/wx/timeline.h index 184a5d9ee..2485e835f 100644 --- a/src/wx/timeline.h +++ b/src/wx/timeline.h @@ -21,7 +21,7 @@ #include "content_menu.h" #include "timeline_content_view.h" -#include "lib/film.h" +#include "lib/film_property.h" #include "lib/rect.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS @@ -97,7 +97,7 @@ private: void mouse_moved (wxMouseEvent &); void mouse_moved_select (wxMouseEvent &); void mouse_moved_zoom (wxMouseEvent &); - void film_change (ChangeType type, Film::Property); + void film_change(ChangeType type, FilmProperty); void film_content_change (ChangeType type, int, bool frequent); void resized (); void assign_tracks (); diff --git a/src/wx/timeline_dialog.cc b/src/wx/timeline_dialog.cc index d6c784387..e0e1689a8 100644 --- a/src/wx/timeline_dialog.cc +++ b/src/wx/timeline_dialog.cc @@ -25,6 +25,7 @@ #include "wx_util.h" #include "lib/compose.hpp" #include "lib/cross.h" +#include "lib/film.h" #include "lib/playlist.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS @@ -98,14 +99,14 @@ TimelineDialog::TimelineDialog(ContentPanel* cp, shared_ptr<Film> film, FilmView Bind(wxEVT_CHAR_HOOK, boost::bind(&TimelineDialog::keypress, this, _1)); _toolbar->ToggleTool ((int) Timeline::SNAP, _timeline.snap ()); - film_change (ChangeType::DONE, Film::Property::SEQUENCE); + film_change(ChangeType::DONE, FilmProperty::SEQUENCE); _film_changed_connection = film->Change.connect (bind (&TimelineDialog::film_change, this, _1, _2)); } void -TimelineDialog::film_change (ChangeType type, Film::Property p) +TimelineDialog::film_change(ChangeType type, FilmProperty p) { if (type != ChangeType::DONE) { return; @@ -116,7 +117,7 @@ TimelineDialog::film_change (ChangeType type, Film::Property p) return; } - if (p == Film::Property::SEQUENCE) { + if (p == FilmProperty::SEQUENCE) { _toolbar->ToggleTool ((int) Timeline::SEQUENCE, film->sequence ()); } } diff --git a/src/wx/timeline_dialog.h b/src/wx/timeline_dialog.h index 155d51fac..8134aa6db 100644 --- a/src/wx/timeline_dialog.h +++ b/src/wx/timeline_dialog.h @@ -37,7 +37,7 @@ public: void set_selection (ContentList selection); private: - void film_change (ChangeType type, Film::Property); + void film_change(ChangeType type, FilmProperty); void tool_clicked (wxCommandEvent& id); void keypress(wxKeyEvent const& event); diff --git a/src/wx/timeline_reels_view.cc b/src/wx/timeline_reels_view.cc index 2ec8f9e82..0601a1196 100644 --- a/src/wx/timeline_reels_view.cc +++ b/src/wx/timeline_reels_view.cc @@ -22,6 +22,7 @@ #include "timeline.h" #include "timeline_reels_view.h" #include "wx_util.h" +#include "lib/film.h" #include <dcp/warnings.h> LIBDCP_DISABLE_WARNINGS #include <wx/graphics.h> diff --git a/src/wx/timing_panel.cc b/src/wx/timing_panel.cc index 890049ae9..98060bb87 100644 --- a/src/wx/timing_panel.cc +++ b/src/wx/timing_panel.cc @@ -32,6 +32,7 @@ #include "lib/dcp_content.h" #include "lib/dcp_subtitle_content.h" #include "lib/ffmpeg_content.h" +#include "lib/film.h" #include "lib/image_content.h" #include "lib/scope_guard.h" #include "lib/string_text_file_content.h" @@ -421,9 +422,9 @@ TimingPanel::content_selection_changed () } void -TimingPanel::film_changed (Film::Property p) +TimingPanel::film_changed(FilmProperty p) { - if (p == Film::Property::VIDEO_FRAME_RATE) { + if (p == FilmProperty::VIDEO_FRAME_RATE) { update_full_length (); update_play_length (); } diff --git a/src/wx/timing_panel.h b/src/wx/timing_panel.h index 1edaeb271..13e733be6 100644 --- a/src/wx/timing_panel.h +++ b/src/wx/timing_panel.h @@ -30,7 +30,7 @@ public: TimingPanel(ContentPanel *, FilmViewer& viewer); void create () override; - void film_changed (Film::Property) override; + void film_changed(FilmProperty) override; void film_content_changed (int) override; void content_selection_changed () override; diff --git a/src/wx/video_panel.cc b/src/wx/video_panel.cc index 4f7c2db79..a9ef6e02d 100644 --- a/src/wx/video_panel.cc +++ b/src/wx/video_panel.cc @@ -33,6 +33,7 @@ #include "lib/config.h" #include "lib/dcp_content.h" #include "lib/ffmpeg_content.h" +#include "lib/film.h" #include "lib/filter.h" #include "lib/frame_rate_change.h" #include "lib/ratio.h" @@ -343,17 +344,17 @@ VideoPanel::range_changed () void -VideoPanel::film_changed (Film::Property property) +VideoPanel::film_changed(FilmProperty property) { switch (property) { - case Film::Property::VIDEO_FRAME_RATE: - case Film::Property::CONTAINER: - case Film::Property::RESOLUTION: + case FilmProperty::VIDEO_FRAME_RATE: + case FilmProperty::CONTAINER: + case FilmProperty::RESOLUTION: setup_description (); setup_sensitivity (); break; - case Film::Property::REEL_TYPE: - case Film::Property::INTEROP: + case FilmProperty::REEL_TYPE: + case FilmProperty::INTEROP: setup_sensitivity (); break; default: diff --git a/src/wx/video_panel.h b/src/wx/video_panel.h index 81e65d820..686d1b99b 100644 --- a/src/wx/video_panel.h +++ b/src/wx/video_panel.h @@ -27,7 +27,7 @@ #include "content_sub_panel.h" #include "content_widget.h" #include "timecode.h" -#include "lib/film.h" +#include "lib/film_property.h" #include "lib/video_frame_type.h" @@ -48,7 +48,7 @@ public: explicit VideoPanel (ContentPanel *); void create () override; - void film_changed (Film::Property) override; + void film_changed(FilmProperty) override; void film_content_changed (int) override; void content_selection_changed () override; |
