nx_metadata_sdk 1.0 Metadata 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 const nx::sdk::analytics::ICompressedVideoPacket* videoFrame) override;
25
26 virtual void doSetNeededMetadataTypes(
27 nx::sdk::Result<void>* outValue,
28 const nx::sdk::analytics::IMetadataTypes* neededMetadataTypes) override;
29
30 private:
31 struct TrackContext
32 {
33 nx::sdk::Uuid trackId;
34 nx::sdk::analytics::Rect boundingBox;
35 };
36
37 private:
38 nx::sdk::Ptr<nx::sdk::analytics::IObjectMetadataPacket> generateObject(int64_t timestampUs);
39
40 private:
41 TrackContext m_trackContext;
42 };
43
44 } // namespace object_actions
45 } // namespace stub
46 } // namespace analytics
47 } // namespace vms_server_plugins
48 } // namespace nx
nx::vms_server_plugins::analytics::stub::object_actions::DeviceAgent::pushCompressedVideoFrame
virtual bool pushCompressedVideoFrame(const nx::sdk::analytics::ICompressedVideoPacket *videoFrame) override
Definition: device_agent.cpp:49
nx::sdk::analytics::ICompressedVideoPacket
Definition: i_compressed_video_packet.h:34
nx::sdk::Ptr
Definition: ptr.h:18
nx::sdk::analytics::ConsumingDeviceAgent
Definition: consuming_device_agent.h:38
nx::sdk::analytics::IMetadataTypes
Definition: i_metadata_types.h:13
nx::sdk::Result< void >
Definition: result.h:81
nx::sdk::Uuid
Definition: uuid.h:22
nx::sdk::IDeviceInfo
Definition: i_device_info.h:14
nx
Definition: apple_utils.h:6
nx::vms_server_plugins::analytics::stub::object_actions::DeviceAgent
Definition: device_agent.h:14
nx::sdk::analytics::Rect
Definition: rect.h:11