nx_server_plugin_sdk 1.0 Server Plugin SDK

stream_writer.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 <nx/sdk/cloud_storage/i_codec_info.h>
6 #include <nx/sdk/cloud_storage/i_stream_writer.h>
7 #include <nx/sdk/helpers/ref_countable.h>
8 #include <nx/sdk/i_list.h>
9 #include <nx/sdk/result.h>
10
11 namespace nx::vms_server_plugins::cloud_storage::sample {
12
13 class StreamWriter: public nx::sdk::RefCountable<nx::sdk::cloud_storage::IStreamWriter>
14 {
15 public:
16 StreamWriter(
17 const std::string& deviceId,
18 int streamIndex,
19 int64_t startTimeMs,
20 const nx::sdk::IList<nx::sdk::cloud_storage::ICodecInfo>* codecList,
21 const char* opaqueMetadata);
22
23 virtual nx::sdk::ErrorCode putData(
24 const nx::sdk::cloud_storage::IMediaDataPacket* packet) override;
25
26 virtual nx::sdk::ErrorCode close(int64_t durationMs) override;
27 virtual int size() const override;
28 virtual const char* locationUrl() const override;
29 };
30
31 } // namespace nx::vms_server_plugins::cloud_storage::stub
nx::vms_server_plugins::cloud_storage::sample::StreamWriter::locationUrl
virtual const char * locationUrl() const override
Definition: stream_writer.cpp:35
nx::sdk::cloud_storage::IMediaDataPacket
Definition: i_media_data_packet.h:17
nx::vms_server_plugins::cloud_storage::sample::StreamWriter
Definition: stream_writer.h:13
nx::vms_server_plugins::cloud_storage::sample::StreamWriter::putData
virtual nx::sdk::ErrorCode putData(const nx::sdk::cloud_storage::IMediaDataPacket *packet) override
Definition: stream_writer.cpp:20
nx::vms_server_plugins::cloud_storage::sample
Definition: device_agent.cpp:13
nx::vms_server_plugins::cloud_storage::sample::StreamWriter::close
virtual nx::sdk::ErrorCode close(int64_t durationMs) override
Definition: stream_writer.cpp:25
nx::vms_server_plugins::cloud_storage::sample::StreamWriter::size
virtual int size() const override
Definition: stream_writer.cpp:30
nx::sdk::IList< nx::sdk::cloud_storage::ICodecInfo >
nx::sdk::RefCountable
Definition: ref_countable.h:83