nx_metadata_sdk 1.0 Metadata SDK

stub_analytics_plugin_ini.h
1 // Copyright 2018-present Network Optix, Inc. Licensed under MPL 2.0: www.mozilla.org/MPL/2.0/
2
3 #pragma once
4
5 #include <nx/kit/ini_config.h>
6 #include <nx/sdk/analytics/helpers/pixel_format.h>
7
8 namespace nx {
9 namespace vms_server_plugins {
10 namespace analytics {
11 namespace stub {
12
13 struct Ini: public nx::kit::IniConfig
14 {
15 const std::string needUncompressedVideoFramesDescription =
16 "Respective capability in the manifest: one of "
17 + nx::sdk::analytics::allPixelFormatsToStdString(", ") + ".\n"
18 "Empty means no such capability.";
19
20 Ini(): IniConfig("stub_analytics_plugin.ini") { reload(); }
21
22 NX_INI_FLAG(0, enableOutput, "");
23 NX_INI_STRING("", needUncompressedVideoFrames, needUncompressedVideoFramesDescription.c_str());
24 NX_INI_FLAG(0, deviceDependent, "Respective capability in the manifest.");
25 NX_INI_INT(-1, crashDeviceAgentOnFrameN,
26 "If >= 0, intentionally crash DeviceAgent on processing a frame with this index.");
27 };
28
29 inline Ini& ini()
30 {
31 static Ini ini;
32 return ini;
33 }
34
35 } // namespace stub
36 } // namespace analytics
37 } // namespace vms_server_plugins
38 } // namespace nx
nx::kit::IniConfig
Definition: ini_config.h:62
nx::vms_server_plugins::analytics::stub::Ini
Definition: stub_analytics_plugin_ini.h:13
nx
Definition: apple_utils.h:6
nx::kit::IniConfig::IniConfig
IniConfig(const char *iniFile)
Definition: ini_config.cpp:621
nx::kit::IniConfig::reload
void reload()
Definition: ini_config.cpp:676