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>2023-12-16 02:07:38 +0100
commit7c0051ada0098452343e3639edd9ffe6b8472f18 (patch)
tree643dc8969ab1f10cdcf55da9710e4a35343a4ee1 /src/lib/grok
parentd249c3dae6b3d9019a9732fc32ece5693d6d57aa (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;
}