nx_server_plugin_sdk 1.0 Server Plugin SDK

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
nx::sdk::cloud_storage::IStreamReader Class Referenceabstract

`#include <i_stream_reader.h>`

Inheritance diagram for nx::sdk::cloud_storage::IStreamReader:

## Public Member Functions
virtual ErrorCode | getNextData (IMediaDataPacket **packet)=0
Result< const IString * > | opaqueMetadata () const
Ptr< const IList< ICodecInfo > > | codecInfoList () const
virtual int64_t | startTimeUs () const =0
virtual int64_t | endTimeUs () const =0
virtual ErrorCode | seek (int64_t timestampUs, bool findKeyFrame, int64_t *selectedPositionUs)=0
virtual int | size () const =0
Public Member Functions inherited from nx::sdk::Interface< IStreamReader >
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
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 ()

## Protected Member Functions
virtual void | getOpaqueMetadata (Result< const IString *> *outResult) const =0
virtual const IList< ICodecInfo > * | getCodecInfoList () const =0
Protected Member Functions inherited from nx::sdk::Interface< IStreamReader >
virtual IRefCountable * | queryInterface (const IRefCountable::InterfaceId *id) override
IRefCountable * | queryInterfaceSupportingDeprecatedId (const IRefCountable::InterfaceId *id, const Uuid &deprecatedInterfaceId)

## Additional Inherited Members
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)

## Detailed Description

Stream Reader for the media data chunk previously recorded by the Stream Writer.

## Member Function Documentation

## ◆ codecInfoList()

Ptr<const IList<ICodecInfo> > nx::sdk::cloud_storage::IStreamReader::codecInfoList | ( |  | ) | const
| inline

Returns codec info list that was provided to the plugin when a stream writer for the corresponding media data chunk was created.

## ◆ getNextData()

virtual ErrorCode nx::sdk::cloud_storage::IStreamReader::getNextData | ( | IMediaDataPacket ** | packet | ) |
| pure virtual

Attempts to read a next media data packet. Should return ErrorCode::noData if there is no data left to read.

Implemented in nx::vms_server_plugins::cloud_storage::stub::StreamReader, and nx::vms_server_plugins::cloud_storage::sample::StreamReader.

## ◆ opaqueMetadata()

Result<const IString*> nx::sdk::cloud_storage::IStreamReader::opaqueMetadata | ( |  | ) | const
| inline

Returns opaque metadata that was provided to the plugin when a stream writer for the corresponding media data chunk was created.

## ◆ seek()

virtual ErrorCode nx::sdk::cloud_storage::IStreamReader::seek | ( | int64_t | timestampUs,
|  | bool | findKeyFrame,
|  | int64_t * | selectedPositionUs
| ) |  |
| pure virtual

Moves stream data cursor to the required position if possible. This position may be greater than requested if there is no media data packet with the exact timestamp. If 'findKeyFrame' is true, selected position should correspond to the media data packet which has 'isKeyFrame' flag set.

Implemented in nx::vms_server_plugins::cloud_storage::stub::StreamReader, and nx::vms_server_plugins::cloud_storage::sample::StreamReader.

## ◆ size()

virtual int nx::sdk::cloud_storage::IStreamReader::size | ( |  | ) | const
| pure virtual

Current media data chunk size. Should return -1 in case of error or if it is unknown.

Implemented in nx::vms_server_plugins::cloud_storage::stub::StreamReader.

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

- src/nx/sdk/cloud_storage/i_stream_reader.h