Click or drag to resize
FrameEncoders Class

Defines a pair of encoders that are used to encode still and interactive frames.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.RemoteViz.RenderingFrameEncoders

Namespace: OIV.RemoteViz.Rendering
Assembly: OIV.RemoteViz (in OIV.RemoteViz.dll) Version: 2023.1.3.0 (2023.1.3)
Syntax
public class FrameEncoders : SoNetBase

The FrameEncoders type exposes the following members.

Constructors
  NameDescription
Public methodFrameEncoders

Constructor.

Top
Methods
  NameDescription
Public methodCopyFrom

Copy assignment operator.

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyInteractiveEncoder

Sets the interactive encoder.

Public propertyInteractiveEncoderStatus

Gets the interactive encoder status.

Public propertyStillEncoder

Sets the still encoder.

Public propertyStillEncoderStatus

Gets the still encoder status.

Top
Remarks

Default value for both still and interactive is NONE when a OIV.RemoteViz.Rendering.FrameEncoders object is created. But when a client connects to the service, RemoteViz will set PNG for still frames and JPEG for interactive frames. Frames are considered "interactive" when the user is interacting with the scene, for example dragging the mouse to move the camera. In this case it may be acceptable to use (for example) lossy JPEG encoding to maximize performance, then switch to loss-less PNG encoding for the "still" frame when the user interaction is finished.

Video encoding (H.264 or VP9) generally provides better performance (frames per second) than image encoding (JPEG and PNG). However this depends on many factors. Video encoded frames usually require less bandwidth, but the encoding of each frame can take more time. See the hardware and software dependencies for each encoder below.

A OIV.RemoteViz.Rendering.FrameEncoders object is passed to the OIV.RemoteViz.Rendering.RenderAreaListener methods onOpenedConnection(), onInitializedConnection() and onRefusedEncoder().

  • In the onOpenedConnection() method, use the OIV.RemoteViz.Rendering.FrameEncoders object to request non-default encoders. Use the OIV.RemoteViz.Rendering.ConnectionSettings.IsSupportedEncoders(OIV.RemoteViz.Rendering.FrameEncoders) method to query if the proposed encoders are available.

  • onRefusedEncoder() will be called if one of the encoders is not supported in the current environment or the combination of encoders is not supported. Use the OIV.RemoteViz.Rendering.FrameEncoders object to determine which encoder is invalid (see () and ()), then set new encoders. onRefusedEncoder() will be called again if the requested encoders are not valid.

  • In the onInitializedConnection() method, use the OIV.RemoteViz.Rendering.FrameEncoders object to query which encoders will actually be used.

The current frame encoders can also be queried using ().

See also OIV.RemoteViz.Rendering.ConnectionSettings.SetFrameEncodingPolicy(OIV.RemoteViz.Rendering.IFrameEncodingPolicy).

See the examples HelloConeH264 and HelloConeVP9.

Limitations:

  • Currently it is not possible to "mix" video and image encoding. In other words, the interactive and still encoders must be both video encoders (H264, VP9, ...) or both image encoders (JPEG, PNG, ...).

  • Currently, when using video encoding, the interactive and still encoders must be the same, e.g. both H264_NVENC.

See Also