diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-05-29 22:47:19 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-05-29 22:47:19 +0200 |
| commit | 5109fb16d5d7d11dcca3f7f11ea9cc5642c2de1f (patch) | |
| tree | e5fb50825e64961ba65420c6fa9f7cdd6c60921c /src | |
| parent | 12bba0badf6570a19c183f2c0938e02b6c825e66 (diff) | |
Move a couple of constants out of the header.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/grok/messenger.cc | 10 | ||||
| -rw-r--r-- | src/lib/grok/messenger.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/grok/messenger.cc b/src/lib/grok/messenger.cc index 1940ad889..c460f55e5 100644 --- a/src/lib/grok/messenger.cc +++ b/src/lib/grok/messenger.cc @@ -32,6 +32,8 @@ auto constexpr GROK_RECEIVE_READY = "Global\\grok_receive_ready"; auto constexpr GROK_TO_CLIENT_MESSAGE = "Global\\grok_to_client_message"; auto constexpr GROK_SENT = "Global\\grok_sent"; auto constexpr CLIENT_RECEIVE_READY = "Global\\client_receive_ready"; +auto constexpr GROK_UNCOMPRESSED_BUFFER = "Global\\grok_uncompressed_buf"; +auto constexpr GROK_COMPRESSED_BUFFER = "Global\\grok_compressed_buf"; Messenger::Messenger(std::function<void(std::string)> processor, size_t numProcessingThreads) @@ -193,7 +195,7 @@ Messenger::initBuffers() bool rc = true; if (_uncompressed_frame_size) { rc = rc && init_shm( - grokUncompressedBuf.c_str(), + GROK_UNCOMPRESSED_BUFFER, _uncompressed_frame_size * _num_frames, &_uncompressed_fd, &_uncompressed_buffer ); @@ -201,7 +203,7 @@ Messenger::initBuffers() if (_compressed_frame_size) { rc = rc && init_shm( - grokCompressedBuf.c_str(), + GROK_COMPRESSED_BUFFER, _compressed_frame_size * _num_frames, &_compressed_fd, &_compressed_buffer ); @@ -215,13 +217,13 @@ bool Messenger::deinit_shm() { bool rc = ::deinit_shm( - grokUncompressedBuf.c_str(), + GROK_UNCOMPRESSED_BUFFER, _uncompressed_frame_size * _num_frames, _uncompressed_fd, &_uncompressed_buffer ); rc = rc && ::deinit_shm( - grokCompressedBuf.c_str(), + GROK_COMPRESSED_BUFFER, _compressed_frame_size * _num_frames, _compressed_fd, &_compressed_buffer ); diff --git a/src/lib/grok/messenger.h b/src/lib/grok/messenger.h index 555c97a40..357f7a2ad 100644 --- a/src/lib/grok/messenger.h +++ b/src/lib/grok/messenger.h @@ -33,8 +33,6 @@ namespace grk_plugin { -static std::string grokUncompressedBuf = "Global\\grok_uncompressed_buf"; -static std::string grokCompressedBuf = "Global\\grok_compressed_buf"; static const std::string GRK_MSGR_BATCH_IMAGE = "GRK_MSGR_BATCH_IMAGE"; static const std::string GRK_MSGR_BATCH_COMPRESS_INIT = "GRK_MSGR_BATCH_COMPRESS_INIT"; static const std::string GRK_MSGR_BATCH_SUBMIT_UNCOMPRESSED = "GRK_MSGR_BATCH_SUBMIT_UNCOMPRESSED"; |
