nx_metadata_sdk  1.0
Metadata SDK
Public Member Functions | Static Public Member Functions | List of all members
nx::sdk::archive::IStreamWriter Class Referenceabstract

#include <i_stream_writer.h>

Inheritance diagram for nx::sdk::archive::IStreamWriter:
nx::sdk::Interface< IStreamWriter > nx::sdk::IRefCountable

Public Member Functions

virtual ErrorCode putData (const nxcip::MediaDataPacket *packet)=0
 
virtual void close (int64_t durationMs)=0
 
- Public Member Functions inherited from nx::sdk::Interface< IStreamWriter >
virtual IRefCountablequeryInterface (const InterfaceId *id)
 
Ptr< InterfacequeryInterface ()
 
Ptr< const InterfacequeryInterface () const
 
- Public Member Functions inherited from nx::sdk::IRefCountable
virtual ~IRefCountable ()=default
 
template<class Interface >
Ptr< InterfacequeryInterface ()
 
template<class Interface >
Ptr< const InterfacequeryInterface () const
 
virtual int addRef () const =0
 
virtual int releaseRef () const =0
 
int refCountThreadUnsafe () const
 

Static Public Member Functions

static auto interfaceId ()
 
- Static Public Member Functions inherited from nx::sdk::IRefCountable
static auto interfaceId ()
 

Additional Inherited Members

- Protected Member Functions inherited from nx::sdk::Interface< IStreamWriter >
virtual IRefCountablequeryInterface (const IRefCountable::InterfaceId *id) override
 
IRefCountablequeryInterfaceSupportingDeprecatedId (const IRefCountable::InterfaceId *id, const Uuid &deprecatedInterfaceId)
 
- Static Protected Member Functions inherited from nx::sdk::IRefCountable
template<int len>
static constexpr const InterfaceIdmakeId (const char(&charArray)[len])
 
template<class TemplateInstance , class TemplateArg , int len>
static const InterfaceIdmakeIdForTemplate (const char(&baseIdCharArray)[len])
 

Detailed Description

When Mediaserver is finished with the current stream ~IStreamWriter() will be called. Implementation might do some finalization at this point.

Member Function Documentation

◆ close()

virtual void nx::sdk::archive::IStreamWriter::close ( int64_t  durationMs)
pure virtual

This function should be called just before destruction of the StreamWriter object and no other calls should follow.

◆ putData()

virtual ErrorCode nx::sdk::archive::IStreamWriter::putData ( const nxcip::MediaDataPacket *  packet)
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.


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