Click or drag to resize
RenderAreaListenerOnOpenedConnection Method

Triggered when a client connects to the OIV.RemoteViz.Rendering.RenderArea.

Namespace: OIV.RemoteViz.Rendering
Assembly: OIV.RemoteViz (in OIV.RemoteViz.dll) Version: 2024.2.0.0 (2024.2.0)
Syntax
public virtual void OnOpenedConnection(
	RenderArea renderArea,
	Connection connection,
	FrameEncoders frameEncoders
)

Parameters

renderArea
Type: OIV.RemoteViz.RenderingRenderArea

: the OIV.RemoteViz.Rendering.RenderArea requested by the connection

connection
Type: OIV.RemoteViz.RenderingConnection

: the OIV.RemoteViz.Rendering.Connection

frameEncoders
Type: OIV.RemoteViz.RenderingFrameEncoders

: frame encoders for interactive and still frames Supported pairs of frame encoders (still/interactive): JPEG/JPEG, PNG/JPEG, H264_NVENC/H264_NVENC, H264_OPENH264/H264_OPENH264, VP9_VPX/VP9_VPX Default behavior: PNG/JPEG.

Remarks

Use this method to set the encoding format for images sent to the client, using the frameEncoders parameter. The default is JPEG for interactive frames (i.e. while the user is interacting) and PNG for still frames. Video encoding (H264 or VP9) may provide better performance by reducing bandwidth requirements. Use the OIV.RemoteViz.Rendering.ConnectionSettings.IsSupportedEncoders(OIV.RemoteViz.Rendering.FrameEncoders) method to query if the proposed encoders are available. If a requested frame encoder cannot be initialized, OIV.RemoteViz.Rendering.RenderAreaListener.OnRefusedEncoder(OIV.RemoteViz.Rendering.RenderArea, OIV.RemoteViz.Rendering.Connection, OIV.RemoteViz.Rendering.FrameEncoders) will be triggered. Otherwise, OIV.RemoteViz.Rendering.RenderAreaListener.OnInitializedConnection(OIV.RemoteViz.Rendering.RenderArea, OIV.RemoteViz.Rendering.Connection, OIV.RemoteViz.Rendering.FrameEncoders) will be triggered.

See Also