Cleanup: some coding standard fixes.
authorCarl Hetherington <cth@carlh.net>
Thu, 28 Nov 2024 18:21:18 +0000 (19:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 29 Nov 2024 22:32:32 +0000 (23:32 +0100)
src/lib/grok/context.h
src/lib/grok/messenger.h

index c2125ea963cb05f5e0a6a31cff4be472969ee7be..70181466b940cbf5aba6855a226d37d2b6311542 100644 (file)
@@ -217,7 +217,7 @@ public:
                        auto s = dcpv.get_size();
                        _dcpomatic_context->set_dimensions(s.width, s.height);
                        auto grok = Config::instance()->grok().get_value_or({});
-                       if (!_messenger->launchGrok(
+                       if (!_messenger->launch_grok(
                                        _dcpomatic_context->location,
                                        _dcpomatic_context->width,
                                        _dcpomatic_context->width,
index 78154c57c31aafcf76e777e0dd2043bca3e80c45..e43e58858939fbdec33ce2ffe45764bcab330a5a 100644 (file)
@@ -530,7 +530,7 @@ struct Messenger
                sendQueue.push(oss.str());
        }
 
-       bool launchGrok(
+       bool launch_grok(
                boost::filesystem::path const& dir,
                uint32_t width,
                uint32_t stride,
@@ -548,21 +548,23 @@ struct Messenger
        {
 
                std::unique_lock<std::mutex> lk(shutdownMutex_);
-               if (async_result_.valid())
+               if (async_result_.valid()) {
                        return true;
-               if(MessengerInit::firstLaunch(true))
+               }
+               if (MessengerInit::firstLaunch(true)) {
                        init_.unlink();
+               }
                startThreads();
-               char _cmd[4096];
                auto fullServer = server + ":" + std::to_string(port);
-               sprintf(_cmd,
+               char cmd[4096];
+               sprintf(cmd,
                                "./grk_compress -batch_src %s,%d,%d,%d,%d,%d -out_fmt j2k -k 1 "
                                "-G %d -%s %d,%d -j %s -J %s -v",
                                GRK_MSGR_BATCH_IMAGE.c_str(), width, stride, height, samplesPerPixel, depth,
                                device, is4K ? "cinema4K" : "cinema2K", fps, bandwidth,
                                license.c_str(), fullServer.c_str());
 
-               return launch(_cmd, dir);
+               return launch(cmd, dir);
        }
        void initClient(size_t uncompressedFrameSize, size_t compressedFrameSize, size_t numFrames)
        {