Class RemoteRenderingClient

RemoteRenderingClient is an authorized connection to the Azure APIs for Remote Rendering.

It is the main entry point for users to use remote rendering. Use this to create RenderingSession instances.

class Microsoft::Azure::RemoteRendering::RemoteRenderingClient final

Methods

CreateNewRenderingSessionAsync

Creates a new rendering session.

This spins up a new server in the Azure cloud. Once ready, CreateSessionAsync returns the created RenderingSession object or an error context.

auto CreateNewRenderingSessionAsync(Microsoft::Azure::RemoteRendering::RenderingSessionCreationOptions options, std::function<void(Status, ApiHandle<Microsoft::Azure::RemoteRendering::CreateRenderingSessionResult>)> callback) -> void;

Parameters

Name Type Description
options RenderingSessionCreationOptions Session creation parameters
  • callback - The task result is of type CreateRenderingSessionResult which either holds a valid session reference or additional error context.

Returns

Type Description
void The task result is of type CreateRenderingSessionResult which either holds a valid session reference or additional error context.

CreateNewRenderingSessionUnsafeAsync

Internal.

auto CreateNewRenderingSessionUnsafeAsync(Microsoft::Azure::RemoteRendering::RenderingSessionCreationOptionsUnsafe options, std::function<void(Status, ApiHandle<Microsoft::Azure::RemoteRendering::CreateRenderingSessionResult>)> callback) -> void;

Parameters

Name Type Description
options RenderingSessionCreationOptionsUnsafe
  • callback

Returns

Type Description
void

Dispose

auto Dispose() noexcept -> Microsoft::Azure::RemoteRendering::Status;

GetAssetConversionStatusAsync

Queries the state of the current asset conversion.

Since the underlying call is a REST call, there should be sufficient delay (5-10s) between subsequent calls to avoid server throttling. In case of throttling, the function will fail and the HttpResponseCode reports code 429 ("too many requests").

A Result.InvalidParam error occurs if no conversionId is provided.

auto GetAssetConversionStatusAsync(std::string const& conversionId, std::function<void(Status, ApiHandle<Microsoft::Azure::RemoteRendering::AssetConversionStatusResult>)> callback) -> void;

Parameters

Name Type Description
conversionId string
  • callback - Task containing the conversion status or an error context. The returned async will complete in an arbitrary thread.

Returns

Type Description
void Task containing the conversion status or an error context. The returned async will complete in an arbitrary thread.

GetCurrentRenderingSessionsAsync

Queries for all existing rendering sessions for the account associated with this client.

Since the underlying call is a REST call, there should be sufficient delay (5-10s) between subsequent calls to avoid server throttling. In case of throttling, the function will fail and the HttpResponseCode reports code 429 ("too many requests"). The returned async will complete in an arbitrary thread.

auto GetCurrentRenderingSessionsAsync(std::function<void(Status, ApiHandle<Microsoft::Azure::RemoteRendering::RenderingSessionPropertiesArrayResult>)> callback) -> void;

Parameters

Name Type Description
  • callback - The returned async will complete in an arbitrary thread.

Returns

Type Description
void The returned async will complete in an arbitrary thread.

OpenRenderingSessionAsync

Opens an existing rendering session.

The session id can be created through RemoteRenderingClient.CreateNewRenderingSessionAsync(RenderingSessionCreationOptions), as well as through external tooling such as PowerShell.

auto OpenRenderingSessionAsync(std::string const& sessionId, std::function<void(Status, ApiHandle<Microsoft::Azure::RemoteRendering::CreateRenderingSessionResult>)> callback) -> void;

Parameters

Name Type Description
sessionId string The UUID of a rendering session.
  • callback - The task result is of type CreateRenderingSessionResult which either holds a valid session reference or additional error context.

Returns

Type Description
void The task result is of type CreateRenderingSessionResult which either holds a valid session reference or additional error context.

StartAssetConversionAsync

Starts converting an asset.

auto StartAssetConversionAsync(Microsoft::Azure::RemoteRendering::AssetConversionInputOptions inputLocation, Microsoft::Azure::RemoteRendering::AssetConversionOutputOptions outputLocation, std::function<void(Status, ApiHandle<Microsoft::Azure::RemoteRendering::AssetConversionResult>)> callback) -> void;

Parameters

Name Type Description
inputLocation AssetConversionInputOptions Where to find the asset.
outputLocation AssetConversionOutputOptions Where to place the converted asset.
  • callback - Task containing the asset token or an error context. The returned async will complete in an arbitrary thread.

Returns

Type Description
void Task containing the asset token or an error context. The returned async will complete in an arbitrary thread.

StartAssetConversionSasAsync

Starts converting an asset using SAS access to the input and output containers.

auto StartAssetConversionSasAsync(Microsoft::Azure::RemoteRendering::AssetConversionInputSasOptions inputLocation, Microsoft::Azure::RemoteRendering::AssetConversionOutputSasOptions outputLocation, std::function<void(Status, ApiHandle<Microsoft::Azure::RemoteRendering::AssetConversionResult>)> callback) -> void;

Parameters

Name Type Description
inputLocation AssetConversionInputSasOptions Where to find the asset.
outputLocation AssetConversionOutputSasOptions Where to place the converted asset.
  • callback - Task containing the asset token or an error context. The returned async will complete in an arbitrary thread.

Returns

Type Description
void Task containing the asset token or an error context. The returned async will complete in an arbitrary thread.

Properties

Configuration

Parameters with which this instance was initialized.

auto GetConfiguration() const noexcept -> Microsoft::Azure::RemoteRendering::SessionConfiguration;

LogLevel

Only messages at this log level or below will be delivered through RemoteRenderingClient.MessageLogged.

auto GetLogLevel() const noexcept -> Microsoft::Azure::RemoteRendering::LogLevel;
auto SetLogLevel(Microsoft::Azure::RemoteRendering::LogLevel value) noexcept -> Microsoft::Azure::RemoteRendering::Status;

Valid

Whether this object is still valid.

An object is invalid if it has been destroyed or if the connection has been lost. It is an error to call any other function on an invalid object.

auto GetValid() const noexcept -> bool;

Events

MessageLogged

Log messages are delivered through this callback.

auto MessageLogged(LogEventHandler const& handler) noexcept -> Expected<event_token, Microsoft::Azure::RemoteRendering::Status>;
auto MessageLogged(event_token& token) noexcept -> Microsoft::Azure::RemoteRendering::Status;

TokenRequired

Occurs when the client requires an updated access token or authentication token.

auto TokenRequired(TokenRequiredEventHandler const& handler) noexcept -> Expected<event_token, Microsoft::Azure::RemoteRendering::Status>;
auto TokenRequired(event_token& token) noexcept -> Microsoft::Azure::RemoteRendering::Status;