nx_server_plugin_sdk 1.0 Server Plugin SDK

media_data_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 <camera/camera_plugin.h>
6 #include <nx/sdk/cloud_storage/i_media_data_packet.h>
7 #include <nx/sdk/helpers/ref_countable.h>
8
9 namespace nx::sdk::cloud_storage {
10
11 struct MediaPacketData;
12
13 class MediaDataPacket: public nx::sdk::RefCountable<IMediaDataPacket>
14 {
15 public:
16 MediaDataPacket(const MediaPacketData& d);
17 virtual ~MediaDataPacket() override;
18 virtual int64_t timestampUs() const override;
19 virtual Type type() const override;
20 virtual const void* data() const override;
21 virtual unsigned int dataSize() const override;
22 virtual unsigned int channelNumber() const override;
23 virtual nxcip::CompressionType codecType() const override;
24 virtual bool isKeyFrame() const override;
25 virtual const void* encryptionData() const override;
26 virtual int encryptionDataSize() const override;
27
28 private:
29 std::unique_ptr<MediaPacketData> m_d;
30 };
31
32 } // namespace nx::sdk::cloud_storage
nx::sdk::cloud_storage::MediaPacketData
Definition: data.h:866
nx::sdk::cloud_storage
Definition: algorithm.cpp:9
nx::sdk::cloud_storage::MediaDataPacket
Definition: media_data_packet.h:13
nx::sdk::RefCountable
Definition: ref_countable.h:83