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 <nx/sdk/analytics/helpers/consuming_device_agent.h>
6 #include <nx/sdk/analytics/i_object_metadata_packet.h>
7
8 namespace nx {
9 namespace vms_server_plugins {
10 namespace analytics {
11 namespace stub {
12 namespace object_actions {
13
14 class DeviceAgent: public nx::sdk::analytics::ConsumingDeviceAgent
15 {
16 public:
17 DeviceAgent(const nx::sdk::IDeviceInfo* deviceInfo);
18 virtual ~DeviceAgent() override;
19
20 protected:
21 virtual std::string manifestString() const override;
22
23 virtual bool pushCompressedVideoFrame(
24 nx::sdk::Ptr<const nx::sdk::analytics::ICompressedVideoPacket> videoFrame) override;
25
26 private:
27 struct TrackContext
28 {
29 nx::sdk::Uuid trackId;
30 nx::sdk::analytics::Rect boundingBox;
31 };
32
33 private:
34 nx::sdk::Ptr<nx::sdk::analytics::IObjectMetadataPacket> generateObject(int64_t timestampUs);
35
36 private:
37 TrackContext m_trackContext;
38 };
39
40 } // namespace object_actions
41 } // namespace stub
42 } // namespace analytics
43 } // namespace vms_server_plugins
44 } // namespace nx
nx::sdk::Ptr
Definition: ptr.h:18
nx::sdk::analytics::ConsumingDeviceAgent
Definition: consuming_device_agent.h:36
nx::sdk::Uuid
Definition: uuid.h:22
nx::sdk::IDeviceInfo
Definition: i_device_info.h:13
nx
Definition: apple_utils.h:6
nx::vms_server_plugins::analytics::stub::object_actions::DeviceAgent
Definition: device_agent.h:14
nx::vms_server_plugins::analytics::stub::object_actions::DeviceAgent::pushCompressedVideoFrame
virtual bool pushCompressedVideoFrame(nx::sdk::Ptr< const nx::sdk::analytics::ICompressedVideoPacket > videoFrame) override
Definition: device_agent.cpp:50
nx::sdk::analytics::Rect
Definition: rect.h:9