nx_server_plugin_sdk 1.0 Server Plugin SDK

Public Member Functions | Protected Member Functions | List of all members
nx::vms_server_plugins::cloud_storage::stub::StreamReader Class Reference
Inheritance diagram for nx::vms_server_plugins::cloud_storage::stub::StreamReader:

## Public Member Functions
| StreamReader (const std::shared_ptr< DataManager > &dataManager, const std::string &bucketUrl, const std::string &deviceId, int streamIndex, int64_t startTimeMs, int64_t durationMs)
virtual nx::sdk::ErrorCode | getNextData (nx::sdk::cloud_storage::IMediaDataPacket **packet) override
virtual int64_t | startTimeUs () const override
virtual int64_t | endTimeUs () const override
virtual nx::sdk::ErrorCode | seek (int64_t timestampUs, bool findKeyFrame, int64_t *selectedPositionUs) override
virtual int | size () const override
Public Member Functions inherited from nx::sdk::RefCountable< nx::sdk::cloud_storage::IStreamReader >
| 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::cloud_storage::IStreamReader
Result< const IString * > | opaqueMetadata () const
Ptr< const IList< ICodecInfo > > | codecInfoList () const
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
int | refCountThreadUnsafe () const

## Protected Member Functions
virtual void | getOpaqueMetadata (nx::sdk::Result< const nx::sdk::IString *> *outResult) const override
virtual const nx::sdk::IList< nx::sdk::cloud_storage::ICodecInfo > * | getCodecInfoList () const override
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 Public Member Functions inherited from nx::sdk::cloud_storage::IStreamReader
static auto | interfaceId ()
Static Public Member Functions inherited from nx::sdk::IRefCountable
static auto | interfaceId ()
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

## ◆ getNextData()

nx::sdk::ErrorCode StreamReader::getNextData | ( | nx::sdk::cloud_storage::IMediaDataPacket ** | packet | ) |
| overridevirtual

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

Implements nx::sdk::cloud_storage::IStreamReader.

## ◆ seek()

nx::sdk::ErrorCode StreamReader::seek | ( | int64_t | timestampUs,
|  | bool | findKeyFrame,
|  | int64_t * | selectedPositionUs
| ) |  |
| overridevirtual

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.

Implements nx::sdk::cloud_storage::IStreamReader.

## ◆ size()

int StreamReader::size | ( |  | ) | const
| overridevirtual

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

Implements nx::sdk::cloud_storage::IStreamReader.

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

- samples/cloud_storage/stub_cloud_storage_plugin/src/nx/vms_server_plugins/cloud_storage/stub/stream_reader.h
- samples/cloud_storage/stub_cloud_storage_plugin/src/nx/vms_server_plugins/cloud_storage/stub/stream_reader.cpp