nx_server_plugin_sdk 1.0 Server Plugin SDK

engine.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 <memory>
6
7 #include <nx/sdk/analytics/helpers/engine.h>
8 #include <nx/sdk/analytics/helpers/integration.h>
9 #include <nx/sdk/analytics/i_uncompressed_video_frame.h>
10 #include <nx/sdk/uuid.h>
11
12 namespace nx {
13 namespace vms_server_plugins {
14 namespace analytics {
15 namespace stub {
16 namespace video_frames {
17
18 class Engine: public nx::sdk::analytics::Engine
19 {
20 public:
21 using PixelFormat = nx::sdk::analytics::IUncompressedVideoFrame::PixelFormat;
22
23 Engine(nx::sdk::analytics::Integration* integration);
24
25 virtual ~Engine() override;
26
27 // Capabilities.
28 bool needUncompressedVideoFrames() const { return m_needUncompressedVideoFrames; }
29
30 PixelFormat pixelFormat() const { return m_pixelFormat; }
31
32 nx::sdk::analytics::Integration* const integration() const { return m_integration; }
33
34 protected:
35 virtual std::string manifestString() const override;
36
37 protected:
38 virtual void doObtainDeviceAgent(
39 nx::sdk::Result<nx::sdk::analytics::IDeviceAgent*>* outResult,
40 const nx::sdk::IDeviceInfo* deviceInfo) override;
41
42 private:
43 void initCapabilities();
44
45 private:
46 nx::sdk::analytics::Integration* const m_integration;
47
48 std::string m_capabilities;
49 std::string m_streamTypeFilter;
50 bool m_needUncompressedVideoFrames = false;
51 PixelFormat m_pixelFormat = PixelFormat::yuv420;
52 };
53
54 } // namespace video_frames
55 } // namespace stub
56 } // namespace analytics
57 } // namespace vms_server_plugins
58 } // namespace nx
nx::vms_server_plugins::analytics::stub::video_frames::Engine
Definition: engine.h:18
nx::sdk::IDeviceInfo
Definition: i_device_info.h:13
nx::sdk::Result
Definition: result.h:52
nx
Definition: apple_utils.h:6
nx::sdk::analytics::Engine
Definition: engine.h:31
nx::sdk::analytics::Integration
Definition: integration.h:21