nx_cloud_storage_sdk
1.0
Cloud Storage SDK
|
#include <i_stream_writer.h>
Public Member Functions | |
virtual ErrorCode | putData (const IMediaDataPacket *packet)=0 |
virtual ErrorCode | close (int64_t durationMs)=0 |
virtual int | size () const =0 |
![]() | |
virtual IRefCountable * | queryInterface (const InterfaceId *id) |
Ptr< Interface > | queryInterface () |
Ptr< const Interface > | queryInterface () const |
![]() | |
virtual | ~IRefCountable ()=default |
template<class Interface > | |
Ptr< Interface > | queryInterface () |
template<class Interface > | |
Ptr< const Interface > | queryInterface () const |
virtual int | addRef () const =0 |
virtual int | releaseRef () const =0 |
int | refCountThreadUnsafe () const |
Static Public Member Functions | |
static auto | interfaceId () |
![]() | |
static auto | interfaceId () |
Additional Inherited Members | |
![]() | |
virtual IRefCountable * | queryInterface (const IRefCountable::InterfaceId *id) override |
IRefCountable * | queryInterfaceSupportingDeprecatedId (const IRefCountable::InterfaceId *id, const Uuid &deprecatedInterfaceId) |
![]() | |
template<int len> | |
static constexpr const InterfaceId * | makeId (const char(&charArray)[len]) |
template<class TemplateInstance , class TemplateArg , int len> | |
static const InterfaceId * | makeIdForTemplate (const char(&baseIdCharArray)[len]) |
Stream writer abstraction. Stream is a sequence of media data packets, which more or less represent continuous chunk of media and metadata for the given period of time. When Mediaserver is finished with the current stream ~IStreamWriter() will be called. Implementation might do some finalization at this point. Server will create a StreamWriter object for each chunk of media data. So the media stream, being continuous is still cut on the small chunks of data each of which has its timestamp and duration. Each of those chunks are recorded using Stream Writer and subsequently requested back using a corresponding StreamReader object.
|
pure virtual |
This function will be called just before destruction of the StreamWriter object and no other calls (except destructor) will follow.
Implemented in nx::vms_server_plugins::cloud_storage::stub::StreamWriter, and nx::vms_server_plugins::cloud_storage::sample::StreamWriter.
|
pure 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.
Implemented in nx::vms_server_plugins::cloud_storage::stub::StreamWriter, and nx::vms_server_plugins::cloud_storage::sample::StreamWriter.
|
pure virtual |
Total size of written data so far.
Implemented in nx::vms_server_plugins::cloud_storage::stub::StreamWriter, and nx::vms_server_plugins::cloud_storage::sample::StreamWriter.