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 <stdint.h>
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, IDataPacket0>
20 {
21 public:
22 static auto interfaceId() { return makeId("nx::sdk::analytics::ICompressedMediaPacket"); }
23
35 virtual const char* codec() const = 0;
36
40 virtual const char* data() const = 0;
41
45 virtual int dataSize() const = 0;
46
48 protected: virtual const IMediaContext* getContext() const = 0;
52 public: Ptr<const IMediaContext> context() const { return toPtr(getContext()); }
53
54 enum class MediaFlags: uint32_t
55 {
56 none = 0,
57 keyFrame = 1 << 0,
58 all = UINT32_MAX
59 };
60
64 virtual MediaFlags flags() const = 0;
65 };
66 using ICompressedMediaPacket0 = ICompressedMediaPacket;
67
68 } // namespace analytics
69 } // namespace sdk
70 } // namespace nx
nx::sdk::analytics::ICompressedMediaPacket::codec
virtual const char * codec() const =0
nx::sdk::Interface
Definition: interface.h:49
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::sdk::analytics::ICompressedMediaPacket::context
Ptr< const IMediaContext > context() const
Definition: i_compressed_media_packet.h:52
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