nx_server_plugin_sdk 1.0 Server Plugin SDK

Public Member Functions | List of all members
nx::vms_server_plugins::cloud_storage::sample::StreamWriter Class Reference
Inheritance diagram for nx::vms_server_plugins::cloud_storage::sample::StreamWriter:

## Public Member Functions
| StreamWriter (const std::string &deviceId, int streamIndex, int64_t startTimeMs, const nx::sdk::IList< nx::sdk::cloud_storage::ICodecInfo > *codecList, const char *opaqueMetadata)
virtual nx::sdk::ErrorCode | putData (const nx::sdk::cloud_storage::IMediaDataPacket *packet) override
virtual nx::sdk::ErrorCode | close (int64_t durationMs) override
virtual int | size () const override
virtual const char * | locationUrl () const override
Public Member Functions inherited from nx::sdk::RefCountable< nx::sdk::cloud_storage::IStreamWriter >
| RefCountable (const RefCountable &)=delete
| RefCountable (RefCountable &&)=delete
RefCountable & | operator= (const RefCountable &)=delete
RefCountable & | operator= (RefCountable &&)=delete
virtual int | addRef () const override
virtual int | releaseRef () const override
int | refCount () const
Public Member Functions inherited from nx::sdk::Interface< IStreamWriter >
virtual IRefCountable * | queryInterface (const InterfaceId *id)
Ptr< Interface > | queryInterface ()
Ptr< const Interface > | queryInterface () const
Public Member Functions inherited from nx::sdk::IRefCountable
virtual | ~IRefCountable ()=default
template<class Interface >
Ptr< Interface > | queryInterface ()
template<class Interface >
Ptr< const Interface > | queryInterface () const
int | refCountThreadUnsafe () const

## Additional Inherited Members
Static Public Member Functions inherited from nx::sdk::cloud_storage::IStreamWriter
static auto | interfaceId ()
Static Public Member Functions inherited from nx::sdk::IRefCountable
static auto | interfaceId ()
Protected Member Functions inherited from nx::sdk::Interface< IStreamWriter >
virtual IRefCountable * | queryInterface (const IRefCountable::InterfaceId *id) override
IRefCountable * | queryInterfaceSupportingDeprecatedId (const IRefCountable::InterfaceId *id, const Uuid &deprecatedInterfaceId)
Static Protected Member Functions inherited from nx::sdk::IRefCountable
template<int len>
static const InterfaceId * | makeId (const char(&charArray)[len])
template<int len, int alternativeLen>
static std::vector< const InterfaceId * > | makeIdWithAlternative (const char(&charArray)[len], const char(&alternativeCharArray)[alternativeLen])
template<class TemplateInstance , class TemplateArg , int len>
static const InterfaceId * | makeIdForTemplate (const char(&baseIdCharArray)[len])
static std::vector< const InterfaceId * > | alternativeInterfaceIds (const InterfaceId *id)
static std::vector< const InterfaceId * > | alternativeInterfaceIds (std::vector< const InterfaceId *> ids)

## Member Function Documentation

## ◆ close()

nx::sdk::ErrorCode nx::vms_server_plugins::cloud_storage::sample::StreamWriter::close | ( | int64_t | durationMs | ) |
| override virtual

This function will be called just before destruction of the StreamWriter object and no other calls (except destructor) will follow.

Implements nx::sdk::cloud_storage::IStreamWriter.

## ◆ locationUrl()

const char * nx::vms_server_plugins::cloud_storage::sample::StreamWriter::locationUrl | ( |  | ) | const
| override virtual

Returns last location of where data has been written. It's not location of an individual media chunk, but general physical storage location. This url should be passed later to the DeviceAgent::createStreamReader when requesting this media chunk for reading later.

Implements nx::sdk::cloud_storage::IStreamWriter.

## ◆ putData()

nx::sdk::ErrorCode nx::vms_server_plugins::cloud_storage::sample::StreamWriter::putData | ( | const nx::sdk::cloud_storage::IMediaDataPacket * | packet | ) |
| override virtual

Write a data packet. Implementation is discouraged to buffer packets. Instead, it should block until the data is completely processed.

packet->channelNumber() corresponds to ICodecInfo::channelNumber() i.e. if packet->type() == dptVideo && packet->channelNumber() == 1, then CodecInfo with mediaType == AVMEDIA_TYPE_VIDEO && channelNumber == 1 can be used to process this packet.

If packet->type() == dptAudio && packet->channelNumber() == 0, then CodecInfo with mediaType == AVMEDIA_TYPE_AUDIO && channelNumber == 0 can be used to process this packet.

If packet->type() == dptData && packet->channelNumber() == 0, then CodecInfo with mediaType == AVMEDIA_TYPE_DATA && channelNumber == 0 can be used to process this packet.

Implements nx::sdk::cloud_storage::IStreamWriter.

## ◆ size()

int nx::vms_server_plugins::cloud_storage::sample::StreamWriter::size | ( |  | ) | const
| override virtual

Total size of written data so far.

Implements nx::sdk::cloud_storage::IStreamWriter.

The documentation for this class was generated from the following files:

- samples/cloud_storage/sample_cloud_storage_plugin/src/nx/vms_server_plugins/cloud_storage/sample/stream_writer.h
- samples/cloud_storage/sample_cloud_storage_plugin/src/nx/vms_server_plugins/cloud_storage/sample/stream_writer.cpp