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 Flags flags() const override;
19 virtual int64_t timestampUs() const override;
20 virtual int64_t durationUs() const override;
21 virtual int count() const override;
22
23 void setFlags(Flags flags);
24 void setTimestampUs(int64_t timestampUs);
25 void setDurationUs(int64_t durationUs);
26 void addItem(const IObjectMetadata* object);
27 void clear();
28
29 protected:
30 virtual const IObjectMetadata* getAt(int index) const override;
31
32 private:
33 Flags m_flags = Flags::none;
34 int64_t m_timestampUs = -1;
35 int64_t m_durationUs = -1;
36
37 std::vector<Ptr<const IObjectMetadata>> m_objects;
38 };
39
40 } // namespace analytics
41 } // namespace sdk
42 } // 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