diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-10-06 22:42:44 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-01-28 02:01:58 +0100 |
| commit | 1760066150070717bf8954313550afdd25a0f3fe (patch) | |
| tree | a87d8a8748ce494fb5a6d3f4e8845ba0e868d7b9 /src/lib/config.h | |
| parent | 6ae94ebba5f714a697167066f69a8ce31f3db360 (diff) | |
Clean up grok's presence in the config file and make sure it's optional.
It should be allowed to not have any grok stuff in the config file,
and we should generally call it grok rather than GPU in case
other non-grok GPU stuff arrives in the future.
Diffstat (limited to 'src/lib/config.h')
| -rw-r--r-- | src/lib/config.h | 74 |
1 files changed, 25 insertions, 49 deletions
diff --git a/src/lib/config.h b/src/lib/config.h index bd040f09a..f241e3819 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -619,27 +619,27 @@ public: return _allow_smpte_bv20; } - boost::filesystem::path gpu_binary_location() const { - return _gpu_binary_location; - } - - bool enable_gpu () const { - return _enable_gpu; - } - - int selected_gpu () const { - return _selected_gpu; - } - std::string gpu_license_server () const { - return _gpu_license_server; - } +#ifdef DCPOMATIC_GROK + class Grok + { + public: + Grok() = default; + Grok(cxml::ConstNodePtr node); + + void as_xml(xmlpp::Element* node) const; + + bool enable = false; + boost::filesystem::path binary_location; + int selected = 0; + std::string licence_server; + int licence_port = 5000; + std::string licence; + }; - int gpu_license_port () const { - return _gpu_license_port; - } - std::string gpu_license () const { - return _gpu_license; + boost::optional<Grok> grok() const { + return _grok; } +#endif int isdcf_name_part_length() const { return _isdcf_name_part_length; @@ -1222,29 +1222,9 @@ public: maybe_set(_allow_smpte_bv20, allow, ALLOW_SMPTE_BV20); } - void set_gpu_binary_location(boost::filesystem::path location) { - maybe_set (_gpu_binary_location, location); - } - - void set_enable_gpu (bool enable) { - maybe_set (_enable_gpu, enable); - } - - void set_selected_gpu (int selected) { - maybe_set (_selected_gpu, selected); - } - - void set_gpu_license_server (std::string s) { - maybe_set (_gpu_license_server, s); - } - - void set_gpu_license_port (int p) { - maybe_set (_gpu_license_port, p); - } - - void set_gpu_license (std::string p) { - maybe_set (_gpu_license, p); - } +#ifdef DCPOMATIC_GROK + void set_grok(Grok const& grok); +#endif void set_isdcf_name_part_length(int length) { maybe_set(_isdcf_name_part_length, length, ISDCF_NAME_PART_LENGTH); @@ -1492,13 +1472,9 @@ private: bool _allow_smpte_bv20; int _isdcf_name_part_length; - /* GPU */ - bool _enable_gpu; - boost::filesystem::path _gpu_binary_location; - int _selected_gpu; - std::string _gpu_license_server; - int _gpu_license_port; - std::string _gpu_license; +#ifdef DCPOMATIC_GROK + boost::optional<Grok> _grok; +#endif ExportConfig _export; |
