nx_server_plugin_sdk 1.0 Server Plugin SDK

device_agent.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 <cstdint>
6 #include <string>
7
8 #include <nx/sdk/analytics/helpers/consuming_device_agent.h>
9
10 #include "engine.h"
11
12 namespace nx {
13 namespace vms_server_plugins {
14 namespace analytics {
15 namespace stub {
16 namespace error_reporting {
17
18 class DeviceAgent: public nx::sdk::analytics::ConsumingDeviceAgent
19 {
20 public:
21 DeviceAgent(Engine* engine, const nx::sdk::IDeviceInfo* deviceInfo);
22 virtual ~DeviceAgent() override;
23
24 protected:
25 virtual bool pushCompressedVideoFrame(
26 nx::sdk::Ptr<const nx::sdk::analytics::ICompressedVideoPacket> videoFrame) override;
27
28 virtual void doSetSettings(
29 nx::sdk::Result<const nx::sdk::ISettingsResponse*>* outResult,
30 const nx::sdk::IStringMap* settings) override;
31
32 virtual void getIntegrationSideSettings(
33 nx::sdk::Result<const nx::sdk::ISettingsResponse*>* outResult) const override;
34
35 virtual void doGetSettingsOnActiveSettingChange(
36 nx::sdk::Result<const nx::sdk::IActiveSettingChangedResponse*>* outResult,
37 const nx::sdk::IActiveSettingChangedAction* activeSettingChangedAction) override;
38
39 virtual std::string manifestString() const override;
40
41 virtual nx::sdk::Result<const nx::sdk::ISettingsResponse*> settingsReceived() override;
42
43 private:
44 int64_t m_frameCount = 0;
45 };
46
47 } // namespace error_reporting
48 } // namespace stub
49 } // namespace analytics
50 } // namespace vms_server_plugins
51 } // namespace nx
nx::vms_server_plugins::analytics::stub::error_reporting::DeviceAgent::pushCompressedVideoFrame
virtual bool pushCompressedVideoFrame(nx::sdk::Ptr< const nx::sdk::analytics::ICompressedVideoPacket > videoFrame) override
Definition: device_agent.cpp:57
nx::sdk::IStringMap
Definition: i_string_map.h:9
nx::sdk::IActiveSettingChangedAction
Definition: i_active_setting_changed_action.h:14
nx::vms_server_plugins::analytics::stub::error_reporting::DeviceAgent
Definition: device_agent.h:18
nx::sdk::Ptr
Definition: ptr.h:18
nx::vms_server_plugins::analytics::stub::error_reporting::Engine
Definition: engine.h:15
nx::sdk::analytics::ConsumingDeviceAgent
Definition: consuming_device_agent.h:36
nx::sdk::IDeviceInfo
Definition: i_device_info.h:13
nx::sdk::Result
Definition: result.h:52
nx::vms_server_plugins::analytics::stub::error_reporting::DeviceAgent::settingsReceived
virtual nx::sdk::Result< const nx::sdk::ISettingsResponse * > settingsReceived() override
Definition: device_agent.cpp:134
nx
Definition: apple_utils.h:6