nx_server_plugin_sdk 1.0 Server Plugin 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::sdk::analytics {
13
17 class ICompressedMediaPacket: public Interface<ICompressedMediaPacket, IDataPacket0>
18 {
19 public:
20 static auto interfaceId() { return makeId("nx::sdk::analytics::ICompressedMediaPacket"); }
21
33 virtual const char* codec() const = 0;
34
38 virtual const char* data() const = 0;
39
43 virtual int dataSize() const = 0;
44
46 protected: virtual const IMediaContext* getContext() const = 0;
50 public: Ptr<const IMediaContext> context() const { return Ptr(getContext()); }
51
52 enum class MediaFlags: uint32_t
53 {
54 none = 0,
55 keyFrame = 1 << 0,
56 all = UINT32_MAX
57 };
58
62 virtual MediaFlags flags() const = 0;
63 };
64 using ICompressedMediaPacket0 = ICompressedMediaPacket;
65
66 } // namespace nx::sdk::analytics
nx::sdk::analytics::ICompressedMediaPacket::codec
virtual const char * codec() const =0
nx::sdk::Interface
Definition: interface.h:48
nx::sdk::analytics::IMediaContext
Definition: i_media_context.h:12
nx::sdk::Ptr
Definition: ptr.h:18
nx::sdk::analytics::ICompressedMediaPacket
Definition: i_compressed_media_packet.h:17
nx::sdk::analytics
Definition: consuming_device_agent.cpp:25
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:50
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