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::IDeviceAgent Class Referenceabstract

`#include <i_device_agent.h>`

Inheritance diagram for nx::sdk::cloud_storage::IDeviceAgent:

## Public Member Functions
virtual Result< const IDeviceInfo * > | deviceInfo () const
Result< IStreamWriter * > | createStreamWriter (nxcip::MediaStreamQuality quality, int64_t startTimeMs, const IList< ICodecInfo > *codecInfoList, const char *opaqueMetadata)
Result< IStreamReader * > | createStreamReader (const char *bucketUrl, nxcip::MediaStreamQuality quality, int64_t startTimeMs, int64_t durationMs)
Public Member Functions inherited from nx::sdk::Interface< IDeviceAgent >
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 | getDeviceInfo (Result< const IDeviceInfo *> *outResult) const =0
virtual void | doCreateStreamWriter (nxcip::MediaStreamQuality quality, int64_t startTimeUs, const IList< ICodecInfo > *codecInfoList, const char *opaqueMetadata, Result< IStreamWriter *> *outResult)=0
virtual void | doCreateStreamReader (const char *locationUrl, nxcip::MediaStreamQuality quality, int64_t startTimeUs, int64_t durationUs, Result< IStreamReader *> *outResult)=0
Protected Member Functions inherited from nx::sdk::Interface< IDeviceAgent >
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

An abstraction of the device agent. Used for obtaining of the stream writer and archive reader objects in the context of the given device.

## Member Function Documentation

## ◆ createStreamReader()

Result<IStreamReader*> nx::sdk::cloud_storage::IDeviceAgent::createStreamReader | ( | const char * | bucketUrl,
|  | nxcip::MediaStreamQuality | quality,
|  | int64_t | startTimeMs,
|  | int64_t | durationMs
| ) |  |
| inline

Creates a StreamWriter object.

Parameters

  codecInfoList | Codec description list, one per stream.
  opaqueMetadata | Arbitrary null terminated string that should be returned unchanged by StreamReader::opaqueMetadata() for the corresponding chunk of media data.

## ◆ createStreamWriter()

Result<IStreamWriter*> nx::sdk::cloud_storage::IDeviceAgent::createStreamWriter | ( | nxcip::MediaStreamQuality | quality,
|  | int64_t | startTimeMs,
|  | const IList< ICodecInfo > * | codecInfoList,
|  | const char * | opaqueMetadata
| ) |  |
| inline

Obtain a StreamWriter object. It is used for media stream (a sequence of media packets) recording. Media stream may consist of several substreams (audio, video, metadata). Each of substream is described via codec info object. Those stream attributes should be stored by the plugin and returned back via the corresponding StreamReader object for the given chunk of media data.

Parameters

  codecInfoList | Codec description list, one per substream.
  opaqueMetadata | Arbitrary null terminated string that should be returned unchanged by StreamReader::opaqueMetadata() for the corresponding chunk of media data.

## ◆ getDeviceInfo()

virtual void nx::sdk::cloud_storage::IDeviceAgent::getDeviceInfo | ( | Result< const IDeviceInfo *> * | outResult | ) | const
| protectedpure virtual

Provides device description

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

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

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