nx_metadata_sdk 1.0 Metadata SDK

i_compressed_media_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 <cstdint>
6
7 #include <nx/sdk/interface.h>
8
9 #include "i_data_packet.h"
10 #include "i_media_context.h"
11
12 namespace nx {
13 namespace sdk {
14 namespace analytics {
15
19 class ICompressedMediaPacket: public Interface<ICompressedMediaPacket, IDataPacket>
20 {
21 public:
22 static auto interfaceId() { return makeId("nx::sdk::analytics::ICompressedMediaPacket"); }
23
28 virtual const char* codec() const = 0;
29
33 virtual const char* data() const = 0;
34
38 virtual int dataSize() const = 0;
39
43 protected: virtual const IMediaContext* getContext() const = 0;
44 public: Ptr<const IMediaContext> context() const { return toPtr(getContext()); }
45
46 enum class MediaFlags: uint32_t
47 {
48 none = 0,
49 keyFrame = 1 << 0,
50 all = UINT32_MAX
51 };
52
56 virtual MediaFlags flags() const = 0;
57 };
58
59 } // namespace analytics
60 } // namespace sdk
61 } // namespace nx
nx::sdk::analytics::ICompressedMediaPacket::codec
virtual const char * codec() const =0
nx::sdk::Interface
Definition: interface.h:28
nx::sdk::analytics::IMediaContext
Definition: i_media_context.h:14
nx::sdk::Ptr
Definition: ptr.h:18
nx::sdk::analytics::ICompressedMediaPacket
Definition: i_compressed_media_packet.h:19
nx::sdk::analytics::ICompressedMediaPacket::flags
virtual MediaFlags flags() const =0
nx
Definition: apple_utils.h:6
nx::sdk::analytics::ICompressedMediaPacket::getContext
virtual const IMediaContext * getContext() const =0
nx::sdk::analytics::ICompressedMediaPacket::dataSize
virtual int dataSize() const =0
nx::sdk::analytics::ICompressedMediaPacket::data
virtual const char * data() const =0