summaryrefslogtreecommitdiff
path: root/src/lib/grok
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-10-06 22:42:44 +0200
committerCarl Hetherington <cth@carlh.net>2024-01-28 02:01:58 +0100
commit1760066150070717bf8954313550afdd25a0f3fe (patch)
treea87d8a8748ce494fb5a6d3f4e8845ba0e868d7b9 /src/lib/grok
parent6ae94ebba5f714a697167066f69a8ce31f3db360 (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/grok')
-rw-r--r--src/lib/grok/context.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/grok/context.h b/src/lib/grok/context.h
index d27caa5f6..521faae8d 100644
--- a/src/lib/grok/context.h
+++ b/src/lib/grok/context.h
@@ -112,7 +112,8 @@ public:
explicit GrokContext(DcpomaticContext* dcpomatic_context)
: _dcpomatic_context(dcpomatic_context)
{
- if (!Config::instance()->enable_gpu()) {
+ auto grok = Config::instance()->grok().get_value_or({});
+ if (!grok.enable) {
return;
}
@@ -214,7 +215,7 @@ public:
auto s = dcpv.get_size();
_dcpomatic_context->set_dimensions(s.width, s.height);
- auto config = Config::instance();
+ auto grok = Config::instance()->grok().get_value_or({});
if (!_messenger->launchGrok(
_dcpomatic_context->location,
_dcpomatic_context->width,
@@ -226,9 +227,9 @@ public:
_dcpomatic_context->film->resolution() == Resolution::FOUR_K,
_dcpomatic_context->film->video_frame_rate(),
_dcpomatic_context->film->j2k_bandwidth(),
- config->gpu_license_server(),
- config->gpu_license_port(),
- config->gpu_license())) {
+ grok.licence_server,
+ grok.licence_port,
+ grok.licence)) {
_launch_failed = true;
return false;
}