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  NX_INI_FLAG(1, needMetadata,
29  "If set, Engine will declare the corresponding stream type filter in the manifest.");
30 
31  NX_INI_FLAG(0, visualizeMotion,
32  "If set, the Engine will visualize motion metadata via object bounding boxes (each\n"
33  "active motion grid cell is dispalyed as a separate object), regular object generation\n"
34  "is disabled in this case, so the correspondent DeviceAgent settings won't work. Use\n"
35  "carefully since this option can affect performance very much.");
36 
37  NX_INI_STRING("primary", preferredStream,
38  "Preferred stream in the Engine manifest. Possible values: \"primary\", \"secondary\".");
39 
40  NX_INI_STRING("http://internal.server/addPerson?trackId=", addPersonActionUrlPrefix,
41  "Prefix for the URL returned by addPerson action; track id will be appended to this "
42  "prefix.");
43 
44  NX_INI_FLAG(0, keepObjectBoundingBoxRotation,
45  "If set, Engine will declare the corresponding capability in the manifest.");
46 
47  NX_INI_FLAG(0, usePluginAsSettingsOrigin,
48  "If set, Engine will declare the corresponding capability in the manifest.");
49 };
50 
51 Ini& ini();
52 
53 } // namespace stub
54 } // namespace analytics
55 } // namespace vms_server_plugins
56 } // namespace nx
Definition: ini_config.h:78
Definition: stub_analytics_plugin_ini.h:13
static TestIni & ini()
Definition: ini_config_ut.cpp:43
Definition: apple_utils.h:6
IniConfig(const char *iniFile)
Definition: ini_config.cpp:606
void reload()
Definition: ini_config.cpp:661