nx_server_plugin_sdk 1.0 Server Plugin SDK

object_track_info.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 <vector>
6
7 #include <nx/sdk/analytics/i_object_track_info.h>
8 #include <nx/sdk/helpers/ref_countable.h>
9 #include <nx/sdk/ptr.h>
10
11 namespace nx::sdk::analytics {
12
13 class ObjectTrackInfo: public RefCountable<IObjectTrackInfo>
14 {
15 public:
16 void setTrack(IList<ITimestampedObjectMetadata>* track);
17 void setBestShotVideoFrame(IUncompressedVideoFrame* bestShotVideoFrame);
18 void setBestShotObjectMetadata(ITimestampedObjectMetadata* bestShotObjectMetadata);
19 void setBestShotImageData(std::vector<char> bestShotImageData);
20 void setBestShotImageDataFormat(std::string bestShotImageDataFormat);
21 void setBestShotImage(
22 std::vector<char> bestShotImageData,
23 std::string bestShotImageDataFormat);
24
25 virtual const char* bestShotImageData() const override;
26 virtual int bestShotImageDataSize() const override;
27 virtual const char* bestShotImageDataFormat() const override;
28
29 virtual const char* titleText() const override;
30 virtual const char* titleImageData() const override;
31 virtual int titleImageDataSize() const override;
32 virtual const char* titleImageDataFormat() const override;
33
34 protected:
35 virtual IList<ITimestampedObjectMetadata>* getTrack() const override;
36 virtual IUncompressedVideoFrame* getBestShotVideoFrame() const override;
37 virtual ITimestampedObjectMetadata* getBestShotObjectMetadata() const override;
38
39 private:
40 Ptr<IList<ITimestampedObjectMetadata>> m_track;
41 Ptr<IUncompressedVideoFrame> m_bestShotVideoFrame;
42 Ptr<ITimestampedObjectMetadata> m_bestShotObjectMetadata;
43
44 std::vector<char> m_bestShotImageData;
45 std::string m_bestShotImageDataFormat;
46
47 std::string m_titleText;
48 std::vector<char> m_titleImageData;
49 std::string m_titleImageDataFormat;
50 };
51
52 } // namespace nx::sdk::analytics
nx::sdk::Ptr
Definition: ptr.h:18
nx::sdk::analytics
Definition: consuming_device_agent.cpp:25
nx::sdk::analytics::ITimestampedObjectMetadata
Definition: i_timestamped_object_metadata.h:9
nx::sdk::analytics::ObjectTrackInfo
Definition: object_track_info.h:13
nx::sdk::analytics::IUncompressedVideoFrame
Definition: i_uncompressed_video_frame.h:70
nx::sdk::IList
Definition: i_list.h:10
nx::sdk::RefCountable
Definition: ref_countable.h:83