nx_metadata_sdk 1.0 Metadata SDK

object_metadata_packet.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/helpers/ref_countable.h>
8 #include <nx/sdk/ptr.h>
9 #include <nx/sdk/analytics/i_object_metadata_packet.h>
10
11 namespace nx {
12 namespace sdk {
13 namespace analytics {
14
15 class ObjectMetadataPacket: public RefCountable<IObjectMetadataPacket>
16 {
17 public:
18 virtual int64_t timestampUs() const override;
19 virtual int64_t durationUs() const override;
20 virtual int count() const override;
21
22 void setTimestampUs(int64_t timestampUs);
23 void setDurationUs(int64_t durationUs);
24 void addItem(const IObjectMetadata* object);
25 void clear();
26
27 protected:
28 virtual const IObjectMetadata* getAt(int index) const override;
29
30 private:
31 int64_t m_timestampUs = -1;
32 int64_t m_durationUs = -1;
33
34 std::vector<Ptr<const IObjectMetadata>> m_objects;
35 };
36
37 } // namespace analytics
38 } // namespace sdk
39 } // namespace nx
nx::sdk::analytics::IObjectMetadata
Definition: i_object_metadata.h:18
nx
Definition: apple_utils.h:6
nx::sdk::RefCountable
Definition: ref_countable.h:84
nx::sdk::analytics::ObjectMetadataPacket
Definition: object_metadata_packet.h:15